Menu
Amazon ElastiCache
API Reference (API Version 2015-02-02)

CreateCacheSecurityGroup

Creates a new cache security group. Use a cache security group to control access to one or more cache clusters.

Cache security groups are only used when you are creating a cache cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cache cluster inside of a VPC, use a cache subnet group instead. For more information, see CreateCacheSubnetGroup.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

CacheSecurityGroupName

A name for the cache security group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters. Cannot be the word "Default".

Example: mysecuritygroup

Type: String

Required: Yes

Description

A description for the cache security group.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

CacheSecurityGroup

Represents the output of one of the following operations:

  • AuthorizeCacheSecurityGroupIngress

  • CreateCacheSecurityGroup

  • RevokeCacheSecurityGroupIngress

Type: CacheSecurityGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

CacheSecurityGroupAlreadyExists

A cache security group with the specified name already exists.

HTTP Status Code: 400

InvalidParameterCombination

Two or more incompatible parameters were specified.

HTTP Status Code: 400

InvalidParameterValue

The value for a parameter is invalid.

HTTP Status Code: 400

QuotaExceeded.CacheSecurityGroup

The request cannot be processed because it would exceed the allowed number of cache security groups.

HTTP Status Code: 400

Example

Sample Request

Copy
https://elasticache.us-west-2.amazonaws.com/ ?Action=CreateCacheSecurityGroup &CacheSecurityGroupName=mycachesecuritygroup &Description=My%20cache%20security%20group &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

Sample Response

Copy
<CreateCacheSecurityGroupResponse xmlns="http://elasticache.amazonaws.com/doc/2015-02-02/"> <CreateCacheSecurityGroupResult> <CacheSecurityGroup> <EC2SecurityGroups/> <CacheSecurityGroupName>mycachesecuritygroup</CacheSecurityGroupName> <OwnerId>123456789012</OwnerId> <Description>My cache security group</Description> </CacheSecurityGroup> </CreateCacheSecurityGroupResult> <ResponseMetadata> <RequestId>2b1c8035-b7fa-11e0-9326-b7275b9d4a6c</RequestId> </ResponseMetadata> </CreateCacheSecurityGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: