Class CfnTaskSet
Create a task set in the specified cluster and service.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTaskSet : CfnResource, IInspectable, ITaggableV2
Syntax (vb)
Public Class CfnTaskSet
Inherits CfnResource
Implements IInspectable, ITaggableV2
Remarks
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 otther quotas, see Amazon ECS service quotas in the Amazon Elastic Container Service Developer Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html
CloudformationResource: AWS::ECS::TaskSet
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var cfnTaskSet = new CfnTaskSet(this, "MyCfnTaskSet", new CfnTaskSetProps {
Cluster = "cluster",
Service = "service",
TaskDefinition = "taskDefinition",
// the properties below are optional
ExternalId = "externalId",
LaunchType = "launchType",
LoadBalancers = new [] { new LoadBalancerProperty {
ContainerName = "containerName",
ContainerPort = 123,
TargetGroupArn = "targetGroupArn"
} },
NetworkConfiguration = new NetworkConfigurationProperty {
AwsVpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
},
PlatformVersion = "platformVersion",
Scale = new ScaleProperty {
Unit = "unit",
Value = 123
},
ServiceRegistries = new [] { new ServiceRegistryProperty {
ContainerName = "containerName",
ContainerPort = 123,
Port = 123,
RegistryArn = "registryArn"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnTaskSet(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTaskSet(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnTaskSet(Construct, String, ICfnTaskSetProps) |
Properties
AttrId | The ID of the task set. |
CdkTagManager | Tag Manager which manages the tags for this resource. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Cluster | The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in. |
ExternalId | An optional non-unique tag that identifies this task set in external systems. |
LaunchType | The launch type that new tasks in the task set uses. |
LoadBalancers | A load balancer object representing the load balancer to use with the task set. |
NetworkConfiguration | The network configuration for the task set. |
PlatformVersion | The platform version that the tasks in the task set uses. |
Scale | A floating-point percentage of your desired number of tasks to place and keep running in the task set. |
Service | The short name or full Amazon Resource Name (ARN) of the service to create the task set in. |
ServiceRegistries | The details of the service discovery registries to assign to this task set. |
Tags | The metadata that you apply to the task set to help you categorize and organize them. |
TaskDefinition | The task definition for the tasks in the task set to use. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTaskSet(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTaskSet(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTaskSet(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTaskSet(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnTaskSet(Construct, String, ICfnTaskSetProps)
public CfnTaskSet(Construct scope, string id, ICfnTaskSetProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnTaskSetProps
Resource properties.
Properties
AttrId
The ID of the task set.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Cluster
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
public virtual string Cluster { get; set; }
Property Value
System.String
ExternalId
An optional non-unique tag that identifies this task set in external systems.
public virtual string ExternalId { get; set; }
Property Value
System.String
LaunchType
The launch type that new tasks in the task set uses.
public virtual string LaunchType { get; set; }
Property Value
System.String
LoadBalancers
A load balancer object representing the load balancer to use with the task set.
public virtual object LoadBalancers { get; set; }
Property Value
System.Object
NetworkConfiguration
The network configuration for the task set.
public virtual object NetworkConfiguration { get; set; }
Property Value
System.Object
PlatformVersion
The platform version that the tasks in the task set uses.
public virtual string PlatformVersion { get; set; }
Property Value
System.String
Scale
A floating-point percentage of your desired number of tasks to place and keep running in the task set.
public virtual object Scale { get; set; }
Property Value
System.Object
Service
The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
public virtual string Service { get; set; }
Property Value
System.String
ServiceRegistries
The details of the service discovery registries to assign to this task set.
public virtual object ServiceRegistries { get; set; }
Property Value
System.Object
Tags
The metadata that you apply to the task set to help you categorize and organize them.
public virtual ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
TaskDefinition
The task definition for the tasks in the task set to use.
public virtual string TaskDefinition { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>