

# AWS Price List


The following actions are supported by AWS Price List:
+  [DescribeServices](API_pricing_DescribeServices.md) 
+  [GetAttributeValues](API_pricing_GetAttributeValues.md) 
+  [GetPriceListFileUrl](API_pricing_GetPriceListFileUrl.md) 
+  [GetProducts](API_pricing_GetProducts.md) 
+  [ListPriceLists](API_pricing_ListPriceLists.md) 

# DescribeServices


Returns the metadata for one service or a list of the metadata for all services. Use this without a service code to get the service codes for all services. Use it with a service code, such as `AmazonEC2`, to get information specific to that service, such as the attribute names available for that service. For example, some of the attribute names available for EC2 are `volumeType`, `maxIopsVolume`, `operation`, `locationType`, and `instanceCapacity10xlarge`.

## Request Syntax


```
{
   "FormatVersion": "string",
   "MaxResults": number,
   "NextToken": "string",
   "ServiceCode": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [FormatVersion](#API_pricing_DescribeServices_RequestSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-request-FormatVersion"></a>
The format version that you want the response to be in.  
Valid values are: `aws_v1`   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Required: No

 ** [MaxResults](#API_pricing_DescribeServices_RequestSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-request-MaxResults"></a>
The maximum number of results that you want returned in the response.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [NextToken](#API_pricing_DescribeServices_RequestSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-request-NextToken"></a>
The pagination token that indicates the next set of results that you want to retrieve.  
Type: String  
Required: No

 ** [ServiceCode](#API_pricing_DescribeServices_RequestSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-request-ServiceCode"></a>
The code for the service whose information you want to retrieve, such as `AmazonEC2`. You can use the `ServiceCode` to filter the results in a `GetProducts` call. To retrieve a list of all services, leave this blank.  
Type: String  
Required: No

## Response Syntax


```
{
   "FormatVersion": "string",
   "NextToken": "string",
   "Services": [ 
      { 
         "AttributeNames": [ "string" ],
         "ServiceCode": "string"
      }
   ]
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [FormatVersion](#API_pricing_DescribeServices_ResponseSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-response-FormatVersion"></a>
The format version of the response. For example, `aws_v1`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.

 ** [NextToken](#API_pricing_DescribeServices_ResponseSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-response-NextToken"></a>
The pagination token for the next set of retrievable results.  
Type: String

 ** [Services](#API_pricing_DescribeServices_ResponseSyntax) **   <a name="awscostmanagement-pricing_DescribeServices-response-Services"></a>
The service metadata for the service or services in the response.  
Type: Array of [Service](API_pricing_Service.md) objects

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
General authentication failure. The request wasn't signed correctly.  
HTTP Status Code: 400

 ** ExpiredNextTokenException **   
The pagination token expired. Try again without a pagination token.  
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.  
HTTP Status Code: 500

 ** InvalidNextTokenException **   
The pagination token is invalid. Try again without a pagination token.  
HTTP Status Code: 400

 ** InvalidParameterException **   
One or more parameters had an invalid value.  
HTTP Status Code: 400

 ** NotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ThrottlingException **   
You've made too many requests exceeding service quotas.   
HTTP Status Code: 400

## Examples


### The following is a sample request and response of the GetService operation.


This example illustrates one usage of DescribeServices.

#### Sample Request


```
POST / HTTP/1.1
Host: api.pricing.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSPriceListService.DescribeServices
{
    "ServiceCode": "AmazonEC2",
    "FormatVersion": "aws_v1",
    "NextToken": null,
    "MaxResults": 1
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
    "FormatVersion": "aws_v1",
    "NextToken": "abcdefg123",
    "Services": [
        {
            "AttributeNames": [
                "volumeType",
                "maxIopsvolume",
                "instanceCapacity10xlarge",
                "locationType",
                "operation"
            ],
            "ServiceCode": "AmazonEC2"
        }
    ]
}
```

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/pricing-2017-10-15/DescribeServices) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/pricing-2017-10-15/DescribeServices) 

# GetAttributeValues


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](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs) in the [AWS Billing and Cost Management User Guide](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html).

## Request Syntax


```
{
   "AttributeName": "string",
   "MaxResults": number,
   "NextToken": "string",
   "ServiceCode": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AttributeName](#API_pricing_GetAttributeValues_RequestSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-request-AttributeName"></a>
The name of the attribute that you want to retrieve the values for, such as `volumeType`.  
Type: String  
Required: Yes

 ** [MaxResults](#API_pricing_GetAttributeValues_RequestSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-request-MaxResults"></a>
The maximum number of results to return in response.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 10000.  
Required: No

 ** [NextToken](#API_pricing_GetAttributeValues_RequestSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-request-NextToken"></a>
The pagination token that indicates the next set of results that you want to retrieve.  
Type: String  
Required: No

 ** [ServiceCode](#API_pricing_GetAttributeValues_RequestSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-request-ServiceCode"></a>
The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use `AmazonEC2`.  
Type: String  
Required: Yes

## Response Syntax


```
{
   "AttributeValues": [ 
      { 
         "Value": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [AttributeValues](#API_pricing_GetAttributeValues_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-response-AttributeValues"></a>
The list of values for an attribute. For example, `Throughput Optimized HDD` and `Provisioned IOPS` are two available values for the `AmazonEC2` `volumeType`.  
Type: Array of [AttributeValue](API_pricing_AttributeValue.md) objects

 ** [NextToken](#API_pricing_GetAttributeValues_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetAttributeValues-response-NextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
General authentication failure. The request wasn't signed correctly.  
HTTP Status Code: 400

 ** ExpiredNextTokenException **   
The pagination token expired. Try again without a pagination token.  
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.  
HTTP Status Code: 500

 ** InvalidNextTokenException **   
The pagination token is invalid. Try again without a pagination token.  
HTTP Status Code: 400

 ** InvalidParameterException **   
One or more parameters had an invalid value.  
HTTP Status Code: 400

 ** NotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ThrottlingException **   
You've made too many requests exceeding service quotas.   
HTTP Status Code: 400

## Examples


### The following is a sample request and response of the GetAttributeValues operation.


This example illustrates one usage of GetAttributeValues.

#### Sample Request


```
POST / HTTP/1.1
Host: api.pricing.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSPriceListService.GetAttributeValues
{
    "ServiceCode": "AmazonEC2",
    "AttributeName": "volumeType",
    "NextToken": null,
    "MaxResults": 2
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
    "AttributeValues": [
        {
            "Value": "Throughput Optimized HDD"
        },
        {
            "Value": "Provisioned IOPS"
        }
    ],
    "NextToken": "GpgauTGIY7LGezucl5LV0w==:7GzYJ0nw0DBTJ2J66EoTIIynE6O1uXwQtTRqioJzQadBnDVgHPzI1en4BUQnPCLpzeBk9RQQAWaFieA4+DapFAGLgk+Z/9/cTw9GldnPOHN98+FdmJP7wKU3QQpQ8MQr5KOeBkIsAqvAQYdL0DkL7tHwPtE5iCEByAmg9gcC/yBU1vAOsf7R3VaNN4M5jMDv3woSWqASSIlBVB6tgW78YL22KhssoItM/jWW+aP6Jqtq4mldxp/ct6DWAl+xLFwHU/CbketimPPXyqHF3/UXDw=="
}
```

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/pricing-2017-10-15/GetAttributeValues) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/pricing-2017-10-15/GetAttributeValues) 

# GetPriceListFileUrl


This returns the URL that you can retrieve your Price List file from. This URL is based on the `PriceListArn` and `FileFormat` that you retrieve from the [ListPriceLists](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html) response. 

## Request Syntax


```
{
   "FileFormat": "string",
   "PriceListArn": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [FileFormat](#API_pricing_GetPriceListFileUrl_RequestSyntax) **   <a name="awscostmanagement-pricing_GetPriceListFileUrl-request-FileFormat"></a>
The format that you want to retrieve your Price List files in. The `FileFormat` can be obtained from the [ListPriceLists](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html) response.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: Yes

 ** [PriceListArn](#API_pricing_GetPriceListFileUrl_RequestSyntax) **   <a name="awscostmanagement-pricing_GetPriceListFileUrl-request-PriceListArn"></a>
The unique identifier that maps to where your Price List files are located. `PriceListArn` can be obtained from the [ListPriceLists](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html) response.   
Type: String  
Length Constraints: Minimum length of 18. Maximum length of 2048.  
Pattern: `arn:[A-Za-z0-9][-.A-Za-z0-9]{0,62}:pricing:::price-list/[A-Za-z0-9+_/.-]{1,1023}`   
Required: Yes

## Response Syntax


```
{
   "Url": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Url](#API_pricing_GetPriceListFileUrl_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetPriceListFileUrl-response-Url"></a>
The URL to download your Price List file from.   
Type: String

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
General authentication failure. The request wasn't signed correctly.  
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.  
HTTP Status Code: 500

 ** InvalidParameterException **   
One or more parameters had an invalid value.  
HTTP Status Code: 400

 ** NotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ThrottlingException **   
You've made too many requests exceeding service quotas.   
HTTP Status Code: 400

## Examples


### The following is a sample request and response of the GetPriceListFileUrl operation.


This example illustrates one usage of GetPriceListFileUrl.

#### Sample Request


```
POST / HTTP/1.1
Host: api.pricing.<region>.<domain>
x-amz-Date: <Date>Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>Connection: Keep-Alive
X-Amz-Target: AWSPriceListService.GetPriceListFileUrl{
    "PriceListArn": "arn:aws:pricing:::price-list/aws/AmazonEC2/USD/20220603151047/us-east-1",
    "FileFormat": "json"
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
    "Url": "https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/20220603151047/us-east-1/index.json"
}
```

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/pricing-2017-10-15/GetPriceListFileUrl) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/pricing-2017-10-15/GetPriceListFileUrl) 

# GetProducts


Returns a list of all products that match the filter criteria.

## Request Syntax


```
{
   "Filters": [ 
      { 
         "Field": "string",
         "Type": "string",
         "Value": "string"
      }
   ],
   "FormatVersion": "string",
   "MaxResults": number,
   "NextToken": "string",
   "ServiceCode": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filters](#API_pricing_GetProducts_RequestSyntax) **   <a name="awscostmanagement-pricing_GetProducts-request-Filters"></a>
The list of filters that limit the returned products. only products that match all filters are returned.  
Type: Array of [Filter](API_pricing_Filter.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 50 items.  
Required: No

 ** [FormatVersion](#API_pricing_GetProducts_RequestSyntax) **   <a name="awscostmanagement-pricing_GetProducts-request-FormatVersion"></a>
The format version that you want the response to be in.  
Valid values are: `aws_v1`   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Required: No

 ** [MaxResults](#API_pricing_GetProducts_RequestSyntax) **   <a name="awscostmanagement-pricing_GetProducts-request-MaxResults"></a>
The maximum number of results to return in the response.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [NextToken](#API_pricing_GetProducts_RequestSyntax) **   <a name="awscostmanagement-pricing_GetProducts-request-NextToken"></a>
The pagination token that indicates the next set of results that you want to retrieve.  
Type: String  
Required: No

 ** [ServiceCode](#API_pricing_GetProducts_RequestSyntax) **   <a name="awscostmanagement-pricing_GetProducts-request-ServiceCode"></a>
The code for the service whose products you want to retrieve.   
Type: String  
Required: Yes

## Response Syntax


```
{
   "FormatVersion": "string",
   "NextToken": "string",
   "PriceList": [ "string" ]
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [FormatVersion](#API_pricing_GetProducts_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetProducts-response-FormatVersion"></a>
The format version of the response. For example, aws\$1v1.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.

 ** [NextToken](#API_pricing_GetProducts_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetProducts-response-NextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String

 ** [PriceList](#API_pricing_GetProducts_ResponseSyntax) **   <a name="awscostmanagement-pricing_GetProducts-response-PriceList"></a>
The list of products that match your filters. The list contains both the product metadata and the price information.  
Type: Array of strings

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
General authentication failure. The request wasn't signed correctly.  
HTTP Status Code: 400

 ** ExpiredNextTokenException **   
The pagination token expired. Try again without a pagination token.  
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.  
HTTP Status Code: 500

 ** InvalidNextTokenException **   
The pagination token is invalid. Try again without a pagination token.  
HTTP Status Code: 400

 ** InvalidParameterException **   
One or more parameters had an invalid value.  
HTTP Status Code: 400

 ** NotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ThrottlingException **   
You've made too many requests exceeding service quotas.   
HTTP Status Code: 400

## Examples


### The following is a sample request and response of the GetProducts operation.


This example illustrates one usage of GetProducts.

#### Sample Request


```
POST / HTTP/1.1
Host: api.pricing.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSPriceListService.GetProducts
{
    "Filters": [
        {
            "Type": "TERM_MATCH",
            "Field": "ServiceCode",
            "Value": "AmazonEC2"
        },
        {
            "Type": "TERM_MATCH",
            "Field": "volumeType",
            "Value": "Provisioned IOPS"
        }
    ],
    "FormatVersion": "aws_v1",
    "NextToken": null,
    "MaxResults": 1,
    "ServiceCode":"AmazonEC2"
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
    "FormatVersion": "aws_v1",
    "NextToken": "57r3UcqRjDujbzWfHF7Ciw==:ywSmZsD3mtpQmQLQ5XfOsIMkYybSj+vAT+kGmwMFq+K9DGmIoJkz7lunVeamiOPgthdWSO2a7YKojCO+zY4dJmuNl2QvbNhXs+AJ2Ufn7xGmJncNI2TsEuAsVCUfTAvAQNcwwamtk6XuZ4YdNnooV62FjkV3ZAn40d9+wAxV7+FImvhUHi/+f8afgZdGh2zPUlH8jlV9uUtj0oHp8+DhPUuHXh+WBII1E/aoKpPSm3c=",
    "PriceList": [
        "{\"product\":{\"productFamily\":\"Storage\",\"attributes\":{\"storageMedia\":\"SSD-backed\",\"maxThroughputvolume\":\"320 MB/sec\",\"volumeType\":\"Provisioned IOPS\",\"maxIopsvolume\":\"20000\",\"servicecode\":\"AmazonEC2\",\"usagetype\":\"CAN1-EBS:VolumeUsage.piops\",\"locationType\":\"AWS Region\",\"location\":\"Canada (Central)\",\"servicename\":\"Amazon Elastic Compute Cloud\",\"maxVolumeSize\":\"16 TiB\",\"operation\":\"\"},\"sku\":\"WQGC34PB2AWS8R4U\"},\"serviceCode\":\"AmazonEC2\",\"terms\":{\"OnDemand\":{\"WQGC34PB2AWS8R4U.JRTCKXETXF\":{\"priceDimensions\":{\"WQGC34PB2AWS8R4U.JRTCKXETXF.6YS6EN2CT7\":{\"unit\":\"GB-Mo\",\"endRange\":\"Inf\",\"description\":\"$0.138 per GB-month of Provisioned IOPS SSD (io1)  provisioned storage - Canada (Central)\",\"appliesTo\":[],\"rateCode\":\"WQGC34PB2AWS8R4U.JRTCKXETXF.6YS6EN2CT7\",\"beginRange\":\"0\",\"pricePerUnit\":{\"USD\":\"0.1380000000\"}}},\"sku\":\"WQGC34PB2AWS8R4U\",\"effectiveDate\":\"2017-08-01T00:00:00Z\",\"offerTermCode\":\"JRTCKXETXF\",\"termAttributes\":{}}}},\"version\":\"20170901182201\",\"publicationDate\":\"2017-09-01T18:22:01Z\"}"
    ]
}
```

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/pricing-2017-10-15/GetProducts) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/pricing-2017-10-15/GetProducts) 

# ListPriceLists


This returns a list of Price List references that the requester if authorized to view, given a `ServiceCode`, `CurrencyCode`, and an `EffectiveDate`. Use without a `RegionCode` filter to list Price List references from all available AWS Regions. Use with a `RegionCode` filter to get the Price List reference that's specific to a specific AWS Region. You can use the `PriceListArn` from the response to get your preferred Price List files through the [GetPriceListFileUrl](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html) API.

## Request Syntax


```
{
   "CurrencyCode": "string",
   "EffectiveDate": number,
   "MaxResults": number,
   "NextToken": "string",
   "RegionCode": "string",
   "ServiceCode": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [CurrencyCode](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-CurrencyCode"></a>
The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.   
Type: String  
Pattern: `[A-Z]{3}`   
Required: Yes

 ** [EffectiveDate](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-EffectiveDate"></a>
The date that the Price List file prices are effective from.   
Type: Timestamp  
Required: Yes

 ** [MaxResults](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-MaxResults"></a>
The maximum number of results to return in the response.   
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [NextToken](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-NextToken"></a>
The pagination token that indicates the next set of results that you want to retrieve.   
Type: String  
Required: No

 ** [RegionCode](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-RegionCode"></a>
This is used to filter the Price List by AWS Region. For example, to get the price list only for the `US East (N. Virginia)` Region, use `us-east-1`. If nothing is specified, you retrieve price lists for all applicable Regions. The available `RegionCode` list can be retrieved from [GetAttributeValues](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html) API.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: No

 ** [ServiceCode](#API_pricing_ListPriceLists_RequestSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-request-ServiceCode"></a>
The service code or the Savings Plans service code for the attributes that you want to retrieve. For example, to get the list of applicable Amazon EC2 price lists, use `AmazonEC2`. For a full list of service codes containing On-Demand and Reserved Instance (RI) pricing, use the [DescribeServices](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_DescribeServices.html#awscostmanagement-pricing_DescribeServices-request-FormatVersion) API.  
To retrieve the Reserved Instance and Compute Savings Plans price lists, use `ComputeSavingsPlans`.   
To retrieve Machine Learning Savings Plans price lists, use `MachineLearningSavingsPlans`.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Required: Yes

## Response Syntax


```
{
   "NextToken": "string",
   "PriceLists": [ 
      { 
         "CurrencyCode": "string",
         "FileFormats": [ "string" ],
         "PriceListArn": "string",
         "RegionCode": "string"
      }
   ]
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_pricing_ListPriceLists_ResponseSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-response-NextToken"></a>
The pagination token that indicates the next set of results to retrieve.   
Type: String

 ** [PriceLists](#API_pricing_ListPriceLists_ResponseSyntax) **   <a name="awscostmanagement-pricing_ListPriceLists-response-PriceLists"></a>
The type of price list references that match your request.   
Type: Array of [PriceList](API_pricing_PriceList.md) objects

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
General authentication failure. The request wasn't signed correctly.  
HTTP Status Code: 400

 ** ExpiredNextTokenException **   
The pagination token expired. Try again without a pagination token.  
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.  
HTTP Status Code: 500

 ** InvalidNextTokenException **   
The pagination token is invalid. Try again without a pagination token.  
HTTP Status Code: 400

 ** InvalidParameterException **   
One or more parameters had an invalid value.  
HTTP Status Code: 400

 ** NotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The requested resource can't be found.  
HTTP Status Code: 400

 ** ThrottlingException **   
You've made too many requests exceeding service quotas.   
HTTP Status Code: 400

## Examples


### The following is a sample request and response of the ListPriceLists operation.


This example illustrates one usage of ListPriceLists.

#### Sample Request


```
POST / HTTP/1.1
Host: api.pricing.<region>.<domain>
x-amz-Date: <Date>Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>Connection: Keep-Alive
X-Amz-Target: AWSPriceListService.ListPriceLists{
    "ServiceCode": "AmazonEC2",
    "EffectiveDate": 1651363200,
    "CurrencyCode": "USD",
    "RegionCode": "us-east-1",
    "NextToken": null,
    "MaxResults": 10
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
    "PriceLists": [
        {
            "PriceListArn": "arn:aws:pricing:::price-list/aws/AmazonEC2/USD/20220603151047/us-east-1",
            "RegionCode": "us-east-1",
            "CurrencyCode": "USD",
            "FileFormats": [
                "json",
                "csv"
            ]
        }
    ],
    "NextToken": "abcdefg123"
}
```

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/pricing-2017-10-15/ListPriceLists) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/pricing-2017-10-15/ListPriceLists) 