@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:30.141Z") public class NetworkLoadBalancedEc2Service extends NetworkLoadBalancedServiceBase
Example:
Cluster cluster; NetworkLoadBalancedEc2Service loadBalancedEcsService = NetworkLoadBalancedEc2Service.Builder.create(this, "Service") .cluster(cluster) .memoryLimitMiB(1024) .taskImageOptions(NetworkLoadBalancedTaskImageOptions.builder() .image(ContainerImage.fromRegistry("test")) .environment(Map.of( "TEST_ENVIRONMENT_VARIABLE1", "test environment variable 1 value", "TEST_ENVIRONMENT_VARIABLE2", "test environment variable 2 value")) .build()) .desiredCount(2) .build();
Modifier and Type | Class and Description |
---|---|
static class |
NetworkLoadBalancedEc2Service.Builder
A fluent builder for
NetworkLoadBalancedEc2Service . |
IConstruct.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
NetworkLoadBalancedEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkLoadBalancedEc2Service(software.amazon.jsii.JsiiObjectRef objRef) |
|
NetworkLoadBalancedEc2Service(software.constructs.Construct scope,
java.lang.String id)
Constructs a new instance of the NetworkLoadBalancedEc2Service class.
|
|
NetworkLoadBalancedEc2Service(software.constructs.Construct scope,
java.lang.String id,
NetworkLoadBalancedEc2ServiceProps props)
Constructs a new instance of the NetworkLoadBalancedEc2Service class.
|
Modifier and Type | Method and Description |
---|---|
Ec2Service |
getService()
The ECS service in this construct.
|
Ec2TaskDefinition |
getTaskDefinition()
The EC2 Task Definition in this construct.
|
addServiceAsTarget, createAWSLogDriver, getCluster, getDefaultCluster, getDefaultCluster, getDesiredCount, getInternalDesiredCount, getListener, getLoadBalancer, getTargetGroup
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected NetworkLoadBalancedEc2Service(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkLoadBalancedEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public NetworkLoadBalancedEc2Service(software.constructs.Construct scope, java.lang.String id, NetworkLoadBalancedEc2ServiceProps props)
scope
- This parameter is required.id
- This parameter is required.props
- public NetworkLoadBalancedEc2Service(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.public Ec2Service getService()
public Ec2TaskDefinition getTaskDefinition()