:doc:`Route53 <../../route53>` / Client / get_traffic_policy

******************
get_traffic_policy
******************



.. py:method:: Route53.Client.get_traffic_policy(**kwargs)

  

  Gets information about a specific traffic policy version.

   

  For information about how of deleting a traffic policy affects the response from ``GetTrafficPolicy``, see `DeleteTrafficPolicy <https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_traffic_policy(
        Id='string',
        Version=123
    )
    
  :type Id: string
  :param Id: **[REQUIRED]** 

    The ID of the traffic policy that you want to get information about.

    

  
  :type Version: integer
  :param Version: **[REQUIRED]** 

    The version number of the traffic policy that you want to get information about.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'TrafficPolicy': {
              'Id': 'string',
              'Version': 123,
              'Name': 'string',
              'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
              'Document': 'string',
              'Comment': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      A complex type that contains the response information for the request.

      
      

      - **TrafficPolicy** *(dict) --* 

        A complex type that contains settings for the specified traffic policy.

        
        

        - **Id** *(string) --* 

          The ID that Amazon Route 53 assigned to a traffic policy when you created it.

          
        

        - **Version** *(integer) --* 

          The version number that Amazon Route 53 assigns to a traffic policy. For a new traffic policy, the value of ``Version`` is always 1.

          
        

        - **Name** *(string) --* 

          The name that you specified when you created the traffic policy.

          
        

        - **Type** *(string) --* 

          The DNS type of the resource record sets that Amazon Route 53 creates when you use a traffic policy to create a traffic policy instance.

          
        

        - **Document** *(string) --* 

          The definition of a traffic policy in JSON format. You specify the JSON document to use for a new traffic policy in the ``CreateTrafficPolicy`` request. For more information about the JSON format, see `Traffic Policy Document Format <https://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html>`__.

          
        

        - **Comment** *(string) --* 

          The comment that you specify in the ``CreateTrafficPolicy`` request, if any.

          
    
  
  **Exceptions**
  
  *   :py:class:`Route53.Client.exceptions.NoSuchTrafficPolicy`

  
  *   :py:class:`Route53.Client.exceptions.InvalidInput`

  