Delete an Amazon CloudFront VPC origin.
Parameters:
-
id
(string)
–
-
if_match
(string)
–
The version identifier of the VPC origin to delete. This is the ETag value returned in the response to GetVpcOrigin.
Raises:
Examples:
To delete a VPC origin
The following command deletes a VPC origin:
>>> client.delete_vpc_origin(id='vo_BQwjxxQxjCaBcQLzJUFkDM', if_match='E1F83G8C2ARO7P')
Source code in docs_src/capo_cloudfront/_services/cloud_front.py
| def delete_vpc_origin(
self,
id: "capo_cloudfront.types.string.string",
if_match: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
) -> "capo_cloudfront.types.delete_vpc_origin_result.DeleteVpcOriginResult":
"""<p>Delete an Amazon CloudFront VPC origin.</p>
Args:
id: <p>The VPC origin ID.</p>
if_match: <p>The version identifier of the VPC origin to delete. This is the <code>ETag</code> value returned in the response to <a>GetVpcOrigin</a>.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.cannot_delete_entity_while_in_use.CannotDeleteEntityWhileInUse: <p>The entity cannot be deleted while it is in use.</p>
capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
capo_cloudfront.errors.illegal_delete.IllegalDelete: <p>Deletion is not allowed for this entity.</p>
capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
capo_cloudfront.errors.invalid_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</p>
capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
capo_cloudfront.errors.unsupported_operation.UnsupportedOperation: <p>This operation is not supported in this Amazon Web Services Region.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a VPC origin
The following command deletes a VPC origin:
>>> client.delete_vpc_origin(id='vo_BQwjxxQxjCaBcQLzJUFkDM', if_match='E1F83G8C2ARO7P')
"""
def _handler(
req: "OperationRequest[capo_cloudfront.types.delete_vpc_origin_request.DeleteVpcOriginRequest]",
) -> OperationResponse[
"capo_cloudfront.types.delete_vpc_origin_result.DeleteVpcOriginResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.delete_vpc_origin
output, http_response = (
capo_cloudfront._operations.cloudfront2020_05_31.delete_vpc_origin.delete_vpc_origin(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteVpcOrigin")
)
input_: capo_cloudfront.types.delete_vpc_origin_request.DeleteVpcOriginRequest = {
"id": id,
"if_match": if_match,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|