AWS::ElasticLoadBalancingV2::LoadBalancer Tag - AWS CloudFormation
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

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.

AWS::ElasticLoadBalancingV2::LoadBalancer Tag

Information about a tag.

Syntax

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

JSON

{ "Key" : String, "Value" : String }

YAML

Key: String Value: String

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: No

Type: String

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Minimum: 0

Maximum: 256

Update requires: No interruption

Examples

The following example creates a Network Load Balancer with two tags.

YAML

myLoadBalancer: Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: Name: my-nlb Type: network Scheme: internal Subnets: - !Ref subnet-AZ1 - !Ref subnet-AZ2 SecurityGroups: - !Ref mySecurityGroup Tags: - Key: "department" Value: "123" - Key: "project" Value: "lima"

JSON

{ "myLoadBalancer": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { "Name": "my-alb", "Type": "network", "Scheme": "internal", "Subnets": [ { "Ref": "subnet-AZ1" }, { "Ref": "subnet-AZ2" } ], "SecurityGroups": [ { "Ref": "mySecurityGroup" } ], "Tags": [ { "Key": "department", "Value": "123" }, { "Key": "project", "Value": "lima" } ] } } }