Pricing ******* Client ====== class Pricing.Client A low-level client representing AWS Price List Service (Pricing) 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*. import boto3 client = boto3.client('pricing') These are the available methods: * can_paginate * close * describe_services * get_attribute_values * get_paginator * get_price_list_file_url * get_products * get_waiter * list_price_lists Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * DescribeServices * GetAttributeValues * GetProducts * ListPriceLists Pricing / Paginator / GetProducts GetProducts *********** class Pricing.Paginator.GetProducts paginator = client.get_paginator('get_products') paginate(**kwargs) Creates an iterator that will paginate through responses from "Pricing.Client.get_products()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ServiceCode='string', Filters=[ { 'Type': 'TERM_MATCH'|'EQUALS'|'CONTAINS'|'ANY_OF'|'NONE_OF', 'Field': 'string', 'Value': 'string' }, ], FormatVersion='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The code for the service whose products you want to retrieve. * **Filters** (*list*) -- The list of filters that limit the returned products. only products that match all filters are returned. * *(dict) --* The constraints that you want all returned products to match. * **Type** *(string) --* **[REQUIRED]** The type of filter that you want to use. Valid values are: * "TERM_MATCH": Returns only products that match both the given filter field and the given value. * "EQUALS": Returns products that have a field value exactly matching the provided value. * "CONTAINS": Returns products where the field value contains the provided value as a substring. * "ANY_OF": Returns products where the field value is any of the provided values. * "NONE_OF": Returns products where the field value is not any of the provided values. * **Field** *(string) --* **[REQUIRED]** The product metadata field that you want to filter on. You can filter by just the service code to see all products for a specific service, filter by just the attribute name to see a specific attribute for multiple services, or use both a service code and an attribute name to retrieve only products that match both fields. Valid values include: "ServiceCode", and all attribute names For example, you can filter by the "AmazonEC2" service code and the "volumeType" attribute name to get the prices for only Amazon EC2 volumes. * **Value** *(string) --* **[REQUIRED]** The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as "AmazonEC2". If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a "Provisioned IOPS" volume. For "ANY_OF" and "NONE_OF" filter types, you can provide multiple values as a comma-separated string. For example, "t2.micro,t2.small,t2.medium" or "Compute optimized, GPU instance, Micro instances". * **FormatVersion** (*string*) -- The format version that you want the response to be in. Valid values are: "aws_v1" * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'FormatVersion': 'string', 'PriceList': [ 'string', ], } **Response Structure** * *(dict) --* * **FormatVersion** *(string) --* The format version of the response. For example, aws_v1. * **PriceList** *(list) --* The list of products that match your filters. The list contains both the product metadata and the price information. * *(string) --* Pricing / Paginator / ListPriceLists ListPriceLists ************** class Pricing.Paginator.ListPriceLists paginator = client.get_paginator('list_price_lists') paginate(**kwargs) Creates an iterator that will paginate through responses from "Pricing.Client.list_price_lists()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ServiceCode='string', EffectiveDate=datetime(2015, 1, 1), RegionCode='string', CurrencyCode='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The service code or the Savings Plan 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 API. To retrieve the Reserved Instance and Compute Savings Plan price lists, use "ComputeSavingsPlans". To retrieve Machine Learning Savings Plans price lists, use "MachineLearningSavingsPlans". * **EffectiveDate** (*datetime*) -- **[REQUIRED]** The date that the Price List file prices are effective from. * **RegionCode** (*string*) -- This is used to filter the Price List by Amazon Web Services 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 API. * **CurrencyCode** (*string*) -- **[REQUIRED]** The three alphabetical character ISO-4217 currency code that the Price List files are denominated in. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'PriceLists': [ { 'PriceListArn': 'string', 'RegionCode': 'string', 'CurrencyCode': 'string', 'FileFormats': [ 'string', ] }, ], } **Response Structure** * *(dict) --* * **PriceLists** *(list) --* The type of price list references that match your request. * *(dict) --* 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 is the type of price list references that match your request. * **PriceListArn** *(string) --* The unique identifier that maps to where your Price List files are located. "PriceListArn" can be obtained from the ListPriceList response. * **RegionCode** *(string) --* This is used to filter the Price List by Amazon Web Services 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 API. * **CurrencyCode** *(string) --* The three alphabetical character ISO-4217 currency code the Price List files are denominated in. * **FileFormats** *(list) --* The format you want to retrieve your Price List files. The "FileFormat" can be obtained from the ListPriceList response. * *(string) --* Pricing / Paginator / DescribeServices DescribeServices **************** class Pricing.Paginator.DescribeServices paginator = client.get_paginator('describe_services') paginate(**kwargs) Creates an iterator that will paginate through responses from "Pricing.Client.describe_services()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ServiceCode='string', FormatVersion='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ServiceCode** (*string*) -- 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. * **FormatVersion** (*string*) -- The format version that you want the response to be in. Valid values are: "aws_v1" * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Services': [ { 'ServiceCode': 'string', 'AttributeNames': [ 'string', ] }, ], 'FormatVersion': 'string', } **Response Structure** * *(dict) --* * **Services** *(list) --* The service metadata for the service or services in the response. * *(dict) --* The metadata for a service, such as the service code and available attribute names. * **ServiceCode** *(string) --* The code for the Amazon Web Services service. * **AttributeNames** *(list) --* The attributes that are available for this service. * *(string) --* * **FormatVersion** *(string) --* The format version of the response. For example, "aws_v1". Pricing / Paginator / GetAttributeValues GetAttributeValues ****************** class Pricing.Paginator.GetAttributeValues paginator = client.get_paginator('get_attribute_values') paginate(**kwargs) Creates an iterator that will paginate through responses from "Pricing.Client.get_attribute_values()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ServiceCode='string', AttributeName='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use "AmazonEC2". * **AttributeName** (*string*) -- **[REQUIRED]** The name of the attribute that you want to retrieve the values for, such as "volumeType". * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'AttributeValues': [ { 'Value': 'string' }, ], } **Response Structure** * *(dict) --* * **AttributeValues** *(list) --* The list of values for an attribute. For example, "Throughput Optimized HDD" and "Provisioned IOPS" are two available values for the "AmazonEC2" "volumeType". * *(dict) --* The values of a given attribute, such as "Throughput Optimized HDD" or "Provisioned IOPS" for the "Amazon EC2" "volumeType" attribute. * **Value** *(string) --* The specific value of an "attributeName". Pricing / Client / get_paginator get_paginator ************* Pricing.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. Pricing / Client / get_price_list_file_url get_price_list_file_url *********************** Pricing.Client.get_price_list_file_url(**kwargs) This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10). This returns the URL that you can retrieve your Price List file from. This URL is based on the "PriceListArn" and "FileFormat" that you retrieve from the ListPriceLists response. See also: AWS API Documentation **Request Syntax** response = client.get_price_list_file_url( PriceListArn='string', FileFormat='string' ) Parameters: * **PriceListArn** (*string*) -- **[REQUIRED]** The unique identifier that maps to where your Price List files are located. "PriceListArn" can be obtained from the ListPriceLists response. * **FileFormat** (*string*) -- **[REQUIRED]** The format that you want to retrieve your Price List files in. The "FileFormat" can be obtained from the ListPriceLists response. Return type: dict Returns: **Response Syntax** { 'Url': 'string' } **Response Structure** * *(dict) --* * **Url** *(string) --* The URL to download your Price List file from. **Exceptions** * "Pricing.Client.exceptions.InvalidParameterException" * "Pricing.Client.exceptions.NotFoundException" * "Pricing.Client.exceptions.AccessDeniedException" * "Pricing.Client.exceptions.InternalErrorException" * "Pricing.Client.exceptions.ThrottlingException" * "Pricing.Client.exceptions.ResourceNotFoundException" Pricing / Client / can_paginate can_paginate ************ Pricing.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. Pricing / Client / describe_services describe_services ***************** Pricing.Client.describe_services(**kwargs) 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". See also: AWS API Documentation **Request Syntax** response = client.describe_services( ServiceCode='string', FormatVersion='string', NextToken='string', MaxResults=123 ) Parameters: * **ServiceCode** (*string*) -- 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. * **FormatVersion** (*string*) -- The format version that you want the response to be in. Valid values are: "aws_v1" * **NextToken** (*string*) -- The pagination token that indicates the next set of results that you want to retrieve. * **MaxResults** (*integer*) -- The maximum number of results that you want returned in the response. Return type: dict Returns: **Response Syntax** { 'Services': [ { 'ServiceCode': 'string', 'AttributeNames': [ 'string', ] }, ], 'FormatVersion': 'string', 'NextToken': 'string' } **Response Structure** * *(dict) --* * **Services** *(list) --* The service metadata for the service or services in the response. * *(dict) --* The metadata for a service, such as the service code and available attribute names. * **ServiceCode** *(string) --* The code for the Amazon Web Services service. * **AttributeNames** *(list) --* The attributes that are available for this service. * *(string) --* * **FormatVersion** *(string) --* The format version of the response. For example, "aws_v1". * **NextToken** *(string) --* The pagination token for the next set of retrievable results. **Exceptions** * "Pricing.Client.exceptions.InvalidParameterException" * "Pricing.Client.exceptions.InvalidNextTokenException" * "Pricing.Client.exceptions.NotFoundException" * "Pricing.Client.exceptions.InternalErrorException" * "Pricing.Client.exceptions.ThrottlingException" * "Pricing.Client.exceptions.ExpiredNextTokenException" **Examples** Retrieves the service for the given Service Code. response = client.describe_services( FormatVersion='aws_v1', MaxResults=1, ServiceCode='AmazonEC2', ) print(response) Expected Output: { 'FormatVersion': 'aws_v1', 'NextToken': 'abcdefg123', 'Services': [ { 'AttributeNames': [ 'volumeType', 'maxIopsvolume', 'instanceCapacity10xlarge', 'locationType', 'operation', ], 'ServiceCode': 'AmazonEC2', }, ], 'ResponseMetadata': { '...': '...', }, } Pricing / Client / get_waiter get_waiter ********** Pricing.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" Pricing / Client / get_products get_products ************ Pricing.Client.get_products(**kwargs) Returns a list of all products that match the filter criteria. See also: AWS API Documentation **Request Syntax** response = client.get_products( ServiceCode='string', Filters=[ { 'Type': 'TERM_MATCH'|'EQUALS'|'CONTAINS'|'ANY_OF'|'NONE_OF', 'Field': 'string', 'Value': 'string' }, ], FormatVersion='string', NextToken='string', MaxResults=123 ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The code for the service whose products you want to retrieve. * **Filters** (*list*) -- The list of filters that limit the returned products. only products that match all filters are returned. * *(dict) --* The constraints that you want all returned products to match. * **Type** *(string) --* **[REQUIRED]** The type of filter that you want to use. Valid values are: * "TERM_MATCH": Returns only products that match both the given filter field and the given value. * "EQUALS": Returns products that have a field value exactly matching the provided value. * "CONTAINS": Returns products where the field value contains the provided value as a substring. * "ANY_OF": Returns products where the field value is any of the provided values. * "NONE_OF": Returns products where the field value is not any of the provided values. * **Field** *(string) --* **[REQUIRED]** The product metadata field that you want to filter on. You can filter by just the service code to see all products for a specific service, filter by just the attribute name to see a specific attribute for multiple services, or use both a service code and an attribute name to retrieve only products that match both fields. Valid values include: "ServiceCode", and all attribute names For example, you can filter by the "AmazonEC2" service code and the "volumeType" attribute name to get the prices for only Amazon EC2 volumes. * **Value** *(string) --* **[REQUIRED]** The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as "AmazonEC2". If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a "Provisioned IOPS" volume. For "ANY_OF" and "NONE_OF" filter types, you can provide multiple values as a comma-separated string. For example, "t2.micro,t2.small,t2.medium" or "Compute optimized, GPU instance, Micro instances". * **FormatVersion** (*string*) -- The format version that you want the response to be in. Valid values are: "aws_v1" * **NextToken** (*string*) -- The pagination token that indicates the next set of results that you want to retrieve. * **MaxResults** (*integer*) -- The maximum number of results to return in the response. Return type: dict Returns: **Response Syntax** { 'FormatVersion': 'string', 'PriceList': [ 'string', ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **FormatVersion** *(string) --* The format version of the response. For example, aws_v1. * **PriceList** *(list) --* The list of products that match your filters. The list contains both the product metadata and the price information. * *(string) --* * **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "Pricing.Client.exceptions.InvalidParameterException" * "Pricing.Client.exceptions.InvalidNextTokenException" * "Pricing.Client.exceptions.NotFoundException" * "Pricing.Client.exceptions.InternalErrorException" * "Pricing.Client.exceptions.ThrottlingException" * "Pricing.Client.exceptions.ExpiredNextTokenException" **Examples** This operation returns a list of products that match the given criteria. response = client.get_products( Filters=[ { 'Field': 'ServiceCode', 'Type': 'TERM_MATCH', 'Value': 'AmazonEC2', }, { 'Field': 'volumeType', 'Type': 'TERM_MATCH', 'Value': 'Provisioned IOPS', }, ], FormatVersion='aws_v1', MaxResults=1, ) print(response) Expected Output: { 'FormatVersion': 'aws_v1', 'NextToken': '57r3EXAMPLEujbzWfHF7Ciw==: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"}', ], 'ResponseMetadata': { '...': '...', }, } Pricing / Client / list_price_lists list_price_lists **************** Pricing.Client.list_price_lists(**kwargs) 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 an "EffectiveDate". Use without a "RegionCode" filter to list Price List references from all available Amazon Web Services Regions. Use with a "RegionCode" filter to get the Price List reference that's specific to a specific Amazon Web Services Region. You can use the "PriceListArn" from the response to get your preferred Price List files through the GetPriceListFileUrl API. See also: AWS API Documentation **Request Syntax** response = client.list_price_lists( ServiceCode='string', EffectiveDate=datetime(2015, 1, 1), RegionCode='string', CurrencyCode='string', NextToken='string', MaxResults=123 ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The service code or the Savings Plan 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 API. To retrieve the Reserved Instance and Compute Savings Plan price lists, use "ComputeSavingsPlans". To retrieve Machine Learning Savings Plans price lists, use "MachineLearningSavingsPlans". * **EffectiveDate** (*datetime*) -- **[REQUIRED]** The date that the Price List file prices are effective from. * **RegionCode** (*string*) -- This is used to filter the Price List by Amazon Web Services 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 API. * **CurrencyCode** (*string*) -- **[REQUIRED]** The three alphabetical character ISO-4217 currency code that the Price List files are denominated in. * **NextToken** (*string*) -- The pagination token that indicates the next set of results that you want to retrieve. * **MaxResults** (*integer*) -- The maximum number of results to return in the response. Return type: dict Returns: **Response Syntax** { 'PriceLists': [ { 'PriceListArn': 'string', 'RegionCode': 'string', 'CurrencyCode': 'string', 'FileFormats': [ 'string', ] }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **PriceLists** *(list) --* The type of price list references that match your request. * *(dict) --* 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 is the type of price list references that match your request. * **PriceListArn** *(string) --* The unique identifier that maps to where your Price List files are located. "PriceListArn" can be obtained from the ListPriceList response. * **RegionCode** *(string) --* This is used to filter the Price List by Amazon Web Services 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 API. * **CurrencyCode** *(string) --* The three alphabetical character ISO-4217 currency code the Price List files are denominated in. * **FileFormats** *(list) --* The format you want to retrieve your Price List files. The "FileFormat" can be obtained from the ListPriceList response. * *(string) --* * **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "Pricing.Client.exceptions.InvalidParameterException" * "Pricing.Client.exceptions.InvalidNextTokenException" * "Pricing.Client.exceptions.NotFoundException" * "Pricing.Client.exceptions.AccessDeniedException" * "Pricing.Client.exceptions.InternalErrorException" * "Pricing.Client.exceptions.ThrottlingException" * "Pricing.Client.exceptions.ResourceNotFoundException" * "Pricing.Client.exceptions.ExpiredNextTokenException" Pricing / Client / close close ***** Pricing.Client.close() Closes underlying endpoint connections. Pricing / Client / get_attribute_values get_attribute_values ******************** Pricing.Client.get_attribute_values(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_attribute_values( ServiceCode='string', AttributeName='string', NextToken='string', MaxResults=123 ) Parameters: * **ServiceCode** (*string*) -- **[REQUIRED]** The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use "AmazonEC2". * **AttributeName** (*string*) -- **[REQUIRED]** The name of the attribute that you want to retrieve the values for, such as "volumeType". * **NextToken** (*string*) -- The pagination token that indicates the next set of results that you want to retrieve. * **MaxResults** (*integer*) -- The maximum number of results to return in response. Return type: dict Returns: **Response Syntax** { 'AttributeValues': [ { 'Value': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **AttributeValues** *(list) --* The list of values for an attribute. For example, "Throughput Optimized HDD" and "Provisioned IOPS" are two available values for the "AmazonEC2" "volumeType". * *(dict) --* The values of a given attribute, such as "Throughput Optimized HDD" or "Provisioned IOPS" for the "Amazon EC2" "volumeType" attribute. * **Value** *(string) --* The specific value of an "attributeName". * **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "Pricing.Client.exceptions.InvalidParameterException" * "Pricing.Client.exceptions.InvalidNextTokenException" * "Pricing.Client.exceptions.NotFoundException" * "Pricing.Client.exceptions.InternalErrorException" * "Pricing.Client.exceptions.ThrottlingException" * "Pricing.Client.exceptions.ExpiredNextTokenException" **Examples** This operation returns a list of values available for the given attribute. response = client.get_attribute_values( AttributeName='volumeType', MaxResults=2, ServiceCode='AmazonEC2', ) print(response) Expected Output: { 'AttributeValues': [ { 'Value': 'Throughput Optimized HDD', }, { 'Value': 'Provisioned IOPS', }, ], 'NextToken': 'GpgauEXAMPLEezucl5LV0w==:7GzYJ0nw0DBTJ2J66EoTIIynE6O1uXwQtTRqioJzQadBnDVgHPzI1en4BUQnPCLpzeBk9RQQAWaFieA4+DapFAGLgk+Z/9/cTw9GldnPOHN98+FdmJP7wKU3QQpQ8MQr5KOeBkIsAqvAQYdL0DkL7tHwPtE5iCEByAmg9gcC/yBU1vAOsf7R3VaNN4M5jMDv3woSWqASSIlBVB6tgW78YL22KhssoItM/jWW+aP6Jqtq4mldxp/ct6DWAl+xLFwHU/CbketimPPXyqHF3/UXDw==', 'ResponseMetadata': { '...': '...', }, }