# ComputeCapacityProperty

The desired capacity for a fleet.

- Source: Generated at build time
- Type last changed: v2.97.0 · 22 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_appstream as appstream } from 'aws-cdk-lib';
const computeCapacityProperty: appstream.CfnFleet.ComputeCapacityProperty = {
  desiredInstances: 123,
  desiredSessions: 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_appstream as appstream

compute_capacity_property = appstream.CfnFleet.ComputeCapacityProperty(
    desired_instances=123,
    desired_sessions=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.appstream.*;

ComputeCapacityProperty computeCapacityProperty = ComputeCapacityProperty.builder()
        .desiredInstances(123)
        .desiredSessions(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.AppStream;

var computeCapacityProperty = new ComputeCapacityProperty {
    DesiredInstances = 123,
    DesiredSessions = 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"

computeCapacityProperty := &ComputeCapacityProperty{
	DesiredInstances: jsii.Number(123),
	DesiredSessions: jsii.Number(123),
}
```

## Properties

- `desiredInstances`: number — The desired number of streaming instances.

- `desiredSessions`: number — The desired capacity in terms of number of user sessions, for the multi-session fleet.

  This is not allowed for single-session fleets.

  When you create a fleet, you must set define either the DesiredSessions or DesiredInstances attribute, based on the type of fleet you create. You can’t define both attributes or leave both attributes blank.
