AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::VpcLattice::TargetGroup

CfnTargetGroup

Creates a target group. 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. For more information, see [Target groups](https://docs.aws.amazon.com/vpc-lattice/latest/ug/target-groups.html) in the *Amazon VPC Lattice User Guide* .

Import

import { CfnTargetGroup } from 'aws-cdk-lib/aws-vpclattice';

Or use the module namespace:

import * as vpclattice from 'aws-cdk-lib/aws-vpclattice';
// vpclattice.CfnTargetGroup

Properties

Configuration passed to the constructor as CfnTargetGroupProps.

typeRequired
string

The type of target group.

configOptional
IResolvable | TargetGroupConfigProperty

The target group configuration.

nameOptional
string

The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.

tagsOptional
CfnTag[]

The tags for the target group.

targetsOptional
IResolvable | IResolvable | TargetProperty[]

Describes a target.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter