Skip to content
v2.278.0

EksPropertiesProperty Struct ​

An object that contains the properties for the Kubernetes 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 labels: any;
declare const limits: any;
declare const requests: any;
const eksPropertiesProperty: batch.CfnJobDefinition.EksPropertiesProperty = {
  podProperties: {
    containers: [{
      image: 'image',

      // the properties below are optional
      args: ['args'],
      command: ['command'],
      env: [{
        name: 'name',

        // the properties below are optional
        value: 'value',
      }],
      imagePullPolicy: 'imagePullPolicy',
      name: 'name',
      resources: {
        limits: limits,
        requests: requests,
      },
      securityContext: {
        allowPrivilegeEscalation: false,
        capabilities: {
          add: ['add'],
          drop: ['drop'],
        },
        privileged: false,
        readOnlyRootFilesystem: false,
        runAsGroup: 123,
        runAsNonRoot: false,
        runAsUser: 123,
        seccompProfile: {
          type: 'type',

          // the properties below are optional
          localhostProfile: 'localhostProfile',
        },
      },
      volumeMounts: [{
        mountPath: 'mountPath',
        name: 'name',
        readOnly: false,
        subPath: 'subPath',
      }],
    }],
    dnsPolicy: 'dnsPolicy',
    hostNetwork: false,
    imagePullSecrets: [{
      name: 'name',
    }],
    initContainers: [{
      image: 'image',

      // the properties below are optional
      args: ['args'],
      command: ['command'],
      env: [{
        name: 'name',

        // the properties below are optional
        value: 'value',
      }],
      imagePullPolicy: 'imagePullPolicy',
      name: 'name',
      resources: {
        limits: limits,
        requests: requests,
      },
      securityContext: {
        allowPrivilegeEscalation: false,
        capabilities: {
          add: ['add'],
          drop: ['drop'],
        },
        privileged: false,
        readOnlyRootFilesystem: false,
        runAsGroup: 123,
        runAsNonRoot: false,
        runAsUser: 123,
        seccompProfile: {
          type: 'type',

          // the properties below are optional
          localhostProfile: 'localhostProfile',
        },
      },
      volumeMounts: [{
        mountPath: 'mountPath',
        name: 'name',
        readOnly: false,
        subPath: 'subPath',
      }],
    }],
    metadata: {
      labels: labels,
    },
    securityContext: {
      fsGroup: 123,
      runAsGroup: 123,
      runAsNonRoot: false,
      runAsUser: 123,
      seccompProfile: {
        type: 'type',

        // the properties below are optional
        localhostProfile: 'localhostProfile',
      },
    },
    serviceAccountName: 'serviceAccountName',
    shareProcessNamespace: false,
    volumes: [{
      name: 'name',

      // the properties below are optional
      emptyDir: {
        medium: 'medium',
        sizeLimit: 'sizeLimit',
      },
      hostPath: {
        path: 'path',
      },
      persistentVolumeClaim: {
        claimName: 'claimName',

        // the properties below are optional
        readOnly: false,
      },
      secret: {
        secretName: 'secretName',

        // the properties below are optional
        optional: false,
      },
    }],
  },
};
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

# labels: Any
# limits: Any
# requests: Any

