Interface ArtifactAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic ArtifactAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aArtifactAsyncClient.static ArtifactAsyncClientcreate()Create aArtifactAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.getAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest) Get the account settings for Artifact.getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest) Get the account settings for Artifact.default CompletableFuture<GetReportResponse> getReport(Consumer<GetReportRequest.Builder> getReportRequest) Get the content for a single report.default CompletableFuture<GetReportResponse> getReport(GetReportRequest getReportRequest) Get the content for a single report.getReportMetadata(Consumer<GetReportMetadataRequest.Builder> getReportMetadataRequest) Get the metadata for a single report.getReportMetadata(GetReportMetadataRequest getReportMetadataRequest) Get the metadata for a single report.getTermForReport(Consumer<GetTermForReportRequest.Builder> getTermForReportRequest) Get the Term content associated with a single report.getTermForReport(GetTermForReportRequest getTermForReportRequest) Get the Term content associated with a single report.default CompletableFuture<ListReportsResponse> listReports(Consumer<ListReportsRequest.Builder> listReportsRequest) List available reports.default CompletableFuture<ListReportsResponse> listReports(ListReportsRequest listReportsRequest) List available reports.default ListReportsPublisherlistReportsPaginator(Consumer<ListReportsRequest.Builder> listReportsRequest) This is a variant oflistReports(software.amazon.awssdk.services.artifact.model.ListReportsRequest)operation.default ListReportsPublisherlistReportsPaginator(ListReportsRequest listReportsRequest) This is a variant oflistReports(software.amazon.awssdk.services.artifact.model.ListReportsRequest)operation.putAccountSettings(Consumer<PutAccountSettingsRequest.Builder> putAccountSettingsRequest) Put the account settings for Artifact.putAccountSettings(PutAccountSettingsRequest putAccountSettingsRequest) Put the account settings for Artifact.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetAccountSettingsRequest.builder()- Parameters:
getAccountSettingsRequest- AConsumerthat will call methods onGetAccountSettingsRequest.Builderto 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 invokeThrowable.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
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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetReportRequest.builder()- Parameters:
getReportRequest- AConsumerthat will call methods onGetReportRequest.Builderto 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 invokeThrowable.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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetReportMetadataRequest.builder()- Parameters:
getReportMetadataRequest- AConsumerthat will call methods onGetReportMetadataRequest.Builderto 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 invokeThrowable.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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetTermForReportRequest.builder()- Parameters:
getTermForReportRequest- AConsumerthat will call methods onGetTermForReportRequest.Builderto 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 invokeThrowable.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
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 invokeThrowable.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.Builderavoiding the need to create one manually viaListReportsRequest.builder()- Parameters:
listReportsRequest- AConsumerthat will call methods onListReportsRequest.Builderto 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 invokeThrowable.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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.artifact.paginators.ListReportsPublisher publisher = client.listReportsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.artifact.paginators.ListReportsPublisher publisher = client.listReportsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaListReportsRequest.builder()- Parameters:
listReportsRequest- AConsumerthat will call methods onListReportsRequest.Builderto 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 invokeThrowable.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 invokeThrowable.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.Builderavoiding the need to create one manually viaPutAccountSettingsRequest.builder()- Parameters:
putAccountSettingsRequest- AConsumerthat will call methods onPutAccountSettingsRequest.Builderto 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 invokeThrowable.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
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aArtifactAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aArtifactAsyncClient.
-