Skip to content

delete_response_headers_policy

Operation

delete_response_headers_policy

delete_response_headers_policy(request: DeleteResponseHeadersPolicyInput | DeleteResponseHeadersPolicyInputDict | None = None, /, *, 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
request DeleteResponseHeadersPolicyInput | DeleteResponseHeadersPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[DeleteResponseHeadersPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteResponseHeadersPolicyOutput

An instance of DeleteResponseHeadersPolicyOutput.

delete_response_headers_policy async

delete_response_headers_policy(request: DeleteResponseHeadersPolicyInput | DeleteResponseHeadersPolicyInputDict | None = None, /, *, 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
request DeleteResponseHeadersPolicyInput | DeleteResponseHeadersPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[DeleteResponseHeadersPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteResponseHeadersPolicyOutput

An instance of DeleteResponseHeadersPolicyOutput.

Input

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

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.

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.