# UnmanagedComputeEnvironmentProps

Represents an UnmanagedComputeEnvironment.

Batch will not provision instances on your behalf
in this ComputeEvironment.

Extends: [ComputeEnvironmentProps](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.ComputeEnvironmentProps.html)
Used as props by: [UnmanagedComputeEnvironment](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.UnmanagedComputeEnvironment.html)

- Source: [`aws-batch/lib/unmanaged-compute-environment.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-batch/lib/unmanaged-compute-environment.ts#L30)
- Type last changed: v2.96.0 · 13 Sep 2023

## Example

TypeScript:

```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';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const unmanagedComputeEnvironmentProps: batch.UnmanagedComputeEnvironmentProps = {
  computeEnvironmentName: 'computeEnvironmentName',
  enabled: false,
  serviceRole: role,
  unmanagedvCpus: 123,
};
```

Python:

```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
from aws_cdk import aws_iam as iam

# role: iam.Role

unmanaged_compute_environment_props = batch.UnmanagedComputeEnvironmentProps(
    compute_environment_name="computeEnvironmentName",
    enabled=False,
    service_role=role,
    unmanagedv_cpus=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.services.batch.*;
import software.amazon.awscdk.services.iam.*;

Role role;

UnmanagedComputeEnvironmentProps unmanagedComputeEnvironmentProps = UnmanagedComputeEnvironmentProps.builder()
        .computeEnvironmentName("computeEnvironmentName")
        .enabled(false)
        .serviceRole(role)
        .unmanagedvCpus(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.AWS.Batch;
using Amazon.CDK.AWS.IAM;

Role role;

var unmanagedComputeEnvironmentProps = new UnmanagedComputeEnvironmentProps {
    ComputeEnvironmentName = "computeEnvironmentName",
    Enabled = false,
    ServiceRole = role,
    UnmanagedvCpus = 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 "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

unmanagedComputeEnvironmentProps := &UnmanagedComputeEnvironmentProps{
	ComputeEnvironmentName: jsii.String("computeEnvironmentName"),
	Enabled: jsii.Boolean(false),
	ServiceRole: role,
	UnmanagedvCpus: jsii.Number(123),
}
```

## Properties

- `computeEnvironmentName`: string — The name of the ComputeEnvironment.

  **Default:** generated by CloudFormation

- `enabled`: boolean = true — Whether or not this ComputeEnvironment can accept jobs from a Queue.

  Enabled ComputeEnvironments can accept jobs from a Queue and
  can scale instances up or down.
  Disabled ComputeEnvironments cannot accept jobs from a Queue or
  scale instances up or down.

  If you change a ComputeEnvironment from enabled to disabled while it is executing jobs,
  Jobs in the `STARTED` or `RUNNING` states will not
  be interrupted. As jobs complete, the ComputeEnvironment will scale instances down to `minvCpus`.

  To ensure you aren't billed for unused capacity, set `minvCpus` to `0`.

- `serviceRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.

  **Default:** a serviceRole will be created for managed CEs, none for unmanaged CEs

- `unmanagedvCpus`: number = 0 — The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in `Queue`s that use `FairshareSchedulingPolicy`s.

  **If this parameter is not provided on a fairshare queue, no capacity is reserved**;
  that is, the `FairshareSchedulingPolicy` is ignored.