eks_properties_property = batch.CfnJobDefinition.EksPropertiesProperty(
    pod_properties=batch.CfnJobDefinition.PodPropertiesProperty(
        containers=[batch.CfnJobDefinition.EksContainerProperty(
            image="image",

            # the properties below are optional
            args=["args"],
            command=["command"],
            env=[batch.CfnJobDefinition.EksContainerEnvironmentVariableProperty(
                name="name",

                # the properties below are optional
                value="value"
            )],
            image_pull_policy="imagePullPolicy",
            name="name",
            resources=batch.CfnJobDefinition.ResourcesProperty(
                limits=limits,
                requests=requests
            ),
            security_context=batch.CfnJobDefinition.SecurityContextProperty(
                allow_privilege_escalation=False,
                capabilities=batch.CfnJobDefinition.EksContainerLinuxCapabilitiesProperty(
                    add=["add"],
                    drop=["drop"]
                ),
                privileged=False,
                read_only_root_filesystem=False,
                run_as_group=123,
                run_as_non_root=False,
                run_as_user=123,
                seccomp_profile=batch.CfnJobDefinition.EksSeccompProfileProperty(
                    type="type",

                    # the properties below are optional
                    localhost_profile="localhostProfile"
                )
            ),
            volume_mounts=[batch.CfnJobDefinition.EksContainerVolumeMountProperty(
                mount_path="mountPath",
                name="name",
                read_only=False,
                sub_path="subPath"
            )]
        )],
        dns_policy="dnsPolicy",
        host_network=False,
        image_pull_secrets=[batch.CfnJobDefinition.ImagePullSecretProperty(
            name="name"
        )],
        init_containers=[batch.CfnJobDefinition.EksContainerProperty(
            image="image",

            # the properties below are optional
            args=["args"],
            command=["command"],
            env=[batch.CfnJobDefinition.EksContainerEnvironmentVariableProperty(
                name="name",

                # the properties below are optional
                value="value"
            )],
            image_pull_policy="imagePullPolicy",
            name="name",
            resources=batch.CfnJobDefinition.ResourcesProperty(
                limits=limits,
                requests=requests
            ),
            security_context=batch.CfnJobDefinition.SecurityContextProperty(
                allow_privilege_escalation=False,
                capabilities=batch.CfnJobDefinition.EksContainerLinuxCapabilitiesProperty(
                    add=["add"],
                    drop=["drop"]
                ),
                privileged=False,
                read_only_root_filesystem=False,
                run_as_group=123,
                run_as_non_root=False,
                run_as_user=123,
                seccomp_profile=batch.CfnJobDefinition.EksSeccompProfileProperty(
                    type="type",

                    # the properties below are optional
                    localhost_profile="localhostProfile"
                )
            ),
            volume_mounts=[batch.CfnJobDefinition.EksContainerVolumeMountProperty(
                mount_path="mountPath",
                name="name",
                read_only=False,
                sub_path="subPath"
            )]
        )],
        metadata=batch.CfnJobDefinition.MetadataProperty(
            labels=labels
        ),
        security_context=batch.CfnJobDefinition.EksPodSecurityContextProperty(
            fs_group=123,
            run_as_group=123,
            run_as_non_root=False,
            run_as_user=123,
            seccomp_profile=batch.CfnJobDefinition.EksSeccompProfileProperty(
                type="type",

                # the properties below are optional
                localhost_profile="localhostProfile"
            )
        ),
        service_account_name="serviceAccountName",
        share_process_namespace=False,
        volumes=[batch.CfnJobDefinition.EksVolumeProperty(
            name="name",

            # the properties below are optional
            empty_dir=batch.CfnJobDefinition.EmptyDirProperty(
                medium="medium",
                size_limit="sizeLimit"
            ),
            host_path=batch.CfnJobDefinition.HostPathProperty(
                path="path"
            ),
            persistent_volume_claim=batch.CfnJobDefinition.EksPersistentVolumeClaimProperty(
                claim_name="claimName",

                # the properties below are optional
                read_only=False
            ),
            secret=batch.CfnJobDefinition.EksSecretProperty(
                secret_name="secretName",

                # the properties below are optional
                optional=False
            )
        )]
    )
)
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 labels;
Object limits;
Object requests;

