

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::ElastiCache::SecurityGroup
<a name="aws-resource-elasticache-securitygroup"></a>

The `AWS::ElastiCache::SecurityGroup` resource creates a cache security group. For more information about cache security groups, go to [CacheSecurityGroups](https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/VPCs.html) in the *Amazon ElastiCache User Guide* or go to [CreateCacheSecurityGroup](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSecurityGroup.html) in the *Amazon ElastiCache API Reference Guide*. 

For more information, see [CreateCacheSubnetGroup](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html).

## Syntax
<a name="aws-resource-elasticache-securitygroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-elasticache-securitygroup-syntax.json"></a>

```
{
  "Type" : "AWS::ElastiCache::SecurityGroup",
  "Properties" : {
      "[Description](#cfn-elasticache-securitygroup-description)" : String,
      "[Tags](#cfn-elasticache-securitygroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-elasticache-securitygroup-syntax.yaml"></a>

```
Type: AWS::ElastiCache::SecurityGroup
Properties:
  [Description](#cfn-elasticache-securitygroup-description): String
  [Tags](#cfn-elasticache-securitygroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-elasticache-securitygroup-properties"></a>

`Description`  <a name="cfn-elasticache-securitygroup-description"></a>
A description for the cache security group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-elasticache-securitygroup-tags"></a>
A tag that can be added to an ElastiCache security group. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your security groups. A tag with a null Value is permitted.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-elasticache-securitygroup-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-elasticache-securitygroup-return-values"></a>

### Ref
<a name="aws-resource-elasticache-securitygroup-return-values-ref"></a>

When the logical ID of this resource is provided to the `Ref` intrinsic function, `Ref` returns the resource name. 

For more information about using the `Ref` function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-elasticache-securitygroup-return-values-fn--getatt"></a>

# AWS::ElastiCache::SecurityGroup Tag
<a name="aws-properties-elasticache-securitygroup-tag"></a>

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.

## Syntax
<a name="aws-properties-elasticache-securitygroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticache-securitygroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-elasticache-securitygroup-tag-key)" : String,
  "[Value](#cfn-elasticache-securitygroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-elasticache-securitygroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-elasticache-securitygroup-tag-key): String
  [Value](#cfn-elasticache-securitygroup-tag-value): String
```

## Properties
<a name="aws-properties-elasticache-securitygroup-tag-properties"></a>

`Key`  <a name="cfn-elasticache-securitygroup-tag-key"></a>
The key for the tag. May not be null.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-elasticache-securitygroup-tag-value"></a>
The tag's value. May be null.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)