Skip to content

Delete Origin Request Policy

cloudfront_delete_origin_request_policy R Documentation

Deletes an origin request policy

Description

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 list_origin_request_policies or get_origin_request_policy.

Usage

cloudfront_delete_origin_request_policy(Id, IfMatch)

Arguments

Id

[required] The unique identifier for the origin request policy that you are deleting. To get the identifier, you can use list_origin_request_policies.

IfMatch

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 list_origin_request_policies, get_origin_request_policy, or get_origin_request_policy_config.

Value

An empty list.

Request syntax

svc$delete_origin_request_policy(
  Id = "string",
  IfMatch = "string"
)