create_key_group
(**kwargs)¶Creates a key group that you can use with CloudFront signed URLs and signed cookies.
To create a key group, you must specify at least one public key for the key group. After you create a key group, you can reference it from one or more cache behaviors. When you reference a key group in a cache behavior, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_key_group(
KeyGroupConfig={
'Name': 'string',
'Items': [
'string',
],
'Comment': 'string'
}
)
[REQUIRED]
A key group configuration.
A name to identify the key group.
A list of the identifiers of the public keys in the key group.
A comment to describe the key group. The comment cannot be longer than 128 characters.
{
'KeyGroup': {
'Id': 'string',
'LastModifiedTime': datetime(2015, 1, 1),
'KeyGroupConfig': {
'Name': 'string',
'Items': [
'string',
],
'Comment': 'string'
}
},
'Location': 'string',
'ETag': 'string'
}
Response Structure
The key group that was just created.
The identifier for the key group.
The date and time when the key group was last modified.
The key group configuration.
A name to identify the key group.
A list of the identifiers of the public keys in the key group.
A comment to describe the key group. The comment cannot be longer than 128 characters.
The URL of the key group.
The identifier for this version of the key group.
Exceptions
CloudFront.Client.exceptions.InvalidArgument
CloudFront.Client.exceptions.KeyGroupAlreadyExists
CloudFront.Client.exceptions.TooManyKeyGroups
CloudFront.Client.exceptions.TooManyPublicKeysInKeyGroup