Show / Hide Table of Contents

Class CfnTaskDefinition

Registers a new task definition from the supplied family and containerDefinitions .

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnTaskDefinition
Implements
IInspectable
ITaggable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTaskDefinition : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnTaskDefinition Inherits CfnResource Implements IInspectable, ITaggable
Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

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 cfnTaskDefinition = new CfnTaskDefinition(this, "MyCfnTaskDefinition", new CfnTaskDefinitionProps {
                 ContainerDefinitions = new [] { new ContainerDefinitionProperty {
                     Image = "image",
                     Name = "name",

                     // the properties below are optional
                     Command = new [] { "command" },
                     Cpu = 123,
                     CredentialSpecs = new [] { "credentialSpecs" },
                     DependsOn = new [] { new ContainerDependencyProperty {
                         Condition = "condition",
                         ContainerName = "containerName"
                     } },
                     DisableNetworking = false,
                     DnsSearchDomains = new [] { "dnsSearchDomains" },
                     DnsServers = new [] { "dnsServers" },
                     DockerLabels = new Dictionary<string, string> {
                         { "dockerLabelsKey", "dockerLabels" }
                     },
                     DockerSecurityOptions = new [] { "dockerSecurityOptions" },
                     EntryPoint = new [] { "entryPoint" },
                     Environment = new [] { new KeyValuePairProperty {
                         Name = "name",
                         Value = "value"
                     } },
                     EnvironmentFiles = new [] { new EnvironmentFileProperty {
                         Type = "type",
                         Value = "value"
                     } },
                     Essential = false,
                     ExtraHosts = new [] { new HostEntryProperty {
                         Hostname = "hostname",
                         IpAddress = "ipAddress"
                     } },
                     FirelensConfiguration = new FirelensConfigurationProperty {
                         Options = new Dictionary<string, string> {
                             { "optionsKey", "options" }
                         },
                         Type = "type"
                     },
                     HealthCheck = new HealthCheckProperty {
                         Command = new [] { "command" },
                         Interval = 123,
                         Retries = 123,
                         StartPeriod = 123,
                         Timeout = 123
                     },
                     Hostname = "hostname",
                     Interactive = false,
                     Links = new [] { "links" },
                     LinuxParameters = new LinuxParametersProperty {
                         Capabilities = new KernelCapabilitiesProperty {
                             Add = new [] { "add" },
                             Drop = new [] { "drop" }
                         },
                         Devices = new [] { new DeviceProperty {
                             ContainerPath = "containerPath",
                             HostPath = "hostPath",
                             Permissions = new [] { "permissions" }
                         } },
                         InitProcessEnabled = false,
                         MaxSwap = 123,
                         SharedMemorySize = 123,
                         Swappiness = 123,
                         Tmpfs = new [] { new TmpfsProperty {
                             Size = 123,

                             // the properties below are optional
                             ContainerPath = "containerPath",
                             MountOptions = new [] { "mountOptions" }
                         } }
                     },
                     LogConfiguration = new LogConfigurationProperty {
                         LogDriver = "logDriver",

                         // the properties below are optional
                         Options = new Dictionary<string, string> {
                             { "optionsKey", "options" }
                         },
                         SecretOptions = new [] { new SecretProperty {
                             Name = "name",
                             ValueFrom = "valueFrom"
                         } }
                     },
                     Memory = 123,
                     MemoryReservation = 123,
                     MountPoints = new [] { new MountPointProperty {
                         ContainerPath = "containerPath",
                         ReadOnly = false,
                         SourceVolume = "sourceVolume"
                     } },
                     PortMappings = new [] { new PortMappingProperty {
                         AppProtocol = "appProtocol",
                         ContainerPort = 123,
                         ContainerPortRange = "containerPortRange",
                         HostPort = 123,
                         Name = "name",
                         Protocol = "protocol"
                     } },
                     Privileged = false,
                     PseudoTerminal = false,
                     ReadonlyRootFilesystem = false,
                     RepositoryCredentials = new RepositoryCredentialsProperty {
                         CredentialsParameter = "credentialsParameter"
                     },
                     ResourceRequirements = new [] { new ResourceRequirementProperty {
                         Type = "type",
                         Value = "value"
                     } },
                     RestartPolicy = new RestartPolicyProperty {
                         Enabled = false,
                         IgnoredExitCodes = new [] { 123 },
                         RestartAttemptPeriod = 123
                     },
                     Secrets = new [] { new SecretProperty {
                         Name = "name",
                         ValueFrom = "valueFrom"
                     } },
                     StartTimeout = 123,
                     StopTimeout = 123,
                     SystemControls = new [] { new SystemControlProperty {
                         Namespace = "namespace",
                         Value = "value"
                     } },
                     Ulimits = new [] { new UlimitProperty {
                         HardLimit = 123,
                         Name = "name",
                         SoftLimit = 123
                     } },
                     User = "user",
                     VersionConsistency = "versionConsistency",
                     VolumesFrom = new [] { new VolumeFromProperty {
                         ReadOnly = false,
                         SourceContainer = "sourceContainer"
                     } },
                     WorkingDirectory = "workingDirectory"
                 } },
                 Cpu = "cpu",
                 EnableFaultInjection = false,
                 EphemeralStorage = new EphemeralStorageProperty {
                     SizeInGiB = 123
                 },
                 ExecutionRoleArn = "executionRoleArn",
                 Family = "family",
                 InferenceAccelerators = new [] { new InferenceAcceleratorProperty {
                     DeviceName = "deviceName",
                     DeviceType = "deviceType"
                 } },
                 IpcMode = "ipcMode",
                 Memory = "memory",
                 NetworkMode = "networkMode",
                 PidMode = "pidMode",
                 PlacementConstraints = new [] { new TaskDefinitionPlacementConstraintProperty {
                     Type = "type",

                     // the properties below are optional
                     Expression = "expression"
                 } },
                 ProxyConfiguration = new ProxyConfigurationProperty {
                     ContainerName = "containerName",

                     // the properties below are optional
                     ProxyConfigurationProperties = new [] { new KeyValuePairProperty {
                         Name = "name",
                         Value = "value"
                     } },
                     Type = "type"
                 },
                 RequiresCompatibilities = new [] { "requiresCompatibilities" },
                 RuntimePlatform = new RuntimePlatformProperty {
                     CpuArchitecture = "cpuArchitecture",
                     OperatingSystemFamily = "operatingSystemFamily"
                 },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 TaskRoleArn = "taskRoleArn",
                 Volumes = new [] { new VolumeProperty {
                     ConfiguredAtLaunch = false,
                     DockerVolumeConfiguration = new DockerVolumeConfigurationProperty {
                         Autoprovision = false,
                         Driver = "driver",
                         DriverOpts = new Dictionary<string, string> {
                             { "driverOptsKey", "driverOpts" }
                         },
                         Labels = new Dictionary<string, string> {
                             { "labelsKey", "labels" }
                         },
                         Scope = "scope"
                     },
                     EfsVolumeConfiguration = new EFSVolumeConfigurationProperty {
                         FilesystemId = "filesystemId",

                         // the properties below are optional
                         AuthorizationConfig = new AuthorizationConfigProperty {
                             AccessPointId = "accessPointId",
                             Iam = "iam"
                         },
                         RootDirectory = "rootDirectory",
                         TransitEncryption = "transitEncryption",
                         TransitEncryptionPort = 123
                     },
                     FSxWindowsFileServerVolumeConfiguration = new FSxWindowsFileServerVolumeConfigurationProperty {
                         FileSystemId = "fileSystemId",
                         RootDirectory = "rootDirectory",

                         // the properties below are optional
                         AuthorizationConfig = new FSxAuthorizationConfigProperty {
                             CredentialsParameter = "credentialsParameter",
                             Domain = "domain"
                         }
                     },
                     Host = new HostVolumePropertiesProperty {
                         SourcePath = "sourcePath"
                     },
                     Name = "name"
                 } }
             });

