This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::ElasticLoadBalancingV2::TargetGroup Tag
Information about a tag.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
Properties
Key
-
The key of the tag.
Required: Yes
Type: String
Pattern:
^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
Minimum:
1
Maximum:
128
Update requires: No interruption
Value
-
The value of the tag.
Required: Yes
Type: String
Pattern:
^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
Minimum:
0
Maximum:
256
Update requires: No interruption
Examples
The following example creates a target group with two tags.
YAML
myTargetGroup: Type: 'AWS::ElasticLoadBalancingV2::TargetGroup' Properties: Name: my-target-group Protocol: HTTP Port: 80 TargetType: instance VpcId: !Ref myVPC Tags: - Key: "department" Value: "123" - Key: "project" Value: "lima"
JSON
{ "myTargetGroup": { "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", "Properties": { "Name": "my-target-group", "Protocol": "HTTP", "Port": 80, "TargetType": "instance", "VpcId": { "Ref": "myVPC" }, "Tags": [ { "Key": "department", "Value": "123" }, { "Key": "project", "Value": "lima" } ] } } }