ElastiCache / Client / create_cache_parameter_group
create_cache_parameter_group#
- ElastiCache.Client.create_cache_parameter_group(**kwargs)#
Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster or replication group using the CacheParameterGroup.
A newly created CacheParameterGroup is an exact duplicate of the default parameter group for the CacheParameterGroupFamily. To customize the newly created CacheParameterGroup you can change the values of specific parameters. For more information, see:
ModifyCacheParameterGroup in the ElastiCache API Reference.
Parameters and Parameter Groups in the ElastiCache User Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_cache_parameter_group( CacheParameterGroupName='string', CacheParameterGroupFamily='string', Description='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
CacheParameterGroupName (string) –
[REQUIRED]
A user-specified name for the cache parameter group.
CacheParameterGroupFamily (string) –
[REQUIRED]
The name of the cache parameter group family that the cache parameter group can be used with.
Valid values are:
memcached1.4
|memcached1.5
|memcached1.6
|redis2.6
|redis2.8
|redis3.2
|redis4.0
|redis5.0
|redis6.x
|redis7
Description (string) –
[REQUIRED]
A user-specified description for the cache parameter group.
Tags (list) –
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
(dict) –
A tag that can be added to an ElastiCache cluster or replication group. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your ElastiCache resources, with the exception of global replication group. When you add or remove tags on replication groups, those actions will be replicated to all nodes in the replication group. A tag with a null Value is permitted.
Key (string) –
The key for the tag. May not be null.
Value (string) –
The tag’s value. May be null.
- Return type:
dict
- Returns:
Response Syntax
{ 'CacheParameterGroup': { 'CacheParameterGroupName': 'string', 'CacheParameterGroupFamily': 'string', 'Description': 'string', 'IsGlobal': True|False, 'ARN': 'string' } }
Response Structure
(dict) –
CacheParameterGroup (dict) –
Represents the output of a
CreateCacheParameterGroup
operation.CacheParameterGroupName (string) –
The name of the cache parameter group.
CacheParameterGroupFamily (string) –
The name of the cache parameter group family that this cache parameter group is compatible with.
Valid values are:
memcached1.4
|memcached1.5
|memcached1.6
|redis2.6
|redis2.8
|redis3.2
|redis4.0
|redis5.0
|redis6.x
|redis7
Description (string) –
The description for this cache parameter group.
IsGlobal (boolean) –
Indicates whether the parameter group is associated with a Global datastore
ARN (string) –
The ARN (Amazon Resource Name) of the cache parameter group.
Exceptions
ElastiCache.Client.exceptions.CacheParameterGroupQuotaExceededFault
ElastiCache.Client.exceptions.CacheParameterGroupAlreadyExistsFault
ElastiCache.Client.exceptions.InvalidCacheParameterGroupStateFault
ElastiCache.Client.exceptions.InvalidParameterValueException
ElastiCache.Client.exceptions.InvalidParameterCombinationException
Examples
Creates the Amazon ElastiCache parameter group custom-redis2-8.
response = client.create_cache_parameter_group( CacheParameterGroupFamily='redis2.8', CacheParameterGroupName='custom-redis2-8', Description='Custom Redis 2.8 parameter group.', ) print(response)
Expected Output:
{ 'CacheParameterGroup': { 'CacheParameterGroupFamily': 'redis2.8', 'CacheParameterGroupName': 'custom-redis2-8', 'Description': 'Custom Redis 2.8 parameter group.', }, 'ResponseMetadata': { '...': '...', }, }