update_key_group
¶
update_key_group(
key_group_config: KeyGroupConfig,
id: string,
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
if_match: Optional[string] = None,
) -> UpdateKeyGroupResult
Updates a key group.
When you update a key group, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update a key group:
-
Get the current key group with
GetKeyGrouporGetKeyGroupConfig. -
Locally modify the fields in the key group that you want to update. For example, add or remove public key IDs.
-
Call
UpdateKeyGroupwith the entire key group object, including the fields that you modified and those that you didn't.
Parameters:
-
key_group_config(KeyGroupConfig) –The key group configuration.
-
id(string) –The identifier of the key group that you are updating.
-
if_match(Optional[string], default:None) –The version of the key group that you are updating. The version is the key group's
ETagvalue.
Raises:
-
InvalidArgument–An argument is invalid.
-
InvalidIfMatchVersion–The
If-Matchversion is missing or not valid. -
KeyGroupAlreadyExists–A key group with this name already exists. You must provide a unique name. To modify an existing key group, use
UpdateKeyGroup. -
NoSuchResource–A resource that was specified is not valid.
-
PreconditionFailed–The precondition in one or more of the request fields evaluated to
false. -
TooManyPublicKeysInKeyGroup–The number of public keys in this key group is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
UnknownServiceError–The service returned an error code this client does not model.