create_traffic_policy
¶
create_traffic_policy(
name: TrafficPolicyName,
document: TrafficPolicyDocument,
*,
config_overrides: Optional[Route53ClientConfig] = None,
comment: Optional[TrafficPolicyComment] = None,
) -> CreateTrafficPolicyResponse
Creates a traffic policy, which you use to create multiple DNS resource record sets for one domain name (such as example.com) or one subdomain name (such as www.example.com).
Parameters:
-
name(TrafficPolicyName) –The name of the traffic policy.
-
document(TrafficPolicyDocument) –The definition of this traffic policy in JSON format. For more information, see Traffic Policy Document Format.
-
comment(Optional[TrafficPolicyComment], default:None) –(Optional) Any comments that you want to include about the traffic policy.
Raises:
-
InvalidInput–The input is not valid.
-
InvalidTrafficPolicyDocument–The format of the traffic policy document that you specified in the
Documentelement is not valid. -
TooManyTrafficPolicies–This traffic policy can't be created because the current account has reached the limit on the number of traffic policies.
For information about default limits, see Limits in the Amazon Route 53 Developer Guide.
To get the current limit for an account, see GetAccountLimit.
To request a higher limit, create a case with the Amazon Web Services Support Center.
-
TrafficPolicyAlreadyExists–A traffic policy that has the same value for
Namealready exists. -
UnknownServiceError–The service returned an error code this client does not model.