Skip to content
v2.277.0

MultiNodeEcsPropertiesProperty Struct ​

An object that contains the properties for the Amazon ECS resources of a job.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';

declare const options: any;
const multiNodeEcsPropertiesProperty: batch.CfnJobDefinition.MultiNodeEcsPropertiesProperty = {
  taskProperties: [{
    containers: [{
      image: 'image',

      // the properties below are optional
      command: ['command'],
      dependsOn: [{
        condition: 'condition',
        containerName: 'containerName',
      }],
      environment: [{
        name: 'name',
        value: 'value',
      }],
      essential: false,
      firelensConfiguration: {
        type: 'type',

        // the properties below are optional
        options: {
          optionsKey: 'options',
        },
      },
      linuxParameters: {
        devices: [{
          containerPath: 'containerPath',
          hostPath: 'hostPath',
          permissions: ['permissions'],
        }],
        initProcessEnabled: false,
        maxSwap: 123,
        sharedMemorySize: 123,
        swappiness: 123,
        tmpfs: [{
          containerPath: 'containerPath',
          size: 123,

          // the properties below are optional
          mountOptions: ['mountOptions'],
        }],
      },
      logConfiguration: {
        logDriver: 'logDriver',

        // the properties below are optional
        options: options,
        secretOptions: [{
          name: 'name',
          valueFrom: 'valueFrom',
        }],
      },
      mountPoints: [{
        containerPath: 'containerPath',
        readOnly: false,
        sourceVolume: 'sourceVolume',
      }],
      name: 'name',
      privileged: false,
      readonlyRootFilesystem: false,
      repositoryCredentials: {
        credentialsParameter: 'credentialsParameter',
      },
      resourceRequirements: [{
        type: 'type',
        value: 'value',
      }],
      secrets: [{
        name: 'name',
        valueFrom: 'valueFrom',
      }],
      startTimeout: 123,
      stopTimeout: 123,
      ulimits: [{
        hardLimit: 123,
        name: 'name',
        softLimit: 123,
      }],
      user: 'user',
    }],
    enableExecuteCommand: false,
    executionRoleArn: 'executionRoleArn',
    ipcMode: 'ipcMode',
    pidMode: 'pidMode',
    taskRoleArn: 'taskRoleArn',
    volumes: [{
      efsVolumeConfiguration: {
        fileSystemId: 'fileSystemId',

        // the properties below are optional
        authorizationConfig: {
          accessPointId: 'accessPointId',
          iam: 'iam',
        },
        rootDirectory: 'rootDirectory',
        transitEncryption: 'transitEncryption',
        transitEncryptionPort: 123,
      },
      host: {
        sourcePath: 'sourcePath',
      },
      name: 'name',
      s3FilesVolumeConfiguration: {
        fileSystemArn: 'fileSystemArn',

        // the properties below are optional
        accessPointArn: 'accessPointArn',
        rootDirectory: 'rootDirectory',
        transitEncryptionPort: 123,
      },
    }],
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_batch as batch

# options: Any

multi_node_ecs_properties_property = batch.CfnJobDefinition.MultiNodeEcsPropertiesProperty(
    task_properties=[batch.CfnJobDefinition.MultiNodeEcsTaskPropertiesProperty(
        containers=[batch.CfnJobDefinition.TaskContainerPropertiesProperty(
            image="image",

            # the properties below are optional
            command=["command"],
            depends_on=[batch.CfnJobDefinition.TaskContainerDependencyProperty(
                condition="condition",
                container_name="containerName"
            )],
            environment=[batch.CfnJobDefinition.EnvironmentProperty(
                name="name",
                value="value"
            )],
            essential=False,
            firelens_configuration=batch.CfnJobDefinition.FirelensConfigurationProperty(
                type="type",

                # the properties below are optional
                options={
                    "options_key": "options"
                }
            ),
            linux_parameters=batch.CfnJobDefinition.LinuxParametersProperty(
                devices=[batch.CfnJobDefinition.DeviceProperty(
                    container_path="containerPath",
                    host_path="hostPath",
                    permissions=["permissions"]
                )],
                init_process_enabled=False,
                max_swap=123,
                shared_memory_size=123,
                swappiness=123,
                tmpfs=[batch.CfnJobDefinition.TmpfsProperty(
                    container_path="containerPath",
                    size=123,

                    # the properties below are optional
                    mount_options=["mountOptions"]
                )]
            ),
            log_configuration=batch.CfnJobDefinition.LogConfigurationProperty(
                log_driver="logDriver",

                # the properties below are optional
                options=options,
                secret_options=[batch.CfnJobDefinition.SecretProperty(
                    name="name",
                    value_from="valueFrom"
                )]
            ),
            mount_points=[batch.CfnJobDefinition.MountPointProperty(
                container_path="containerPath",
                read_only=False,
                source_volume="sourceVolume"
            )],
            name="name",
            privileged=False,
            readonly_root_filesystem=False,
            repository_credentials=batch.CfnJobDefinition.RepositoryCredentialsProperty(
                credentials_parameter="credentialsParameter"
            ),
            resource_requirements=[batch.CfnJobDefinition.ResourceRequirementProperty(
                type="type",
                value="value"
            )],
            secrets=[batch.CfnJobDefinition.SecretProperty(
                name="name",
                value_from="valueFrom"
            )],
            start_timeout=123,
            stop_timeout=123,
            ulimits=[batch.CfnJobDefinition.UlimitProperty(
                hard_limit=123,
                name="name",
                soft_limit=123
            )],
            user="user"
        )],
        enable_execute_command=False,
        execution_role_arn="executionRoleArn",
        ipc_mode="ipcMode",
        pid_mode="pidMode",
        task_role_arn="taskRoleArn",
        volumes=[batch.CfnJobDefinition.VolumesProperty(
            efs_volume_configuration=batch.CfnJobDefinition.EfsVolumeConfigurationProperty(
                file_system_id="fileSystemId",

                # the properties below are optional
                authorization_config=batch.CfnJobDefinition.AuthorizationConfigProperty(
                    access_point_id="accessPointId",
                    iam="iam"
                ),
                root_directory="rootDirectory",
                transit_encryption="transitEncryption",
                transit_encryption_port=123
            ),
            host=batch.CfnJobDefinition.VolumesHostProperty(
                source_path="sourcePath"
            ),
            name="name",
            s3_files_volume_configuration=batch.CfnJobDefinition.S3FilesVolumeConfigurationProperty(
                file_system_arn="fileSystemArn",

                # the properties below are optional
                access_point_arn="accessPointArn",
                root_directory="rootDirectory",
                transit_encryption_port=123
            )
        )]
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;

Object options;

MultiNodeEcsPropertiesProperty multiNodeEcsPropertiesProperty = MultiNodeEcsPropertiesProperty.builder()
        .taskProperties(List.of(MultiNodeEcsTaskPropertiesProperty.builder()
                .containers(List.of(TaskContainerPropertiesProperty.builder()
                        .image("image")

                        // the properties below are optional
                        .command(List.of("command"))
                        .dependsOn(List.of(TaskContainerDependencyProperty.builder()
                                .condition("condition")
                                .containerName("containerName")
                                .build()))
                        .environment(List.of(EnvironmentProperty.builder()
                                .name("name")
                                .value("value")
                                .build()))
                        .essential(false)
                        .firelensConfiguration(FirelensConfigurationProperty.builder()
                                .type("type")

                                // the properties below are optional
                                .options(Map.of(
                                        "optionsKey", "options"))
                                .build())
                        .linuxParameters(LinuxParametersProperty.builder()
                                .devices(List.of(DeviceProperty.builder()
                                        .containerPath("containerPath")
                                        .hostPath("hostPath")
                                        .permissions(List.of("permissions"))
                                        .build()))
                                .initProcessEnabled(false)
                                .maxSwap(123)
                                .sharedMemorySize(123)
                                .swappiness(123)
                                .tmpfs(List.of(TmpfsProperty.builder()
                                        .containerPath("containerPath")
                                        .size(123)

                                        // the properties below are optional
                                        .mountOptions(List.of("mountOptions"))
                                        .build()))
                                .build())
                        .logConfiguration(LogConfigurationProperty.builder()
                                .logDriver("logDriver")

                                // the properties below are optional
                                .options(options)
                                .secretOptions(List.of(SecretProperty.builder()
                                        .name("name")
                                        .valueFrom("valueFrom")
                                        .build()))
                                .build())
                        .mountPoints(List.of(MountPointProperty.builder()
                                .containerPath("containerPath")
                                .readOnly(false)
                                .sourceVolume("sourceVolume")
                                .build()))
                        .name("name")
                        .privileged(false)
                        .readonlyRootFilesystem(false)
                        .repositoryCredentials(RepositoryCredentialsProperty.builder()
                                .credentialsParameter("credentialsParameter")
                                .build())
                        .resourceRequirements(List.of(ResourceRequirementProperty.builder()
                                .type("type")
                                .value("value")
                                .build()))
                        .secrets(List.of(SecretProperty.builder()
                                .name("name")
                                .valueFrom("valueFrom")
                                .build()))
                        .startTimeout(123)
                        .stopTimeout(123)
                        .ulimits(List.of(UlimitProperty.builder()
                                .hardLimit(123)
                                .name("name")
                                .softLimit(123)
                                .build()))
                        .user("user")
                        .build()))
                .enableExecuteCommand(false)
                .executionRoleArn("executionRoleArn")
                .ipcMode("ipcMode")
                .pidMode("pidMode")
                .taskRoleArn("taskRoleArn")
                .volumes(List.of(VolumesProperty.builder()
                        .efsVolumeConfiguration(EfsVolumeConfigurationProperty.builder()
                                .fileSystemId("fileSystemId")

                                // the properties below are optional
                                .authorizationConfig(AuthorizationConfigProperty.builder()
                                        .accessPointId("accessPointId")
                                        .iam("iam")
                                        .build())
                                .rootDirectory("rootDirectory")
                                .transitEncryption("transitEncryption")
                                .transitEncryptionPort(123)
                                .build())
                        .host(VolumesHostProperty.builder()
                                .sourcePath("sourcePath")
                                .build())
                        .name("name")
                        .s3FilesVolumeConfiguration(S3FilesVolumeConfigurationProperty.builder()
                                .fileSystemArn("fileSystemArn")

                                // the properties below are optional
                                .accessPointArn("accessPointArn")
                                .rootDirectory("rootDirectory")
                                .transitEncryptionPort(123)
                                .build())
                        .build()))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;

var options;

var multiNodeEcsPropertiesProperty = new MultiNodeEcsPropertiesProperty {
    TaskProperties = new [] { new MultiNodeEcsTaskPropertiesProperty {
        Containers = new [] { new TaskContainerPropertiesProperty {
            Image = "image",

            // the properties below are optional
            Command = new [] { "command" },
            DependsOn = new [] { new TaskContainerDependencyProperty {
                Condition = "condition",
                ContainerName = "containerName"
            } },
            Environment = new [] { new EnvironmentProperty {
                Name = "name",
                Value = "value"
            } },
            Essential = false,
            FirelensConfiguration = new FirelensConfigurationProperty {
                Type = "type",

                // the properties below are optional
                Options = new Dictionary<string, string> {
                    { "optionsKey", "options" }
                }
            },
            LinuxParameters = new LinuxParametersProperty {
                Devices = new [] { new DeviceProperty {
                    ContainerPath = "containerPath",
                    HostPath = "hostPath",
                    Permissions = new [] { "permissions" }
                } },
                InitProcessEnabled = false,
                MaxSwap = 123,
                SharedMemorySize = 123,
                Swappiness = 123,
                Tmpfs = new [] { new TmpfsProperty {
                    ContainerPath = "containerPath",
                    Size = 123,

                    // the properties below are optional
                    MountOptions = new [] { "mountOptions" }
                } }
            },
            LogConfiguration = new LogConfigurationProperty {
                LogDriver = "logDriver",

                // the properties below are optional
                Options = options,
                SecretOptions = new [] { new SecretProperty {
                    Name = "name",
                    ValueFrom = "valueFrom"
                } }
            },
            MountPoints = new [] { new MountPointProperty {
                ContainerPath = "containerPath",
                ReadOnly = false,
                SourceVolume = "sourceVolume"
            } },
            Name = "name",
            Privileged = false,
            ReadonlyRootFilesystem = false,
            RepositoryCredentials = new RepositoryCredentialsProperty {
                CredentialsParameter = "credentialsParameter"
            },
            ResourceRequirements = new [] { new ResourceRequirementProperty {
                Type = "type",
                Value = "value"
            } },
            Secrets = new [] { new SecretProperty {
                Name = "name",
                ValueFrom = "valueFrom"
            } },
            StartTimeout = 123,
            StopTimeout = 123,
            Ulimits = new [] { new UlimitProperty {
                HardLimit = 123,
                Name = "name",
                SoftLimit = 123
            } },
            User = "user"
        } },
        EnableExecuteCommand = false,
        ExecutionRoleArn = "executionRoleArn",
        IpcMode = "ipcMode",
        PidMode = "pidMode",
        TaskRoleArn = "taskRoleArn",
        Volumes = new [] { new VolumesProperty {
            EfsVolumeConfiguration = new EfsVolumeConfigurationProperty {
                FileSystemId = "fileSystemId",

                // the properties below are optional
                AuthorizationConfig = new AuthorizationConfigProperty {
                    AccessPointId = "accessPointId",
                    Iam = "iam"
                },
                RootDirectory = "rootDirectory",
                TransitEncryption = "transitEncryption",
                TransitEncryptionPort = 123
            },
            Host = new VolumesHostProperty {
                SourcePath = "sourcePath"
            },
            Name = "name",
            S3FilesVolumeConfiguration = new S3FilesVolumeConfigurationProperty {
                FileSystemArn = "fileSystemArn",

                // the properties below are optional
                AccessPointArn = "accessPointArn",
                RootDirectory = "rootDirectory",
                TransitEncryptionPort = 123
            }
        } }
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}

multiNodeEcsPropertiesProperty := &MultiNodeEcsPropertiesProperty{
	TaskProperties: []interface{}{
		&MultiNodeEcsTaskPropertiesProperty{
			Containers: []interface{}{
				&TaskContainerPropertiesProperty{
					Image: jsii.String("image"),

					// the properties below are optional
					Command: []*string{
						jsii.String("command"),
					},
					DependsOn: []interface{}{
						&TaskContainerDependencyProperty{
							Condition: jsii.String("condition"),
							ContainerName: jsii.String("containerName"),
						},
					},
					Environment: []interface{}{
						&EnvironmentProperty{
							Name: jsii.String("name"),
							Value: jsii.String("value"),
						},
					},
					Essential: jsii.Boolean(false),
					FirelensConfiguration: &FirelensConfigurationProperty{
						Type: jsii.String("type"),

						// the properties below are optional
						Options: map[string]*string{
							"optionsKey": jsii.String("options"),
						},
					},
					LinuxParameters: &LinuxParametersProperty{
						Devices: []interface{}{
							&DeviceProperty{
								ContainerPath: jsii.String("containerPath"),
								HostPath: jsii.String("hostPath"),
								Permissions: []*string{
									jsii.String("permissions"),
								},
							},
						},
						InitProcessEnabled: jsii.Boolean(false),
						MaxSwap: jsii.Number(123),
						SharedMemorySize: jsii.Number(123),
						Swappiness: jsii.Number(123),
						Tmpfs: []interface{}{
							&TmpfsProperty{
								ContainerPath: jsii.String("containerPath"),
								Size: jsii.Number(123),

								// the properties below are optional
								MountOptions: []*string{
									jsii.String("mountOptions"),
								},
							},
						},
					},
					LogConfiguration: &LogConfigurationProperty{
						LogDriver: jsii.String("logDriver"),

						// the properties below are optional
						Options: options,
						SecretOptions: []interface{}{
							&SecretProperty{
								Name: jsii.String("name"),
								ValueFrom: jsii.String("valueFrom"),
							},
						},
					},
					MountPoints: []interface{}{
						&MountPointProperty{
							ContainerPath: jsii.String("containerPath"),
							ReadOnly: jsii.Boolean(false),
							SourceVolume: jsii.String("sourceVolume"),
						},
					},
					Name: jsii.String("name"),
					Privileged: jsii.Boolean(false),
					ReadonlyRootFilesystem: jsii.Boolean(false),
					RepositoryCredentials: &RepositoryCredentialsProperty{
						CredentialsParameter: jsii.String("credentialsParameter"),
					},
					ResourceRequirements: []interface{}{
						&ResourceRequirementProperty{
							Type: jsii.String("type"),
							Value: jsii.String("value"),
						},
					},
					Secrets: []interface{}{
						&SecretProperty{
							Name: jsii.String("name"),
							ValueFrom: jsii.String("valueFrom"),
						},
					},
					StartTimeout: jsii.Number(123),
					StopTimeout: jsii.Number(123),
					Ulimits: []interface{}{
						&UlimitProperty{
							HardLimit: jsii.Number(123),
							Name: jsii.String("name"),
							SoftLimit: jsii.Number(123),
						},
					},
					User: jsii.String("user"),
				},
			},
			EnableExecuteCommand: jsii.Boolean(false),
			ExecutionRoleArn: jsii.String("executionRoleArn"),
			IpcMode: jsii.String("ipcMode"),
			PidMode: jsii.String("pidMode"),
			TaskRoleArn: jsii.String("taskRoleArn"),
			Volumes: []interface{}{
				&VolumesProperty{
					EfsVolumeConfiguration: &EfsVolumeConfigurationProperty{
						FileSystemId: jsii.String("fileSystemId"),

						// the properties below are optional
						AuthorizationConfig: &AuthorizationConfigProperty{
							AccessPointId: jsii.String("accessPointId"),
							Iam: jsii.String("iam"),
						},
						RootDirectory: jsii.String("rootDirectory"),
						TransitEncryption: jsii.String("transitEncryption"),
						TransitEncryptionPort: jsii.Number(123),
					},
					Host: &VolumesHostProperty{
						SourcePath: jsii.String("sourcePath"),
					},
					Name: jsii.String("name"),
					S3FilesVolumeConfiguration: &S3FilesVolumeConfigurationProperty{
						FileSystemArn: jsii.String("fileSystemArn"),

						// the properties below are optional
						AccessPointArn: jsii.String("accessPointArn"),
						RootDirectory: jsii.String("rootDirectory"),
						TransitEncryptionPort: jsii.Number(123),
					},
				},
			},
		},
	},
}

Properties ​

taskPropertiesIResolvable | IResolvable | CfnJobDefinition.MultiNodeEcsTaskPropertiesProperty[]task_propertiestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MultiNodeEcsTaskPropertiesProperty]]]taskPropertiesIResolvableTaskPropertiesIResolvableTaskPropertiesinterface{}required#
An object that contains the properties for the Amazon ECS task definition of a job.

This object is currently limited to one task element. However, the task element can run up to 10 containers.