Skip to content
v2.276.0

CfnTargetGroupProps Struct ​

Properties for defining a CfnTargetGroup.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const cfnTargetGroupProps: vpclattice.CfnTargetGroupProps = {
  type: 'type',

  // the properties below are optional
  config: {
    healthCheck: {
      enabled: false,
      healthCheckIntervalSeconds: 123,
      healthCheckTimeoutSeconds: 123,
      healthyThresholdCount: 123,
      matcher: {
        httpCode: 'httpCode',
      },
      path: 'path',
      port: 123,
      protocol: 'protocol',
      protocolVersion: 'protocolVersion',
      unhealthyThresholdCount: 123,
    },
    ipAddressType: 'ipAddressType',
    lambdaEventStructureVersion: 'lambdaEventStructureVersion',
    port: 123,
    protocol: 'protocol',
    protocolVersion: 'protocolVersion',
    vpcIdentifier: 'vpcIdentifier',
  },
  name: 'name',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  targets: [{
    id: 'id',

    // the properties below are optional
    port: 123,
  }],
};

Properties ​

configoptionalIResolvable | CfnTargetGroup.TargetGroupConfigPropertyconfigoptionaltyping.Union[IResolvable, TargetGroupConfigProperty]configoptionalIResolvableConfigoptionalIResolvableConfigoptionalinterface{}#
The target group configuration.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string#
The name of the target group.
notes

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.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
The tags for the target group.
targetsoptionalIResolvable | IResolvable | CfnTargetGroup.TargetProperty[]targetsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TargetProperty]]]targetsoptionalIResolvableTargetsoptionalIResolvableTargetsoptionalinterface{}#
Describes a target.
typestringtypestrtypeStringTypestringType*stringrequired#
The type of target group.