Interface DlmAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface DlmAsyncClient extends AwsClient
Service client for accessing Amazon DLM asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call. Amazon Data Lifecycle Manager

With Amazon Data Lifecycle Manager, you can manage the lifecycle of your Amazon Web Services resources. You create lifecycle policies, which are used to automate operations on the specified resources.

Amazon Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information about using Amazon Data Lifecycle Manager with Amazon EBS, see Amazon Data Lifecycle Manager in the Amazon EC2 User Guide.

  • Field Details

  • Method Details

    • createLifecyclePolicy

      default CompletableFuture<CreateLifecyclePolicyResponse> createLifecyclePolicy(CreateLifecyclePolicyRequest createLifecyclePolicyRequest)

      Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:

      • Custom EBS snapshot policy

      • Custom EBS-backed AMI policy

      • Cross-account copy event policy

      • Default policy for EBS snapshots

      • Default policy for EBS-backed AMIs

      For more information, see Default policies vs custom policies.

      If you create a default policy, you can specify the request parameters either in the request body, or in the PolicyDetails request structure, but not both.

      Parameters:
      createLifecyclePolicyRequest -
      Returns:
      A Java Future containing the result of the CreateLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • LimitExceededException The request failed because a limit was exceeded.
      • InternalServerException The service failed in an unexpected way.
      • 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createLifecyclePolicy

      default CompletableFuture<CreateLifecyclePolicyResponse> createLifecyclePolicy(Consumer<CreateLifecyclePolicyRequest.Builder> createLifecyclePolicyRequest)

      Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:

      • Custom EBS snapshot policy

      • Custom EBS-backed AMI policy

      • Cross-account copy event policy

      • Default policy for EBS snapshots

      • Default policy for EBS-backed AMIs

      For more information, see Default policies vs custom policies.

      If you create a default policy, you can specify the request parameters either in the request body, or in the PolicyDetails request structure, but not both.


      This is a convenience which creates an instance of the CreateLifecyclePolicyRequest.Builder avoiding the need to create one manually via CreateLifecyclePolicyRequest.builder()

      Parameters:
      createLifecyclePolicyRequest - A Consumer that will call methods on CreateLifecyclePolicyRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • LimitExceededException The request failed because a limit was exceeded.
      • InternalServerException The service failed in an unexpected way.
      • 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteLifecyclePolicy

      default CompletableFuture<DeleteLifecyclePolicyResponse> deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest)

      Deletes the specified lifecycle policy and halts the automated operations that the policy specified.

      For more information about deleting a policy, see Delete lifecycle policies.

      Parameters:
      deleteLifecyclePolicyRequest -
      Returns:
      A Java Future containing the result of the DeleteLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteLifecyclePolicy

      default CompletableFuture<DeleteLifecyclePolicyResponse> deleteLifecyclePolicy(Consumer<DeleteLifecyclePolicyRequest.Builder> deleteLifecyclePolicyRequest)

      Deletes the specified lifecycle policy and halts the automated operations that the policy specified.

      For more information about deleting a policy, see Delete lifecycle policies.


      This is a convenience which creates an instance of the DeleteLifecyclePolicyRequest.Builder avoiding the need to create one manually via DeleteLifecyclePolicyRequest.builder()

      Parameters:
      deleteLifecyclePolicyRequest - A Consumer that will call methods on DeleteLifecyclePolicyRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getLifecyclePolicies

      default CompletableFuture<GetLifecyclePoliciesResponse> getLifecyclePolicies(GetLifecyclePoliciesRequest getLifecyclePoliciesRequest)

      Gets summary information about all or the specified data lifecycle policies.

      To get complete information about a policy, use GetLifecyclePolicy.

      Parameters:
      getLifecyclePoliciesRequest -
      Returns:
      A Java Future containing the result of the GetLifecyclePolicies operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getLifecyclePolicies

      default CompletableFuture<GetLifecyclePoliciesResponse> getLifecyclePolicies(Consumer<GetLifecyclePoliciesRequest.Builder> getLifecyclePoliciesRequest)

      Gets summary information about all or the specified data lifecycle policies.

      To get complete information about a policy, use GetLifecyclePolicy.


      This is a convenience which creates an instance of the GetLifecyclePoliciesRequest.Builder avoiding the need to create one manually via GetLifecyclePoliciesRequest.builder()

      Parameters:
      getLifecyclePoliciesRequest - A Consumer that will call methods on GetLifecyclePoliciesRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetLifecyclePolicies operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getLifecyclePolicies

      default CompletableFuture<GetLifecyclePoliciesResponse> getLifecyclePolicies()

      Gets summary information about all or the specified data lifecycle policies.

      To get complete information about a policy, use GetLifecyclePolicy.

      Returns:
      A Java Future containing the result of the GetLifecyclePolicies operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getLifecyclePolicy

      default CompletableFuture<GetLifecyclePolicyResponse> getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest)

      Gets detailed information about the specified lifecycle policy.

      Parameters:
      getLifecyclePolicyRequest -
      Returns:
      A Java Future containing the result of the GetLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getLifecyclePolicy

      default CompletableFuture<GetLifecyclePolicyResponse> getLifecyclePolicy(Consumer<GetLifecyclePolicyRequest.Builder> getLifecyclePolicyRequest)

      Gets detailed information about the specified lifecycle policy.


      This is a convenience which creates an instance of the GetLifecyclePolicyRequest.Builder avoiding the need to create one manually via GetLifecyclePolicyRequest.builder()

      Parameters:
      getLifecyclePolicyRequest - A Consumer that will call methods on GetLifecyclePolicyRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)

      Lists the tags for the specified resource.

      Parameters:
      listTagsForResourceRequest -
      Returns:
      A Java Future containing the result of the ListTagsForResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)

      Lists the tags for the specified resource.


      This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the need to create one manually via ListTagsForResourceRequest.builder()

      Parameters:
      listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListTagsForResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)

      Adds the specified tags to the specified resource.

      Parameters:
      tagResourceRequest -
      Returns:
      A Java Future containing the result of the TagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)

      Adds the specified tags to the specified resource.


      This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to create one manually via TagResourceRequest.builder()

      Parameters:
      tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the TagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)

      Removes the specified tags from the specified resource.

      Parameters:
      untagResourceRequest -
      Returns:
      A Java Future containing the result of the UntagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)

      Removes the specified tags from the specified resource.


      This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to create one manually via UntagResourceRequest.builder()

      Parameters:
      untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UntagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The service failed in an unexpected way.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • ResourceNotFoundException A requested 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateLifecyclePolicy

      default CompletableFuture<UpdateLifecyclePolicyResponse> updateLifecyclePolicy(UpdateLifecyclePolicyRequest updateLifecyclePolicyRequest)

      Updates the specified lifecycle policy.

      For more information about updating a policy, see Modify lifecycle policies.

      Parameters:
      updateLifecyclePolicyRequest -
      Returns:
      A Java Future containing the result of the UpdateLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateLifecyclePolicy

      default CompletableFuture<UpdateLifecyclePolicyResponse> updateLifecyclePolicy(Consumer<UpdateLifecyclePolicyRequest.Builder> updateLifecyclePolicyRequest)

      Updates the specified lifecycle policy.

      For more information about updating a policy, see Modify lifecycle policies.


      This is a convenience which creates an instance of the UpdateLifecyclePolicyRequest.Builder avoiding the need to create one manually via UpdateLifecyclePolicyRequest.builder()

      Parameters:
      updateLifecyclePolicyRequest - A Consumer that will call methods on UpdateLifecyclePolicyRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UpdateLifecyclePolicy operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException A requested resource was not found.
      • InvalidRequestException Bad request. The request is missing required parameters or has invalid parameters.
      • InternalServerException The service failed in an unexpected way.
      • LimitExceededException The request failed because a limit was 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.
      • DlmException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default DlmServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static DlmAsyncClient create()
      Create a DlmAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      static DlmAsyncClientBuilder builder()
      Create a builder that can be used to configure and create a DlmAsyncClient.