Amazon ElastiCache
API Reference (API Version 2012-11-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

CreateCacheSecurityGroup

Description

Creates a new Cache Security Group. Cache Security groups control access to one or more Cache Clusters.

Only use cache security groups when you are creating a cluster outside of an Amazon Virtual Private Cloud (VPC). Inside of a VPC, use VPC security groups.

Request Parameters

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

CacheSecurityGroupName

The name for the Cache Security Group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default".

Example: mysecuritygroup

Type: String

Required: Yes

Description

The description for the Cache Security Group.

Type: String

Required: Yes

Response Elements

The following elements are returned in a CacheSecurityGroup structure.

CacheSecurityGroupName

Specifies the name of the Cache Security Group.

Type: String

Description

Provides the description of the Cache Security Group.

Type: String

EC2SecurityGroups

Contains a list of EC2SecurityGroup elements.

Type: EC2SecurityGroup list

OwnerId

Provides the AWS ID of the owner of a specific Cache Security Group.

Type: String

Errors

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

CacheSecurityGroupAlreadyExists

A Cache Security Group with the name specified in CacheSecurityGroupName already exists.

HTTP Status Code: 400

CacheSecurityGroupQuotaExceeded

Request would result in user exceeding the allowed number of Cache Security Groups.

HTTP Status Code: 400

InvalidParameterCombination

HTTP Status Code: 400

InvalidParameterValue

HTTP Status Code: 400

Examples

Sample Request

https://elasticache.us-east-1.amazonaws.com/
   ?Action=CreateCacheSecurityGroup
   &CacheSecurityGroupName=mycachesecuritygroup
   &Description=My%20cache%20security%20group
   &Version=2012-11-15
   &SignatureVersion=2
   &SignatureMethod=HmacSHA256
   &Timestamp=2011-07-27T02%3A43%3A10.703Z
   &AWSAccessKeyId=YOUR-ACCESS-KEY
   &Signature=YOUR-SIGNATURE

Sample Response

<CreateCacheSecurityGroupResponse xmlns="http://elasticache.amazonaws.com/doc/2012-11-15/">
  <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>