From 8e3c248319464415579b5dcea13d5f1c6b784090 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 26 Oct 2023 18:27:14 +0000 Subject: [PATCH] feat(client-appstream): This release introduces multi-session fleets, allowing customers to provision more than one user session on a single fleet instance. --- .../src/commands/CreateFleetCommand.ts | 9 ++- .../src/commands/DescribeFleetsCommand.ts | 5 ++ .../src/commands/DescribeSessionsCommand.ts | 2 + .../src/commands/UpdateFleetCommand.ts | 11 ++- .../client-appstream/src/models/models_0.ts | 72 ++++++++++++++++- .../src/protocols/Aws_json1_1.ts | 2 + codegen/sdk-codegen/aws-models/appstream.json | 78 +++++++++++++++++-- 7 files changed, 167 insertions(+), 12 deletions(-) diff --git a/clients/client-appstream/src/commands/CreateFleetCommand.ts b/clients/client-appstream/src/commands/CreateFleetCommand.ts index 6d6d88230323..2b69519923a3 100644 --- a/clients/client-appstream/src/commands/CreateFleetCommand.ts +++ b/clients/client-appstream/src/commands/CreateFleetCommand.ts @@ -51,7 +51,8 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB * InstanceType: "STRING_VALUE", // required * FleetType: "ALWAYS_ON" || "ON_DEMAND" || "ELASTIC", * ComputeCapacity: { // ComputeCapacity - * DesiredInstances: Number("int"), // required + * DesiredInstances: Number("int"), + * DesiredSessions: Number("int"), * }, * VpcConfig: { // VpcConfig * SubnetIds: [ // SubnetIdList @@ -85,6 +86,7 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB * S3Bucket: "STRING_VALUE", // required * S3Key: "STRING_VALUE", * }, + * MaxSessionsPerInstance: Number("int"), * }; * const command = new CreateFleetCommand(input); * const response = await client.send(command); @@ -103,6 +105,10 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB * // Running: Number("int"), * // InUse: Number("int"), * // Available: Number("int"), + * // DesiredUserSessions: Number("int"), + * // AvailableUserSessions: Number("int"), + * // ActiveUserSessions: Number("int"), + * // ActualUserSessions: Number("int"), * // }, * // MaxUserDurationInSeconds: Number("int"), * // DisconnectTimeoutInSeconds: Number("int"), @@ -139,6 +145,7 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB * // S3Bucket: "STRING_VALUE", // required * // S3Key: "STRING_VALUE", * // }, + * // MaxSessionsPerInstance: Number("int"), * // }, * // }; * diff --git a/clients/client-appstream/src/commands/DescribeFleetsCommand.ts b/clients/client-appstream/src/commands/DescribeFleetsCommand.ts index 994541e7e10f..37fb0bff8518 100644 --- a/clients/client-appstream/src/commands/DescribeFleetsCommand.ts +++ b/clients/client-appstream/src/commands/DescribeFleetsCommand.ts @@ -68,6 +68,10 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met * // Running: Number("int"), * // InUse: Number("int"), * // Available: Number("int"), + * // DesiredUserSessions: Number("int"), + * // AvailableUserSessions: Number("int"), + * // ActiveUserSessions: Number("int"), + * // ActualUserSessions: Number("int"), * // }, * // MaxUserDurationInSeconds: Number("int"), * // DisconnectTimeoutInSeconds: Number("int"), @@ -104,6 +108,7 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met * // S3Bucket: "STRING_VALUE", // required * // S3Key: "STRING_VALUE", * // }, + * // MaxSessionsPerInstance: Number("int"), * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-appstream/src/commands/DescribeSessionsCommand.ts b/clients/client-appstream/src/commands/DescribeSessionsCommand.ts index 7caf23659c65..5e770093d8e7 100644 --- a/clients/client-appstream/src/commands/DescribeSessionsCommand.ts +++ b/clients/client-appstream/src/commands/DescribeSessionsCommand.ts @@ -53,6 +53,7 @@ export interface DescribeSessionsCommandOutput extends DescribeSessionsResult, _ * NextToken: "STRING_VALUE", * Limit: Number("int"), * AuthenticationType: "API" || "SAML" || "USERPOOL" || "AWS_AD", + * InstanceId: "STRING_VALUE", * }; * const command = new DescribeSessionsCommand(input); * const response = await client.send(command); @@ -72,6 +73,7 @@ export interface DescribeSessionsCommandOutput extends DescribeSessionsResult, _ * // EniPrivateIpAddress: "STRING_VALUE", * // EniId: "STRING_VALUE", * // }, + * // InstanceId: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-appstream/src/commands/UpdateFleetCommand.ts b/clients/client-appstream/src/commands/UpdateFleetCommand.ts index 730bc0328ebf..5d995b769fd5 100644 --- a/clients/client-appstream/src/commands/UpdateFleetCommand.ts +++ b/clients/client-appstream/src/commands/UpdateFleetCommand.ts @@ -71,7 +71,8 @@ export interface UpdateFleetCommandOutput extends UpdateFleetResult, __MetadataB * Name: "STRING_VALUE", * InstanceType: "STRING_VALUE", * ComputeCapacity: { // ComputeCapacity - * DesiredInstances: Number("int"), // required + * DesiredInstances: Number("int"), + * DesiredSessions: Number("int"), * }, * VpcConfig: { // VpcConfig * SubnetIds: [ // SubnetIdList @@ -93,7 +94,7 @@ export interface UpdateFleetCommandOutput extends UpdateFleetResult, __MetadataB * }, * IdleDisconnectTimeoutInSeconds: Number("int"), * AttributesToDelete: [ // FleetAttributes - * "VPC_CONFIGURATION" || "VPC_CONFIGURATION_SECURITY_GROUP_IDS" || "DOMAIN_JOIN_INFO" || "IAM_ROLE_ARN" || "USB_DEVICE_FILTER_STRINGS" || "SESSION_SCRIPT_S3_LOCATION", + * "VPC_CONFIGURATION" || "VPC_CONFIGURATION_SECURITY_GROUP_IDS" || "DOMAIN_JOIN_INFO" || "IAM_ROLE_ARN" || "USB_DEVICE_FILTER_STRINGS" || "SESSION_SCRIPT_S3_LOCATION" || "MAX_SESSIONS_PER_INSTANCE", * ], * IamRoleArn: "STRING_VALUE", * StreamView: "APP" || "DESKTOP", @@ -106,6 +107,7 @@ export interface UpdateFleetCommandOutput extends UpdateFleetResult, __MetadataB * S3Bucket: "STRING_VALUE", // required * S3Key: "STRING_VALUE", * }, + * MaxSessionsPerInstance: Number("int"), * }; * const command = new UpdateFleetCommand(input); * const response = await client.send(command); @@ -124,6 +126,10 @@ export interface UpdateFleetCommandOutput extends UpdateFleetResult, __MetadataB * // Running: Number("int"), * // InUse: Number("int"), * // Available: Number("int"), + * // DesiredUserSessions: Number("int"), + * // AvailableUserSessions: Number("int"), + * // ActiveUserSessions: Number("int"), + * // ActualUserSessions: Number("int"), * // }, * // MaxUserDurationInSeconds: Number("int"), * // DisconnectTimeoutInSeconds: Number("int"), @@ -160,6 +166,7 @@ export interface UpdateFleetCommandOutput extends UpdateFleetResult, __MetadataB * // S3Bucket: "STRING_VALUE", // required * // S3Key: "STRING_VALUE", * // }, + * // MaxSessionsPerInstance: Number("int"), * // }, * // }; * diff --git a/clients/client-appstream/src/models/models_0.ts b/clients/client-appstream/src/models/models_0.ts index 87c28d41b9cb..53bd091659db 100644 --- a/clients/client-appstream/src/models/models_0.ts +++ b/clients/client-appstream/src/models/models_0.ts @@ -1224,7 +1224,14 @@ export interface ComputeCapacity { * @public *

