Interface ICommonTaskDefinitionProps
The common properties for all task definitions.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public interface ICommonTaskDefinitionProps
Syntax (vb)
Public Interface ICommonTaskDefinitionProps
Remarks
For more information, see Task Definition Parameters.
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;
ProxyConfiguration proxyConfiguration;
Role role;
var commonTaskDefinitionProps = new CommonTaskDefinitionProps {
ExecutionRole = role,
Family = "family",
ProxyConfiguration = proxyConfiguration,
TaskRole = role,
Volumes = new [] { new Volume {
Name = "name",
// the properties below are optional
DockerVolumeConfiguration = new DockerVolumeConfiguration {
Driver = "driver",
Scope = Scope.TASK,
// the properties below are optional
Autoprovision = false,
DriverOpts = new Dictionary<string, string> {
{ "driverOptsKey", "driverOpts" }
},
Labels = new Dictionary<string, string> {
{ "labelsKey", "labels" }
}
},
EfsVolumeConfiguration = new EfsVolumeConfiguration {
FileSystemId = "fileSystemId",
// the properties below are optional
AuthorizationConfig = new AuthorizationConfig {
AccessPointId = "accessPointId",
Iam = "iam"
},
RootDirectory = "rootDirectory",
TransitEncryption = "transitEncryption",
TransitEncryptionPort = 123
},
Host = new Host {
SourcePath = "sourcePath"
}
} }
};
Synopsis
Properties
ExecutionRole | The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf. |
Family | The name of a family that this task definition is registered to. |
ProxyConfiguration | The configuration details for the App Mesh proxy. |
TaskRole | The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. |
Volumes | The list of volume definitions for the task. |
Properties
ExecutionRole
The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
virtual IRole ExecutionRole { get; }
Property Value
Remarks
The role will be used to retrieve container images from ECR and create CloudWatch log groups.
Default: - An execution role will be automatically created if you use ECR images in your task definition.
Family
The name of a family that this task definition is registered to.
virtual string Family { get; }
Property Value
System.String
Remarks
A family groups multiple versions of a task definition.
Default: - Automatically generated name.
ProxyConfiguration
The configuration details for the App Mesh proxy.
virtual ProxyConfiguration ProxyConfiguration { get; }
Property Value
Remarks
Default: - No proxy configuration.
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: - A task role is automatically created for you.
Volumes
The list of volume definitions for the task.
virtual IVolume[] Volumes { get; }
Property Value
IVolume[]
Remarks
For more information, see Task Definition Parameter Volumes.
Default: - No volumes are passed to the Docker daemon on a container instance.