aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedServiceBase

class NetworkLoadBalancedServiceBase

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

Implements IConstruct, IDependable

Extends Construct

Implemented by NetworkLoadBalancedEc2Service, NetworkLoadBalancedFargateService

The base class for NetworkLoadBalancedEc2Service and NetworkLoadBalancedFargateService services.

Initializer

new NetworkLoadBalancedServiceBase(scope: Construct, id: string, props?: NetworkLoadBalancedServiceBaseProps)

Parameters

  • scope Construct
  • id string
  • props NetworkLoadBalancedServiceBaseProps

Constructs a new instance of the NetworkLoadBalancedServiceBase class.

Properties

NameTypeDescription
clusterIClusterThe cluster that hosts the service.
listenerNetworkListenerThe listener for the service.
loadBalancerNetworkLoadBalancerThe Network Load Balancer for the service.
nodeNodeThe tree node.
targetGroupNetworkTargetGroupThe target group for the service.
internalDesiredCount?numberThe desired number of instantiations of the task definition to keep running on the service.

cluster

Type: ICluster

The cluster that hosts the service.


listener

Type: NetworkListener

The listener for the service.


loadBalancer

Type: NetworkLoadBalancer

The Network Load Balancer for the service.


node

Type: Node

The tree node.


targetGroup

Type: NetworkTargetGroup

The target group for 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.

Methods

NameDescription
toString()Returns a string representation of this construct.
protected addServiceAsTarget(service)Adds service as a target of the target group.
protected createAWSLogDriver(prefix)
protected getDefaultCluster(scope, vpc?)Returns the default cluster.

toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected addServiceAsTarget(service)

protected addServiceAsTarget(service: BaseService): void

Parameters

  • service BaseService

Adds service as a target of the target group.


protected createAWSLogDriver(prefix)

protected createAWSLogDriver(prefix: string): AwsLogDriver

Parameters

  • prefix string

Returns

  • AwsLogDriver

protected getDefaultCluster(scope, vpc?)

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

Parameters

  • scope Construct
  • vpc IVpc

Returns

  • Cluster

Returns the default cluster.