Interface PricingAsyncClient
- 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.
The Amazon Web Services Price List API is a centralized and convenient way to programmatically query Amazon Web
Services for services, products, and pricing information. The Amazon Web Services Price List uses standardized
product attributes such as Location, Storage Class, and Operating System, and
provides prices at the SKU level. You can use the Amazon Web Services Price List to do the following:
-
Build cost control and scenario planning tools
-
Reconcile billing data
-
Forecast future spend for budgeting purposes
-
Provide cost benefit analysis that compare your internal workloads with Amazon Web Services
Use GetServices without a service code to retrieve the service codes for all Amazon Web Services
services, then GetServices with a service code to retrieve the attribute names for that service. After
you have the service code and attribute names, you can use GetAttributeValues to see what values are
available for an attribute. With the service code and an attribute name and value, you can use
GetProducts to find specific products that you're interested in, such as an AmazonEC2
instance, with a Provisioned IOPS volumeType.
For more information, see Using the Amazon Web Services Price List API in the Billing User Guide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic PricingAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aPricingAsyncClient.static PricingAsyncClientcreate()Create aPricingAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.Returns the metadata for one service or a list of the metadata for all services.describeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services.describeServices(DescribeServicesRequest describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesPublisherThis is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.default DescribeServicesPublisherdescribeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) This is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.default DescribeServicesPublisherdescribeServicesPaginator(DescribeServicesRequest describeServicesRequest) This is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) Returns a list of attribute values.getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest) Returns a list of attribute values.default GetAttributeValuesPublishergetAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) This is a variant ofgetAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)operation.default GetAttributeValuesPublishergetAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest) This is a variant ofgetAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)operation.getPriceListFileUrl(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest) This feature is in preview release and is subject to change.getPriceListFileUrl(GetPriceListFileUrlRequest getPriceListFileUrlRequest) This feature is in preview release and is subject to change.default CompletableFuture<GetProductsResponse> getProducts(Consumer<GetProductsRequest.Builder> getProductsRequest) Returns a list of all products that match the filter criteria.default CompletableFuture<GetProductsResponse> getProducts(GetProductsRequest getProductsRequest) Returns a list of all products that match the filter criteria.default GetProductsPublishergetProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest) This is a variant ofgetProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)operation.default GetProductsPublishergetProductsPaginator(GetProductsRequest getProductsRequest) This is a variant ofgetProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)operation.default CompletableFuture<ListPriceListsResponse> listPriceLists(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This feature is in preview release and is subject to change.default CompletableFuture<ListPriceListsResponse> listPriceLists(ListPriceListsRequest listPriceListsRequest) This feature is in preview release and is subject to change.default ListPriceListsPublisherlistPriceListsPaginator(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This is a variant oflistPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)operation.default ListPriceListsPublisherlistPriceListsPaginator(ListPriceListsRequest listPriceListsRequest) This is a variant oflistPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)operation.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
-
describeServices
default CompletableFuture<DescribeServicesResponse> describeServices(DescribeServicesRequest describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services. Use this without a service code to get the service codes for all services. Use it with a service code, such as
AmazonEC2, to get information specific to that service, such as the attribute names available for that service. For example, some of the attribute names available for EC2 arevolumeType,maxIopsVolume,operation,locationType, andinstanceCapacity10xlarge.- Parameters:
describeServicesRequest-- Returns:
- A Java Future containing the result of the DescribeServices 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeServices
default CompletableFuture<DescribeServicesResponse> describeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services. Use this without a service code to get the service codes for all services. Use it with a service code, such as
AmazonEC2, to get information specific to that service, such as the attribute names available for that service. For example, some of the attribute names available for EC2 arevolumeType,maxIopsVolume,operation,locationType, andinstanceCapacity10xlarge.
This is a convenience which creates an instance of the
DescribeServicesRequest.Builderavoiding the need to create one manually viaDescribeServicesRequest.builder()- Parameters:
describeServicesRequest- AConsumerthat will call methods onDescribeServicesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeServices 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeServices
Returns the metadata for one service or a list of the metadata for all services. Use this without a service code to get the service codes for all services. Use it with a service code, such as
AmazonEC2, to get information specific to that service, such as the attribute names available for that service. For example, some of the attribute names available for EC2 arevolumeType,maxIopsVolume,operation,locationType, andinstanceCapacity10xlarge.- Returns:
- A Java Future containing the result of the DescribeServices 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeServicesPaginator
This is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.DescribeServicesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse 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
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.- 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeServicesPaginator
default DescribeServicesPublisher describeServicesPaginator(DescribeServicesRequest describeServicesRequest) This is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.DescribeServicesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse 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
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.- Parameters:
describeServicesRequest-- 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeServicesPaginator
default DescribeServicesPublisher describeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) This is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(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.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.DescribeServicesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse 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
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)operation.
This is a convenience which creates an instance of the
DescribeServicesRequest.Builderavoiding the need to create one manually viaDescribeServicesRequest.builder()- Parameters:
describeServicesRequest- AConsumerthat will call methods onDescribeServicesRequest.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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttributeValues
default CompletableFuture<GetAttributeValuesResponse> getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest) Returns a list of attribute values. Attributes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the Billing and Cost Management User Guide.
- Parameters:
getAttributeValuesRequest-- Returns:
- A Java Future containing the result of the GetAttributeValues 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttributeValues
default CompletableFuture<GetAttributeValuesResponse> getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) Returns a list of attribute values. Attributes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the Billing and Cost Management User Guide.
This is a convenience which creates an instance of the
GetAttributeValuesRequest.Builderavoiding the need to create one manually viaGetAttributeValuesRequest.builder()- Parameters:
getAttributeValuesRequest- AConsumerthat will call methods onGetAttributeValuesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetAttributeValues 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttributeValuesPaginator
default GetAttributeValuesPublisher getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest) This is a variant of
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)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.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(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.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse 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
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)operation.- Parameters:
getAttributeValuesRequest-- 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttributeValuesPaginator
default GetAttributeValuesPublisher getAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) This is a variant of
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)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.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(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.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse 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
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)operation.
This is a convenience which creates an instance of the
GetAttributeValuesRequest.Builderavoiding the need to create one manually viaGetAttributeValuesRequest.builder()- Parameters:
getAttributeValuesRequest- AConsumerthat will call methods onGetAttributeValuesRequest.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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getPriceListFileUrl
default CompletableFuture<GetPriceListFileUrlResponse> getPriceListFileUrl(GetPriceListFileUrlRequest getPriceListFileUrlRequest) This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10).
This returns the URL that you can retrieve your Price List file from. This URL is based on the
PriceListArnandFileFormatthat you retrieve from the ListPriceLists response.- Parameters:
getPriceListFileUrlRequest-- Returns:
- A Java Future containing the result of the GetPriceListFileUrl 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.- InvalidParameterException One or more parameters had an invalid value.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getPriceListFileUrl
default CompletableFuture<GetPriceListFileUrlResponse> getPriceListFileUrl(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest) This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10).
This returns the URL that you can retrieve your Price List file from. This URL is based on the
PriceListArnandFileFormatthat you retrieve from the ListPriceLists response.
This is a convenience which creates an instance of the
GetPriceListFileUrlRequest.Builderavoiding the need to create one manually viaGetPriceListFileUrlRequest.builder()- Parameters:
getPriceListFileUrlRequest- AConsumerthat will call methods onGetPriceListFileUrlRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetPriceListFileUrl 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.- InvalidParameterException One or more parameters had an invalid value.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProducts
Returns a list of all products that match the filter criteria.
- Parameters:
getProductsRequest-- Returns:
- A Java Future containing the result of the GetProducts 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProducts
default CompletableFuture<GetProductsResponse> getProducts(Consumer<GetProductsRequest.Builder> getProductsRequest) Returns a list of all products that match the filter criteria.
This is a convenience which creates an instance of the
GetProductsRequest.Builderavoiding the need to create one manually viaGetProductsRequest.builder()- Parameters:
getProductsRequest- AConsumerthat will call methods onGetProductsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetProducts 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProductsPaginator
This is a variant of
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)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.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(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.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.GetProductsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.GetProductsResponse 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
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)operation.- Parameters:
getProductsRequest-- 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProductsPaginator
default GetProductsPublisher getProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest) This is a variant of
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)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.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(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.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.GetProductsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.GetProductsResponse 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
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)operation.
This is a convenience which creates an instance of the
GetProductsRequest.Builderavoiding the need to create one manually viaGetProductsRequest.builder()- Parameters:
getProductsRequest- AConsumerthat will call methods onGetProductsRequest.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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPriceLists
default CompletableFuture<ListPriceListsResponse> listPriceLists(ListPriceListsRequest listPriceListsRequest) This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10).
This returns a list of Price List references that the requester if authorized to view, given a
ServiceCode,CurrencyCode, and anEffectiveDate. Use without aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.- Parameters:
listPriceListsRequest-- Returns:
- A Java Future containing the result of the ListPriceLists 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPriceLists
default CompletableFuture<ListPriceListsResponse> listPriceLists(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10).
This returns a list of Price List references that the requester if authorized to view, given a
ServiceCode,CurrencyCode, and anEffectiveDate. Use without aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.
This is a convenience which creates an instance of the
ListPriceListsRequest.Builderavoiding the need to create one manually viaListPriceListsRequest.builder()- Parameters:
listPriceListsRequest- AConsumerthat will call methods onListPriceListsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListPriceLists 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPriceListsPaginator
default ListPriceListsPublisher listPriceListsPaginator(ListPriceListsRequest listPriceListsRequest) This is a variant of
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)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.pricing.paginators.ListPriceListsPublisher publisher = client.listPriceListsPaginator(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.pricing.paginators.ListPriceListsPublisher publisher = client.listPriceListsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.ListPriceListsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.ListPriceListsResponse 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
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)operation.- Parameters:
listPriceListsRequest-- 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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPriceListsPaginator
default ListPriceListsPublisher listPriceListsPaginator(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This is a variant of
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)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.pricing.paginators.ListPriceListsPublisher publisher = client.listPriceListsPaginator(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.pricing.paginators.ListPriceListsPublisher publisher = client.listPriceListsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.pricing.model.ListPriceListsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.pricing.model.ListPriceListsResponse 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
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)operation.
This is a convenience which creates an instance of the
ListPriceListsRequest.Builderavoiding the need to create one manually viaListPriceListsRequest.builder()- Parameters:
listPriceListsRequest- AConsumerthat will call methods onListPriceListsRequest.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.- InvalidParameterException One or more parameters had an invalid value.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- NotFoundException The requested resource can't be found.
- AccessDeniedException General authentication failure. The request wasn't signed correctly.
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
- ThrottlingException You've made too many requests exceeding service quotas.
- ResourceNotFoundException The requested resource can't be found.
- ExpiredNextTokenException The pagination token expired. Try again without a pagination token.
- 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.
- PricingException 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 aPricingAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aPricingAsyncClient.
-