Interface ControlTowerAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface ControlTowerAsyncClient extends AwsClient
Service client for accessing AWS Control Tower asynchronously. This can be created using the static builder() method.

These interfaces allow you to apply the AWS library of pre-defined controls to your organizational units, programmatically. In AWS Control Tower, the terms "control" and "guardrail" are synonyms.

To call these APIs, you'll need to know:

  • the controlIdentifier for the control--or guardrail--you are targeting.

  • the ARN associated with the target organizational unit (OU), which we call the targetIdentifier.

  • the ARN associated with a resource that you wish to tag or untag.

To get the controlIdentifier for your AWS Control Tower control:

The controlIdentifier is an ARN that is specified for each control. You can view the controlIdentifier in the console on the Control details page, as well as in the documentation.

The controlIdentifier is unique in each AWS Region for each control. You can find the controlIdentifier for each Region and control in the Tables of control metadata in the AWS Control Tower User Guide.

A quick-reference list of control identifers for the AWS Control Tower legacy Strongly recommended and Elective controls is given in Resource identifiers for APIs and controls in the Controls reference guide section of the AWS Control Tower User Guide. Remember that Mandatory controls cannot be added or removed.

ARN format: arn:aws:controltower:{REGION}::control/{CONTROL_NAME}

Example:

arn:aws:controltower:us-west-2::control/AWS-GR_AUTOSCALING_LAUNCH_CONFIG_PUBLIC_IP_DISABLED

To get the targetIdentifier:

The targetIdentifier is the ARN for an OU.

In the AWS Organizations console, you can find the ARN for the OU on the Organizational unit details page associated with that OU.

OU ARN format:

arn:${Partition}:organizations::${MasterAccountId}:ou/o-${OrganizationId}/ou-${OrganizationalUnitId}

Details and examples

To view the open source resource repository on GitHub, see aws-cloudformation/aws-cloudformation-resource-providers-controltower

Recording API Requests

