Skip to content

CloudFront  >  Operations  >  delete_key_group

delete_key_group

Operation

delete_key_group async

delete_key_group(request: DeleteKeyGroupInput | DeleteKeyGroupInputDict, /, *, plugins: list[Plugin] | None = None) -> DeleteKeyGroupOutput
delete_key_group(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteKeyGroupInputDict]) -> DeleteKeyGroupOutput

Deletes a key group.

You cannot delete a key group that is referenced in a cache behavior. First update your distributions to remove the key group from all cache behaviors, then delete the key group.

To delete a key group, you must provide the key group's identifier and version. To get these values, use ListKeyGroups followed by GetKeyGroup or GetKeyGroupConfig.

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
DeleteKeyGroupOutput

An instance of DeleteKeyGroupOutput.

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

DeleteKeyGroupInput dataclass

Bases: _SerdeShape

Dataclass for DeleteKeyGroupInput structure.

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

The identifier of the key group that you are deleting. To get the identifier, use ListKeyGroups.

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

The version of the key group that you are deleting. The version is the key group's ETag value. To get the ETag, use GetKeyGroup or GetKeyGroupConfig.

Dictionaries

DeleteKeyGroupInputDict

Bases: TypedDict

Dictionary form of DeleteKeyGroupInput.

Attributes
id instance-attribute

The identifier of the key group that you are deleting. To get the identifier, use ListKeyGroups.

if_match instance-attribute
if_match: str | None

The version of the key group that you are deleting. The version is the key group's ETag value. To get the ETag, use GetKeyGroup or GetKeyGroupConfig.

Output

DeleteKeyGroupOutput dataclass

Bases: _SerdeShape

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