Skip to content

CloudFront  >  Operations  >  delete_origin_request_policy

delete_origin_request_policy

Operation

delete_origin_request_policy async

delete_origin_request_policy(request: DeleteOriginRequestPolicyInput | DeleteOriginRequestPolicyInputDict, /, *, plugins: list[Plugin] | None = None) -> DeleteOriginRequestPolicyOutput
delete_origin_request_policy(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteOriginRequestPolicyInputDict]) -> DeleteOriginRequestPolicyOutput

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.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
DeleteOriginRequestPolicyOutput

An instance of DeleteOriginRequestPolicyOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

DeleteOriginRequestPolicyInput dataclass

Bases: _SerdeShape

Dataclass for DeleteOriginRequestPolicyInput structure.

Attributes
id class-attribute instance-attribute
id: str | None = ...

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

if_match class-attribute instance-attribute
if_match: str | None = ...

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.

Dictionaries

DeleteOriginRequestPolicyInputDict

Bases: TypedDict

Dictionary form of DeleteOriginRequestPolicyInput.

Attributes
id instance-attribute

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

if_match instance-attribute
if_match: str | None

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.

Output

DeleteOriginRequestPolicyOutput dataclass

Bases: _SerdeShape

Dataclass for DeleteOriginRequestPolicyOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.