Class TaskDefinitionAttributes
A reference to an existing task definition.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class TaskDefinitionAttributes : Object, ITaskDefinitionAttributes, ICommonTaskDefinitionAttributes
Syntax (vb)
Public Class TaskDefinitionAttributes
Inherits Object
Implements ITaskDefinitionAttributes, ICommonTaskDefinitionAttributes
Remarks
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;
using Amazon.CDK.AWS.IAM;
Role role;
var taskDefinitionAttributes = new TaskDefinitionAttributes {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
Compatibility = Compatibility.EC2,
NetworkMode = NetworkMode.NONE,
TaskRole = role
};
Synopsis
Constructors
TaskDefinitionAttributes() |
Properties
Compatibility | What launch types this task definition should be compatible with. |
NetworkMode | The networking mode to use for the containers in the task. |
TaskDefinitionArn | The arn of the task definition. |
TaskRole | The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. |
Constructors
TaskDefinitionAttributes()
public TaskDefinitionAttributes()
Properties
Compatibility
What launch types this task definition should be compatible with.
public Nullable<Compatibility> Compatibility { get; set; }
Property Value
System.Nullable<Compatibility>
Remarks
Default: Compatibility.EC2_AND_FARGATE
NetworkMode
The networking mode to use for the containers in the task.
public Nullable<NetworkMode> NetworkMode { get; set; }
Property Value
System.Nullable<NetworkMode>
Remarks
Default: Network mode cannot be provided to the imported task.
TaskDefinitionArn
The arn of the task definition.
public string TaskDefinitionArn { get; set; }
Property Value
System.String
TaskRole
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
public IRole TaskRole { get; set; }
Property Value
Remarks
Default: Permissions cannot be granted to the imported task.