Class ExternalService
This creates a service using the External launch type on an ECS cluster.
Implements
Inherited Members
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 |
AttachToApplicationTargetGroup(IApplicationTargetGroup) | Overridden method to throw error as |
AutoScaleTaskCount(IEnableScalingProps) | Overridden method to throw error as |
ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, bool?, ISubnetSelection?, ISecurityGroup[]?) | Overridden method to throw error as |
EnableCloudMap(ICloudMapOptions) | Overridden method to throw error as |
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 |
RegisterLoadBalancerTargets(params IEcsTarget[]) | Overridden method to throw error as |
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
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
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
Overrides
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
Overrides
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
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
Overrides
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
Returns
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
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
Overrides
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
Remarks
Resource: AWS::ECS::Service
ExampleMetadata: infused