Class ApplicationMultipleTargetGroupsEc2Service
An EC2 service running on an ECS cluster fronted by an application load balancer.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ApplicationMultipleTargetGroupsEc2Service : ApplicationMultipleTargetGroupsServiceBase
Syntax (vb)
Public Class ApplicationMultipleTargetGroupsEc2Service
Inherits ApplicationMultipleTargetGroupsServiceBase
Remarks
ExampleMetadata: infused
Examples
// One application load balancer with one listener and two target groups.
Cluster cluster;
var loadBalancedEc2Service = new ApplicationMultipleTargetGroupsEc2Service(this, "Service", new ApplicationMultipleTargetGroupsEc2ServiceProps {
Cluster = cluster,
MemoryLimitMiB = 256,
TaskImageOptions = new ApplicationLoadBalancedTaskImageProps {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
},
TargetGroups = new [] { new ApplicationTargetProps {
ContainerPort = 80
}, new ApplicationTargetProps {
ContainerPort = 90,
PathPattern = "a/b/c",
Priority = 10
} }
});
Synopsis
Constructors
ApplicationMultipleTargetGroupsEc2Service(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ApplicationMultipleTargetGroupsEc2Service(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ApplicationMultipleTargetGroupsEc2Service(Construct, String, IApplicationMultipleTargetGroupsEc2ServiceProps) | Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class. |
Properties
Service | The EC2 service in this construct. |
TargetGroup | (deprecated) The default target group for the service. |
TaskDefinition | The EC2 Task Definition in this construct. |
Constructors
ApplicationMultipleTargetGroupsEc2Service(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ApplicationMultipleTargetGroupsEc2Service(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ApplicationMultipleTargetGroupsEc2Service(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ApplicationMultipleTargetGroupsEc2Service(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ApplicationMultipleTargetGroupsEc2Service(Construct, String, IApplicationMultipleTargetGroupsEc2ServiceProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.
public ApplicationMultipleTargetGroupsEc2Service(Construct scope, string id, IApplicationMultipleTargetGroupsEc2ServiceProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IApplicationMultipleTargetGroupsEc2ServiceProps
Properties
Service
The EC2 service in this construct.
public virtual Ec2Service Service { get; }
Property Value
TargetGroup
(deprecated) The default target group for the service.
public virtual ApplicationTargetGroup TargetGroup { get; }
Property Value
Remarks
Stability: Deprecated
TaskDefinition
The EC2 Task Definition in this construct.
public virtual Ec2TaskDefinition TaskDefinition { get; }
Property Value