Class CfnJobDefinition.NodePropertiesProperty
An object that represents the node properties of a multi-node parallel job.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnJobDefinition.NodePropertiesProperty : CfnJobDefinition.INodePropertiesProperty
Syntax (vb)
Public Class CfnJobDefinition.NodePropertiesProperty Implements CfnJobDefinition.INodePropertiesProperty
Remarks
Node properties can't be specified for Amazon EKS based job definitions.
ExampleMetadata: fixture=_generated
Examples
// 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 labels;
var limits;
var options;
var requests;
var nodePropertiesProperty = new NodePropertiesProperty {
MainNode = 123,
NodeRangeProperties = new [] { new NodeRangePropertyProperty {
TargetNodes = "targetNodes",
// the properties below are optional
ConsumableResourceProperties = new ConsumableResourcePropertiesProperty {
ConsumableResourceList = new [] { new ConsumableResourceRequirementProperty {
ConsumableResource = "consumableResource",
Quantity = 123
} }
},
Container = new ContainerPropertiesProperty {
Image = "image",
// the properties below are optional
Command = new [] { "command" },
EnableExecuteCommand = false,
Environment = new [] { new EnvironmentProperty {
Name = "name",
Value = "value"
} },
EphemeralStorage = new EphemeralStorageProperty {
SizeInGiB = 123
},
ExecutionRoleArn = "executionRoleArn",
FargatePlatformConfiguration = new FargatePlatformConfigurationProperty {
PlatformVersion = "platformVersion"
},
InstanceType = "instanceType",
JobRoleArn = "jobRoleArn",
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"
} }
},
Memory = 123,
MountPoints = new [] { new MountPointsProperty {
ContainerPath = "containerPath",
ReadOnly = false,
SourceVolume = "sourceVolume"
} },
NetworkConfiguration = new NetworkConfigurationProperty {
AssignPublicIp = "assignPublicIp"
},
Privileged = false,
ReadonlyRootFilesystem = false,
RepositoryCredentials = new RepositoryCredentialsProperty {
CredentialsParameter = "credentialsParameter"
},
ResourceRequirements = new [] { new ResourceRequirementProperty {
Type = "type",
Value = "value"
} },
RuntimePlatform = new RuntimePlatformProperty {
CpuArchitecture = "cpuArchitecture",
OperatingSystemFamily = "operatingSystemFamily"
},
Secrets = new [] { new SecretProperty {
Name = "name",
ValueFrom = "valueFrom"
} },
Ulimits = new [] { new UlimitProperty {
HardLimit = 123,
Name = "name",
SoftLimit = 123
} },
User = "user",
Vcpus = 123,
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"
} }
},
EcsProperties = 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"
} },
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"
} }
} }
},
EksProperties = new EksPropertiesProperty {
PodProperties = new PodPropertiesProperty {
Containers = new [] { new EksContainerProperty {
Image = "image",
// the properties below are optional
Args = new [] { "args" },
Command = new [] { "command" },
Env = new [] { new EksContainerEnvironmentVariableProperty {
Name = "name",
// the properties below are optional
Value = "value"
} },
ImagePullPolicy = "imagePullPolicy",
Name = "name",
Resources = new ResourcesProperty {
Limits = limits,
Requests = requests
},
SecurityContext = new SecurityContextProperty {
AllowPrivilegeEscalation = false,
Privileged = false,
ReadOnlyRootFilesystem = false,
RunAsGroup = 123,
RunAsNonRoot = false,
RunAsUser = 123
},
VolumeMounts = new [] { new EksContainerVolumeMountProperty {
MountPath = "mountPath",
Name = "name",
ReadOnly = false,
SubPath = "subPath"
} }
} },
DnsPolicy = "dnsPolicy",
HostNetwork = false,
ImagePullSecrets = new [] { new ImagePullSecretProperty {
Name = "name"
} },
InitContainers = new [] { new EksContainerProperty {
Image = "image",
// the properties below are optional
Args = new [] { "args" },
Command = new [] { "command" },
Env = new [] { new EksContainerEnvironmentVariableProperty {
Name = "name",
// the properties below are optional
Value = "value"
} },
ImagePullPolicy = "imagePullPolicy",
Name = "name",
Resources = new ResourcesProperty {
Limits = limits,
Requests = requests
},
SecurityContext = new SecurityContextProperty {
AllowPrivilegeEscalation = false,
Privileged = false,
ReadOnlyRootFilesystem = false,
RunAsGroup = 123,
RunAsNonRoot = false,
RunAsUser = 123
},
VolumeMounts = new [] { new EksContainerVolumeMountProperty {
MountPath = "mountPath",
Name = "name",
ReadOnly = false,
SubPath = "subPath"
} }
} },
Metadata = new MetadataProperty {
Labels = labels
},
ServiceAccountName = "serviceAccountName",
ShareProcessNamespace = false,
Volumes = new [] { new EksVolumeProperty {
Name = "name",
// the properties below are optional
EmptyDir = new EmptyDirProperty {
Medium = "medium",
SizeLimit = "sizeLimit"
},
HostPath = new HostPathProperty {
Path = "path"
},
PersistentVolumeClaim = new EksPersistentVolumeClaimProperty {
ClaimName = "claimName",
// the properties below are optional
ReadOnly = false
},
Secret = new EksSecretProperty {
SecretName = "secretName",
// the properties below are optional
Optional = false
}
} }
}
},
InstanceTypes = new [] { "instanceTypes" }
} },
NumNodes = 123
};
Synopsis
Constructors
| NodePropertiesProperty() | An object that represents the node properties of a multi-node parallel job. |
Properties
| MainNode | Specifies the node index for the main node of a multi-node parallel job. |
| NodeRangeProperties | A list of node ranges and their properties that are associated with a multi-node parallel job. |
| NumNodes | The number of nodes that are associated with a multi-node parallel job. |
Constructors
NodePropertiesProperty()
An object that represents the node properties of a multi-node parallel job.
public NodePropertiesProperty()
Remarks
Node properties can't be specified for Amazon EKS based job definitions.
ExampleMetadata: fixture=_generated
Examples
// 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 labels;
var limits;
var options;
var requests;
var nodePropertiesProperty = new NodePropertiesProperty {
MainNode = 123,
NodeRangeProperties = new [] { new NodeRangePropertyProperty {
TargetNodes = "targetNodes",
// the properties below are optional
ConsumableResourceProperties = new ConsumableResourcePropertiesProperty {
ConsumableResourceList = new [] { new ConsumableResourceRequirementProperty {
ConsumableResource = "consumableResource",
Quantity = 123
} }
},
Container = new ContainerPropertiesProperty {
Image = "image",
// the properties below are optional
Command = new [] { "command" },
EnableExecuteCommand = false,
Environment = new [] { new EnvironmentProperty {
Name = "name",
Value = "value"
} },
EphemeralStorage = new EphemeralStorageProperty {
SizeInGiB = 123
},
ExecutionRoleArn = "executionRoleArn",
FargatePlatformConfiguration = new FargatePlatformConfigurationProperty {
PlatformVersion = "platformVersion"
},
InstanceType = "instanceType",
JobRoleArn = "jobRoleArn",
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"
} }
},
Memory = 123,
MountPoints = new [] { new MountPointsProperty {
ContainerPath = "containerPath",
ReadOnly = false,
SourceVolume = "sourceVolume"
} },
NetworkConfiguration = new NetworkConfigurationProperty {
AssignPublicIp = "assignPublicIp"
},
Privileged = false,
ReadonlyRootFilesystem = false,
RepositoryCredentials = new RepositoryCredentialsProperty {
CredentialsParameter = "credentialsParameter"
},
ResourceRequirements = new [] { new ResourceRequirementProperty {
Type = "type",
Value = "value"
} },
RuntimePlatform = new RuntimePlatformProperty {
CpuArchitecture = "cpuArchitecture",
OperatingSystemFamily = "operatingSystemFamily"
},
Secrets = new [] { new SecretProperty {
Name = "name",
ValueFrom = "valueFrom"
} },
Ulimits = new [] { new UlimitProperty {
HardLimit = 123,
Name = "name",
SoftLimit = 123
} },
User = "user",
Vcpus = 123,
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"
} }
},
EcsProperties = 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"
} },
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"
} }
} }
},
EksProperties = new EksPropertiesProperty {
PodProperties = new PodPropertiesProperty {
Containers = new [] { new EksContainerProperty {
Image = "image",
// the properties below are optional
Args = new [] { "args" },
Command = new [] { "command" },
Env = new [] { new EksContainerEnvironmentVariableProperty {
Name = "name",
// the properties below are optional
Value = "value"
} },
ImagePullPolicy = "imagePullPolicy",
Name = "name",
Resources = new ResourcesProperty {
Limits = limits,
Requests = requests
},
SecurityContext = new SecurityContextProperty {
AllowPrivilegeEscalation = false,
Privileged = false,
ReadOnlyRootFilesystem = false,
RunAsGroup = 123,
RunAsNonRoot = false,
RunAsUser = 123
},
VolumeMounts = new [] { new EksContainerVolumeMountProperty {
MountPath = "mountPath",
Name = "name",
ReadOnly = false,
SubPath = "subPath"
} }
} },
DnsPolicy = "dnsPolicy",
HostNetwork = false,
ImagePullSecrets = new [] { new ImagePullSecretProperty {
Name = "name"
} },
InitContainers = new [] { new EksContainerProperty {
Image = "image",
// the properties below are optional
Args = new [] { "args" },
Command = new [] { "command" },
Env = new [] { new EksContainerEnvironmentVariableProperty {
Name = "name",
// the properties below are optional
Value = "value"
} },
ImagePullPolicy = "imagePullPolicy",
Name = "name",
Resources = new ResourcesProperty {
Limits = limits,
Requests = requests
},
SecurityContext = new SecurityContextProperty {
AllowPrivilegeEscalation = false,
Privileged = false,
ReadOnlyRootFilesystem = false,
RunAsGroup = 123,
RunAsNonRoot = false,
RunAsUser = 123
},
VolumeMounts = new [] { new EksContainerVolumeMountProperty {
MountPath = "mountPath",
Name = "name",
ReadOnly = false,
SubPath = "subPath"
} }
} },
Metadata = new MetadataProperty {
Labels = labels
},
ServiceAccountName = "serviceAccountName",
ShareProcessNamespace = false,
Volumes = new [] { new EksVolumeProperty {
Name = "name",
// the properties below are optional
EmptyDir = new EmptyDirProperty {
Medium = "medium",
SizeLimit = "sizeLimit"
},
HostPath = new HostPathProperty {
Path = "path"
},
PersistentVolumeClaim = new EksPersistentVolumeClaimProperty {
ClaimName = "claimName",
// the properties below are optional
ReadOnly = false
},
Secret = new EksSecretProperty {
SecretName = "secretName",
// the properties below are optional
Optional = false
}
} }
}
},
InstanceTypes = new [] { "instanceTypes" }
} },
NumNodes = 123
};
Properties
MainNode
Specifies the node index for the main node of a multi-node parallel job.
public double MainNode { get; set; }
Property Value
Remarks
This node index value must be fewer than the number of nodes.
NodeRangeProperties
A list of node ranges and their properties that are associated with a multi-node parallel job.
public object NodeRangeProperties { get; set; }
Property Value
Remarks
NumNodes
The number of nodes that are associated with a multi-node parallel job.
public double NumNodes { get; set; }