interface ExternalTaskDefinitionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.ExternalTaskDefinitionProps |
Java | software.amazon.awscdk.services.ecs.ExternalTaskDefinitionProps |
Python | aws_cdk.aws_ecs.ExternalTaskDefinitionProps |
TypeScript (source) | @aws-cdk/aws-ecs » ExternalTaskDefinitionProps |
The properties for a task definition run on an External cluster.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ecs from '@aws-cdk/aws-ecs';
import * as iam from '@aws-cdk/aws-iam';
declare const proxyConfiguration: ecs.ProxyConfiguration;
declare const role: iam.Role;
const externalTaskDefinitionProps: ecs.ExternalTaskDefinitionProps = {
executionRole: role,
family: 'family',
proxyConfiguration: proxyConfiguration,
taskRole: role,
volumes: [{
name: 'name',
// the properties below are optional
dockerVolumeConfiguration: {
driver: 'driver',
scope: ecs.Scope.TASK,
// the properties below are optional
autoprovision: false,
driverOpts: {
driverOptsKey: 'driverOpts',
},
labels: {
labelsKey: 'labels',
},
},
efsVolumeConfiguration: {
fileSystemId: 'fileSystemId',
// the properties below are optional
authorizationConfig: {
accessPointId: 'accessPointId',
iam: 'iam',
},
rootDirectory: 'rootDirectory',
transitEncryption: 'transitEncryption',
transitEncryptionPort: 123,
},
host: {
sourcePath: 'sourcePath',
},
}],
};
Properties
Name | Type | Description |
---|---|---|
execution | IRole | The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf. |
family? | string | The name of a family that this task definition is registered to. |
proxy | Proxy | The configuration details for the App Mesh proxy. |
task | IRole | The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. |
volumes? | Volume [] | The list of volume definitions for the task. |
executionRole?
Type:
IRole
(optional, default: An execution role will be automatically created if you use ECR images in your task definition.)
The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
The role will be used to retrieve container images from ECR and create CloudWatch log groups.
family?
Type:
string
(optional, default: Automatically generated name.)
The name of a family that this task definition is registered to.
A family groups multiple versions of a task definition.
proxyConfiguration?
Type:
Proxy
(optional, default: No proxy configuration.)
The configuration details for the App Mesh proxy.
taskRole?
Type:
IRole
(optional, default: A task role is automatically created for you.)
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
volumes?
Type:
Volume
[]
(optional, default: No volumes are passed to the Docker daemon on a container instance.)
The list of volume definitions for the task.
For more information, see Task Definition Parameter Volumes.