- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateCacheParameterGroupCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElastiCacheClient, CreateCacheParameterGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, CreateCacheParameterGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // CreateCacheParameterGroupMessage
CacheParameterGroupName: "STRING_VALUE", // required
CacheParameterGroupFamily: "STRING_VALUE", // required
Description: "STRING_VALUE", // required
Tags: [ // TagList
{ // Tag
Key: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
};
const command = new CreateCacheParameterGroupCommand(input);
const response = await client.send(command);
// { // CreateCacheParameterGroupResult
// CacheParameterGroup: { // CacheParameterGroup
// CacheParameterGroupName: "STRING_VALUE",
// CacheParameterGroupFamily: "STRING_VALUE",
// Description: "STRING_VALUE",
// IsGlobal: true || false,
// ARN: "STRING_VALUE",
// },
// };
Example Usage
CreateCacheParameterGroupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
CacheParameterGroupFamily Required | string | undefined | The name of the cache parameter group family that the cache parameter group can be used with. Valid values are: |
CacheParameterGroupName Required | string | undefined | A user-specified name for the cache parameter group. |
Description Required | string | undefined | A user-specified description for the cache parameter group. |
Tags | Tag[] | undefined | 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. |
CreateCacheParameterGroupCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CacheParameterGroup | CacheParameterGroup | undefined | Represents the output of a |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CacheParameterGroupAlreadyExistsFault | client | A cache parameter group with the requested name already exists. |
CacheParameterGroupQuotaExceededFault | client | The request cannot be processed because it would exceed the maximum number of cache security groups. |
InvalidCacheParameterGroupStateFault | client | The current state of the cache parameter group does not allow the requested operation to occur. |
InvalidParameterCombinationException | client | Two or more incompatible parameters were specified. |
InvalidParameterValueException | client | The value for a parameter is invalid. |
TagQuotaPerResourceExceeded | client | The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50. |
ElastiCacheServiceException | Base exception class for all service exceptions from ElastiCache service. |