Menu
Amazon AppStream 2.0
API Reference (API Version 2016-12-01)

DescribeSessions

Describes the streaming sessions for a stack and a fleet. If a user ID is provided, this operation returns streaming sessions for only that user. To retrieve the next set of items, pass this value for the nextToken parameter in a subsequent call to this operation. If an authentication type is not provided, the operation defaults to users authenticated using a streaming URL.

Request Syntax

Copy
{ "AuthenticationType": "string", "FleetName": "string", "Limit": number, "NextToken": "string", "StackName": "string", "UserId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AuthenticationType

The authentication method of the user. It can be API for a user authenticated using a streaming URL, or SAML for a SAML federated user. If an authentication type is not provided, the operation defaults to users authenticated using a streaming URL.

Type: String

Valid Values: API | SAML | USERPOOL

Required: No

FleetName

The name of the fleet for which to list sessions.

Type: String

Length Constraints: Minimum length of 1.

Required: Yes

Limit

The size of each page of results. The default value is 20 and the maximum supported value is 50.

Type: Integer

Required: No

NextToken

The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Type: String

Length Constraints: Minimum length of 1.

Required: No

StackName

The name of the stack for which to list sessions.

Type: String

Length Constraints: Minimum length of 1.

Required: Yes

UserId

The user for whom to list sessions. Use null to describe all the sessions for the stack and fleet.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 32.

Required: No

Response Syntax

Copy
{ "NextToken": "string", "Sessions": [ { "AuthenticationType": "string", "FleetName": "string", "Id": "string", "StackName": "string", "State": "string", "UserId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.

Type: String

Length Constraints: Minimum length of 1.

Sessions

The list of streaming sessions.

Type: Array of Session objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidParameterCombinationException

Indicates an incorrect combination of parameters, or a missing parameter.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: