# BatchContainerOverrides

The overrides that should be sent to a container.

- Source: [`aws-stepfunctions-tasks/lib/batch/submit-job.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/batch/submit-job.ts#L13)

## Example

TypeScript:

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

declare const instanceType: ec2.InstanceType;
declare const size: cdk.Size;
const batchContainerOverrides: stepfunctions_tasks.BatchContainerOverrides = {
  command: ['command'],
  environment: {
    environmentKey: 'environment',
  },
  gpuCount: 123,
  instanceType: instanceType,
  memory: size,
  vcpus: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# instance_type: ec2.InstanceType
# size: cdk.Size

batch_container_overrides = stepfunctions_tasks.BatchContainerOverrides(
    command=["command"],
    environment={
        "environment_key": "environment"
    },
    gpu_count=123,
    instance_type=instance_type,
    memory=size,
    vcpus=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.stepfunctions.tasks.*;

InstanceType instanceType;
Size size;

BatchContainerOverrides batchContainerOverrides = BatchContainerOverrides.builder()
        .command(List.of("command"))
        .environment(Map.of(
                "environmentKey", "environment"))
        .gpuCount(123)
        .instanceType(instanceType)
        .memory(size)
        .vcpus(123)
        .build();
```

C# / .NET:

```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;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.StepFunctions.Tasks;

InstanceType instanceType;
Size size;

var batchContainerOverrides = new BatchContainerOverrides {
    Command = new [] { "command" },
    Environment = new Dictionary<string, string> {
        { "environmentKey", "environment" }
    },
    GpuCount = 123,
    InstanceType = instanceType,
    Memory = size,
    Vcpus = 123
};
```

Golang:

```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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var instanceType InstanceType
var size Size

batchContainerOverrides := &BatchContainerOverrides{
	Command: []*string{
		jsii.String("command"),
	},
	Environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	GpuCount: jsii.Number(123),
	InstanceType: instanceType,
	Memory: size,
	Vcpus: jsii.Number(123),
}
```

## Properties

- `command`: string[] — The command to send to the container that overrides the default command from the Docker image or the job definition.

  **Default:** No command overrides

- `environment`: { [key: string]: string } — The environment variables to send to the container.

  **Default:** No environment overrides

  You can add new environment variables, which are added to the container
  at launch, or you can override the existing environment variables from
  the Docker image or the job definition.

- `gpuCount`: number — The number of physical GPUs to reserve for the container.

  **Default:** No GPU reservation

  The number of GPUs reserved for all containers in a job
  should not exceed the number of available GPUs on the compute
  resource that the job is launched on.

- `instanceType`: [InstanceType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InstanceType.html) — The instance type to use for a multi-node parallel job.

  **Default:** No instance type overrides

  This parameter is not valid for single-node container jobs.

- `memory`: [Size](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Size.html) — Memory reserved for the job.

  **Default:** No memory overrides. The memory supplied in the job definition will be used.

- `vcpus`: number — The number of vCPUs to reserve for the container.

  **Default:** No vCPUs overrides

  This value overrides the value set in the job definition.
