create_traffic_policy_version
¶
create_traffic_policy_version(
id: TrafficPolicyId,
document: TrafficPolicyDocument,
*,
config_overrides: Optional[Route53ClientConfig] = None,
comment: Optional[TrafficPolicyComment] = None,
) -> CreateTrafficPolicyVersionResponse
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.
Parameters:
-
id(TrafficPolicyId) –The ID of the traffic policy for which you want to create a new version.
-
document(TrafficPolicyDocument) –The definition of this version of the traffic policy, in JSON format. You specified the JSON in the
CreateTrafficPolicyVersionrequest. For more information about the JSON format, see CreateTrafficPolicy. -
comment(Optional[TrafficPolicyComment], default:None) –The comment that you specified in the
CreateTrafficPolicyVersionrequest, if any.
Raises:
-
ConcurrentModification–Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.
-
InvalidInput–The input is not valid.
-
InvalidTrafficPolicyDocument–The format of the traffic policy document that you specified in the
Documentelement is not valid. -
NoSuchTrafficPolicy–No traffic policy exists with the specified ID.
-
TooManyTrafficPolicyVersionsForCurrentPolicy–This traffic policy version can't be created because you've reached the limit of 1000 on the number of versions that you can create for the current traffic policy.
To create more traffic policy versions, you can use GetTrafficPolicy to get the traffic policy document for a specified traffic policy version, and then use CreateTrafficPolicy to create a new traffic policy using the traffic policy document.
-
UnknownServiceError–The service returned an error code this client does not model.