aws-cdk-lib.aws_elasticloadbalancingv2.BaseTargetGroupProps

interface BaseTargetGroupProps

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancingV2.BaseTargetGroupProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#BaseTargetGroupProps
Javasoftware.amazon.awscdk.services.elasticloadbalancingv2.BaseTargetGroupProps
Pythonaws_cdk.aws_elasticloadbalancingv2.BaseTargetGroupProps
TypeScript (source)aws-cdk-lib » aws_elasticloadbalancingv2 » BaseTargetGroupProps

Basic properties of both Application and Network Target Groups.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';

declare const vpc: ec2.Vpc;
const baseTargetGroupProps: elbv2.BaseTargetGroupProps = {
  deregistrationDelay: cdk.Duration.minutes(30),
  healthCheck: {
    enabled: false,
    healthyGrpcCodes: 'healthyGrpcCodes',
    healthyHttpCodes: 'healthyHttpCodes',
    healthyThresholdCount: 123,
    interval: cdk.Duration.minutes(30),
    path: 'path',
    port: 'port',
    protocol: elbv2.Protocol.HTTP,
    timeout: cdk.Duration.minutes(30),
    unhealthyThresholdCount: 123,
  },
  targetGroupName: 'targetGroupName',
  targetType: elbv2.TargetType.INSTANCE,
  vpc: vpc,
};

Properties

NameTypeDescription
deregistrationDelay?DurationThe amount of time for Elastic Load Balancing to wait before deregistering a target.
healthCheck?HealthCheckHealth check configuration.
targetGroupName?stringThe name of the target group.
targetType?TargetTypeThe type of targets registered to this TargetGroup, either IP or Instance.
vpc?IVpcThe virtual private cloud (VPC).

deregistrationDelay?

Type: Duration (optional, default: 300)

The amount of time for Elastic Load Balancing to wait before deregistering a target.

The range is 0-3600 seconds.


healthCheck?

Type: HealthCheck (optional, default: The default value for each property in this configuration varies depending on the target.)

Health check configuration.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#aws-resource-elasticloadbalancingv2-targetgroup-properties


targetGroupName?

Type: string (optional, default: Automatically generated.)

The name of the target group.

This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.


targetType?

Type: TargetType (optional, default: Determined automatically.)

The type of targets registered to this TargetGroup, either IP or Instance.

All targets registered into the group must be of this type. If you register targets to the TargetGroup in the CDK app, the TargetType is determined automatically.


vpc?

Type: IVpc (optional, default: undefined)

The virtual private cloud (VPC).

only if TargetType is Ip or InstanceId