Interface RbinClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface RbinClient extends AwsClient
Service client for accessing Amazon Recycle Bin. This can be created using the staticbuilder()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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static RbinClientBuilderbuilder()Create a builder that can be used to configure and create aRbinClient.static RbinClientcreate()Create aRbinClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateRuleResponsecreateRule(Consumer<CreateRuleRequest.Builder> createRuleRequest)Creates a Recycle Bin retention rule.default CreateRuleResponsecreateRule(CreateRuleRequest createRuleRequest)Creates a Recycle Bin retention rule.default DeleteRuleResponsedeleteRule(Consumer<DeleteRuleRequest.Builder> deleteRuleRequest)Deletes a Recycle Bin retention rule.default DeleteRuleResponsedeleteRule(DeleteRuleRequest deleteRuleRequest)Deletes a Recycle Bin retention rule.default GetRuleResponsegetRule(Consumer<GetRuleRequest.Builder> getRuleRequest)Gets information about a Recycle Bin retention rule.default GetRuleResponsegetRule(GetRuleRequest getRuleRequest)Gets information about a Recycle Bin retention rule.default ListRulesResponselistRules(Consumer<ListRulesRequest.Builder> listRulesRequest)Lists the Recycle Bin retention rules in the Region.default ListRulesResponselistRules(ListRulesRequest listRulesRequest)Lists the Recycle Bin retention rules in the Region.default ListRulesIterablelistRulesPaginator(Consumer<ListRulesRequest.Builder> listRulesRequest)This is a variant oflistRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest)operation.default ListRulesIterablelistRulesPaginator(ListRulesRequest listRulesRequest)This is a variant oflistRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Lists the tags assigned to a retention rule.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Lists the tags assigned to a retention rule.default LockRuleResponselockRule(Consumer<LockRuleRequest.Builder> lockRuleRequest)Locks a retention rule.default LockRuleResponselockRule(LockRuleRequest lockRuleRequest)Locks a retention rule.default RbinServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)Assigns tags to the specified retention rule.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)Assigns tags to the specified retention rule.default UnlockRuleResponseunlockRule(Consumer<UnlockRuleRequest.Builder> unlockRuleRequest)Unlocks a retention rule.default UnlockRuleResponseunlockRule(UnlockRuleRequest unlockRuleRequest)Unlocks a retention rule.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Unassigns a tag from a retention rule.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Unassigns a tag from a retention rule.default UpdateRuleResponseupdateRule(Consumer<UpdateRuleRequest.Builder> updateRuleRequest)Updates an existing Recycle Bin retention rule.default UpdateRuleResponseupdateRule(UpdateRuleRequest updateRuleRequest)Updates an existing Recycle Bin retention rule.-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createRule
default CreateRuleResponse createRule(CreateRuleRequest createRuleRequest) throws ValidationException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, RbinException
Creates a Recycle Bin retention rule. For more information, see Create Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
createRuleRequest-- Returns:
- Result of the CreateRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createRule
default CreateRuleResponse createRule(Consumer<CreateRuleRequest.Builder> createRuleRequest) throws ValidationException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, RbinException
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.Builderavoiding the need to create one manually viaCreateRuleRequest.builder()- Parameters:
createRuleRequest- AConsumerthat will call methods onCreateRuleRequest.Builderto create a request.- Returns:
- Result of the CreateRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteRule
default DeleteRuleResponse deleteRule(DeleteRuleRequest deleteRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
Deletes a Recycle Bin retention rule. For more information, see Delete Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
deleteRuleRequest-- Returns:
- Result of the DeleteRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteRule
default DeleteRuleResponse deleteRule(Consumer<DeleteRuleRequest.Builder> deleteRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
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.Builderavoiding the need to create one manually viaDeleteRuleRequest.builder()- Parameters:
deleteRuleRequest- AConsumerthat will call methods onDeleteRuleRequest.Builderto create a request.- Returns:
- Result of the DeleteRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getRule
default GetRuleResponse getRule(GetRuleRequest getRuleRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Gets information about a Recycle Bin retention rule.
- Parameters:
getRuleRequest-- Returns:
- Result of the GetRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getRule
default GetRuleResponse getRule(Consumer<GetRuleRequest.Builder> getRuleRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Gets information about a Recycle Bin retention rule.
This is a convenience which creates an instance of the
GetRuleRequest.Builderavoiding the need to create one manually viaGetRuleRequest.builder()- Parameters:
getRuleRequest- AConsumerthat will call methods onGetRuleRequest.Builderto create a request.- Returns:
- Result of the GetRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listRules
default ListRulesResponse listRules(ListRulesRequest listRulesRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RbinException
Lists the Recycle Bin retention rules in the Region.
- Parameters:
listRulesRequest-- Returns:
- Result of the ListRules operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listRules
default ListRulesResponse listRules(Consumer<ListRulesRequest.Builder> listRulesRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RbinException
Lists the Recycle Bin retention rules in the Region.
This is a convenience which creates an instance of the
ListRulesRequest.Builderavoiding the need to create one manually viaListRulesRequest.builder()- Parameters:
listRulesRequest- AConsumerthat will call methods onListRulesRequest.Builderto create a request.- Returns:
- Result of the ListRules operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listRulesPaginator
default ListRulesIterable listRulesPaginator(ListRulesRequest listRulesRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RbinException
This is a variant of
listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); for (software.amazon.awssdk.services.rbin.model.ListRulesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); responses.iterator().forEachRemaining(....);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.- Parameters:
listRulesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listRulesPaginator
default ListRulesIterable listRulesPaginator(Consumer<ListRulesRequest.Builder> listRulesRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RbinException
This is a variant of
listRules(software.amazon.awssdk.services.rbin.model.ListRulesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); for (software.amazon.awssdk.services.rbin.model.ListRulesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.rbin.paginators.ListRulesIterable responses = client.listRulesPaginator(request); responses.iterator().forEachRemaining(....);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.Builderavoiding the need to create one manually viaListRulesRequest.builder()- Parameters:
listRulesRequest- AConsumerthat will call methods onListRulesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Lists the tags assigned to a retention rule.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Lists the tags assigned to a retention rule.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
lockRule
default LockRuleResponse lockRule(LockRuleRequest lockRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
Locks a retention rule. A locked retention rule can't be modified or deleted.
- Parameters:
lockRuleRequest-- Returns:
- Result of the LockRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
lockRule
default LockRuleResponse lockRule(Consumer<LockRuleRequest.Builder> lockRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
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.Builderavoiding the need to create one manually viaLockRuleRequest.builder()- Parameters:
lockRuleRequest- AConsumerthat will call methods onLockRuleRequest.Builderto create a request.- Returns:
- Result of the LockRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RbinException
Assigns tags to the specified retention rule.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RbinException
Assigns tags to the specified retention rule.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
unlockRule
default UnlockRuleResponse unlockRule(UnlockRuleRequest unlockRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted only after the unlock delay period expires.
- Parameters:
unlockRuleRequest-- Returns:
- Result of the UnlockRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
unlockRule
default UnlockRuleResponse unlockRule(Consumer<UnlockRuleRequest.Builder> unlockRuleRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ConflictException, AwsServiceException, SdkClientException, RbinException
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.Builderavoiding the need to create one manually viaUnlockRuleRequest.builder()- Parameters:
unlockRuleRequest- AConsumerthat will call methods onUnlockRuleRequest.Builderto create a request.- Returns:
- Result of the UnlockRule operation returned by the service.
- Throws:
InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ValidationException- One or more of the parameters in the request is not valid.ConflictException- The specified retention rule lock request can't be completed.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Unassigns a tag from a retention rule.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, AwsServiceException, SdkClientException, RbinException
Unassigns a tag from a retention rule.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateRule
default UpdateRuleResponse updateRule(UpdateRuleRequest updateRuleRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, ConflictException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RbinException
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.
- Parameters:
updateRuleRequest-- Returns:
- Result of the UpdateRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ConflictException- The specified retention rule lock request can't be completed.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateRule
default UpdateRuleResponse updateRule(Consumer<UpdateRuleRequest.Builder> updateRuleRequest) throws ValidationException, InternalServerException, ResourceNotFoundException, ConflictException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RbinException
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.Builderavoiding the need to create one manually viaUpdateRuleRequest.builder()- Parameters:
updateRuleRequest- AConsumerthat will call methods onUpdateRuleRequest.Builderto create a request.- Returns:
- Result of the UpdateRule operation returned by the service.
- Throws:
ValidationException- One or more of the parameters in the request is not valid.InternalServerException- The service could not respond to the request due to an internal problem.ResourceNotFoundException- The specified resource was not found.ConflictException- The specified retention rule lock request can't be completed.ServiceQuotaExceededException- The request would cause a service quota for the number of tags per resource to be exceeded.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RbinException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static RbinClient create()
Create aRbinClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static RbinClientBuilder builder()
Create a builder that can be used to configure and create aRbinClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default RbinServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-