aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsServiceBase

class ApplicationMultipleTargetGroupsServiceBase

LanguageType name
.NETAmazon.CDK.AWS.ECS.Patterns.ApplicationMultipleTargetGroupsServiceBase
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecspatterns#ApplicationMultipleTargetGroupsServiceBase
Javasoftware.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsServiceBase
Pythonaws_cdk.aws_ecs_patterns.ApplicationMultipleTargetGroupsServiceBase
TypeScript (source)aws-cdk-lib » aws_ecs_patterns » ApplicationMultipleTargetGroupsServiceBase

Implements IConstruct, IDependable

Extends Construct

Implemented by ApplicationMultipleTargetGroupsEc2Service, ApplicationMultipleTargetGroupsFargateService

The base class for ApplicationMultipleTargetGroupsEc2Service and ApplicationMultipleTargetGroupsFargateService classes.

Initializer

new ApplicationMultipleTargetGroupsServiceBase(scope: Construct, id: string, props?: ApplicationMultipleTargetGroupsServiceBaseProps)

Parameters

  • scope Construct
  • id string
  • props ApplicationMultipleTargetGroupsServiceBaseProps

Constructs a new instance of the ApplicationMultipleTargetGroupsServiceBase class.

Properties

NameTypeDescription
clusterIClusterThe cluster that hosts the service.
listener⚠️ApplicationListenerThe default listener for the service (first added listener).
listenersApplicationListener[]The listeners of the service.
loadBalancer⚠️ApplicationLoadBalancerThe default Application Load Balancer for the service (first added load balancer).
loadBalancersApplicationLoadBalancer[]The load balancers of the service.
nodeNodeThe tree node.
targetGroupsApplicationTargetGroup[]The target groups of the service.
internalDesiredCount?numberThe desired number of instantiations of the task definition to keep running on the service.
logDriver?LogDriver

cluster

Type: ICluster

The cluster that hosts the service.


listener⚠️

⚠️ Deprecated: - Use listeners instead.

Type: ApplicationListener

The default listener for the service (first added listener).


listeners

Type: ApplicationListener[]

The listeners of the service.


loadBalancer⚠️

⚠️ Deprecated: - Use loadBalancers instead.

Type: ApplicationLoadBalancer

The default Application Load Balancer for the service (first added load balancer).


loadBalancers

Type: ApplicationLoadBalancer[]

The load balancers of the service.


node

Type: Node

The tree node.


targetGroups

Type: ApplicationTargetGroup[]

The target groups of the service.


internalDesiredCount?

Type: number (optional)

The desired number of instantiations of the task definition to keep running on the service.

The default is 1 for all new services and uses the existing services desired count when updating an existing service, if one is not provided.


logDriver?

Type: LogDriver (optional)

Methods

NameDescription
toString()Returns a string representation of this construct.
protected addPortMappingForTargets(container, targets)
protected createAWSLogDriver(prefix)
protected findListener(name?)
protected getDefaultCluster(scope, vpc?)Returns the default cluster.
protected registerECSTargets(service, container, targets)

toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected addPortMappingForTargets(container, targets)

protected addPortMappingForTargets(container: ContainerDefinition, targets: ApplicationTargetProps[]): void

Parameters

  • container ContainerDefinition
  • targets ApplicationTargetProps[]

protected createAWSLogDriver(prefix)

protected createAWSLogDriver(prefix: string): AwsLogDriver

Parameters

  • prefix string

Returns

  • AwsLogDriver

protected findListener(name?)

protected findListener(name?: string): ApplicationListener

Parameters

  • name string

Returns

  • ApplicationListener

protected getDefaultCluster(scope, vpc?)

protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster

Parameters

  • scope Construct
  • vpc IVpc

Returns

  • Cluster

Returns the default cluster.


protected registerECSTargets(service, container, targets)

protected registerECSTargets(service: BaseService, container: ContainerDefinition, targets: ApplicationTargetProps[]): ApplicationTargetGroup

Parameters

  • service BaseService
  • container ContainerDefinition
  • targets ApplicationTargetProps[]

Returns

  • ApplicationTargetGroup