Class ApplicationLoadBalancedEc2Service
An EC2 service running on an ECS cluster fronted by an application load balancer.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ApplicationLoadBalancedEc2Service : ApplicationLoadBalancedServiceBase
Syntax (vb)
Public Class ApplicationLoadBalancedEc2Service
Inherits ApplicationLoadBalancedServiceBase
Remarks
ExampleMetadata: infused
Examples
Cluster cluster;
var loadBalancedEcsService = new ApplicationLoadBalancedEc2Service(this, "Service", new ApplicationLoadBalancedEc2ServiceProps {
Cluster = cluster,
MemoryLimitMiB = 1024,
TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
Image = ContainerImage.FromRegistry("test"),
Environment = new Dictionary<string, string> {
{ "TEST_ENVIRONMENT_VARIABLE1", "test environment variable 1 value" },
{ "TEST_ENVIRONMENT_VARIABLE2", "test environment variable 2 value" }
},
Command = new [] { "command" },
EntryPoint = new [] { "entry", "point" }
},
DesiredCount = 2
});
Synopsis
Constructors
ApplicationLoadBalancedEc2Service(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ApplicationLoadBalancedEc2Service(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ApplicationLoadBalancedEc2Service(Construct, String, IApplicationLoadBalancedEc2ServiceProps) | Constructs a new instance of the ApplicationLoadBalancedEc2Service class. |
Properties
Service | The EC2 service in this construct. |
TaskDefinition | The EC2 Task Definition in this construct. |
Constructors
ApplicationLoadBalancedEc2Service(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ApplicationLoadBalancedEc2Service(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ApplicationLoadBalancedEc2Service(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ApplicationLoadBalancedEc2Service(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ApplicationLoadBalancedEc2Service(Construct, String, IApplicationLoadBalancedEc2ServiceProps)
Constructs a new instance of the ApplicationLoadBalancedEc2Service class.
public ApplicationLoadBalancedEc2Service(Construct scope, string id, IApplicationLoadBalancedEc2ServiceProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IApplicationLoadBalancedEc2ServiceProps
Properties
Service
The EC2 service in this construct.
public virtual Ec2Service Service { get; }
Property Value
TaskDefinition
The EC2 Task Definition in this construct.
public virtual Ec2TaskDefinition TaskDefinition { get; }
Property Value