Interface CommonTaskDefinitionAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
Ec2TaskDefinitionAttributes, ExternalTaskDefinitionAttributes, FargateTaskDefinitionAttributes, TaskDefinitionAttributes
All Known Implementing Classes:
CommonTaskDefinitionAttributes.Jsii$Proxy, Ec2TaskDefinitionAttributes.Jsii$Proxy, ExternalTaskDefinitionAttributes.Jsii$Proxy, FargateTaskDefinitionAttributes.Jsii$Proxy, TaskDefinitionAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:16.404Z") @Stability(Stable) public interface CommonTaskDefinitionAttributes extends software.amazon.jsii.JsiiSerializable
The common task definition attributes used across all types of task definitions.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecs.*;
 import software.amazon.awscdk.services.iam.*;
 Role role;
 CommonTaskDefinitionAttributes commonTaskDefinitionAttributes = CommonTaskDefinitionAttributes.builder()
         .taskDefinitionArn("taskDefinitionArn")
         // the properties below are optional
         .executionRole(role)
         .networkMode(NetworkMode.NONE)
         .taskRole(role)
         .build();
 
  • Method Details

    • getTaskDefinitionArn

      @Stability(Stable) @NotNull String getTaskDefinitionArn()
      The arn of the task definition.
    • getExecutionRole

      @Stability(Stable) @Nullable default IRole getExecutionRole()
      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.

      Default: - undefined

    • getNetworkMode

      @Stability(Stable) @Nullable default NetworkMode getNetworkMode()
      The networking mode to use for the containers in the task.

      Default: Network mode cannot be provided to the imported task.

    • getTaskRole

      @Stability(Stable) @Nullable default IRole getTaskRole()
      The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.

      Default: Permissions cannot be granted to the imported task.

    • builder

      @Stability(Stable) static CommonTaskDefinitionAttributes.Builder builder()
      Returns:
      a CommonTaskDefinitionAttributes.Builder of CommonTaskDefinitionAttributes