Skip to content

CloudFront  >  Operations  >  delete_response_headers_policy

delete_response_headers_policy

Operation

delete_response_headers_policy async

delete_response_headers_policy(request: DeleteResponseHeadersPolicyInput | DeleteResponseHeadersPolicyInputDict, /, *, plugins: list[Plugin] | None = None) -> DeleteResponseHeadersPolicyOutput
delete_response_headers_policy(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteResponseHeadersPolicyInputDict]) -> 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
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

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

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.

Dictionaries

DeleteResponseHeadersPolicyInputDict

Bases: TypedDict

Dictionary form of DeleteResponseHeadersPolicyInput.

Attributes
id instance-attribute

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

To get the identifier, you can use ListResponseHeadersPolicies.

if_match 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.