# AWS::VpcLattice::TargetGroup A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Type" : "AWS::VpcLattice::TargetGroup", "Properties" : { "Config" : TargetGroupConfig, "Name" : String, "Type" : String, "Targets" : [ Target, ... ], "Tags" : [ Tag, ... ] } }### YAML
Type: AWS::VpcLattice::TargetGroup Properties: Config: TargetGroupConfig Name: String Type: String Targets: - Target Tags: - Tag## Properties #### Config _Required_: No _Type_: TargetGroupConfig _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Name _Required_: No _Type_: String _Minimum Length_:
3
_Maximum Length_: 128
_Pattern_: ^(?!tg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Type
_Required_: Yes
_Type_: String
_Allowed Values_: IP
| LAMBDA
| INSTANCE
| ALB
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Targets
_Required_: No
_Type_: List of Target
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Tags
_Required_: No
_Type_: List of Tag
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
## Return Values
### Ref
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Arn.
### Fn::GetAtt
The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).
#### Arn
Returns the Arn
value.
#### CreatedAt
Returns the CreatedAt
value.
#### Id
Returns the Id
value.
#### LastUpdatedAt
Returns the LastUpdatedAt
value.
#### Status
Returns the Status
value.