aws-cdk-lib.aws_elasticloadbalancingv2.TargetGroupBase

class TargetGroupBase

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

Implements IConstruct, IDependable, ITargetGroup

Extends Construct

Implemented by ApplicationTargetGroup, NetworkTargetGroup

Define the target of a load balancer.

Initializer

new TargetGroupBase(scope: Construct, id: string, baseProps: BaseTargetGroupProps, additionalProps: any)

Parameters

  • scope Construct
  • id string
  • baseProps BaseTargetGroupProps
  • additionalProps any

Properties

NameTypeDescription
defaultPortnumberDefault port configured for members of this target group.
firstLoadBalancerFullNamestringFull name of first load balancer.
healthCheckHealthCheckHealth check for the members of this target group.
loadBalancerArnsstringA token representing a list of ARNs of the load balancers that route traffic to this target group.
loadBalancerAttachedIDependableList of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.
loadBalancerAttachedDependenciesDependencyGroupConfigurable dependable with all resources that lead to load balancer attachment.
nodeNodeThe tree node.
targetGroupArnstringThe ARN of the target group.
targetGroupFullNamestringThe full name of the target group.
targetGroupLoadBalancerArnsstring[]ARNs of load balancers load balancing to this TargetGroup.
targetGroupNamestringThe name of the target group.
targetType?TargetTypeThe types of the directly registered members of this target group.

defaultPort

Type: number

Default port configured for members of this target group.


firstLoadBalancerFullName

Type: string

Full name of first load balancer.

This identifier is emitted as a dimensions of the metrics of this target group.

Example value: app/my-load-balancer/123456789


healthCheck

Type: HealthCheck

Health check for the members of this target group.


loadBalancerArns

Type: string

A token representing a list of ARNs of the load balancers that route traffic to this target group.


loadBalancerAttached

Type: IDependable

List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.


loadBalancerAttachedDependencies

Type: DependencyGroup

Configurable dependable with all resources that lead to load balancer attachment.


node

Type: Node

The tree node.


targetGroupArn

Type: string

The ARN of the target group.


targetGroupFullName

Type: string

The full name of the target group.


targetGroupLoadBalancerArns

Type: string[]

ARNs of load balancers load balancing to this TargetGroup.


targetGroupName

Type: string

The name of the target group.


targetType?

Type: TargetType (optional)

The types of the directly registered members of this target group.

Methods

NameDescription
configureHealthCheck(healthCheck)Set/replace the target group's health check.
setAttribute(key, value?)Set a non-standard attribute on the target group.
toString()Returns a string representation of this construct.
protected addLoadBalancerTarget(props)Register the given load balancing target as part of this group.
protected validateTargetGroup()

configureHealthCheck(healthCheck)

public configureHealthCheck(healthCheck: HealthCheck): void

Parameters

  • healthCheck HealthCheck

Set/replace the target group's health check.


setAttribute(key, value?)

public setAttribute(key: string, value?: string): void

Parameters

  • key string
  • value string

Set a non-standard attribute on the target group.

See also: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected addLoadBalancerTarget(props)

protected addLoadBalancerTarget(props: LoadBalancerTargetProps): void

Parameters

  • props LoadBalancerTargetProps

Register the given load balancing target as part of this group.


protected validateTargetGroup()

protected validateTargetGroup(): string[]

Returns

  • string[]