Synopsis

Constructors

CfnTaskDefinition(Construct, string, ICfnTaskDefinitionProps?)

Registers a new task definition from the supplied family and containerDefinitions .

Properties

AttrTaskDefinitionArn

The ARN of the task definition.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Registers a new task definition from the supplied family and containerDefinitions .

ContainerDefinitions

A list of container definitions in JSON format that describe the different containers that make up your task.

Cpu

The number of cpu units used by the task.

EnableFaultInjection

Enables fault injection and allows for fault injection requests to be accepted from the task's containers.

EphemeralStorage

The ephemeral storage settings to use for tasks run with the task definition.

ExecutionRoleArn

The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf.

Family

The name of a family that this task definition is registered to.

InferenceAccelerators

The Elastic Inference accelerators to use for the containers in the task.

IpcMode

The IPC resource namespace to use for the containers in the task.

Memory

The amount (in MiB) of memory used by the task.

NetworkMode

The Docker networking mode to use for the containers in the task.

PidMode

The process namespace to use for the containers in the task.

PlacementConstraints

An array of placement constraint objects to use for tasks.

ProxyConfiguration

The configuration details for the App Mesh proxy.

RequiresCompatibilities

The task launch types the task definition was validated against.

RuntimePlatform

The operating system that your tasks definitions run on.

