GetAttributeValues - AWS Billing and Cost Management


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 AWS Billing and Cost Management User Guide.

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.

The request accepts the following data in JSON format.


The name of the attribute that you want to retrieve the values for, such as volumeType.

Type: String

Required: Yes


The maximum number of results to return in response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No


The pagination token that indicates the next set of results that you want to retrieve.

Type: String

Required: No


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.


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 objects


The pagination token that indicates the next set of results to retrieve.

Type: String


For information about the errors that are common to all actions, see Common Errors.


The pagination token expired. Try again without a pagination token.

HTTP Status Code: 400


An error on the server occurred during the processing of your request. Try again later.

HTTP Status Code: 500


The pagination token is invalid. Try again without a pagination token.

HTTP Status Code: 400


One or more parameters had an invalid value.

HTTP Status Code: 400


The requested resource can't be found.

HTTP Status Code: 400


You've made too many requests exceeding service quotas.

HTTP Status Code: 400


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: