Interface CommonTaskDefinitionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
Ec2TaskDefinitionProps, ExternalTaskDefinitionProps, FargateTaskDefinitionProps, TaskDefinitionProps
All Known Implementing Classes:
CommonTaskDefinitionProps.Jsii$Proxy, Ec2TaskDefinitionProps.Jsii$Proxy, ExternalTaskDefinitionProps.Jsii$Proxy, FargateTaskDefinitionProps.Jsii$Proxy, TaskDefinitionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.250Z") @Stability(Stable) public interface CommonTaskDefinitionProps extends software.amazon.jsii.JsiiSerializable
The common properties for all task definitions.

For more information, see Task Definition Parameters.

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.*;
 ProxyConfiguration proxyConfiguration;
 Role role;
 CommonTaskDefinitionProps commonTaskDefinitionProps = CommonTaskDefinitionProps.builder()
         .executionRole(role)
         .family("family")
         .proxyConfiguration(proxyConfiguration)
         .taskRole(role)
         .volumes(List.of(Volume.builder()
                 .name("name")
                 // the properties below are optional
                 .dockerVolumeConfiguration(DockerVolumeConfiguration.builder()
                         .driver("driver")
                         .scope(Scope.TASK)
                         // the properties below are optional
                         .autoprovision(false)
                         .driverOpts(Map.of(
                                 "driverOptsKey", "driverOpts"))
                         .labels(Map.of(
                                 "labelsKey", "labels"))
                         .build())
                 .efsVolumeConfiguration(EfsVolumeConfiguration.builder()
                         .fileSystemId("fileSystemId")
                         // the properties below are optional
                         .authorizationConfig(AuthorizationConfig.builder()
                                 .accessPointId("accessPointId")
                                 .iam("iam")
                                 .build())
                         .rootDirectory("rootDirectory")
                         .transitEncryption("transitEncryption")
                         .transitEncryptionPort(123)
                         .build())
                 .host(Host.builder()
                         .sourcePath("sourcePath")
                         .build())
                 .build()))
         .build();
 
  • Method Details

    • getExecutionRole

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

      Default: - An execution role will be automatically created if you use ECR images in your task definition.

    • getFamily

      @Stability(Stable) @Nullable default String getFamily()
      The name of a family that this task definition is registered to.

      A family groups multiple versions of a task definition.

      Default: - Automatically generated name.

    • getProxyConfiguration

      @Stability(Stable) @Nullable default ProxyConfiguration getProxyConfiguration()
      The configuration details for the App Mesh proxy.

      Default: - No proxy configuration.

    • 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: - A task role is automatically created for you.

    • getVolumes

      @Stability(Stable) @Nullable default List<Volume> getVolumes()
      The list of volume definitions for the task.

      For more information, see Task Definition Parameter Volumes.

      Default: - No volumes are passed to the Docker daemon on a container instance.

    • builder

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