@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.594Z") public class CfnTaskSet extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnTaskSet.AwsVpcConfigurationProperty
An object representing the networking details for a task or service.
|
static class |
CfnTaskSet.Builder
A fluent builder for
CfnTaskSet . |
static interface |
CfnTaskSet.LoadBalancerProperty
The load balancer configuration to use with a service or task set.
|
static interface |
CfnTaskSet.NetworkConfigurationProperty
The network configuration for a task or service.
|
static interface |
CfnTaskSet.ScaleProperty
A floating-point percentage of the desired number of tasks to place and keep running in the task set.
|
static interface |
CfnTaskSet.ServiceRegistryProperty
The details for the service registry.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTaskSet(Construct scope,
java.lang.String id,
CfnTaskSetProps props)
Create a new `AWS::ECS::TaskSet`.
|
protected |
CfnTaskSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTaskSet(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrId()
The ID of the task set.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCluster()
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
|
java.lang.String |
getExternalId()
An optional non-unique tag that identifies this task set in external systems.
|
java.lang.String |
getLaunchType()
The launch type that new tasks in the task set uses.
|
java.lang.Object |
getLoadBalancers()
A load balancer object representing the load balancer to use with the task set.
|
java.lang.Object |
getNetworkConfiguration()
The network configuration for the task set.
|
java.lang.String |
getPlatformVersion()
The platform version that the tasks in the task set uses.
|
java.lang.Object |
getScale()
A floating-point percentage of your desired number of tasks to place and keep running in the task set.
|
java.lang.String |
getService()
The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
|
java.lang.Object |
getServiceRegistries()
The details of the service discovery registries to assign to this task set.
|
java.lang.String |
getTaskDefinition()
The task definition for the tasks in the task set to use.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCluster(java.lang.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(java.lang.String value)
An optional non-unique tag that identifies this task set in external systems.
|
void |
setLaunchType(java.lang.String value)
The launch type that new tasks in the task set uses.
|
void |
setLoadBalancers(IResolvable value)
A load balancer object representing the load balancer to use with the task set.
|
void |
setLoadBalancers(java.util.List<java.lang.Object> value)
A load balancer object representing the load balancer to use with the task set.
|
void |
setNetworkConfiguration(CfnTaskSet.NetworkConfigurationProperty value)
The network configuration for the task set.
|
void |
setNetworkConfiguration(IResolvable value)
The network configuration for the task set.
|
void |
setPlatformVersion(java.lang.String value)
The platform version that the tasks in the task set uses.
|
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 |
setScale(IResolvable value)
A floating-point percentage of your desired number of tasks to place and keep running in the task set.
|
void |
setService(java.lang.String value)
The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
|
void |
setServiceRegistries(IResolvable value)
The details of the service discovery registries to assign to this task set.
|
void |
setServiceRegistries(java.util.List<java.lang.Object> value)
The details of the service discovery registries to assign to this task set.
|
void |
setTaskDefinition(java.lang.String value)
The task definition for the tasks in the task set to use.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTaskSet(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTaskSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTaskSet(Construct scope, java.lang.String id, CfnTaskSetProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getCluster()
public void setCluster(java.lang.String value)
public java.lang.String getService()
public void setService(java.lang.String value)
public java.lang.String getTaskDefinition()
public void setTaskDefinition(java.lang.String value)
public java.lang.String getExternalId()
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.
public void setExternalId(java.lang.String value)
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.
public java.lang.String getLaunchType()
For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .
If a launchType
is specified, the capacityProviderStrategy
parameter must be omitted.
public void setLaunchType(java.lang.String value)
For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .
If a launchType
is specified, the capacityProviderStrategy
parameter must be omitted.
public java.lang.Object getLoadBalancers()
The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
public void setLoadBalancers(IResolvable value)
The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
public void setLoadBalancers(java.util.List<java.lang.Object> value)
The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
public java.lang.Object getNetworkConfiguration()
public void setNetworkConfiguration(IResolvable value)
public void setNetworkConfiguration(CfnTaskSet.NetworkConfigurationProperty value)
public java.lang.String getPlatformVersion()
A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the LATEST
platform version is used.
public void setPlatformVersion(java.lang.String value)
A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the LATEST
platform version is used.
public java.lang.Object getScale()
public void setScale(IResolvable value)
public void setScale(CfnTaskSet.ScaleProperty value)
public java.lang.Object getServiceRegistries()
For more information, see Service discovery .
public void setServiceRegistries(IResolvable value)
For more information, see Service discovery .
public void setServiceRegistries(java.util.List<java.lang.Object> value)
For more information, see Service discovery .