Skip to content

delete_cache_policy

Operation

delete_cache_policy

delete_cache_policy(request: DeleteCachePolicyInput | DeleteCachePolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteCachePolicyInputDict]) -> DeleteCachePolicyOutput

Deletes a cache policy.

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

To delete a cache policy, you must provide the policy's identifier and version. To get these values, you can use ListCachePolicies or GetCachePolicy.

Parameters:

Name Type Description Default
request DeleteCachePolicyInput | DeleteCachePolicyInputDict | 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[DeleteCachePolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteCachePolicyOutput

An instance of DeleteCachePolicyOutput.

delete_cache_policy async

delete_cache_policy(request: DeleteCachePolicyInput | DeleteCachePolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteCachePolicyInputDict]) -> DeleteCachePolicyOutput

Deletes a cache policy.

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

To delete a cache policy, you must provide the policy's identifier and version. To get these values, you can use ListCachePolicies or GetCachePolicy.

Parameters:

Name Type Description Default
request DeleteCachePolicyInput | DeleteCachePolicyInputDict | 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[DeleteCachePolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteCachePolicyOutput

An instance of DeleteCachePolicyOutput.

Input

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

DeleteCachePolicyInputDict

Bases: TypedDict

Dictionary form of DeleteCachePolicyInput.

Attributes

id instance-attribute

The unique identifier for the cache policy that you are deleting. To get the identifier, you can use ListCachePolicies.

if_match instance-attribute
if_match: str | None

The version of the cache policy that you are deleting. The version is the cache policy's ETag value, which you can get using ListCachePolicies, GetCachePolicy, or GetCachePolicyConfig.

DeleteCachePolicyInput dataclass

Bases: _SerdeShape

Dataclass for DeleteCachePolicyInput structure.

Attributes

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

The unique identifier for the cache policy that you are deleting. To get the identifier, you can use ListCachePolicies.

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

The version of the cache policy that you are deleting. The version is the cache policy's ETag value, which you can get using ListCachePolicies, GetCachePolicy, or GetCachePolicyConfig.

Output

DeleteCachePolicyOutput dataclass

Bases: _SerdeShape

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