Show / Hide Table of Contents

Interface IFargateServiceProps

The properties for defining a service using the Fargate launch type.

Inherited Members
IBaseServiceOptions.Cluster
IBaseServiceOptions.CapacityProviderStrategies
IBaseServiceOptions.CircuitBreaker
IBaseServiceOptions.CloudMapOptions
IBaseServiceOptions.DeploymentController
IBaseServiceOptions.DesiredCount
IBaseServiceOptions.EnableECSManagedTags
IBaseServiceOptions.EnableExecuteCommand
IBaseServiceOptions.HealthCheckGracePeriod
IBaseServiceOptions.MaxHealthyPercent
IBaseServiceOptions.MinHealthyPercent
IBaseServiceOptions.PropagateTags
IBaseServiceOptions.PropagateTaskTagsFrom
IBaseServiceOptions.ServiceName
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public interface IFargateServiceProps : IBaseServiceOptions
Syntax (vb)
Public Interface IFargateServiceProps
    Inherits IBaseServiceOptions
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;
TaskDefinition taskDefinition;
Vpc vpc;

var service = new FargateService(this, "Service", new FargateServiceProps { Cluster = cluster, TaskDefinition = taskDefinition });

var lb = new ApplicationLoadBalancer(this, "LB", new ApplicationLoadBalancerProps { Vpc = vpc, InternetFacing = true });
var listener = lb.AddListener("Listener", new BaseApplicationListenerProps { Port = 80 });
service.RegisterLoadBalancerTargets(new EcsTarget {
    ContainerName = "web",
    ContainerPort = 80,
    NewTargetGroupId = "ECS",
    Listener = ListenerConfig.ApplicationListener(listener, new AddApplicationTargetsProps {
        Protocol = ApplicationProtocol.HTTPS
    })
});

Synopsis

Properties

AssignPublicIp

Specifies whether the task's elastic network interface receives a public IP address.

PlatformVersion

The platform version on which to run your service.

SecurityGroup

(deprecated) The security groups to associate with the service.

SecurityGroups

The security groups to associate with the service.

TaskDefinition

The task definition to use for tasks in the service.

VpcSubnets

The subnets to associate with the service.

Properties

AssignPublicIp

Specifies whether the task's elastic network interface receives a public IP address.

virtual Nullable<bool> AssignPublicIp { get; }
Property Value

System.Nullable<System.Boolean>

Remarks

If true, each task will receive a public IP address.

Default: false

PlatformVersion

The platform version on which to run your service.

virtual Nullable<FargatePlatformVersion> PlatformVersion { get; }
Property Value

System.Nullable<FargatePlatformVersion>

Remarks

If one is not specified, the LATEST platform version is used by default. For more information, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.

Default: Latest

SecurityGroup

(deprecated) The security groups to associate with the service.

virtual ISecurityGroup SecurityGroup { get; }
Property Value

ISecurityGroup

Remarks

If you do not specify a security group, a new security group is created.

Default: - A new security group is created.

Stability: Deprecated

SecurityGroups

The security groups to associate with the service.

virtual ISecurityGroup[] SecurityGroups { get; }
Property Value

ISecurityGroup[]

Remarks

If you do not specify a security group, a new security group is created.

Default: - A new security group is created.

TaskDefinition

The task definition to use for tasks in the service.

TaskDefinition TaskDefinition { get; }
Property Value

TaskDefinition

Remarks

[disable-awslint:ref-via-interface]

VpcSubnets

The subnets to associate with the service.

virtual ISubnetSelection VpcSubnets { get; }
Property Value

ISubnetSelection

Remarks

Default: - Public subnets if assignPublicIp is set, otherwise the first available one of Private, Isolated, Public, in that order.

Back to top Generated by DocFX