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.AWS.ECS.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;
var service = new ExternalService(this, "Service", new ExternalServiceProps {
Cluster = cluster,
TaskDefinition = taskDefinition,
DesiredCount = 5
});
Synopsis
Constructors
ExternalService(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ExternalService(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ExternalService(Construct, String, IExternalServiceProps) | Constructs a new instance of the ExternalService class. |
Methods
AssociateCloudMapService(IAssociateCloudMapServiceOptions) | Overriden method to throw error as |
AttachToApplicationTargetGroup(IApplicationTargetGroup) | Overriden method to throw error as |
AutoScaleTaskCount(IEnableScalingProps) | Overriden method to throw error as |
ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, Nullable<Boolean>, ISubnetSelection, ISecurityGroup[]) | Overriden method to throw error as |
EnableCloudMap(ICloudMapOptions) | Overriden 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) | Overriden method to throw error as |
RegisterLoadBalancerTargets(IEcsTarget[]) | Overriden method to throw error as |
Constructors
ExternalService(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ExternalService(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ExternalService(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ExternalService(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ExternalService(Construct, String, IExternalServiceProps)
Constructs a new instance of the ExternalService class.
public ExternalService(Construct scope, string id, IExternalServiceProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IExternalServiceProps
Methods
AssociateCloudMapService(IAssociateCloudMapServiceOptions)
Overriden method to throw error as associateCloudMapService
is not supported for external service.
public override void AssociateCloudMapService(IAssociateCloudMapServiceOptions options)
Parameters
- options IAssociateCloudMapServiceOptions
Overrides
AttachToApplicationTargetGroup(IApplicationTargetGroup)
Overriden method to throw error as attachToApplicationTargetGroup
is not supported for external service.
public override ILoadBalancerTargetProps AttachToApplicationTargetGroup(IApplicationTargetGroup targetGroup)
Parameters
- targetGroup IApplicationTargetGroup
Returns
Overrides
AutoScaleTaskCount(IEnableScalingProps)
Overriden method to throw error as autoScaleTaskCount
is not supported for external service.
public override ScalableTaskCount AutoScaleTaskCount(IEnableScalingProps props)
Parameters
- props IEnableScalingProps
Returns
Overrides
ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc, Nullable<Boolean>, ISubnetSelection, ISecurityGroup[])
Overriden method to throw error as configureAwsVpcNetworkingWithSecurityGroups
is not supported for external service.
protected override void ConfigureAwsVpcNetworkingWithSecurityGroups(IVpc vpc, Nullable<bool> assignPublicIp = null, ISubnetSelection vpcSubnets = null, ISecurityGroup[] securityGroups = null)
Parameters
- vpc IVpc
- assignPublicIp System.Nullable<System.Boolean>
- vpcSubnets ISubnetSelection
- securityGroups ISecurityGroup[]
Overrides
EnableCloudMap(ICloudMapOptions)
Overriden method to throw error as enableCloudMap
is not supported for external service.
public override Service EnableCloudMap(ICloudMapOptions options)
Parameters
- options ICloudMapOptions
Returns
Overrides
FromExternalServiceArn(Construct, String, String)
Imports from the specified service ARN.
public static IExternalService FromExternalServiceArn(Construct scope, string id, string externalServiceArn)
Parameters
- scope Constructs.Construct
- id System.String
- externalServiceArn System.String
Returns
FromExternalServiceAttributes(Construct, String, IExternalServiceAttributes)
Imports from the specified service attributes.
public static IBaseService FromExternalServiceAttributes(Construct scope, string id, IExternalServiceAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IExternalServiceAttributes
Returns
LoadBalancerTarget(ILoadBalancerTargetOptions)
Overriden method to throw error as loadBalancerTarget
is not supported for external service.
public override IEcsLoadBalancerTarget LoadBalancerTarget(ILoadBalancerTargetOptions options)
Parameters
- options ILoadBalancerTargetOptions
Returns
Overrides
RegisterLoadBalancerTargets(IEcsTarget[])
Overriden method to throw error as registerLoadBalancerTargets
is not supported for external service.
public override void RegisterLoadBalancerTargets(params IEcsTarget[] targets)
Parameters
- targets IEcsTarget[]