Tags

Tag Manager which manages the tags for this resource.

TagsRaw

The metadata that you apply to the task definition to help you categorize and organize them.

TaskRoleArn

The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access Management role that grants containers in the task permission to call AWS APIs on your behalf.

Volumes

The list of data volume definitions for the task.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

Registers a new task definition from the supplied family and containerDefinitions .

Constructors

CfnTaskDefinition(Construct, string, ICfnTaskDefinitionProps?)

Registers a new task definition from the supplied family and containerDefinitions .

public CfnTaskDefinition(Construct scope, string id, ICfnTaskDefinitionProps? props = null)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnTaskDefinitionProps

Resource properties.

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Properties

AttrTaskDefinitionArn

The ARN of the task definition.

public virtual string AttrTaskDefinitionArn { get; }
Property Value

string

Remarks

CloudformationAttribute: TaskDefinitionArn

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

CfnProperties

Registers a new task definition from the supplied family and containerDefinitions .

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

ContainerDefinitions

A list of container definitions in JSON format that describe the different containers that make up your task.

public virtual object? ContainerDefinitions { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Cpu

The number of cpu units used by the task.

public virtual string? Cpu { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

EnableFaultInjection

Enables fault injection and allows for fault injection requests to be accepted from the task's containers.

public virtual object? EnableFaultInjection { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

EphemeralStorage

The ephemeral storage settings to use for tasks run with the task definition.

public virtual object? EphemeralStorage { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

ExecutionRoleArn

The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf.

public virtual string? ExecutionRoleArn { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Family

The name of a family that this task definition is registered to.

public virtual string? Family { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

InferenceAccelerators

The Elastic Inference accelerators to use for the containers in the task.

public virtual object? InferenceAccelerators { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

IpcMode

The IPC resource namespace to use for the containers in the task.

public virtual string? IpcMode { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Memory

The amount (in MiB) of memory used by the task.

public virtual string? Memory { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

NetworkMode

The Docker networking mode to use for the containers in the task.

public virtual string? NetworkMode { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

PidMode

The process namespace to use for the containers in the task.

public virtual string? PidMode { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

PlacementConstraints

An array of placement constraint objects to use for tasks.

public virtual object? PlacementConstraints { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

ProxyConfiguration

The configuration details for the App Mesh proxy.

public virtual object? ProxyConfiguration { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

RequiresCompatibilities

The task launch types the task definition was validated against.

public virtual string[]? RequiresCompatibilities { get; set; }
Property Value

string[]

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

RuntimePlatform

The operating system that your tasks definitions run on.

public virtual object? RuntimePlatform { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Tags

Tag Manager which manages the tags for this resource.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

TagsRaw

The metadata that you apply to the task definition to help you categorize and organize them.

public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value

ICfnTag[]

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

TaskRoleArn

The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access Management role that grants containers in the task permission to call AWS APIs on your behalf.

public virtual string? TaskRoleArn { get; set; }
Property Value

string

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Volumes

The list of data volume definitions for the task.

public virtual object? Volumes { get; set; }
Property Value

object

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

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.

Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Registers a new task definition from the supplied family and containerDefinitions .

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide .

You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide .

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html

CloudformationResource: AWS::ECS::TaskDefinition

ExampleMetadata: fixture=_generated

Implements

IInspectable
ITaggable
Back to top Generated by DocFX