- Navigation GuideYou are on a Client landing page. Commands (operations) are listed on this page. The Client constructor type is linked at the bottom.
PricingClient
The Amazon Web Services Price List API is a centralized and convenient way to programmatically query Amazon Web Services for services, products, and pricing information. The Amazon Web Services Price List uses standardized product attributes such as Location
, Storage Class
, and Operating System
, and provides prices at the SKU level. You can use the Amazon Web Services Price List to do the following:
-
Build cost control and scenario planning tools
-
Reconcile billing data
-
Forecast future spend for budgeting purposes
-
Provide cost benefit analysis that compare your internal workloads with Amazon Web Services
Use GetServices
without a service code to retrieve the service codes for all Amazon Web Services services, then GetServices
with a service code to retrieve the attribute names for that service. After you have the service code and attribute names, you can use GetAttributeValues
to see what values are available for an attribute. With the service code and an attribute name and value, you can use GetProducts
to find specific products that you're interested in, such as an AmazonEC2
instance, with a Provisioned IOPS
volumeType
.
For more information, see Using the Amazon Web Services Price List API in the Billing User Guide.
Installation
npm install @aws-sdk/client-pricing
yarn add @aws-sdk/client-pricing
pnpm add @aws-sdk/client-pricing
PricingClient Operations
Command | Summary |
---|
Command | Summary |
---|---|
DescribeServicesCommand | 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 |
GetAttributeValuesCommand | 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 . |
GetPriceListFileUrlCommand | 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 |
GetProductsCommand | Returns a list of all products that match the filter criteria. |
ListPriceListsCommand | 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 |
PricingClient Configuration
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
defaultsMode Optional | DefaultsMode | Provider<DefaultsMode> | The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK. |
disableHostPrefix Optional | boolean | Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation. |
extensions Optional | RuntimeExtension[] | Optional extensions |
logger Optional | Logger | Optional logger for logging debug/info/warn/error. |
maxAttempts Optional | number | Provider<number> | Value for how many times a request will be made at most in case of retry. |
profile Optional | string | Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options. |
region Optional | string | Provider<string> | The AWS region to which this client will send requests |
requestHandler Optional | __HttpHandlerUserInput | The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. |
retryMode Optional | string | Provider<string> | Specifies which retry algorithm to use. |
useDualstackEndpoint Optional | boolean | Provider<boolean> | Enables IPv6/IPv4 dualstack endpoint. |
useFipsEndpoint Optional | boolean | Provider<boolean> | Enables FIPS compatible endpoints. |
Additional config fields are described in the full configuration type: PricingClientConfig