@Generated(value="software.amazon.awssdk:codegen") public interface PricingAsyncClient extends SdkClient
builder()
method.
AWS Price List Service API (AWS Price List Service) is a centralized and convenient way to programmatically query
Amazon Web Services for services, products, and pricing information. The AWS Price List Service uses standardized
product attributes such as Location
, Storage Class
, and Operating System
, and
provides prices at the SKU level. You can use the AWS Price List Service 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 AWS.
Use GetServices
without a service code to retrieve the service codes for all AWS services, then
GetServices
with a service code to retreive 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
AWS 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
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static PricingAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
PricingAsyncClient . |
static PricingAsyncClient |
create()
Create a
PricingAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<DescribeServicesResponse> |
describeServices()
Returns the metadata for one service or a list of the metadata for all services.
|
default CompletableFuture<DescribeServicesResponse> |
describeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest)
Returns the metadata for one service or a list of the metadata for all services.
|
default CompletableFuture<DescribeServicesResponse> |
describeServices(DescribeServicesRequest describeServicesRequest)
Returns the metadata for one service or a list of the metadata for all services.
|
default DescribeServicesPublisher |
describeServicesPaginator()
Returns the metadata for one service or a list of the metadata for all services.
|
default DescribeServicesPublisher |
describeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest)
Returns the metadata for one service or a list of the metadata for all services.
|
default DescribeServicesPublisher |
describeServicesPaginator(DescribeServicesRequest describeServicesRequest)
Returns the metadata for one service or a list of the metadata for all services.
|
default CompletableFuture<GetAttributeValuesResponse> |
getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)
Returns a list of attribute values.
|
default CompletableFuture<GetAttributeValuesResponse> |
getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest)
Returns a list of attribute values.
|
default GetAttributeValuesPublisher |
getAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)
Returns a list of attribute values.
|
default GetAttributeValuesPublisher |
getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest)
Returns a list of attribute values.
|
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 GetProductsPublisher |
getProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest)
Returns a list of all products that match the filter criteria.
|
default GetProductsPublisher |
getProductsPaginator(GetProductsRequest getProductsRequest)
Returns a list of all products that match the filter criteria.
|
serviceName
close
static final String SERVICE_NAME
static PricingAsyncClient create()
PricingAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static PricingAsyncClientBuilder builder()
PricingAsyncClient
.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 are volumeType
, maxIopsVolume
,
operation
, locationType
, and instanceCapacity10xlarge
.
describeServicesRequest
- 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 are volumeType
, maxIopsVolume
,
operation
, locationType
, and instanceCapacity10xlarge
.
This is a convenience which creates an instance of the DescribeServicesRequest.Builder
avoiding the need
to create one manually via DescribeServicesRequest.builder()
describeServicesRequest
- A Consumer
that will call methods on DescribeServicesRequest.Builder
to create a request.default CompletableFuture<DescribeServicesResponse> 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 are volumeType
, maxIopsVolume
,
operation
, locationType
, and instanceCapacity10xlarge
.
default DescribeServicesPublisher describeServicesPaginator()
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
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation.
default DescribeServicesPublisher describeServicesPaginator(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 are volumeType
, maxIopsVolume
,
operation
, locationType
, and instanceCapacity10xlarge
.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation.
describeServicesRequest
- default DescribeServicesPublisher describeServicesPaginator(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 are volumeType
, maxIopsVolume
,
operation
, locationType
, and instanceCapacity10xlarge
.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.DescribeServicesPublisher publisher = client.describeServicesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.Builder
avoiding the need
to create one manually via DescribeServicesRequest.builder()
describeServicesRequest
- A Consumer
that will call methods on DescribeServicesRequest.Builder
to create a request.default CompletableFuture<GetAttributeValuesResponse> getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest)
Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
getAttributeValuesRequest
- default CompletableFuture<GetAttributeValuesResponse> getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)
Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
This is a convenience which creates an instance of the GetAttributeValuesRequest.Builder
avoiding the
need to create one manually via GetAttributeValuesRequest.builder()
getAttributeValuesRequest
- A Consumer
that will call methods on GetAttributeValuesRequest.Builder
to create a
request.default GetAttributeValuesPublisher getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest)
Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)
operation.
getAttributeValuesRequest
- default GetAttributeValuesPublisher getAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)
Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesPublisher publisher = client.getAttributeValuesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.Builder
avoiding the
need to create one manually via GetAttributeValuesRequest.builder()
getAttributeValuesRequest
- A Consumer
that will call methods on GetAttributeValuesRequest.Builder
to create a
request.default CompletableFuture<GetProductsResponse> getProducts(GetProductsRequest getProductsRequest)
Returns a list of all products that match the filter criteria.
getProductsRequest
- 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.Builder
avoiding the need to
create one manually via GetProductsRequest.builder()
getProductsRequest
- A Consumer
that will call methods on GetProductsRequest.Builder
to create a request.default GetProductsPublisher getProductsPaginator(GetProductsRequest getProductsRequest)
Returns a list of all products that match the filter criteria.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)
operation.
getProductsRequest
- default GetProductsPublisher getProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest)
Returns a list of all products that match the filter criteria.
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 new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.pricing.paginators.GetProductsPublisher publisher = client.getProductsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.Builder
avoiding the need to
create one manually via GetProductsRequest.builder()
getProductsRequest
- A Consumer
that will call methods on GetProductsRequest.Builder
to create a request.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.