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 staticbuilder()method.The asynchronous client performs non-blocking I/O when configured with anySdkAsyncHttpClientsupported 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
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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 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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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 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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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 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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
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:
- AWS API Documentation
-
serviceClientConfiguration
default ArtifactServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
create
static ArtifactAsyncClient create()
Create aArtifactAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static ArtifactAsyncClientBuilder builder()
Create a builder that can be used to configure and create aArtifactAsyncClient.
-
-