Interface PricingClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface PricingClient extends AwsClient
Service client for accessing AWS Pricing. This can be created using the staticbuilder()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, andOperating 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
GetServiceswithout a service code to retrieve the service codes for all Amazon Web Services, thenGetServiceswith a service code to retrieve the attribute names for that service. After you have the service code and attribute names, you can useGetAttributeValuesto see what values are available for an attribute. With the service code and an attribute name and value, you can useGetProductsto find specific products that you're interested in, such as anAmazonEC2instance, with aProvisioned IOPSvolumeType.For more information, see Using the Amazon Web Services Price List API in the Billing User Guide.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static PricingClientBuilderbuilder()Create a builder that can be used to configure and create aPricingClient.static PricingClientcreate()Create aPricingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DescribeServicesResponsedescribeServices()Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesResponsedescribeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest)Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesResponsedescribeServices(DescribeServicesRequest describeServicesRequest)Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesIterabledescribeServicesPaginator()Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesIterabledescribeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest)Returns the metadata for one service or a list of the metadata for all services.default DescribeServicesIterabledescribeServicesPaginator(DescribeServicesRequest describeServicesRequest)Returns the metadata for one service or a list of the metadata for all services.default GetAttributeValuesResponsegetAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)Returns a list of attribute values.default GetAttributeValuesResponsegetAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest)Returns a list of attribute values.default GetAttributeValuesIterablegetAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest)Returns a list of attribute values.default GetAttributeValuesIterablegetAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest)Returns a list of attribute values.default GetPriceListFileUrlResponsegetPriceListFileUrl(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest)This feature is in preview release and is subject to change.default GetPriceListFileUrlResponsegetPriceListFileUrl(GetPriceListFileUrlRequest getPriceListFileUrlRequest)This feature is in preview release and is subject to change.default GetProductsResponsegetProducts(Consumer<GetProductsRequest.Builder> getProductsRequest)Returns a list of all products that match the filter criteria.default GetProductsResponsegetProducts(GetProductsRequest getProductsRequest)Returns a list of all products that match the filter criteria.default GetProductsIterablegetProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest)Returns a list of all products that match the filter criteria.default GetProductsIterablegetProductsPaginator(GetProductsRequest getProductsRequest)Returns a list of all products that match the filter criteria.default ListPriceListsResponselistPriceLists(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest)This feature is in preview release and is subject to change.default ListPriceListsResponselistPriceLists(ListPriceListsRequest listPriceListsRequest)This feature is in preview release and is subject to change.default ListPriceListsIterablelistPriceListsPaginator(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest)This feature is in preview release and is subject to change.default ListPriceListsIterablelistPriceListsPaginator(ListPriceListsRequest listPriceListsRequest)This feature is in preview release and is subject to change.default PricingServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
describeServices
default DescribeServicesResponse describeServices(DescribeServicesRequest describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
describeServices
default DescribeServicesResponse describeServices(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.Builderavoiding the need to create one manually viaDescribeServicesRequest.builder()- Parameters:
describeServicesRequest- AConsumerthat will call methods onDescribeServicesRequest.Builderto create a request.- Returns:
- Result of the DescribeServices operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
describeServices
default DescribeServicesResponse describeServices() throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.- Returns:
- Result of the DescribeServices operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
describeServices(DescribeServicesRequest), AWS API Documentation
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator() throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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 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 Stream
2) Using For loopsoftware.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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
describeServicesPaginator(DescribeServicesRequest), AWS API Documentation
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator(DescribeServicesRequest describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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 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 Stream
2) Using For loopsoftware.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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
describeServicesPaginator
default DescribeServicesIterable describeServicesPaginator(Consumer<DescribeServicesRequest.Builder> describeServicesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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 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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaDescribeServicesRequest.builder()- Parameters:
describeServicesRequest- AConsumerthat will call methods onDescribeServicesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getAttributeValues
default GetAttributeValuesResponse getAttributeValues(GetAttributeValuesRequest getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getAttributeValues
default GetAttributeValuesResponse getAttributeValues(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.Builderavoiding the need to create one manually viaGetAttributeValuesRequest.builder()- Parameters:
getAttributeValuesRequest- AConsumerthat will call methods onGetAttributeValuesRequest.Builderto create a request.- Returns:
- Result of the GetAttributeValues operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getAttributeValuesPaginator
default GetAttributeValuesIterable getAttributeValuesPaginator(GetAttributeValuesRequest getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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 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 Stream
2) Using For loopsoftware.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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getAttributeValuesPaginator
default GetAttributeValuesIterable getAttributeValuesPaginator(Consumer<GetAttributeValuesRequest.Builder> getAttributeValuesRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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 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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaGetAttributeValuesRequest.builder()- Parameters:
getAttributeValuesRequest- AConsumerthat will call methods onGetAttributeValuesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getPriceListFileUrl
default GetPriceListFileUrlResponse getPriceListFileUrl(GetPriceListFileUrlRequest getPriceListFileUrlRequest) throws InvalidParameterException, NotFoundException, AccessDeniedException, InternalErrorException, 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
PriceListArnandFileFormatthat you retrieve from the ListPriceLists response.- Parameters:
getPriceListFileUrlRequest-- Returns:
- Result of the GetPriceListFileUrl operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getPriceListFileUrl
default GetPriceListFileUrlResponse getPriceListFileUrl(Consumer<GetPriceListFileUrlRequest.Builder> getPriceListFileUrlRequest) throws InvalidParameterException, NotFoundException, AccessDeniedException, InternalErrorException, 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
PriceListArnandFileFormatthat you retrieve from the ListPriceLists response.
This is a convenience which creates an instance of the
GetPriceListFileUrlRequest.Builderavoiding the need to create one manually viaGetPriceListFileUrlRequest.builder()- Parameters:
getPriceListFileUrlRequest- AConsumerthat will call methods onGetPriceListFileUrlRequest.Builderto create a request.- Returns:
- Result of the GetPriceListFileUrl operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getProducts
default GetProductsResponse getProducts(GetProductsRequest getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getProducts
default GetProductsResponse getProducts(Consumer<GetProductsRequest.Builder> getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, 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.Builderavoiding the need to create one manually viaGetProductsRequest.builder()- Parameters:
getProductsRequest- AConsumerthat will call methods onGetProductsRequest.Builderto create a request.- Returns:
- Result of the GetProducts operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getProductsPaginator
default GetProductsIterable getProductsPaginator(GetProductsRequest getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException
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 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 Stream
2) Using For loopsoftware.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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
getProductsPaginator
default GetProductsIterable getProductsPaginator(Consumer<GetProductsRequest.Builder> getProductsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, InternalErrorException, ExpiredNextTokenException, AwsServiceException, SdkClientException, PricingException
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 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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaGetProductsRequest.builder()- Parameters:
getProductsRequest- AConsumerthat will call methods onGetProductsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
listPriceLists
default ListPriceListsResponse listPriceLists(ListPriceListsRequest listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, 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 aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.- Parameters:
listPriceListsRequest-- Returns:
- Result of the ListPriceLists operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
listPriceLists
default ListPriceListsResponse listPriceLists(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, 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 aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.
This is a convenience which creates an instance of the
ListPriceListsRequest.Builderavoiding the need to create one manually viaListPriceListsRequest.builder()- Parameters:
listPriceListsRequest- AConsumerthat will call methods onListPriceListsRequest.Builderto create a request.- Returns:
- Result of the ListPriceLists operation returned by the service.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
listPriceListsPaginator
default ListPriceListsIterable listPriceListsPaginator(ListPriceListsRequest listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, 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 aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.
This is a 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 Stream
2) Using For loopsoftware.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.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
listPriceListsPaginator
default ListPriceListsIterable listPriceListsPaginator(Consumer<ListPriceListsRequest.Builder> listPriceListsRequest) throws InvalidParameterException, InvalidNextTokenException, NotFoundException, AccessDeniedException, InternalErrorException, 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 aRegionCodefilter to list Price List references from all available Amazon Web Services Regions. Use with aRegionCodefilter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use thePriceListArnfrom the response to get your preferred Price List files through the GetPriceListFileUrl API.
This is a 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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListPriceListsRequest.builder()- Parameters:
listPriceListsRequest- AConsumerthat will call methods onListPriceListsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidParameterException- One or more parameters had an invalid value.InvalidNextTokenException- The pagination token is invalid. Try again without a pagination token.NotFoundException- The requested resource can't be found.AccessDeniedException- General authentication failure. The request wasn't signed correctly.InternalErrorException- An error on the server occurred during the processing of your request. Try again later.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.AwsServiceException- See Also:
- AWS API Documentation
-
create
static PricingClient create()
Create aPricingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static PricingClientBuilder builder()
Create a builder that can be used to configure and create aPricingClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default PricingServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-