Skip to content
v2.278.0

ComputeCapacityProperty Struct ​

The desired capacity for a fleet.

Example ​

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
# 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
// 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();
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
};
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 ​

desiredInstancesoptionalnumberdesired_instancesoptionalint | floatdesiredInstancesoptionalNumberDesiredInstancesoptionaldoubleDesiredInstancesoptional*float64 #
The desired number of streaming instances.
desiredSessionsoptionalnumberdesired_sessionsoptionalint | floatdesiredSessionsoptionalNumberDesiredSessionsoptionaldoubleDesiredSessionsoptional*float64 #
The desired capacity in terms of number of user sessions, for the multi-session fleet.
notes

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.