create_traffic_policy_instance
async
¶
create_traffic_policy_instance(
hosted_zone_id: ResourceId,
name: DNSName,
ttl: TTL,
traffic_policy_id: TrafficPolicyId,
traffic_policy_version: TrafficPolicyVersion,
*,
config_overrides: Optional[AsyncRoute53ClientConfig] = None,
) -> CreateTrafficPolicyInstanceResponse
Creates resource record sets in a specified hosted zone based on the settings in a specified traffic policy version. In addition, CreateTrafficPolicyInstance associates the resource record sets with a specified domain name (such as example.com) or subdomain name (such as www.example.com). Amazon Route 53 responds to DNS queries for the domain or subdomain name by using the resource record sets that CreateTrafficPolicyInstance created.
After you submit an CreateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 creates the resource record sets that are specified in the traffic policy definition. Use GetTrafficPolicyInstance with the id of new traffic policy instance to confirm that the CreateTrafficPolicyInstance request completed successfully. For more information, see the State response element.
Parameters:
-
hosted_zone_id(ResourceId) –The ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
-
name(DNSName) –The domain name (such as example.com) or subdomain name (such as www.example.com) for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
-
ttl(TTL) –(Optional) The TTL that you want Amazon Route 53 to assign to all of the resource record sets that it creates in the specified hosted zone.
-
traffic_policy_id(TrafficPolicyId) –The ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
-
traffic_policy_version(TrafficPolicyVersion) –The version of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
Raises:
-
InvalidInput–The input is not valid.
-
NoSuchHostedZone–No hosted zone exists with the ID that you specified.
-
NoSuchTrafficPolicy–No traffic policy exists with the specified ID.
-
TooManyTrafficPolicyInstances–This traffic policy instance can't be created because the current account has reached the limit on the number of traffic policy instances.
For information about default limits, see Limits in the Amazon Route 53 Developer Guide.
For information about how 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.
-
TrafficPolicyInstanceAlreadyExists–There is already a traffic policy instance with the specified ID.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_route_53/_services/async_route53.py
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 | |