Interface ICommonTaskDefinitionAttributes
The common task definition attributes used across all types of task definitions.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICommonTaskDefinitionAttributes
Syntax (vb)
Public Interface 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 commonTaskDefinitionAttributes = new CommonTaskDefinitionAttributes {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
ExecutionRole = role,
NetworkMode = NetworkMode.NONE,
TaskRole = role
};
Synopsis
Properties
ExecutionRole | The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf. |
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. |
Properties
ExecutionRole
The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf.
virtual IRole ExecutionRole { get; }
Property Value
Remarks
Some tasks do not have an execution role.
Default: - undefined
NetworkMode
The networking mode to use for the containers in the task.
virtual Nullable<NetworkMode> NetworkMode { get; }
Property Value
System.Nullable<NetworkMode>
Remarks
Default: Network mode cannot be provided to the imported task.
TaskDefinitionArn
The arn of the task definition.
string TaskDefinitionArn { get; }
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.
virtual IRole TaskRole { get; }
Property Value
Remarks
Default: Permissions cannot be granted to the imported task.