Class ExternalService

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ecs.BaseService
software.amazon.awscdk.services.ecs.ExternalService
All Implemented Interfaces:
IResource, IConnectable, IBaseService, IExternalService, IService, ILoadBalancerTarget, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:50:57.012Z") @Stability(Stable) public class ExternalService extends BaseService implements IExternalService
This creates a service using the External launch type on an ECS cluster.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 ExternalService service = ExternalService.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .desiredCount(5)
         .build();
 
  • Constructor Details

    • ExternalService

      protected ExternalService(software.amazon.jsii.JsiiObjectRef objRef)
    • ExternalService

      protected ExternalService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ExternalService

      @Stability(Stable) public ExternalService(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ExternalServiceProps props)
      Constructs a new instance of the ExternalService class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromExternalServiceArn

      @Stability(Stable) @NotNull public static IExternalService fromExternalServiceArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String externalServiceArn)
      Imports from the specified service ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      externalServiceArn - This parameter is required.
    • fromExternalServiceAttributes

      @Stability(Stable) @NotNull public static IBaseService fromExternalServiceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ExternalServiceAttributes attrs)
      Imports from the specified service attributes.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • associateCloudMapService

      @Stability(Stable) public void associateCloudMapService(@NotNull AssociateCloudMapServiceOptions _options)
      Overriden method to throw error as associateCloudMapService is not supported for external service.

      Overrides:
      associateCloudMapService in class BaseService
      Parameters:
      _options - This parameter is required.
    • attachToApplicationTargetGroup

      @Stability(Stable) @NotNull public LoadBalancerTargetProps attachToApplicationTargetGroup(@NotNull IApplicationTargetGroup _targetGroup)
      Overriden method to throw error as attachToApplicationTargetGroup is not supported for external service.

      Specified by:
      attachToApplicationTargetGroup in interface IApplicationLoadBalancerTarget
      Overrides:
      attachToApplicationTargetGroup in class BaseService
      Parameters:
      _targetGroup - This parameter is required.
    • autoScaleTaskCount

      @Stability(Stable) @NotNull public ScalableTaskCount autoScaleTaskCount(@NotNull EnableScalingProps _props)
      Overriden method to throw error as autoScaleTaskCount is not supported for external service.

      Overrides:
      autoScaleTaskCount in class BaseService
      Parameters:
      _props - This parameter is required.
    • configureAwsVpcNetworkingWithSecurityGroups

      @Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc, @Nullable Boolean _assignPublicIp, @Nullable SubnetSelection _vpcSubnets, @Nullable List<ISecurityGroup> _securityGroups)
      Overriden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

      Overrides:
      configureAwsVpcNetworkingWithSecurityGroups in class BaseService
      Parameters:
      _vpc - This parameter is required.
      _assignPublicIp -
      _vpcSubnets -
      _securityGroups -
    • configureAwsVpcNetworkingWithSecurityGroups

      @Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc, @Nullable Boolean _assignPublicIp, @Nullable SubnetSelection _vpcSubnets)
      Overriden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

      Overrides:
      configureAwsVpcNetworkingWithSecurityGroups in class BaseService
      Parameters:
      _vpc - This parameter is required.
      _assignPublicIp -
      _vpcSubnets -
    • configureAwsVpcNetworkingWithSecurityGroups

      @Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc, @Nullable Boolean _assignPublicIp)
      Overriden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

      Overrides:
      configureAwsVpcNetworkingWithSecurityGroups in class BaseService
      Parameters:
      _vpc - This parameter is required.
      _assignPublicIp -
    • configureAwsVpcNetworkingWithSecurityGroups

      @Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc)
      Overriden method to throw error as configureAwsVpcNetworkingWithSecurityGroups is not supported for external service.

      Overrides:
      configureAwsVpcNetworkingWithSecurityGroups in class BaseService
      Parameters:
      _vpc - This parameter is required.
    • enableCloudMap

      @Stability(Stable) @NotNull public Service enableCloudMap(@NotNull CloudMapOptions _options)
      Overriden method to throw error as enableCloudMap is not supported for external service.

      Overrides:
      enableCloudMap in class BaseService
      Parameters:
      _options - This parameter is required.
      Returns:
      The created CloudMap service
    • loadBalancerTarget

      @Stability(Stable) @NotNull public IEcsLoadBalancerTarget loadBalancerTarget(@NotNull LoadBalancerTargetOptions _options)
      Overriden method to throw error as loadBalancerTarget is not supported for external service.

      Overrides:
      loadBalancerTarget in class BaseService
      Parameters:
      _options - This parameter is required.
    • registerLoadBalancerTargets

      @Stability(Stable) public void registerLoadBalancerTargets(@NotNull @NotNull EcsTarget... _targets)
      Overriden method to throw error as registerLoadBalancerTargets is not supported for external service.

      Overrides:
      registerLoadBalancerTargets in class BaseService
      Parameters:
      _targets - This parameter is required.