AWS Control Tower supports AWS CloudTrail, a service that records AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. By using information collected by CloudTrail, you can determine which requests the AWS Control Tower service received, who made the request and when, and so on. For more about AWS Control Tower and its support for CloudTrail, see Logging AWS Control Tower Actions with AWS CloudTrail in the AWS Control Tower User Guide. To learn more about CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User Guide.

  • Field Details

  • Method Details

    • disableControl

      default CompletableFuture<DisableControlResponse> disableControl(DisableControlRequest disableControlRequest)

      This API call turns off a control. It starts an asynchronous operation that deletes AWS resources on the specified organizational unit and the accounts it contains. The resources will vary according to the control that you specify. For usage examples, see the AWS Control Tower User Guide .

      Parameters:
      disableControlRequest -
      Returns:
      A Java Future containing the result of the DisableControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ConflictException Updating or deleting a resource can cause an inconsistent state.
      • ServiceQuotaExceededException Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • disableControl

      default CompletableFuture<DisableControlResponse> disableControl(Consumer<DisableControlRequest.Builder> disableControlRequest)

      This API call turns off a control. It starts an asynchronous operation that deletes AWS resources on the specified organizational unit and the accounts it contains. The resources will vary according to the control that you specify. For usage examples, see the AWS Control Tower User Guide .


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

      Parameters:
      disableControlRequest - A Consumer that will call methods on DisableControlRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DisableControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ConflictException Updating or deleting a resource can cause an inconsistent state.
      • ServiceQuotaExceededException Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • enableControl

      default CompletableFuture<EnableControlResponse> enableControl(EnableControlRequest enableControlRequest)

      This API call activates a control. It starts an asynchronous operation that creates AWS resources on the specified organizational unit and the accounts it contains. The resources created will vary according to the control that you specify. For usage examples, see the AWS Control Tower User Guide .

      Parameters:
      enableControlRequest -
      Returns:
      A Java Future containing the result of the EnableControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ConflictException Updating or deleting a resource can cause an inconsistent state.
      • ServiceQuotaExceededException Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • enableControl

      default CompletableFuture<EnableControlResponse> enableControl(Consumer<EnableControlRequest.Builder> enableControlRequest)

      This API call activates a control. It starts an asynchronous operation that creates AWS resources on the specified organizational unit and the accounts it contains. The resources created will vary according to the control that you specify. For usage examples, see the AWS Control Tower User Guide .


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

      Parameters:
      enableControlRequest - A Consumer that will call methods on EnableControlRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the EnableControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ConflictException Updating or deleting a resource can cause an inconsistent state.
      • ServiceQuotaExceededException Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getControlOperation

      default CompletableFuture<GetControlOperationResponse> getControlOperation(GetControlOperationRequest getControlOperationRequest)

      Returns the status of a particular EnableControl or DisableControl operation. Displays a message in case of error. Details for an operation are available for 90 days. For usage examples, see the AWS Control Tower User Guide .

      Parameters:
      getControlOperationRequest -
      Returns:
      A Java Future containing the result of the GetControlOperation operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getControlOperation

      default CompletableFuture<GetControlOperationResponse> getControlOperation(Consumer<GetControlOperationRequest.Builder> getControlOperationRequest)

      Returns the status of a particular EnableControl or DisableControl operation. Displays a message in case of error. Details for an operation are available for 90 days. For usage examples, see the AWS Control Tower User Guide .


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

      Parameters:
      getControlOperationRequest - A Consumer that will call methods on GetControlOperationRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetControlOperation operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getEnabledControl

      default CompletableFuture<GetEnabledControlResponse> getEnabledControl(GetEnabledControlRequest getEnabledControlRequest)

      Retrieves details about an enabled control. For usage examples, see the AWS Control Tower User Guide .

      Parameters:
      getEnabledControlRequest -
      Returns:
      A Java Future containing the result of the GetEnabledControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getEnabledControl

      default CompletableFuture<GetEnabledControlResponse> getEnabledControl(Consumer<GetEnabledControlRequest.Builder> getEnabledControlRequest)

      Retrieves details about an enabled control. For usage examples, see the AWS Control Tower User Guide .


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

      Parameters:
      getEnabledControlRequest - A Consumer that will call methods on GetEnabledControlRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetEnabledControl operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEnabledControls

      default CompletableFuture<ListEnabledControlsResponse> listEnabledControls(ListEnabledControlsRequest listEnabledControlsRequest)

      Lists the controls enabled by AWS Control Tower on the specified organizational unit and the accounts it contains. For usage examples, see the AWS Control Tower User Guide .

      Parameters:
      listEnabledControlsRequest -
      Returns:
      A Java Future containing the result of the ListEnabledControls operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEnabledControls

      default CompletableFuture<ListEnabledControlsResponse> listEnabledControls(Consumer<ListEnabledControlsRequest.Builder> listEnabledControlsRequest)

      Lists the controls enabled by AWS Control Tower on the specified organizational unit and the accounts it contains. For usage examples, see the AWS Control Tower User Guide .


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

      Parameters:
      listEnabledControlsRequest - A Consumer that will call methods on ListEnabledControlsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListEnabledControls operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEnabledControlsPaginator

      default ListEnabledControlsPublisher listEnabledControlsPaginator(ListEnabledControlsRequest listEnabledControlsRequest)

      Lists the controls enabled by AWS Control Tower on the specified organizational unit and the accounts it contains. For usage examples, see the AWS Control Tower User Guide .


      This is a variant of listEnabledControls(software.amazon.awssdk.services.controltower.model.ListEnabledControlsRequest) 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.controltower.paginators.ListEnabledControlsPublisher publisher = client.listEnabledControlsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.controltower.paginators.ListEnabledControlsPublisher publisher = client.listEnabledControlsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.controltower.model.ListEnabledControlsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.controltower.model.ListEnabledControlsResponse 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 listEnabledControls(software.amazon.awssdk.services.controltower.model.ListEnabledControlsRequest) operation.

      Parameters:
      listEnabledControlsRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEnabledControlsPaginator

      default ListEnabledControlsPublisher listEnabledControlsPaginator(Consumer<ListEnabledControlsRequest.Builder> listEnabledControlsRequest)

      Lists the controls enabled by AWS Control Tower on the specified organizational unit and the accounts it contains. For usage examples, see the AWS Control Tower User Guide .


      This is a variant of listEnabledControls(software.amazon.awssdk.services.controltower.model.ListEnabledControlsRequest) 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.controltower.paginators.ListEnabledControlsPublisher publisher = client.listEnabledControlsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.controltower.paginators.ListEnabledControlsPublisher publisher = client.listEnabledControlsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.controltower.model.ListEnabledControlsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.controltower.model.ListEnabledControlsResponse 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 listEnabledControls(software.amazon.awssdk.services.controltower.model.ListEnabledControlsRequest) operation.

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

      Parameters:
      listEnabledControlsRequest - A Consumer that will call methods on ListEnabledControlsRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ThrottlingException Request was denied due to request throttling.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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)

      Returns a list of tags associated with the resource. For usage examples, see the AWS Control Tower User Guide .

      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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)

      Returns a list of tags associated with the resource. For usage examples, see the AWS Control Tower User Guide .


      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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)

      Applies tags to a resource. For usage examples, see the AWS Control Tower User Guide .

      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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)

      Applies tags to a resource. For usage examples, see the AWS Control Tower User Guide .


      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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 tags from a resource. For usage examples, see the AWS Control Tower User Guide .

      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException 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 tags from a resource. For usage examples, see the AWS Control Tower User Guide .


      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.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • InternalServerException Unexpected error during processing of request.
      • ResourceNotFoundException Request references a resource which does not exist.
      • 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.
      • ControlTowerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default ControlTowerServiceClientConfiguration 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 ControlTowerAsyncClient create()
      Create a ControlTowerAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a ControlTowerAsyncClient.