create_traffic_policy_version

create_traffic_policy_version(**kwargs)

Creates a new version of an existing traffic policy. When you create a new version of a traffic policy, you specify the ID of the traffic policy that you want to update and a JSON-formatted document that describes the new version. You use traffic policies to create multiple DNS resource record sets for one domain name (such as example.com) or one subdomain name (such as www.example.com). You can create a maximum of 1000 versions of a traffic policy. If you reach the limit and need to create another version, you'll need to start a new traffic policy.

See also: AWS API Documentation

Request Syntax

response = client.create_traffic_policy_version(
    Id='string',
    Document='string',
    Comment='string'
)
Parameters
  • Id (string) --

    [REQUIRED]

    The ID of the traffic policy for which you want to create a new version.

  • Document (string) --

    [REQUIRED]

    The definition of this version of the traffic policy, in JSON format. You specified the JSON in the CreateTrafficPolicyVersion request. For more information about the JSON format, see CreateTrafficPolicy.

  • Comment (string) -- The comment that you specified in the CreateTrafficPolicyVersion request, if any.
Return type

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',
        'Document': 'string',
        'Comment': 'string'
    },
    'Location': 'string'
}

Response Structure

  • (dict) --

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

    • TrafficPolicy (dict) --

      A complex type that contains settings for the new version of the 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.

      • Comment (string) --

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

    • Location (string) --

      A unique URL that represents a new traffic policy version.

Exceptions

  • Route53.Client.exceptions.NoSuchTrafficPolicy
  • Route53.Client.exceptions.InvalidInput
  • Route53.Client.exceptions.TooManyTrafficPolicyVersionsForCurrentPolicy
  • Route53.Client.exceptions.ConcurrentModification
  • Route53.Client.exceptions.InvalidTrafficPolicyDocument