Interface PricingClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
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, 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
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic PricingClientBuilder
builder()
Create a builder that can be used to configure and create aPricingClient
.static PricingClient
create()
Create aPricingClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default DescribeServicesResponse
Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesResponse
describeServices
(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesResponse
describeServices
(DescribeServicesRequest describeServicesRequest) Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesIterable
This is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation.default DescribeServicesIterable
describeServicesPaginator
(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) This is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation.default DescribeServicesIterable
describeServicesPaginator
(DescribeServicesRequest describeServicesRequest) This is a variant ofdescribeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation.default GetAttributeValuesResponse
getAttributeValues
(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) Returns a list of attribute values.default GetAttributeValuesResponse
getAttributeValues
(GetAttributeValuesRequest getAttributeValuesRequest) Returns a list of attribute values.default GetAttributeValuesIterable
getAttributeValuesPaginator
(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) This is a variant ofgetAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)
operation.default GetAttributeValuesIterable
getAttributeValuesPaginator
(GetAttributeValuesRequest getAttributeValuesRequest) This is a variant ofgetAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)
operation.default GetPriceListFileUrlResponse
getPriceListFileUrl
(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest) This feature is in preview release and is subject to change.default GetPriceListFileUrlResponse
getPriceListFileUrl
(GetPriceListFileUrlRequest getPriceListFileUrlRequest) This feature is in preview release and is subject to change.default GetProductsResponse
getProducts
(Consumer<GetProductsRequest.Builder> getProductsRequest) Returns a list of all products that match the filter criteria.default GetProductsResponse
getProducts
(GetProductsRequest getProductsRequest) Returns a list of all products that match the filter criteria.default GetProductsIterable
getProductsPaginator
(Consumer<GetProductsRequest.Builder> getProductsRequest) This is a variant ofgetProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)
operation.default GetProductsIterable
getProductsPaginator
(GetProductsRequest getProductsRequest) This is a variant ofgetProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)
operation.default ListPriceListsResponse
listPriceLists
(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This feature is in preview release and is subject to change.default ListPriceListsResponse
listPriceLists
(ListPriceListsRequest listPriceListsRequest) This feature is in preview release and is subject to change.default ListPriceListsIterable
listPriceListsPaginator
(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) This is a variant oflistPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)
operation.default ListPriceListsIterable
listPriceListsPaginator
(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., ClientOverrideConfigurationstatic ServiceMetadata
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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 DescribeServicesResponse describeServices(DescribeServicesRequest describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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:
- Result of the DescribeServices operation returned by the service.
- See Also:
-
describeServices
default DescribeServicesResponse describeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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.Builder
avoiding the need to create one manually viaDescribeServicesRequest.builder()
- Parameters:
describeServicesRequest
- AConsumer
that will call methods onDescribeServicesRequest.Builder
to create a request.- Returns:
- Result of the DescribeServices operation returned by the service.
- See Also:
-
describeServices
default DescribeServicesResponse describeServices() throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingExceptionReturns 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:
- Result of the DescribeServices operation returned by the service.
- See Also:
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator() throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingExceptionThis is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client .describeServicesPaginator(request); for (software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator(DescribeServicesRequest describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client .describeServicesPaginator(request); for (software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
describeServices(software.amazon.awssdk.services.pricing.model.DescribeServicesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client .describeServicesPaginator(request); for (software.amazon.awssdk.services.pricing.model.DescribeServicesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.DescribeServicesIterable responses = client.describeServicesPaginator(request); responses.iterator().forEachRemaining(....);
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.Builder
avoiding the need to create one manually viaDescribeServicesRequest.builder()
- Parameters:
describeServicesRequest
- AConsumer
that will call methods onDescribeServicesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getAttributeValues
default GetAttributeValuesResponse getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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:
- Result of the GetAttributeValues operation returned by the service.
- See Also:
-
getAttributeValues
default GetAttributeValuesResponse getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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.Builder
avoiding the need to create one manually viaGetAttributeValuesRequest.builder()
- Parameters:
getAttributeValuesRequest
- AConsumer
that will call methods onGetAttributeValuesRequest.Builder
to create a request.- Returns:
- Result of the GetAttributeValues operation returned by the service.
- See Also:
-
getAttributeValuesPaginator
default GetAttributeValuesIterable getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client.getAttributeValuesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client .getAttributeValuesPaginator(request); for (software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client.getAttributeValuesPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
getAttributeValuesPaginator
default GetAttributeValuesIterable getAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
getAttributeValues(software.amazon.awssdk.services.pricing.model.GetAttributeValuesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client.getAttributeValuesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client .getAttributeValuesPaginator(request); for (software.amazon.awssdk.services.pricing.model.GetAttributeValuesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.GetAttributeValuesIterable responses = client.getAttributeValuesPaginator(request); responses.iterator().forEachRemaining(....);
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.Builder
avoiding the need to create one manually viaGetAttributeValuesRequest.builder()
- Parameters:
getAttributeValuesRequest
- AConsumer
that will call methods onGetAttributeValuesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getPriceListFileUrl
default GetPriceListFileUrlResponse getPriceListFileUrl(GetPriceListFileUrlRequest getPriceListFileUrlRequest) throws InvalidParameterException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, AwsServiceException, SdkClientException, PricingException 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
PriceListArn
andFileFormat
that you retrieve from the ListPriceLists response.- Parameters:
getPriceListFileUrlRequest
-- Returns:
- Result of the GetPriceListFileUrl operation returned by the service.
- See Also:
-
getPriceListFileUrl
default GetPriceListFileUrlResponse getPriceListFileUrl(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest) throws InvalidParameterException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, AwsServiceException, SdkClientException, PricingException 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
PriceListArn
andFileFormat
that you retrieve from the ListPriceLists response.
This is a convenience which creates an instance of the
GetPriceListFileUrlRequest.Builder
avoiding the need to create one manually viaGetPriceListFileUrlRequest.builder()
- Parameters:
getPriceListFileUrlRequest
- AConsumer
that will call methods onGetPriceListFileUrlRequest.Builder
to create a request.- Returns:
- Result of the GetPriceListFileUrl operation returned by the service.
- See Also:
-
getProducts
default GetProductsResponse getProducts(GetProductsRequest getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException Returns a list of all products that match the filter criteria.
- Parameters:
getProductsRequest
-- Returns:
- Result of the GetProducts operation returned by the service.
- See Also:
-
getProducts
default GetProductsResponse getProducts(Consumer<GetProductsRequest.Builder> getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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 viaGetProductsRequest.builder()
- Parameters:
getProductsRequest
- AConsumer
that will call methods onGetProductsRequest.Builder
to create a request.- Returns:
- Result of the GetProducts operation returned by the service.
- See Also:
-
getProductsPaginator
default GetProductsIterable getProductsPaginator(GetProductsRequest getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); for (software.amazon.awssdk.services.pricing.model.GetProductsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
getProductsPaginator
default GetProductsIterable getProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ThrottlingException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
getProducts(software.amazon.awssdk.services.pricing.model.GetProductsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); for (software.amazon.awssdk.services.pricing.model.GetProductsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.GetProductsIterable responses = client.getProductsPaginator(request); responses.iterator().forEachRemaining(....);
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.Builder
avoiding the need to create one manually viaGetProductsRequest.builder()
- Parameters:
getProductsRequest
- AConsumer
that will call methods onGetProductsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listPriceLists
default ListPriceListsResponse listPriceLists(ListPriceListsRequest listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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 aRegionCode
filter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCode
filter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArn
from the response to get your preferred Price List files through the GetPriceListFileUrl API.- Parameters:
listPriceListsRequest
-- Returns:
- Result of the ListPriceLists operation returned by the service.
- See Also:
-
listPriceLists
default ListPriceListsResponse listPriceLists(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException 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 aRegionCode
filter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCode
filter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArn
from the response to get your preferred Price List files through the GetPriceListFileUrl API.
This is a convenience which creates an instance of the
ListPriceListsRequest.Builder
avoiding the need to create one manually viaListPriceListsRequest.builder()
- Parameters:
listPriceListsRequest
- AConsumer
that will call methods onListPriceListsRequest.Builder
to create a request.- Returns:
- Result of the ListPriceLists operation returned by the service.
- See Also:
-
listPriceListsPaginator
default ListPriceListsIterable listPriceListsPaginator(ListPriceListsRequest listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); for (software.amazon.awssdk.services.pricing.model.ListPriceListsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
listPriceListsPaginator
default ListPriceListsIterable listPriceListsPaginator(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, ThrottlingException, ResourceNotFoundException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException This is a variant of
listPriceLists(software.amazon.awssdk.services.pricing.model.ListPriceListsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); for (software.amazon.awssdk.services.pricing.model.ListPriceListsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.pricing.paginators.ListPriceListsIterable responses = client.listPriceListsPaginator(request); responses.iterator().forEachRemaining(....);
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.Builder
avoiding the need to create one manually viaListPriceListsRequest.builder()
- Parameters:
listPriceListsRequest
- AConsumer
that will call methods onListPriceListsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
create
Create aPricingClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aPricingClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-