EksPropertiesProperty eksPropertiesProperty = EksPropertiesProperty.builder()
        .podProperties(PodPropertiesProperty.builder()
                .containers(List.of(EksContainerProperty.builder()
                        .image("image")

                        // the properties below are optional
                        .args(List.of("args"))
                        .command(List.of("command"))
                        .env(List.of(EksContainerEnvironmentVariableProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .value("value")
                                .build()))
                        .imagePullPolicy("imagePullPolicy")
                        .name("name")
                        .resources(ResourcesProperty.builder()
                                .limits(limits)
                                .requests(requests)
                                .build())
                        .securityContext(SecurityContextProperty.builder()
                                .allowPrivilegeEscalation(false)
                                .capabilities(EksContainerLinuxCapabilitiesProperty.builder()
                                        .add(List.of("add"))
                                        .drop(List.of("drop"))
                                        .build())
                                .privileged(false)
                                .readOnlyRootFilesystem(false)
                                .runAsGroup(123)
                                .runAsNonRoot(false)
                                .runAsUser(123)
                                .seccompProfile(EksSeccompProfileProperty.builder()
                                        .type("type")

                                        // the properties below are optional
                                        .localhostProfile("localhostProfile")
                                        .build())
                                .build())
                        .volumeMounts(List.of(EksContainerVolumeMountProperty.builder()
                                .mountPath("mountPath")
                                .name("name")
                                .readOnly(false)
                                .subPath("subPath")
                                .build()))
                        .build()))
                .dnsPolicy("dnsPolicy")
                .hostNetwork(false)
                .imagePullSecrets(List.of(ImagePullSecretProperty.builder()
                        .name("name")
                        .build()))
                .initContainers(List.of(EksContainerProperty.builder()
                        .image("image")

                        // the properties below are optional
                        .args(List.of("args"))
                        .command(List.of("command"))
                        .env(List.of(EksContainerEnvironmentVariableProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .value("value")
                                .build()))
                        .imagePullPolicy("imagePullPolicy")
                        .name("name")
                        .resources(ResourcesProperty.builder()
                                .limits(limits)
                                .requests(requests)
                                .build())
                        .securityContext(SecurityContextProperty.builder()
                                .allowPrivilegeEscalation(false)
                                .capabilities(EksContainerLinuxCapabilitiesProperty.builder()
                                        .add(List.of("add"))
                                        .drop(List.of("drop"))
                                        .build())
                                .privileged(false)
                                .readOnlyRootFilesystem(false)
                                .runAsGroup(123)
                                .runAsNonRoot(false)
                                .runAsUser(123)
                                .seccompProfile(EksSeccompProfileProperty.builder()
                                        .type("type")

                                        // the properties below are optional
                                        .localhostProfile("localhostProfile")
                                        .build())
                                .build())
                        .volumeMounts(List.of(EksContainerVolumeMountProperty.builder()
                                .mountPath("mountPath")
                                .name("name")
                                .readOnly(false)
                                .subPath("subPath")
                                .build()))
                        .build()))
                .metadata(MetadataProperty.builder()
                        .labels(labels)
                        .build())
                .securityContext(EksPodSecurityContextProperty.builder()
                        .fsGroup(123)
                        .runAsGroup(123)
                        .runAsNonRoot(false)
                        .runAsUser(123)
                        .seccompProfile(EksSeccompProfileProperty.builder()
                                .type("type")

                                // the properties below are optional
                                .localhostProfile("localhostProfile")
                                .build())
                        .build())
                .serviceAccountName("serviceAccountName")
                .shareProcessNamespace(false)
                .volumes(List.of(EksVolumeProperty.builder()
                        .name("name")

                        // the properties below are optional
                        .emptyDir(EmptyDirProperty.builder()
                                .medium("medium")
                                .sizeLimit("sizeLimit")
                                .build())
                        .hostPath(HostPathProperty.builder()
                                .path("path")
                                .build())
                        .persistentVolumeClaim(EksPersistentVolumeClaimProperty.builder()
                                .claimName("claimName")

                                // the properties below are optional
                                .readOnly(false)
                                .build())
                        .secret(EksSecretProperty.builder()
                                .secretName("secretName")

                                // the properties below are optional
                                .optional(false)
                                .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 labels;
var limits;
var requests;

var eksPropertiesProperty = 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,
                Capabilities = new EksContainerLinuxCapabilitiesProperty {
                    Add = new [] { "add" },
                    Drop = new [] { "drop" }
                },
                Privileged = false,
                ReadOnlyRootFilesystem = false,
                RunAsGroup = 123,
                RunAsNonRoot = false,
                RunAsUser = 123,
                SeccompProfile = new EksSeccompProfileProperty {
                    Type = "type",

                    // the properties below are optional
                    LocalhostProfile = "localhostProfile"
                }
            },
            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,
                Capabilities = new EksContainerLinuxCapabilitiesProperty {
                    Add = new [] { "add" },
                    Drop = new [] { "drop" }
                },
                Privileged = false,
                ReadOnlyRootFilesystem = false,
                RunAsGroup = 123,
                RunAsNonRoot = false,
                RunAsUser = 123,
                SeccompProfile = new EksSeccompProfileProperty {
                    Type = "type",

                    // the properties below are optional
                    LocalhostProfile = "localhostProfile"
                }
            },
            VolumeMounts = new [] { new EksContainerVolumeMountProperty {
                MountPath = "mountPath",
                Name = "name",
                ReadOnly = false,
                SubPath = "subPath"
            } }
        } },
        Metadata = new MetadataProperty {
            Labels = labels
        },
        SecurityContext = new EksPodSecurityContextProperty {
            FsGroup = 123,
            RunAsGroup = 123,
            RunAsNonRoot = false,
            RunAsUser = 123,
            SeccompProfile = new EksSeccompProfileProperty {
                Type = "type",

                // the properties below are optional
                LocalhostProfile = "localhostProfile"
            }
        },
        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
            }
        } }
    }
};
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 labels interface{}
var limits interface{}
var requests interface{}

