@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface RbinAsyncClient extends SdkClient
builder() method.
This is the Recycle Bin API Reference. This documentation provides descriptions and syntax for each of the actions and data types in Recycle Bin.
Recycle Bin is a resource recovery feature that enables you to restore accidentally deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are deleted, they are retained in the Recycle Bin for a time period that you specify.
You can restore a resource from the Recycle Bin at any time before its retention period expires. After you restore a resource from the Recycle Bin, the resource is removed from the Recycle Bin, and you can then use it in the same way you use any other resource of that type in your account. If the retention period expires and the resource is not restored, the resource is permanently deleted from the Recycle Bin and is no longer available for recovery. For more information about Recycle Bin, see Recycle Bin in the Amazon Elastic Compute Cloud User Guide.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static RbinAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
RbinAsyncClient. |
static RbinAsyncClient |
create()
Create a
RbinAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<CreateRuleResponse> |
createRule(Consumer<CreateRuleRequest.Builder> createRuleRequest)
Creates a Recycle Bin retention rule.
|
default CompletableFuture<CreateRuleResponse> |
createRule(CreateRuleRequest createRuleRequest)
Creates a Recycle Bin retention rule.
|
default CompletableFuture<DeleteRuleResponse> |
deleteRule(Consumer<DeleteRuleRequest.Builder> deleteRuleRequest)
Deletes a Recycle Bin retention rule.
|
default CompletableFuture<DeleteRuleResponse> |
deleteRule(DeleteRuleRequest deleteRuleRequest)
Deletes a Recycle Bin retention rule.
|
default CompletableFuture<GetRuleResponse> |
getRule(Consumer<GetRuleRequest.Builder> getRuleRequest)
Gets information about a Recycle Bin retention rule.
|
default CompletableFuture<GetRuleResponse> |
getRule(GetRuleRequest getRuleRequest)
Gets information about a Recycle Bin retention rule.
|
default CompletableFuture<ListRulesResponse> |
listRules(Consumer<ListRulesRequest.Builder> listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
|
default CompletableFuture<ListRulesResponse> |
listRules(ListRulesRequest listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
|
default ListRulesPublisher |
listRulesPaginator(Consumer<ListRulesRequest.Builder> listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
|
default ListRulesPublisher |
listRulesPaginator(ListRulesRequest listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Lists the tags assigned to a retention rule.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists the tags assigned to a retention rule.
|
default CompletableFuture<LockRuleResponse> |
lockRule(Consumer<LockRuleRequest.Builder> lockRuleRequest)
Locks a retention rule.
|
default CompletableFuture<LockRuleResponse> |
lockRule(LockRuleRequest lockRuleRequest)
Locks a retention rule.
|
default CompletableFuture<TagResourceResponse> |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Assigns tags to the specified retention rule.
|
default CompletableFuture<TagResourceResponse> |
tagResource(TagResourceRequest tagResourceRequest)
Assigns tags to the specified retention rule.
|
default CompletableFuture<UnlockRuleResponse> |
unlockRule(Consumer<UnlockRuleRequest.Builder> unlockRuleRequest)
Unlocks a retention rule.
|
default CompletableFuture<UnlockRuleResponse> |
unlockRule(UnlockRuleRequest unlockRuleRequest)
Unlocks a retention rule.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Unassigns a tag from a retention rule.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(UntagResourceRequest untagResourceRequest)
Unassigns a tag from a retention rule.
|
default CompletableFuture<UpdateRuleResponse> |
updateRule(Consumer<UpdateRuleRequest.Builder> updateRuleRequest)
Updates an existing Recycle Bin retention rule.
|
default CompletableFuture<UpdateRuleResponse> |
updateRule(UpdateRuleRequest updateRuleRequest)
Updates an existing Recycle Bin retention rule.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CompletableFuture<CreateRuleResponse> createRule(CreateRuleRequest createRuleRequest)
Creates a Recycle Bin retention rule. For more information, see Create Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
createRuleRequest - default CompletableFuture<CreateRuleResponse> createRule(Consumer<CreateRuleRequest.Builder> createRuleRequest)
Creates a Recycle Bin retention rule. For more information, see Create Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
This is a convenience which creates an instance of the CreateRuleRequest.Builder avoiding the need to
create one manually via CreateRuleRequest.builder()
createRuleRequest - A Consumer that will call methods on CreateRuleRequest.Builder to create a request.default CompletableFuture<DeleteRuleResponse> deleteRule(DeleteRuleRequest deleteRuleRequest)
Deletes a Recycle Bin retention rule. For more information, see Delete Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
deleteRuleRequest - default CompletableFuture<DeleteRuleResponse> deleteRule(Consumer<DeleteRuleRequest.Builder> deleteRuleRequest)
Deletes a Recycle Bin retention rule. For more information, see Delete Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
This is a convenience which creates an instance of the DeleteRuleRequest.Builder avoiding the need to
create one manually via DeleteRuleRequest.builder()
deleteRuleRequest - A Consumer that will call methods on DeleteRuleRequest.Builder to create a request.default CompletableFuture<GetRuleResponse> getRule(GetRuleRequest getRuleRequest)
Gets information about a Recycle Bin retention rule.
getRuleRequest - default CompletableFuture<GetRuleResponse> getRule(Consumer<GetRuleRequest.Builder> getRuleRequest)
Gets information about a Recycle Bin retention rule.
This is a convenience which creates an instance of the GetRuleRequest.Builder avoiding the need to create
one manually via GetRuleRequest.builder()
getRuleRequest - A Consumer that will call methods on GetRuleRequest.Builder to create a request.default CompletableFuture<ListRulesResponse> listRules(ListRulesRequest listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
listRulesRequest - default CompletableFuture<ListRulesResponse> listRules(Consumer<ListRulesRequest.Builder> listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
This is a convenience which creates an instance of the ListRulesRequest.Builder avoiding the need to
create one manually via ListRulesRequest.builder()
listRulesRequest - A Consumer that will call methods on ListRulesRequest.Builder to create a request.default ListRulesPublisher listRulesPaginator(ListRulesRequest listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
This is a variant of listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.rbin.paginators.ListRulesPublisher publisher = client.listRulesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.rbin.paginators.ListRulesPublisher publisher = client.listRulesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.rbin.model.ListRulesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.rbin.model.ListRulesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest) operation.
listRulesRequest - default ListRulesPublisher listRulesPaginator(Consumer<ListRulesRequest.Builder> listRulesRequest)
Lists the Recycle Bin retention rules in the Region.
This is a variant of listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.rbin.paginators.ListRulesPublisher publisher = client.listRulesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.rbin.paginators.ListRulesPublisher publisher = client.listRulesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.rbin.model.ListRulesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.rbin.model.ListRulesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest) operation.
This is a convenience which creates an instance of the ListRulesRequest.Builder avoiding the need to
create one manually via ListRulesRequest.builder()
listRulesRequest - A Consumer that will call methods on ListRulesRequest.Builder to create a request.default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists the tags assigned to a retention rule.
listTagsForResourceRequest - default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Lists the tags assigned to a retention rule.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a
request.default CompletableFuture<LockRuleResponse> lockRule(LockRuleRequest lockRuleRequest)
Locks a retention rule. A locked retention rule can't be modified or deleted.
lockRuleRequest - default CompletableFuture<LockRuleResponse> lockRule(Consumer<LockRuleRequest.Builder> lockRuleRequest)
Locks a retention rule. A locked retention rule can't be modified or deleted.
This is a convenience which creates an instance of the LockRuleRequest.Builder avoiding the need to
create one manually via LockRuleRequest.builder()
lockRuleRequest - A Consumer that will call methods on LockRuleRequest.Builder to create a request.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)
Assigns tags to the specified retention rule.
tagResourceRequest - default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Assigns tags to the specified retention rule.
This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.default CompletableFuture<UnlockRuleResponse> unlockRule(UnlockRuleRequest unlockRuleRequest)
Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted only after the unlock delay period expires.
unlockRuleRequest - default CompletableFuture<UnlockRuleResponse> unlockRule(Consumer<UnlockRuleRequest.Builder> unlockRuleRequest)
Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted only after the unlock delay period expires.
This is a convenience which creates an instance of the UnlockRuleRequest.Builder avoiding the need to
create one manually via UnlockRuleRequest.builder()
unlockRuleRequest - A Consumer that will call methods on UnlockRuleRequest.Builder to create a request.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)
Unassigns a tag from a retention rule.
untagResourceRequest - default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Unassigns a tag from a retention rule.
This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.default CompletableFuture<UpdateRuleResponse> updateRule(UpdateRuleRequest updateRuleRequest)
Updates an existing Recycle Bin retention rule. You can update a retention rule's description, resource tags, and retention period at any time after creation. You can't update a retention rule's resource type after creation. For more information, see Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
updateRuleRequest - default CompletableFuture<UpdateRuleResponse> updateRule(Consumer<UpdateRuleRequest.Builder> updateRuleRequest)
Updates an existing Recycle Bin retention rule. You can update a retention rule's description, resource tags, and retention period at any time after creation. You can't update a retention rule's resource type after creation. For more information, see Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
This is a convenience which creates an instance of the UpdateRuleRequest.Builder avoiding the need to
create one manually via UpdateRuleRequest.builder()
updateRuleRequest - A Consumer that will call methods on UpdateRuleRequest.Builder to create a request.static RbinAsyncClient create()
RbinAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static RbinAsyncClientBuilder builder()
RbinAsyncClient.Copyright © 2023. All rights reserved.