# BatchRestrictionsProperty

Specifies restrictions for the batch build.

- Source: Generated at build time
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const batchRestrictionsProperty: codebuild.CfnProject.BatchRestrictionsProperty = {
  computeTypesAllowed: ['computeTypesAllowed'],
  fleetsAllowed: ['fleetsAllowed'],
  maximumBuildsAllowed: 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_codebuild as codebuild

batch_restrictions_property = codebuild.CfnProject.BatchRestrictionsProperty(
    compute_types_allowed=["computeTypesAllowed"],
    fleets_allowed=["fleetsAllowed"],
    maximum_builds_allowed=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.codebuild.*;

BatchRestrictionsProperty batchRestrictionsProperty = BatchRestrictionsProperty.builder()
        .computeTypesAllowed(List.of("computeTypesAllowed"))
        .fleetsAllowed(List.of("fleetsAllowed"))
        .maximumBuildsAllowed(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.CodeBuild;

var batchRestrictionsProperty = new BatchRestrictionsProperty {
    ComputeTypesAllowed = new [] { "computeTypesAllowed" },
    FleetsAllowed = new [] { "fleetsAllowed" },
    MaximumBuildsAllowed = 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"

batchRestrictionsProperty := &BatchRestrictionsProperty{
	ComputeTypesAllowed: []*string{
		jsii.String("computeTypesAllowed"),
	},
	FleetsAllowed: []*string{
		jsii.String("fleetsAllowed"),
	},
	MaximumBuildsAllowed: jsii.Number(123),
}
```

## Properties

- `computeTypesAllowed`: string[] — An array of strings that specify the compute types that are allowed for the batch build.

  See [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild User Guide* for these values.

- `fleetsAllowed`: string[]

- `maximumBuildsAllowed`: number — Specifies the maximum number of builds allowed.
