# CfnServiceEnvironmentProps

Properties for defining a `CfnServiceEnvironment`.

Used as props by: [CfnServiceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnServiceEnvironment.html)

- Source: Generated at build time
- Type last changed: v2.211.0 · 13 Aug 2025

## 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';
const cfnServiceEnvironmentProps: batch.CfnServiceEnvironmentProps = {
  capacityLimits: [{
    capacityUnit: 'capacityUnit',
    maxCapacity: 123,
  }],
  serviceEnvironmentType: 'serviceEnvironmentType',

  // the properties below are optional
  serviceEnvironmentName: 'serviceEnvironmentName',
  state: 'state',
  tags: {
    tagsKey: 'tags',
  },
};
```

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

cfn_service_environment_props = batch.CfnServiceEnvironmentProps(
    capacity_limits=[batch.CfnServiceEnvironment.CapacityLimitProperty(
        capacity_unit="capacityUnit",
        max_capacity=123
    )],
    service_environment_type="serviceEnvironmentType",

    # the properties below are optional
    service_environment_name="serviceEnvironmentName",
    state="state",
    tags={
        "tags_key": "tags"
    }
)
```

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.*;

CfnServiceEnvironmentProps cfnServiceEnvironmentProps = CfnServiceEnvironmentProps.builder()
        .capacityLimits(List.of(CapacityLimitProperty.builder()
                .capacityUnit("capacityUnit")
                .maxCapacity(123)
                .build()))
        .serviceEnvironmentType("serviceEnvironmentType")

        // the properties below are optional
        .serviceEnvironmentName("serviceEnvironmentName")
        .state("state")
        .tags(Map.of(
                "tagsKey", "tags"))
        .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;

var cfnServiceEnvironmentProps = new CfnServiceEnvironmentProps {
    CapacityLimits = new [] { new CapacityLimitProperty {
        CapacityUnit = "capacityUnit",
        MaxCapacity = 123
    } },
    ServiceEnvironmentType = "serviceEnvironmentType",

    // the properties below are optional
    ServiceEnvironmentName = "serviceEnvironmentName",
    State = "state",
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
```

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"

cfnServiceEnvironmentProps := &CfnServiceEnvironmentProps{
	CapacityLimits: []interface{}{
		&CapacityLimitProperty{
			CapacityUnit: jsii.String("capacityUnit"),
			MaxCapacity: jsii.Number(123),
		},
	},
	ServiceEnvironmentType: jsii.String("serviceEnvironmentType"),

	// the properties below are optional
	ServiceEnvironmentName: jsii.String("serviceEnvironmentName"),
	State: jsii.String("state"),
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}
```

## Properties

- `capacityLimits`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServiceEnvironment.CapacityLimitProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnServiceEnvironment.CapacityLimitProperty.html)[] (required) — The capacity limits for the service environment.

  This defines the maximum resources that can be used by service jobs in this environment.

- `serviceEnvironmentName`: string — The name of the service environment.

- `serviceEnvironmentType`: string (required) — The type of service environment.

  For SageMaker Training jobs, this value is `SAGEMAKER_TRAINING` .

- `state`: string — The state of the service environment.

  Valid values are `ENABLED` and `DISABLED` .

- `tags`: { [key: string]: string } — The tags associated with the service environment.

  Each tag consists of a key and an optional value. For more information, see [Tagging your AWS Batch resources](https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html) .
