# CapacitySizeProperty

Struct · External

Specifies the type and size of the endpoint capacity to activate for a blue/green deployment, a rolling deployment, or a rollback strategy.

You can specify your batches as either instance count or the overall percentage or your fleet.

For a rollback strategy, if you don't specify the fields in this object, or if you set the `Value` to 100%, then SageMaker uses a blue/green rollback strategy and rolls all traffic back to the blue fleet.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 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_sagemaker as sagemaker } from 'aws-cdk-lib';
const capacitySizeProperty: sagemaker.CfnEndpoint.CapacitySizeProperty = {
  type: 'type',
  value: 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_sagemaker as sagemaker

capacity_size_property = sagemaker.CfnEndpoint.CapacitySizeProperty(
    type="type",
    value=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.sagemaker.*;

CapacitySizeProperty capacitySizeProperty = CapacitySizeProperty.builder()
        .type("type")
        .value(123)
        .build();
```

C#:

```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.Sagemaker;

var capacitySizeProperty = new CapacitySizeProperty {
    Type = "type",
    Value = 123
};
```

Go:

```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"

capacitySizeProperty := &CapacitySizeProperty{
	Type: jsii.String("type"),
	Value: jsii.Number(123),
}
```

## Properties

- `type`: string (required) — Specifies the endpoint capacity type.

  - `INSTANCE_COUNT` : The endpoint activates based on the number of instances.
  - `CAPACITY_PERCENT` : The endpoint activates based on the specified percentage of capacity.

- `value`: number (required) — Defines the capacity size, either as a number of instances or a capacity percentage.
