:doc:`Pricing <../../pricing>` / Client / get_attribute_values

********************
get_attribute_values
********************



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

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues>`_  


  **Request Syntax**
  ::

    response = client.get_attribute_values(
        ServiceCode='string',
        AttributeName='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type ServiceCode: string
  :param ServiceCode: **[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``.

    

  
  :type AttributeName: string
  :param AttributeName: **[REQUIRED]** 

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

    

  
  :type NextToken: string
  :param NextToken: 

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

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return in response.

    

  
  
  :rtype: 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**
  
  *   :py:class:`Pricing.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Pricing.Client.exceptions.InvalidNextTokenException`

  
  *   :py:class:`Pricing.Client.exceptions.NotFoundException`

  
  *   :py:class:`Pricing.Client.exceptions.InternalErrorException`

  
  *   :py:class:`Pricing.Client.exceptions.ThrottlingException`

  
  *   :py:class:`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': {
            '...': '...',
        },
    }

  