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:
IEnvironmentAware,IResource,IConnectable,IBaseService,IExternalService,IService,ILoadBalancerTarget,IApplicationLoadBalancerTarget,INetworkLoadBalancerTarget,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:09.705Z")
@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;
Ec2Service.Builder.create(this, "Ec2Service")
.cluster(cluster)
.taskDefinition(taskDefinition)
.daemon(true)
.build();
ExternalService.Builder.create(this, "ExternalService")
.cluster(cluster)
.taskDefinition(taskDefinition)
.daemon(true)
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancerTarget
IApplicationLoadBalancerTarget.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.IBaseService
IBaseService.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.IExternalService
IExternalService.Jsii$Default, IExternalService.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancing.ILoadBalancerTarget
ILoadBalancerTarget.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.INetworkLoadBalancerTarget
INetworkLoadBalancerTarget.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExternalService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedExternalService(software.amazon.jsii.JsiiObjectRef objRef) ExternalService(software.constructs.Construct scope, String id, ExternalServiceProps props) Constructs a new instance of the ExternalService class. -
Method Summary
Modifier and TypeMethodDescriptionvoidOverridden method to throw error asassociateCloudMapServiceis not supported for external service.attachToApplicationTargetGroup(IApplicationTargetGroup _targetGroup) Overridden method to throw error asattachToApplicationTargetGroupis not supported for external service.autoScaleTaskCount(EnableScalingProps _props) Overridden method to throw error asautoScaleTaskCountis not supported for external service.protected voidOverridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.protected voidconfigureAwsVpcNetworkingWithSecurityGroups(IVpc _vpc, Boolean _assignPublicIp) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.protected voidconfigureAwsVpcNetworkingWithSecurityGroups(IVpc _vpc, Boolean _assignPublicIp, SubnetSelection _vpcSubnets) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.protected voidconfigureAwsVpcNetworkingWithSecurityGroups(IVpc _vpc, Boolean _assignPublicIp, SubnetSelection _vpcSubnets, List<ISecurityGroup> _securityGroups) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.enableCloudMap(CloudMapOptions _options) Overridden method to throw error asenableCloudMapis not supported for external service.static IExternalServicefromExternalServiceArn(software.constructs.Construct scope, String id, String externalServiceArn) Imports from the specified service ARN.static IBaseServicefromExternalServiceAttributes(software.constructs.Construct scope, String id, ExternalServiceAttributes attrs) Imports from the specified service attributes.loadBalancerTarget(LoadBalancerTargetOptions _options) Overridden method to throw error asloadBalancerTargetis not supported for external service.voidregisterLoadBalancerTargets(EcsTarget... _targets) Overridden method to throw error asregisterLoadBalancerTargetsis not supported for external service.Methods inherited from class software.amazon.awscdk.services.ecs.BaseService
addLifecycleHook, addVolume, attachToClassicLB, attachToNetworkTargetGroup, enableDeploymentAlarms, enableDeploymentAlarms, enableServiceConnect, enableServiceConnect, fromServiceArnWithCluster, getCloudmapService, getCloudMapService, getCluster, getConnections, getDeploymentAlarms, getLoadBalancers, getNetworkConfiguration, getServiceArn, getServiceName, getServiceRegistries, getTaskDefinition, isUsingECSDeploymentController, metric, metric, metricCpuUtilization, metricCpuUtilization, metricMemoryUtilization, metricMemoryUtilization, setCloudmapService, setDeploymentAlarms, setLoadBalancers, setNetworkConfiguration, setServiceRegistriesMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.ecs.IService
getServiceArn, getServiceNameMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
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) Overridden method to throw error asassociateCloudMapServiceis not supported for external service.- Overrides:
associateCloudMapServicein classBaseService- Parameters:
_options- This parameter is required.
-
attachToApplicationTargetGroup
@Stability(Stable) @NotNull public LoadBalancerTargetProps attachToApplicationTargetGroup(@NotNull IApplicationTargetGroup _targetGroup) Overridden method to throw error asattachToApplicationTargetGroupis not supported for external service.- Specified by:
attachToApplicationTargetGroupin interfaceIApplicationLoadBalancerTarget- Overrides:
attachToApplicationTargetGroupin classBaseService- Parameters:
_targetGroup- This parameter is required.
-
autoScaleTaskCount
@Stability(Stable) @NotNull public ScalableTaskCount autoScaleTaskCount(@NotNull EnableScalingProps _props) Overridden method to throw error asautoScaleTaskCountis not supported for external service.- Overrides:
autoScaleTaskCountin classBaseService- 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) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.- Overrides:
configureAwsVpcNetworkingWithSecurityGroupsin classBaseService- Parameters:
_vpc- This parameter is required._assignPublicIp-_vpcSubnets-_securityGroups-
-
configureAwsVpcNetworkingWithSecurityGroups
@Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc, @Nullable Boolean _assignPublicIp, @Nullable SubnetSelection _vpcSubnets) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.- Overrides:
configureAwsVpcNetworkingWithSecurityGroupsin classBaseService- Parameters:
_vpc- This parameter is required._assignPublicIp-_vpcSubnets-
-
configureAwsVpcNetworkingWithSecurityGroups
@Stability(Stable) protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull IVpc _vpc, @Nullable Boolean _assignPublicIp) Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.- Overrides:
configureAwsVpcNetworkingWithSecurityGroupsin classBaseService- Parameters:
_vpc- This parameter is required._assignPublicIp-
-
configureAwsVpcNetworkingWithSecurityGroups
Overridden method to throw error asconfigureAwsVpcNetworkingWithSecurityGroupsis not supported for external service.- Overrides:
configureAwsVpcNetworkingWithSecurityGroupsin classBaseService- Parameters:
_vpc- This parameter is required.
-
enableCloudMap
Overridden method to throw error asenableCloudMapis not supported for external service.- Overrides:
enableCloudMapin classBaseService- Parameters:
_options- This parameter is required.- Returns:
- The created CloudMap service
-
loadBalancerTarget
@Stability(Stable) @NotNull public IEcsLoadBalancerTarget loadBalancerTarget(@NotNull LoadBalancerTargetOptions _options) Overridden method to throw error asloadBalancerTargetis not supported for external service.- Overrides:
loadBalancerTargetin classBaseService- Parameters:
_options- This parameter is required.
-
registerLoadBalancerTargets
Overridden method to throw error asregisterLoadBalancerTargetsis not supported for external service.- Overrides:
registerLoadBalancerTargetsin classBaseService- Parameters:
_targets- This parameter is required.
-