

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

# AWS::AutoScaling::AutoScalingGroup TagProperty
<a name="aws-properties-autoscaling-autoscalinggroup-tagproperty"></a>

A structure that specifies a tag for the `Tags` property of [AWS::AutoScaling::AutoScalingGroup](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource.

For more information, see [Tag Auto Scaling groups and instances](https://docs.amazonaws.cn/autoscaling/ec2/userguide/autoscaling-tagging.html) in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the [Examples](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#aws-resource-autoscaling-autoscalinggroup--examples) section of the `AWS::AutoScaling::AutoScalingGroup` resource.

CloudFormation adds the following tags to all Auto Scaling groups and associated instances: 
+ aws:cloudformation:stack-name
+ aws:cloudformation:stack-id
+ aws:cloudformation:logical-id 

## Syntax
<a name="aws-properties-autoscaling-autoscalinggroup-tagproperty-syntax"></a>

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

### JSON
<a name="aws-properties-autoscaling-autoscalinggroup-tagproperty-syntax.json"></a>

```
{
  "[Key](#cfn-autoscaling-autoscalinggroup-tagproperty-key)" : String,
  "[PropagateAtLaunch](#cfn-autoscaling-autoscalinggroup-tagproperty-propagateatlaunch)" : Boolean,
  "[Value](#cfn-autoscaling-autoscalinggroup-tagproperty-value)" : String
}
```

### YAML
<a name="aws-properties-autoscaling-autoscalinggroup-tagproperty-syntax.yaml"></a>

```
  [Key](#cfn-autoscaling-autoscalinggroup-tagproperty-key): String
  [PropagateAtLaunch](#cfn-autoscaling-autoscalinggroup-tagproperty-propagateatlaunch): Boolean
  [Value](#cfn-autoscaling-autoscalinggroup-tagproperty-value): String
```

## Properties
<a name="aws-properties-autoscaling-autoscalinggroup-tagproperty-properties"></a>

`Key`  <a name="cfn-autoscaling-autoscalinggroup-tagproperty-key"></a>
The tag key.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropagateAtLaunch`  <a name="cfn-autoscaling-autoscalinggroup-tagproperty-propagateatlaunch"></a>
Set to `true` if you want CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group. Set to `false` if you want the tag attached only to the Auto Scaling group and not copied to any instances launched as part of the Auto Scaling group.   
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-autoscaling-autoscalinggroup-tagproperty-value"></a>
The tag value.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)