CapacityLimitProperty Struct
Defines the capacity limit for a service environment.
This structure specifies the maximum amount of resources that can be used by service jobs in the environment.
| Source | |
|---|---|
| Type last changed |
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';
const capacityLimitProperty: batch.CfnServiceEnvironment.CapacityLimitProperty = {
capacityUnit: 'capacityUnit',
maxCapacity: 123,
};
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
capacity_limit_property = batch.CfnServiceEnvironment.CapacityLimitProperty(
capacity_unit="capacityUnit",
max_capacity=123
)
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.*;
CapacityLimitProperty capacityLimitProperty = CapacityLimitProperty.builder()
.capacityUnit("capacityUnit")
.maxCapacity(123)
.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 capacityLimitProperty = new CapacityLimitProperty {
CapacityUnit = "capacityUnit",
MaxCapacity = 123
};
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"
capacityLimitProperty := &CapacityLimitProperty{
CapacityUnit: jsii.String("capacityUnit"),
MaxCapacity: jsii.Number(123),
}
Properties
capacityUnitoptionalstringcapacity_unitoptionalstrcapacityUnitoptionalStringCapacityUnitoptionalstringCapacityUnitoptional*string #The unit of measure for the capacity limit.
This defines how the maxCapacity value should be interpreted. For SAGEMAKER_TRAINING jobs, use NUM_INSTANCES .
maxCapacityoptionalnumbermax_capacityoptionalint | floatmaxCapacityoptionalNumberMaxCapacityoptionaldoubleMaxCapacityoptional*float64 #The maximum capacity available for the service environment.
notes
This value represents the maximum amount resources that can be allocated to service jobs.
For example, maxCapacity=50 , capacityUnit=NUM_INSTANCES . This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.