Skip to content

CloudFront  >  Operations  >  delete_response_headers_policy

delete_response_headers_policy

Operation

delete_response_headers_policy async

delete_response_headers_policy(input: DeleteResponseHeadersPolicyInput, plugins: list[Plugin] | None = None) -> DeleteResponseHeadersPolicyOutput

Deletes a response headers policy.

You cannot delete a response headers policy if it's attached to a cache behavior. First update your distributions to remove the response headers policy from all cache behaviors, then delete the response headers policy.

To delete a response headers policy, you must provide the policy's identifier and version. To get these values, you can use ListResponseHeadersPolicies or GetResponseHeadersPolicy.

Parameters:

Name Type Description Default
input DeleteResponseHeadersPolicyInput

An instance of DeleteResponseHeadersPolicyInput.

required
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
DeleteResponseHeadersPolicyOutput

An instance of DeleteResponseHeadersPolicyOutput.

Input

DeleteResponseHeadersPolicyInput dataclass

Bases: _SerdeShape

Dataclass for DeleteResponseHeadersPolicyInput structure.

Attributes

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

The identifier for the response headers policy that you are deleting.

To get the identifier, you can use ListResponseHeadersPolicies.

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

The version of the response headers policy that you are deleting.

The version is the response headers policy's ETag value, which you can get using ListResponseHeadersPolicies, GetResponseHeadersPolicy, or GetResponseHeadersPolicyConfig.

Output

DeleteResponseHeadersPolicyOutput dataclass

Bases: _SerdeShape

Dataclass for DeleteResponseHeadersPolicyOutput 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.