
software.amazon.awssdk.services.pricing.PricingAsyncClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.pricing;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.pricing.model.DescribeServicesRequest;
import software.amazon.awssdk.services.pricing.model.DescribeServicesResponse;
import software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest;
import software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse;
import software.amazon.awssdk.services.pricing.model.GetProductsRequest;
import software.amazon.awssdk.services.pricing.model.GetProductsResponse;
import software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher;
import software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher;
import software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher;
/**
* Service client for accessing AWS Pricing asynchronously. This can be created using the static {@link #builder()}
* method.
*
*
* 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 build cost control and scenario planning
* tools, reconcile billing data, forecast future spend for budgeting purposes, and 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 AWS 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
.
*
*
* Service Endpoint
*
*
* Amazon Web Services Price List service API provides the following two endpoints:
*
*
* -
*
* https://api.pricing.us-east-1.amazonaws.com
*
*
* -
*
* https://api.pricing.ap-south-1.amazonaws.com
*
*
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface PricingAsyncClient extends SdkClient {
String SERVICE_NAME = "pricing";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "api.pricing";
/**
* Create a {@link PricingAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static PricingAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link PricingAsyncClient}.
*/
static PricingAsyncClientBuilder builder() {
return new DefaultPricingAsyncClientBuilder();
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
* @param describeServicesRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default CompletableFuture describeServices(DescribeServicesRequest describeServicesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
*
* This is a convenience which creates an instance of the {@link DescribeServicesRequest.Builder} avoiding the need
* to create one manually via {@link DescribeServicesRequest#builder()}
*
*
* @param describeServicesRequest
* A {@link Consumer} that will call methods on {@link DescribeServicesRequest.Builder} to create a request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default CompletableFuture describeServices(
Consumer describeServicesRequest) {
return describeServices(DescribeServicesRequest.builder().applyMutation(describeServicesRequest).build());
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default CompletableFuture describeServices() {
return describeServices(DescribeServicesRequest.builder().build());
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)} operation.
*
*
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default DescribeServicesPublisher describeServicesPaginator() {
return describeServicesPaginator(DescribeServicesRequest.builder().build());
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)} operation.
*
*
* @param describeServicesRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default DescribeServicesPublisher describeServicesPaginator(DescribeServicesRequest describeServicesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 are volumeType
, maxIopsVolume
,
* operation
, locationType
, and instanceCapacity10xlarge
.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)} operation.
*
*
* This is a convenience which creates an instance of the {@link DescribeServicesRequest.Builder} avoiding the need
* to create one manually via {@link DescribeServicesRequest#builder()}
*
*
* @param describeServicesRequest
* A {@link Consumer} that will call methods on {@link DescribeServicesRequest.Builder} to create a request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.DescribeServices
* @see AWS API
* Documentation
*/
default DescribeServicesPublisher describeServicesPaginator(Consumer describeServicesRequest) {
return describeServicesPaginator(DescribeServicesRequest.builder().applyMutation(describeServicesRequest).build());
}
/**
*
* 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.
*
*
* @param getAttributeValuesRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetAttributeValues
* @see AWS
* API Documentation
*/
default CompletableFuture getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 {@link GetAttributeValuesRequest.Builder} avoiding the
* need to create one manually via {@link GetAttributeValuesRequest#builder()}
*
*
* @param getAttributeValuesRequest
* A {@link Consumer} that will call methods on {@link GetAttributeValuesRequest.Builder} to create a
* request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetAttributeValues
* @see AWS
* API Documentation
*/
default CompletableFuture getAttributeValues(
Consumer getAttributeValuesRequest) {
return getAttributeValues(GetAttributeValuesRequest.builder().applyMutation(getAttributeValuesRequest).build());
}
/**
*
* 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 variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)}
* operation.
*
*
* @param getAttributeValuesRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetAttributeValues
* @see AWS
* API Documentation
*/
default GetAttributeValuesPublisher getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)}
* operation.
*
*
* This is a convenience which creates an instance of the {@link GetAttributeValuesRequest.Builder} avoiding the
* need to create one manually via {@link GetAttributeValuesRequest#builder()}
*
*
* @param getAttributeValuesRequest
* A {@link Consumer} that will call methods on {@link GetAttributeValuesRequest.Builder} to create a
* request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetAttributeValues
* @see AWS
* API Documentation
*/
default GetAttributeValuesPublisher getAttributeValuesPaginator(
Consumer getAttributeValuesRequest) {
return getAttributeValuesPaginator(GetAttributeValuesRequest.builder().applyMutation(getAttributeValuesRequest).build());
}
/**
*
* Returns a list of all products that match the filter criteria.
*
*
* @param getProductsRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetProducts
* @see AWS API
* Documentation
*/
default CompletableFuture getProducts(GetProductsRequest getProductsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of all products that match the filter criteria.
*
*
*
* This is a convenience which creates an instance of the {@link GetProductsRequest.Builder} avoiding the need to
* create one manually via {@link GetProductsRequest#builder()}
*
*
* @param getProductsRequest
* A {@link Consumer} that will call methods on {@link GetProductsRequest.Builder} to create a request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetProducts
* @see AWS API
* Documentation
*/
default CompletableFuture getProducts(Consumer getProductsRequest) {
return getProducts(GetProductsRequest.builder().applyMutation(getProductsRequest).build());
}
/**
*
* Returns a list of all products that match the filter criteria.
*
*
*
* This is a variant of {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.GetProductsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)} operation.
*
*
* @param getProductsRequest
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetProducts
* @see AWS API
* Documentation
*/
default GetProductsPublisher getProductsPaginator(GetProductsRequest getProductsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of all products that match the filter criteria.
*
*
*
* This is a variant of {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.pricing.model.GetProductsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)} operation.
*
*
* This is a convenience which creates an instance of the {@link GetProductsRequest.Builder} avoiding the need to
* create one manually via {@link GetProductsRequest#builder()}
*
*
* @param getProductsRequest
* A {@link Consumer} that will call methods on {@link GetProductsRequest.Builder} to create a request.
* @return 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.
*
* - InternalErrorException An error on the server occurred during the processing of your request. Try
* again later.
* - InvalidParameterException One or more parameters had an invalid value.
* - NotFoundException The requested resource can't be found.
* - InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
* - 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.
*
* @sample PricingAsyncClient.GetProducts
* @see AWS API
* Documentation
*/
default GetProductsPublisher getProductsPaginator(Consumer getProductsRequest) {
return getProductsPaginator(GetProductsRequest.builder().applyMutation(getProductsRequest).build());
}
}