Interface ArtifactAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface ArtifactAsyncClient extends AwsClient
Service client for accessing AWS Artifact 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.

This reference provides descriptions of the low-level AWS Artifact Service API.

  • Field Details

  • Method Details

    • getAccountSettings

      default CompletableFuture<GetAccountSettingsResponse> getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest)

      Get the account settings for Artifact.

      Parameters:
      getAccountSettingsRequest -
      Returns:
      A Java Future containing the result of the GetAccountSettings 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getAccountSettings

      default CompletableFuture<GetAccountSettingsResponse> getAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest)

      Get the account settings for Artifact.


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

      Parameters:
      getAccountSettingsRequest - A Consumer that will call methods on GetAccountSettingsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetAccountSettings 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReport

      default CompletableFuture<GetReportResponse> getReport(GetReportRequest getReportRequest)

      Get the content for a single report.

      Parameters:
      getReportRequest -
      Returns:
      A Java Future containing the result of the GetReport 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReport

      default CompletableFuture<GetReportResponse> getReport(Consumer<GetReportRequest.Builder> getReportRequest)

      Get the content for a single report.


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

      Parameters:
      getReportRequest - A Consumer that will call methods on GetReportRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetReport 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReportMetadata

      default CompletableFuture<GetReportMetadataResponse> getReportMetadata(GetReportMetadataRequest getReportMetadataRequest)

      Get the metadata for a single report.

      Parameters:
      getReportMetadataRequest -
      Returns:
      A Java Future containing the result of the GetReportMetadata 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReportMetadata

      default CompletableFuture<GetReportMetadataResponse> getReportMetadata(Consumer<GetReportMetadataRequest.Builder> getReportMetadataRequest)

      Get the metadata for a single report.


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

      Parameters:
      getReportMetadataRequest - A Consumer that will call methods on GetReportMetadataRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetReportMetadata 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getTermForReport

      default CompletableFuture<GetTermForReportResponse> getTermForReport(GetTermForReportRequest getTermForReportRequest)

      Get the Term content associated with a single report.

      Parameters:
      getTermForReportRequest -
      Returns:
      A Java Future containing the result of the GetTermForReport 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getTermForReport

      default CompletableFuture<GetTermForReportResponse> getTermForReport(Consumer<GetTermForReportRequest.Builder> getTermForReportRequest)

      Get the Term content associated with a single report.


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

      Parameters:
      getTermForReportRequest - A Consumer that will call methods on GetTermForReportRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetTermForReport 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReports

      default CompletableFuture<ListReportsResponse> listReports(ListReportsRequest listReportsRequest)

      List available reports.

      Parameters:
      listReportsRequest -
      Returns:
      A Java Future containing the result of the ListReports 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReports

      default CompletableFuture<ListReportsResponse> listReports(Consumer<ListReportsRequest.Builder> listReportsRequest)

      List available reports.


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

      Parameters:
      listReportsRequest - A Consumer that will call methods on ListReportsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListReports 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportsPaginator

      default ListReportsPublisher listReportsPaginator(ListReportsRequest listReportsRequest)

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

      Parameters:
      listReportsRequest -
      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. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportsPaginator

      default ListReportsPublisher listReportsPaginator(Consumer<ListReportsRequest.Builder> listReportsRequest)

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


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

      Parameters:
      listReportsRequest - A Consumer that will call methods on ListReportsRequest.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. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putAccountSettings

      default CompletableFuture<PutAccountSettingsResponse> putAccountSettings(PutAccountSettingsRequest putAccountSettingsRequest)

      Put the account settings for Artifact.

      Parameters:
      putAccountSettingsRequest -
      Returns:
      A Java Future containing the result of the PutAccountSettings 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putAccountSettings

      default CompletableFuture<PutAccountSettingsResponse> putAccountSettings(Consumer<PutAccountSettingsRequest.Builder> putAccountSettingsRequest)

      Put the account settings for Artifact.


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

      Parameters:
      putAccountSettingsRequest - A Consumer that will call methods on PutAccountSettingsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the PutAccountSettings 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 Request references a resource which does not exist.
      • ThrottlingException Request was denied due to request throttling.
      • AccessDeniedException User does not have sufficient access to perform this action.
      • ConflictException Request to create/modify content would result in a conflict.
      • InternalServerException An unknown server exception has occurred.
      • ValidationException Request fails to satisfy the constraints specified by an AWS service.
      • ServiceQuotaExceededException Request would cause a service quota 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.
      • ArtifactException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

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

      static ArtifactAsyncClientBuilder builder()
      Create a builder that can be used to configure and create a ArtifactAsyncClient.