CloudFront / Client / delete_origin_request_policy

delete_origin_request_policy#

CloudFront.Client.delete_origin_request_policy(**kwargs)#

Deletes an origin request policy.

You cannot delete an origin request policy if it’s attached to any cache behaviors. First update your distributions to remove the origin request policy from all cache behaviors, then delete the origin request policy.

To delete an origin request policy, you must provide the policy’s identifier and version. To get the identifier, you can use ListOriginRequestPolicies or GetOriginRequestPolicy.

See also: AWS API Documentation

Request Syntax

response = client.delete_origin_request_policy(
    Id='string',
    IfMatch='string'
)
Parameters:
  • Id (string) –

    [REQUIRED]

    The unique identifier for the origin request policy that you are deleting. To get the identifier, you can use ListOriginRequestPolicies.

  • IfMatch (string) – The version of the origin request policy that you are deleting. The version is the origin request policy’s ETag value, which you can get using ListOriginRequestPolicies, GetOriginRequestPolicy, or GetOriginRequestPolicyConfig.

Returns:

None

Exceptions

  • CloudFront.Client.exceptions.AccessDenied

  • CloudFront.Client.exceptions.InvalidIfMatchVersion

  • CloudFront.Client.exceptions.NoSuchOriginRequestPolicy

  • CloudFront.Client.exceptions.PreconditionFailed

  • CloudFront.Client.exceptions.IllegalDelete

  • CloudFront.Client.exceptions.OriginRequestPolicyInUse