eksPropertiesProperty := &EksPropertiesProperty{
	PodProperties: &PodPropertiesProperty{
		Containers: []interface{}{
			&EksContainerProperty{
				Image: jsii.String("image"),

				// the properties below are optional
				Args: []*string{
					jsii.String("args"),
				},
				Command: []*string{
					jsii.String("command"),
				},
				Env: []interface{}{
					&EksContainerEnvironmentVariableProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Value: jsii.String("value"),
					},
				},
				ImagePullPolicy: jsii.String("imagePullPolicy"),
				Name: jsii.String("name"),
				Resources: &ResourcesProperty{
					Limits: limits,
					Requests: requests,
				},
				SecurityContext: &SecurityContextProperty{
					AllowPrivilegeEscalation: jsii.Boolean(false),
					Capabilities: &EksContainerLinuxCapabilitiesProperty{
						Add: []*string{
							jsii.String("add"),
						},
						Drop: []*string{
							jsii.String("drop"),
						},
					},
					Privileged: jsii.Boolean(false),
					ReadOnlyRootFilesystem: jsii.Boolean(false),
					RunAsGroup: jsii.Number(123),
					RunAsNonRoot: jsii.Boolean(false),
					RunAsUser: jsii.Number(123),
					SeccompProfile: &EksSeccompProfileProperty{
						Type: jsii.String("type"),

						// the properties below are optional
						LocalhostProfile: jsii.String("localhostProfile"),
					},
				},
				VolumeMounts: []interface{}{
					&EksContainerVolumeMountProperty{
						MountPath: jsii.String("mountPath"),
						Name: jsii.String("name"),
						ReadOnly: jsii.Boolean(false),
						SubPath: jsii.String("subPath"),
					},
				},
			},
		},
		DnsPolicy: jsii.String("dnsPolicy"),
		HostNetwork: jsii.Boolean(false),
		ImagePullSecrets: []interface{}{
			&ImagePullSecretProperty{
				Name: jsii.String("name"),
			},
		},
		InitContainers: []interface{}{
			&EksContainerProperty{
				Image: jsii.String("image"),

				// the properties below are optional
				Args: []*string{
					jsii.String("args"),
				},
				Command: []*string{
					jsii.String("command"),
				},
				Env: []interface{}{
					&EksContainerEnvironmentVariableProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Value: jsii.String("value"),
					},
				},
				ImagePullPolicy: jsii.String("imagePullPolicy"),
				Name: jsii.String("name"),
				Resources: &ResourcesProperty{
					Limits: limits,
					Requests: requests,
				},
				SecurityContext: &SecurityContextProperty{
					AllowPrivilegeEscalation: jsii.Boolean(false),
					Capabilities: &EksContainerLinuxCapabilitiesProperty{
						Add: []*string{
							jsii.String("add"),
						},
						Drop: []*string{
							jsii.String("drop"),
						},
					},
					Privileged: jsii.Boolean(false),
					ReadOnlyRootFilesystem: jsii.Boolean(false),
					RunAsGroup: jsii.Number(123),
					RunAsNonRoot: jsii.Boolean(false),
					RunAsUser: jsii.Number(123),
					SeccompProfile: &EksSeccompProfileProperty{
						Type: jsii.String("type"),

						// the properties below are optional
						LocalhostProfile: jsii.String("localhostProfile"),
					},
				},
				VolumeMounts: []interface{}{
					&EksContainerVolumeMountProperty{
						MountPath: jsii.String("mountPath"),
						Name: jsii.String("name"),
						ReadOnly: jsii.Boolean(false),
						SubPath: jsii.String("subPath"),
					},
				},
			},
		},
		Metadata: &MetadataProperty{
			Labels: labels,
		},
		SecurityContext: &EksPodSecurityContextProperty{
			FsGroup: jsii.Number(123),
			RunAsGroup: jsii.Number(123),
			RunAsNonRoot: jsii.Boolean(false),
			RunAsUser: jsii.Number(123),
			SeccompProfile: &EksSeccompProfileProperty{
				Type: jsii.String("type"),

				// the properties below are optional
				LocalhostProfile: jsii.String("localhostProfile"),
			},
		},
		ServiceAccountName: jsii.String("serviceAccountName"),
		ShareProcessNamespace: jsii.Boolean(false),
		Volumes: []interface{}{
			&EksVolumeProperty{
				Name: jsii.String("name"),

				// the properties below are optional
				EmptyDir: &EmptyDirProperty{
					Medium: jsii.String("medium"),
					SizeLimit: jsii.String("sizeLimit"),
				},
				HostPath: &HostPathProperty{
					Path: jsii.String("path"),
				},
				PersistentVolumeClaim: &EksPersistentVolumeClaimProperty{
					ClaimName: jsii.String("claimName"),

					// the properties below are optional
					ReadOnly: jsii.Boolean(false),
				},
				Secret: &EksSecretProperty{
					SecretName: jsii.String("secretName"),

					// the properties below are optional
					Optional: jsii.Boolean(false),
				},
			},
		},
	},
}

Properties ​

podPropertiesoptionalIResolvable | CfnJobDefinition.PodPropertiesPropertypod_propertiesoptionaltyping.Union[IResolvable, PodPropertiesProperty]podPropertiesoptionalIResolvablePodPropertiesoptionalIResolvablePodPropertiesoptionalinterface{} #
The properties for the Kubernetes pod resources of a job.