Show / Hide Table of Contents

Class ExternalService

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

Inheritance
object
Resource
BaseService
ExternalService
Implements
IBaseService
IApplicationLoadBalancerTarget
INetworkLoadBalancerTarget
ILoadBalancerTarget
IConnectable
IExternalService
IService
IResource
IConstruct
IDependable
Inherited Members
BaseService.FromServiceArnWithCluster(Construct, string, string)
BaseService.AddVolume(ServiceManagedVolume)
BaseService.AttachToClassicLB(LoadBalancer)
BaseService.AttachToNetworkTargetGroup(INetworkTargetGroup)
BaseService.EnableDeploymentAlarms(string[], IDeploymentAlarmOptions)
BaseService.EnableServiceConnect(IServiceConnectProps)
BaseService.Metric(string, IMetricOptions)
BaseService.MetricCpuUtilization(IMetricOptions)
BaseService.MetricMemoryUtilization(IMetricOptions)
BaseService.Cluster
BaseService.Connections
BaseService.ServiceArn
BaseService.ServiceName
BaseService.TaskDefinition
BaseService.CloudMapService
BaseService.LoadBalancers
BaseService.ServiceRegistries
BaseService.CloudmapService
BaseService.DeploymentAlarms
BaseService.NetworkConfiguration
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ExternalService : BaseService, IBaseService, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget, IConnectable, IExternalService, IService, IResource, IConstruct, IDependable
Syntax (vb)
Public Class ExternalService Inherits BaseService Implements IBaseService, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget, IConnectable, IExternalService, IService, IResource, IConstruct, IDependable
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

Examples
Cluster cluster;
             TaskDefinition taskDefinition;


             new Ec2Service(this, "Ec2Service", new Ec2ServiceProps {
                 Cluster = cluster,
                 TaskDefinition = taskDefinition,
                 Daemon = true
             });

             new ExternalService(this, "ExternalService", new ExternalServiceProps {
                 Cluster = cluster,
                 TaskDefinition = taskDefinition,
                 Daemon = true
             });

Synopsis

Constructors

ExternalService(Construct, string, IExternalServiceProps)

Constructs a new instance of the ExternalService class.

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

AssociateCloudMapService(IAssociateCloudMapServiceOptions)

Overridden method to throw error as associateCloudMapService is not supported for external service.

AttachToApplicationTargetGroup(IApplicationTargetGroup)

Overridden method to throw error as attachToApplicationTargetGroup is not supported for external service.

AutoScaleTaskCount(IEnableScalingProps)

Overridden method to throw error as autoScaleTaskCount is not supported for external service.

ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, bool?, ISubnetSelection?, ISecurityGroup[]?)

Overridden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

EnableCloudMap(ICloudMapOptions)

Overridden method to throw error as enableCloudMap is not supported for external service.

FromExternalServiceArn(Construct, string, string)

Imports from the specified service ARN.

FromExternalServiceAttributes(Construct, string, IExternalServiceAttributes)

Imports from the specified service attributes.

LoadBalancerTarget(ILoadBalancerTargetOptions)

Overridden method to throw error as loadBalancerTarget is not supported for external service.

RegisterLoadBalancerTargets(params IEcsTarget[])

Overridden method to throw error as registerLoadBalancerTargets is not supported for external service.

Constructors

ExternalService(Construct, string, IExternalServiceProps)

Constructs a new instance of the ExternalService class.

public ExternalService(Construct scope, string id, IExternalServiceProps props)
Parameters
scope Construct
id string
props IExternalServiceProps
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

Methods

AssociateCloudMapService(IAssociateCloudMapServiceOptions)

Overridden method to throw error as associateCloudMapService is not supported for external service.

public override void AssociateCloudMapService(IAssociateCloudMapServiceOptions options)
Parameters
options IAssociateCloudMapServiceOptions
Overrides
BaseService.AssociateCloudMapService(IAssociateCloudMapServiceOptions)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

AttachToApplicationTargetGroup(IApplicationTargetGroup)

Overridden method to throw error as attachToApplicationTargetGroup is not supported for external service.

public override ILoadBalancerTargetProps AttachToApplicationTargetGroup(IApplicationTargetGroup targetGroup)
Parameters
targetGroup IApplicationTargetGroup
Returns

ILoadBalancerTargetProps

Overrides
BaseService.AttachToApplicationTargetGroup(IApplicationTargetGroup)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

AutoScaleTaskCount(IEnableScalingProps)

Overridden method to throw error as autoScaleTaskCount is not supported for external service.

public override ScalableTaskCount AutoScaleTaskCount(IEnableScalingProps props)
Parameters
props IEnableScalingProps
Returns

ScalableTaskCount

Overrides
BaseService.AutoScaleTaskCount(IEnableScalingProps)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, bool?, ISubnetSelection?, ISecurityGroup[]?)

Overridden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

protected override void ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc vpc, bool? assignPublicIp = null, ISubnetSelection? vpcSubnets = null, ISecurityGroup[]? securityGroups = null)
Parameters
vpc IVpc
assignPublicIp bool?
vpcSubnets ISubnetSelection
securityGroups ISecurityGroup[]
Overrides
BaseService.ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, bool?, ISubnetSelection?, ISecurityGroup[]?)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

EnableCloudMap(ICloudMapOptions)

Overridden method to throw error as enableCloudMap is not supported for external service.

public override Service EnableCloudMap(ICloudMapOptions options)
Parameters
options ICloudMapOptions
Returns

Service

Overrides
BaseService.EnableCloudMap(ICloudMapOptions)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

FromExternalServiceArn(Construct, string, string)

Imports from the specified service ARN.

public static IExternalService FromExternalServiceArn(Construct scope, string id, string externalServiceArn)
Parameters
scope Construct
id string
externalServiceArn string
Returns

IExternalService

Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

FromExternalServiceAttributes(Construct, string, IExternalServiceAttributes)

Imports from the specified service attributes.

public static IBaseService FromExternalServiceAttributes(Construct scope, string id, IExternalServiceAttributes attrs)
Parameters
scope Construct
id string
attrs IExternalServiceAttributes
Returns

IBaseService

Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

LoadBalancerTarget(ILoadBalancerTargetOptions)

Overridden method to throw error as loadBalancerTarget is not supported for external service.

public override IEcsLoadBalancerTarget LoadBalancerTarget(ILoadBalancerTargetOptions options)
Parameters
options ILoadBalancerTargetOptions
Returns

IEcsLoadBalancerTarget

Overrides
BaseService.LoadBalancerTarget(ILoadBalancerTargetOptions)
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

RegisterLoadBalancerTargets(params IEcsTarget[])

Overridden method to throw error as registerLoadBalancerTargets is not supported for external service.

public override void RegisterLoadBalancerTargets(params IEcsTarget[] targets)
Parameters
targets IEcsTarget[]
Overrides
BaseService.RegisterLoadBalancerTargets(params IEcsTarget[])
Remarks

Resource: AWS::ECS::Service

ExampleMetadata: infused

Implements

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