Show / Hide Table of Contents

Class FargateService

This creates a service using the Fargate launch type on an ECS cluster.

Inheritance
System.Object
Construct
Resource
BaseService
FargateService
Implements
IBaseService
IApplicationLoadBalancerTarget
INetworkLoadBalancerTarget
ILoadBalancerTarget
IConnectable
IFargateService
IService
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
BaseService.FromServiceArnWithCluster(Construct, String, String)
BaseService.AssociateCloudMapService(IAssociateCloudMapServiceOptions)
BaseService.AttachToApplicationTargetGroup(IApplicationTargetGroup)
BaseService.AttachToClassicLB(LoadBalancer)
BaseService.AttachToNetworkTargetGroup(INetworkTargetGroup)
BaseService.AutoScaleTaskCount(IEnableScalingProps)
BaseService.ConfigureAwsVpcNetworking(IVpc, Nullable<Boolean>, ISubnetSelection, ISecurityGroup)
BaseService.ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, Nullable<Boolean>, ISubnetSelection, ISecurityGroup[])
BaseService.EnableCloudMap(ICloudMapOptions)
BaseService.LoadBalancerTarget(ILoadBalancerTargetOptions)
BaseService.Metric(String, IMetricOptions)
BaseService.MetricCpuUtilization(IMetricOptions)
BaseService.MetricMemoryUtilization(IMetricOptions)
BaseService.RegisterLoadBalancerTargets(IEcsTarget[])
BaseService.Cluster
BaseService.Connections
BaseService.ServiceArn
BaseService.ServiceName
BaseService.TaskDefinition
BaseService.CloudMapService
BaseService.LoadBalancers
BaseService.ServiceRegistries
BaseService.CloudmapService
BaseService.NetworkConfiguration
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class FargateService : BaseService, IBaseService, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget, IConnectable, IFargateService, IService, IResource, IConstruct, IDependable
Syntax (vb)
Public Class FargateService
    Inherits BaseService
    Implements IBaseService, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget, IConnectable, IFargateService, IService, IResource, IConstruct, IDependable
Remarks

Resource: AWS::ECS::Service

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

Constructors

FargateService(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

FargateService(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

FargateService(Construct, String, IFargateServiceProps)

Constructs a new instance of the FargateService class.

Methods

FromFargateServiceArn(Construct, String, String)

Imports from the specified service ARN.

FromFargateServiceAttributes(Construct, String, IFargateServiceAttributes)

Imports from the specified service attributes.

Constructors

FargateService(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected FargateService(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

FargateService(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected FargateService(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

FargateService(Construct, String, IFargateServiceProps)

Constructs a new instance of the FargateService class.

public FargateService(Construct scope, string id, IFargateServiceProps props)
Parameters
scope Constructs.Construct
id System.String
props IFargateServiceProps

Methods

FromFargateServiceArn(Construct, String, String)

Imports from the specified service ARN.

public static IFargateService FromFargateServiceArn(Construct scope, string id, string fargateServiceArn)
Parameters
scope Constructs.Construct
id System.String
fargateServiceArn System.String
Returns

IFargateService

FromFargateServiceAttributes(Construct, String, IFargateServiceAttributes)

Imports from the specified service attributes.

public static IBaseService FromFargateServiceAttributes(Construct scope, string id, IFargateServiceAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs IFargateServiceAttributes
Returns

IBaseService

Implements

IBaseService
IApplicationLoadBalancerTarget
INetworkLoadBalancerTarget
ILoadBalancerTarget
IConnectable
IFargateService
IService
IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX