Interface IApplicationMultipleTargetGroupsFargateServiceProps
The properties for the ApplicationMultipleTargetGroupsFargateService service.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IApplicationMultipleTargetGroupsFargateServiceProps : IApplicationMultipleTargetGroupsServiceBaseProps, IFargateServiceBaseProps
Syntax (vb)
Public Interface IApplicationMultipleTargetGroupsFargateServiceProps
Inherits IApplicationMultipleTargetGroupsServiceBaseProps, IFargateServiceBaseProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CertificateManager;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
using Amazon.CDK.AWS.Route53;
var vpc = new Vpc(this, "Vpc", new VpcProps { MaxAzs = 1 });
var loadBalancedFargateService = new ApplicationMultipleTargetGroupsFargateService(this, "myService", new ApplicationMultipleTargetGroupsFargateServiceProps {
Cluster = new Cluster(this, "EcsCluster", new ClusterProps { Vpc = vpc }),
MemoryLimitMiB = 256,
TaskImageOptions = new ApplicationLoadBalancedTaskImageProps {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
},
EnableExecuteCommand = true,
LoadBalancers = new [] { new ApplicationLoadBalancerProps {
Name = "lb",
IdleTimeout = Duration.Seconds(400),
DomainName = "api.example.com",
DomainZone = new PublicHostedZone(this, "HostedZone", new PublicHostedZoneProps { ZoneName = "example.com" }),
Listeners = new [] { new ApplicationListenerProps {
Name = "listener",
Protocol = ApplicationProtocol.HTTPS,
Certificate = Certificate.FromCertificateArn(this, "Cert", "helloworld"),
SslPolicy = SslPolicy.TLS12_EXT
} }
}, new ApplicationLoadBalancerProps {
Name = "lb2",
IdleTimeout = Duration.Seconds(120),
DomainName = "frontend.com",
DomainZone = new PublicHostedZone(this, "HostedZone", new PublicHostedZoneProps { ZoneName = "frontend.com" }),
Listeners = new [] { new ApplicationListenerProps {
Name = "listener2",
Protocol = ApplicationProtocol.HTTPS,
Certificate = Certificate.FromCertificateArn(this, "Cert2", "helloworld"),
SslPolicy = SslPolicy.TLS12_EXT
} }
} },
TargetGroups = new [] { new ApplicationTargetProps {
ContainerPort = 80,
Listener = "listener"
}, new ApplicationTargetProps {
ContainerPort = 90,
PathPattern = "a/b/c",
Priority = 10,
Listener = "listener"
}, new ApplicationTargetProps {
ContainerPort = 443,
Listener = "listener2"
}, new ApplicationTargetProps {
ContainerPort = 80,
PathPattern = "a/b/c",
Priority = 10,
Listener = "listener2"
} }
});
Synopsis
Properties
AssignPublicIp | Determines whether the service will be assigned a public IP address. |
Properties
AssignPublicIp
Determines whether the service will be assigned a public IP address.
virtual Nullable<bool> AssignPublicIp { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false