Class CfnTaskSet
- All Implemented Interfaces:
IInspectable,ITaggableV2,ITaskSetRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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 .
On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.
For information about the maximum number of task sets and other quotas, see Amazon ECS service quotas 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
.capacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
.base(123)
.capacityProvider("capacityProvider")
.weight(123)
.build()))
.externalId("externalId")
.launchType("launchType")
.loadBalancers(List.of(LoadBalancerProperty.builder()
.containerName("containerName")
.containerPort(123)
.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()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn object representing the networking details for a task or service.static final classA fluent builder forCfnTaskSet.static interfaceThe details of a capacity provider strategy.static interfaceThe load balancer configuration to use with a service or task set.static interfaceThe network configuration for a task or service.static interfaceA floating-point percentage of the desired number of tasks to place and keep running in the task set.static interfaceThe details for the service registry.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.ITaskSetRef
ITaskSetRef.Jsii$Default, ITaskSetRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTaskSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTaskSet(software.amazon.jsii.JsiiObjectRef objRef) CfnTaskSet(software.constructs.Construct scope, String id, CfnTaskSetProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the task set.The capacity provider strategy that are associated with the task set.Tag Manager which manages the tags for this resource.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.getTags()The metadata that you apply to the task set to help you categorize and organize them.The task definition for the tasks in the task set to use.A reference to a TaskSet resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCapacityProviderStrategy(List<Object> value) The capacity provider strategy that are associated with the task set.voidThe capacity provider strategy that are associated with the task set.voidsetCluster(String value) The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.voidsetExternalId(String value) An optional non-unique tag that identifies this task set in external systems.voidsetLaunchType(String value) The launch type that new tasks in the task set uses.voidsetLoadBalancers(List<Object> value) A load balancer object representing the load balancer to use with the task set.voidsetLoadBalancers(IResolvable value) A load balancer object representing the load balancer to use with the task set.voidThe network configuration for the task set.voidThe network configuration for the task set.voidsetPlatformVersion(String value) The platform version that the tasks in the task set uses.voidsetScale(IResolvable value) A floating-point percentage of your desired number of tasks to place and keep running in the task set.voidsetScale(CfnTaskSet.ScaleProperty value) A floating-point percentage of your desired number of tasks to place and keep running in the task set.voidsetService(String value) The short name or full Amazon Resource Name (ARN) of the service to create the task set in.voidsetServiceRegistries(List<Object> value) The details of the service discovery registries to assign to this task set.voidsetServiceRegistries(IResolvable value) The details of the service discovery registries to assign to this task set.voidThe metadata that you apply to the task set to help you categorize and organize them.voidsetTaskDefinition(String value) The task definition for the tasks in the task set to use.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnTaskSetProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
The ID of the task set. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTaskSetRef
A reference to a TaskSet resource.- Specified by:
getTaskSetRefin interfaceITaskSetRef
-
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. -
getCapacityProviderStrategy
The capacity provider strategy that are associated with the task set.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTaskSet.CapacityProviderStrategyItemProperty> -
setCapacityProviderStrategy
The capacity provider strategy that are associated with the task set. -
setCapacityProviderStrategy
The capacity provider strategy that are associated with the task set. -
getExternalId
An optional non-unique tag that identifies this task set in external systems. -
setExternalId
An optional non-unique tag that identifies this task set in external systems. -
getLaunchType
The launch type that new tasks in the task set uses. -
setLaunchType
The launch type that new tasks in the task set uses. -
getLoadBalancers
A load balancer object representing the load balancer to use with the task set.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTaskSet.LoadBalancerProperty> -
setLoadBalancers
A load balancer object representing the load balancer to use with the task set. -
setLoadBalancers
A load balancer object representing the load balancer to use with the task set. -
getNetworkConfiguration
The network configuration for the task set.Returns union: either
IResolvableorCfnTaskSet.NetworkConfigurationProperty -
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. -
setPlatformVersion
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.Returns union: either
IResolvableorCfnTaskSet.ScaleProperty -
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTaskSet.ServiceRegistryProperty> -
setServiceRegistries
The details of the service discovery registries to assign to this task set. -
setServiceRegistries
The details of the service discovery registries to assign to this task set. -
getTags
The metadata that you apply to the task set to help you categorize and organize them. -
setTags
The metadata that you apply to the task set to help you categorize and organize them.
-