Class CfnTaskSet
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::ECS::TaskSet
.
Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL
deployment controller type. For more information, see Amazon ECS deployment types in the Amazon Elastic Container Service Developer Guide .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ecs.*; CfnTaskSet cfnTaskSet = CfnTaskSet.Builder.create(this, "MyCfnTaskSet") .cluster("cluster") .service("service") .taskDefinition("taskDefinition") // the properties below are optional .externalId("externalId") .launchType("launchType") .loadBalancers(List.of(LoadBalancerProperty.builder() .containerName("containerName") .containerPort(123) .loadBalancerName("loadBalancerName") .targetGroupArn("targetGroupArn") .build())) .networkConfiguration(NetworkConfigurationProperty.builder() .awsVpcConfiguration(AwsVpcConfigurationProperty.builder() .subnets(List.of("subnets")) // the properties below are optional .assignPublicIp("assignPublicIp") .securityGroups(List.of("securityGroups")) .build()) .build()) .platformVersion("platformVersion") .scale(ScaleProperty.builder() .unit("unit") .value(123) .build()) .serviceRegistries(List.of(ServiceRegistryProperty.builder() .containerName("containerName") .containerPort(123) .port(123) .registryArn("registryArn") .build())) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
An object representing the networking details for a task or service.static final class
A fluent builder forCfnTaskSet
.static interface
The load balancer configuration to use with a service or task set.static interface
The network configuration for a task or service.static interface
A floating-point percentage of the desired number of tasks to place and keep running in the task set.static interface
The details for the service registry.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnTaskSet
(Construct scope, String id, CfnTaskSetProps props) Create a newAWS::ECS::TaskSet
.protected
CfnTaskSet
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnTaskSet
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the task set.The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.An optional non-unique tag that identifies this task set in external systems.The launch type that new tasks in the task set uses.A load balancer object representing the load balancer to use with the task set.The network configuration for the task set.The platform version that the tasks in the task set uses.getScale()
A floating-point percentage of your desired number of tasks to place and keep running in the task set.The short name or full Amazon Resource Name (ARN) of the service to create the task set in.The details of the service discovery registries to assign to this task set.The task definition for the tasks in the task set to use.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCluster
(String value) The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.void
setExternalId
(String value) An optional non-unique tag that identifies this task set in external systems.void
setLaunchType
(String value) The launch type that new tasks in the task set uses.void
setLoadBalancers
(List<Object> value) A load balancer object representing the load balancer to use with the task set.void
setLoadBalancers
(IResolvable value) A load balancer object representing the load balancer to use with the task set.void
The network configuration for the task set.void
The network configuration for the task set.void
setPlatformVersion
(String value) The platform version that the tasks in the task set uses.void
setScale
(IResolvable value) A floating-point percentage of your desired number of tasks to place and keep running in the task set.void
setScale
(CfnTaskSet.ScaleProperty value) A floating-point percentage of your desired number of tasks to place and keep running in the task set.void
setService
(String value) The short name or full Amazon Resource Name (ARN) of the service to create the task set in.void
setServiceRegistries
(List<Object> value) The details of the service discovery registries to assign to this task set.void
setServiceRegistries
(IResolvable value) The details of the service discovery registries to assign to this task set.void
setTaskDefinition
(String value) The task definition for the tasks in the task set to use.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnTaskSet
protected CfnTaskSet(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTaskSet
protected CfnTaskSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTaskSet
@Stability(Stable) public CfnTaskSet(@NotNull Construct scope, @NotNull String id, @NotNull CfnTaskSetProps props) Create a newAWS::ECS::TaskSet
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID of the task set. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getCluster
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in. -
setCluster
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in. -
getService
The short name or full Amazon Resource Name (ARN) of the service to create the task set in. -
setService
The short name or full Amazon Resource Name (ARN) of the service to create the task set in. -
getTaskDefinition
The task definition for the tasks in the task set to use. -
setTaskDefinition
The task definition for the tasks in the task set to use. -
getExternalId
An optional non-unique tag that identifies this task set in external systems.If the task set is associated with a service discovery registry, the tasks in this task set will have the
ECS_TASK_SET_EXTERNAL_ID
AWS Cloud Map attribute set to the provided value. -
setExternalId
An optional non-unique tag that identifies this task set in external systems.If the task set is associated with a service discovery registry, the tasks in this task set will have the
ECS_TASK_SET_EXTERNAL_ID
AWS Cloud Map attribute set to the provided value. -
getLaunchType
The launch type that new tasks in the task set uses.For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .
If a
launchType
is specified, thecapacityProviderStrategy
parameter must be omitted. -
setLaunchType
The launch type that new tasks in the task set uses.For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .
If a
launchType
is specified, thecapacityProviderStrategy
parameter must be omitted. -
getLoadBalancers
A load balancer object representing the load balancer to use with the task set.The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
-
setLoadBalancers
A load balancer object representing the load balancer to use with the task set.The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
-
setLoadBalancers
A load balancer object representing the load balancer to use with the task set.The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
-
getNetworkConfiguration
The network configuration for the task set. -
setNetworkConfiguration
The network configuration for the task set. -
setNetworkConfiguration
@Stability(Stable) public void setNetworkConfiguration(@Nullable CfnTaskSet.NetworkConfigurationProperty value) The network configuration for the task set. -
getPlatformVersion
The platform version that the tasks in the task set uses.A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the
LATEST
platform version is used. -
setPlatformVersion
The platform version that the tasks in the task set uses.A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the
LATEST
platform version is used. -
getScale
A floating-point percentage of your desired number of tasks to place and keep running in the task set. -
setScale
A floating-point percentage of your desired number of tasks to place and keep running in the task set. -
setScale
A floating-point percentage of your desired number of tasks to place and keep running in the task set. -
getServiceRegistries
The details of the service discovery registries to assign to this task set.For more information, see Service discovery .
-
setServiceRegistries
The details of the service discovery registries to assign to this task set.For more information, see Service discovery .
-
setServiceRegistries
The details of the service discovery registries to assign to this task set.For more information, see Service discovery .
-