Deletes a traffic policy instance and all of the resource record sets that Amazon Route 53 created when you created the instance.
In the Route 53 console, traffic policy instances are known as policy records.
Parameters:
-
id
(TrafficPolicyInstanceId)
–
The ID of the traffic policy instance that you want to delete.
When you delete a traffic policy instance, Amazon Route 53 also deletes all of the resource record sets that were created when you created the traffic policy instance.
Raises:
-
InvalidInput
–
-
NoSuchTrafficPolicyInstance
–
No traffic policy instance exists with the specified ID.
-
PriorRequestNotComplete
–
If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_route_53/_services/route53.py
| def delete_traffic_policy_instance(
self,
id: "capo_route_53.types.traffic_policy_instance_id.TrafficPolicyInstanceId",
*,
config_overrides: Optional[Route53ClientConfig] = None,
) -> "capo_route_53.types.delete_traffic_policy_instance_response.DeleteTrafficPolicyInstanceResponse":
"""<p>Deletes a traffic policy instance and all of the resource record sets that Amazon Route 53 created when you created the instance.</p> <note> <p>In the Route 53 console, traffic policy instances are known as policy records.</p> </note>
Args:
id: <p>The ID of the traffic policy instance that you want to delete. </p> <important> <p>When you delete a traffic policy instance, Amazon Route 53 also deletes all of the resource record sets that were created when you created the traffic policy instance.</p> </important>
Raises:
capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
capo_route_53.errors.no_such_traffic_policy_instance.NoSuchTrafficPolicyInstance: <p>No traffic policy instance exists with the specified ID.</p>
capo_route_53.errors.prior_request_not_complete.PriorRequestNotComplete: <p>If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an <code>HTTP 400 error</code> (<code>Bad request</code>). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.</p>
capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route_53.types.delete_traffic_policy_instance_request.DeleteTrafficPolicyInstanceRequest]",
) -> OperationResponse[
"capo_route_53.types.delete_traffic_policy_instance_response.DeleteTrafficPolicyInstanceResponse"
]:
import capo_route_53._operations.aws_dns_v20130401.delete_traffic_policy_instance
output, http_response = (
capo_route_53._operations.aws_dns_v20130401.delete_traffic_policy_instance.delete_traffic_policy_instance(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteTrafficPolicyInstance")
)
input_: capo_route_53.types.delete_traffic_policy_instance_request.DeleteTrafficPolicyInstanceRequest = {
"id": id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|