The desired number of streaming instances.

*/ - DesiredInstances: number | undefined; + DesiredInstances?: number; + + /** + * @public + *

The desired number of user sessions for a multi-session fleet. This is not allowed for single-session fleets.

+ *

When you create a fleet, you must set 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.

+ */ + DesiredSessions?: number; } /** @@ -1256,6 +1263,36 @@ export interface ComputeCapacityStatus { * sessions.

*/ Available?: number; + + /** + * @public + *

The total number of sessions slots that are either running or pending. This represents the total number of concurrent streaming sessions your fleet can support in a steady state.

+ *

DesiredUserSessionCapacity = ActualUserSessionCapacity + PendingUserSessionCapacity

+ *

This only applies to multi-session fleets.

+ */ + DesiredUserSessions?: number; + + /** + * @public + *

The number of idle session slots currently available for user sessions.

+ *

AvailableUserSessionCapacity = ActualUserSessionCapacity - ActiveUserSessions

+ *

This only applies to multi-session fleets.

+ */ + AvailableUserSessions?: number; + + /** + * @public + *

The number of user sessions currently being used for streaming sessions. This only applies to multi-session fleets.

+ */ + ActiveUserSessions?: number; + + /** + * @public + *

The total number of session slots that are available for streaming or are currently streaming.

+ *

ActualUserSessionCapacity = AvailableUserSessionCapacity + ActiveUserSessions

+ *

This only applies to multi-session fleets.

+ */ + ActualUserSessions?: number; } /** @@ -2209,7 +2246,7 @@ export interface CreateFleetRequest { /** * @public *

The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance.

- *

Specify a value between 600 and 360000.

+ *

Specify a value between 600 and 432000.

*/ MaxUserDurationInSeconds?: number; @@ -2312,6 +2349,12 @@ export interface CreateFleetRequest { *

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

*/ SessionScriptS3Location?: S3Location; + + /** + * @public + *

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

+ */ + MaxSessionsPerInstance?: number; } /** @@ -2627,6 +2670,12 @@ export interface Fleet { *

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

*/ SessionScriptS3Location?: S3Location; + + /** + * @public + *

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

+ */ + MaxSessionsPerInstance?: number; } /** @@ -4684,6 +4733,12 @@ export interface DescribeSessionsRequest { * The default is to authenticate users using a streaming URL.

*/ AuthenticationType?: AuthenticationType; + + /** + * @public + *

The identifier for the instance hosting the session.

+ */ + InstanceId?: string; } /** @@ -4780,6 +4835,12 @@ export interface Session { *

The network details for the streaming session.

*/ NetworkAccessConfiguration?: NetworkAccessConfiguration; + + /** + * @public + *

The identifier for the instance hosting the session.

+ */ + InstanceId?: string; } /** @@ -5284,6 +5345,7 @@ export interface ExpireSessionResult {} export const FleetAttribute = { DOMAIN_JOIN_INFO: "DOMAIN_JOIN_INFO", IAM_ROLE_ARN: "IAM_ROLE_ARN", + MAX_SESSIONS_PER_INSTANCE: "MAX_SESSIONS_PER_INSTANCE", SESSION_SCRIPT_S3_LOCATION: "SESSION_SCRIPT_S3_LOCATION", USB_DEVICE_FILTER_STRINGS: "USB_DEVICE_FILTER_STRINGS", VPC_CONFIGURATION: "VPC_CONFIGURATION", @@ -6142,6 +6204,12 @@ export interface UpdateFleetRequest { *

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

*/ SessionScriptS3Location?: S3Location; + + /** + * @public + *

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

+ */ + MaxSessionsPerInstance?: number; } /** diff --git a/clients/client-appstream/src/protocols/Aws_json1_1.ts b/clients/client-appstream/src/protocols/Aws_json1_1.ts index 7819577fad9e..4d4830215282 100644 --- a/clients/client-appstream/src/protocols/Aws_json1_1.ts +++ b/clients/client-appstream/src/protocols/Aws_json1_1.ts @@ -6359,6 +6359,7 @@ const de_Fleet = (output: any, context: __SerdeContext): Fleet => { ImageName: __expectString, InstanceType: __expectString, MaxConcurrentSessions: __expectInt32, + MaxSessionsPerInstance: __expectInt32, MaxUserDurationInSeconds: __expectInt32, Name: __expectString, Platform: __expectString, @@ -6549,6 +6550,7 @@ const de_Session = (output: any, context: __SerdeContext): Session => { ConnectionState: __expectString, FleetName: __expectString, Id: __expectString, + InstanceId: __expectString, MaxExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), NetworkAccessConfiguration: _json, StackName: __expectString, diff --git a/codegen/sdk-codegen/aws-models/appstream.json b/codegen/sdk-codegen/aws-models/appstream.json index fa9f98e7b123..0389d02b3166 100644 --- a/codegen/sdk-codegen/aws-models/appstream.json +++ b/codegen/sdk-codegen/aws-models/appstream.json @@ -1206,9 +1206,13 @@ "DesiredInstances": { "target": "com.amazonaws.appstream#Integer", "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The desired number of streaming instances.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The desired number of streaming instances.

" + } + }, + "DesiredSessions": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The desired number of user sessions for a multi-session fleet. This is not allowed for single-session fleets.

\n

When you create a fleet, you must set 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.

" } } }, @@ -1244,6 +1248,30 @@ "traits": { "smithy.api#documentation": "

The number of currently available instances that can be used to stream\n sessions.

" } + }, + "DesiredUserSessions": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The total number of sessions slots that are either running or pending. This represents the total number of concurrent streaming sessions your fleet can support in a steady state.

\n

DesiredUserSessionCapacity = ActualUserSessionCapacity + PendingUserSessionCapacity

\n

This only applies to multi-session fleets.

" + } + }, + "AvailableUserSessions": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The number of idle session slots currently available for user sessions.

\n

AvailableUserSessionCapacity = ActualUserSessionCapacity - ActiveUserSessions

\n

This only applies to multi-session fleets.

" + } + }, + "ActiveUserSessions": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The number of user sessions currently being used for streaming sessions. This only applies to multi-session fleets.

" + } + }, + "ActualUserSessions": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The total number of session slots that are available for streaming or are currently streaming.

\n

ActualUserSessionCapacity = AvailableUserSessionCapacity + ActiveUserSessions

\n

This only applies to multi-session fleets.

" + } } }, "traits": { @@ -2033,7 +2061,7 @@ "MaxUserDurationInSeconds": { "target": "com.amazonaws.appstream#Integer", "traits": { - "smithy.api#documentation": "

The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance.

\n

Specify a value between 600 and 360000.

" + "smithy.api#documentation": "

The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance.

\n

Specify a value between 600 and 432000.

" } }, "DisconnectTimeoutInSeconds": { @@ -2113,6 +2141,12 @@ "traits": { "smithy.api#documentation": "

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

" } + }, + "MaxSessionsPerInstance": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

" + } } }, "traits": { @@ -4261,7 +4295,7 @@ "type": "structure", "members": { "StackName": { - "target": "com.amazonaws.appstream#String", + "target": "com.amazonaws.appstream#Name", "traits": { "smithy.api#clientOptional": {}, "smithy.api#documentation": "

The name of the stack. This value is case-sensitive.

", @@ -4269,7 +4303,7 @@ } }, "FleetName": { - "target": "com.amazonaws.appstream#String", + "target": "com.amazonaws.appstream#Name", "traits": { "smithy.api#clientOptional": {}, "smithy.api#documentation": "

The name of the fleet. This value is case-sensitive.

", @@ -4299,6 +4333,12 @@ "traits": { "smithy.api#documentation": "

The authentication method. Specify API for a user\n authenticated using a streaming URL or SAML for a SAML federated user. \n The default is to authenticate users using a streaming URL.

" } + }, + "InstanceId": { + "target": "com.amazonaws.appstream#String", + "traits": { + "smithy.api#documentation": "

The identifier for the instance hosting the session.

" + } } }, "traits": { @@ -5437,6 +5477,12 @@ "traits": { "smithy.api#documentation": "

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

" } + }, + "MaxSessionsPerInstance": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

" + } } }, "traits": { @@ -5481,6 +5527,12 @@ "traits": { "smithy.api#enumValue": "SESSION_SCRIPT_S3_LOCATION" } + }, + "MAX_SESSIONS_PER_INSTANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAX_SESSIONS_PER_INSTANCE" + } } }, "traits": { @@ -8156,6 +8208,12 @@ "traits": { "smithy.api#documentation": "

The network details for the streaming session.

" } + }, + "InstanceId": { + "target": "com.amazonaws.appstream#String", + "traits": { + "smithy.api#documentation": "

The identifier for the instance hosting the session.

" + } } }, "traits": { @@ -9543,7 +9601,7 @@ } }, "Name": { - "target": "com.amazonaws.appstream#String", + "target": "com.amazonaws.appstream#Name", "traits": { "smithy.api#documentation": "

A unique name for the fleet.

" } @@ -9656,6 +9714,12 @@ "traits": { "smithy.api#documentation": "

The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets.

" } + }, + "MaxSessionsPerInstance": { + "target": "com.amazonaws.appstream#Integer", + "traits": { + "smithy.api#documentation": "

The maximum number of user sessions on an instance. This only applies to multi-session fleets.

" + } } }, "traits": {