FargateTaskDefinitionAttributes Struct
Attributes used to import an existing Fargate task definition.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const role: iam.Role;
const fargateTaskDefinitionAttributes: ecs.FargateTaskDefinitionAttributes = {
taskDefinitionArn: 'taskDefinitionArn',
// the properties below are optional
executionRole: role,
networkMode: ecs.NetworkMode.NONE,
taskRole: role,
};
Properties
executionRoleoptionalIRoleexecution_roleoptionalIRoleexecutionRoleoptionalIRoleExecutionRoleoptionalIRoleExecutionRoleoptionalIRole= undefined#The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf.
Some tasks do not have an execution role.
networkModeoptionalNetworkModenetwork_modeoptionalNetworkModenetworkModeoptionalNetworkModeNetworkModeoptionalNetworkModeNetworkModeoptionalNetworkMode#The networking mode to use for the containers in the task.
Default: Network mode cannot be provided to the imported task.
taskDefinitionArnstringtask_definition_arnstrtaskDefinitionArnStringTaskDefinitionArnstringTaskDefinitionArn*stringrequired#The arn of the task definition.