Skip to main content

cache_parameter_groups

Creates, updates, deletes, gets or lists a cache_parameter_groups resource.

Overview

Namecache_parameter_groups
TypeResource
Idaws.elasticache.cache_parameter_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN (Amazon Resource Name) of the cache parameter group.
cache_parameter_group_familystringThe 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
cache_parameter_group_namestringThe name of the cache parameter group.
descriptionstringThe description for this cache parameter group.
is_globalbooleanIndicates whether the parameter group is associated with a Global datastore

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_cache_parameter_groupsselectregionCacheParameterGroupName, MaxRecords, MarkerReturns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list contains only the descriptions for that group.
create_cache_parameter_groupinsertCacheParameterGroupName, CacheParameterGroupFamily, regionDescription, TagsCreates 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.
modify_cache_parameter_groupupdateCacheParameterGroupName, ParameterNameValues, regionModifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.
delete_cache_parameter_groupdeleteCacheParameterGroupName, regionDeletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with any cache clusters. You cannot delete the default cache parameter groups in your account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
CacheParameterGroupFamilystringThe name of the cache parameter group family that the cache parameter group can be used with. Valid values are: valkey8 | valkey7 | memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | redis7
CacheParameterGroupNamestringThe name of the cache parameter group to delete. The specified cache security group must not be associated with any clusters.
ParameterNameValuesarrayAn array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be modified per request.
regionstringAWS region (default: us-east-1)
CacheParameterGroupNamestringThe name of a specific cache parameter group to return details for.
DescriptionstringA user-specified description for the cache parameter group.
MarkerstringAn optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved. Default: 100 Constraints: minimum 20; maximum 100.
TagsarrayA 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.

SELECT examples

Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list contains only the descriptions for that group.

SELECT
arn,
cache_parameter_group_family,
cache_parameter_group_name,
description,
is_global
FROM aws.elasticache.cache_parameter_groups
WHERE region = '{{ region }}' -- required
AND CacheParameterGroupName = '{{ CacheParameterGroupName }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;

INSERT examples

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.

INSERT INTO aws.elasticache.cache_parameter_groups (
CacheParameterGroupName,
CacheParameterGroupFamily,
region,
Description,
Tags
)
SELECT
'{{ CacheParameterGroupName }}',
'{{ CacheParameterGroupFamily }}',
'{{ region }}',
'{{ Description }}',
'{{ Tags }}'
RETURNING
arn,
cache_parameter_group_family,
cache_parameter_group_name,
description,
is_global
;

UPDATE examples

Modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.

UPDATE aws.elasticache.cache_parameter_groups
SET
-- No updatable properties
WHERE
CacheParameterGroupName = '{{ CacheParameterGroupName }}' --required
AND ParameterNameValues = '{{ ParameterNameValues }}' --required
AND region = '{{ region }}' --required
RETURNING
cache_parameter_group_name;

DELETE examples

Deletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with any cache clusters. You cannot delete the default cache parameter groups in your account.

DELETE FROM aws.elasticache.cache_parameter_groups
WHERE CacheParameterGroupName = '{{ CacheParameterGroupName }}' --required
AND region = '{{ region }}' --required
;