Skip to content

CloudFront  >  Operations  >  delete_key_group

delete_key_group

Operation

delete_key_group async

delete_key_group(input: DeleteKeyGroupInput, plugins: list[Plugin] | None = None) -> 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
input DeleteKeyGroupInput

An instance of DeleteKeyGroupInput.

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
DeleteKeyGroupOutput

An instance of DeleteKeyGroupOutput.

Input

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.

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.