Amazon WorkSpaces Web

2024/09/19 - Amazon WorkSpaces Web - 3 new api methods

Changes  WorkSpaces Secure Browser now enables Administrators to view and manage end-user browsing sessions via Session Management APIs.

ExpireSession (new) Link ¶

Expires an active secure browser session.

See also: AWS API Documentation

Request Syntax

client.expire_session(
    portalId='string',
    sessionId='string'
)
type portalId:

string

param portalId:

[REQUIRED]

The ID of the web portal for the session.

type sessionId:

string

param sessionId:

[REQUIRED]

The ID of the session to expire.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetSession (new) Link ¶

Gets information for a secure browser session.

See also: AWS API Documentation

Request Syntax

client.get_session(
    portalId='string',
    sessionId='string'
)
type portalId:

string

param portalId:

[REQUIRED]

The ID of the web portal for the session.

type sessionId:

string

param sessionId:

[REQUIRED]

The ID of the session.

rtype:

dict

returns:

Response Syntax

{
    'session': {
        'clientIpAddresses': [
            'string',
        ],
        'endTime': datetime(2015, 1, 1),
        'portalArn': 'string',
        'sessionId': 'string',
        'startTime': datetime(2015, 1, 1),
        'status': 'Active'|'Terminated',
        'username': 'string'
    }
}

Response Structure

  • (dict) --

    • session (dict) --

      The sessions in a list.

      • clientIpAddresses (list) --

        The IP address of the client.

        • (string) --

      • endTime (datetime) --

        The end time of the session.

      • portalArn (string) --

        The ARN of the web portal.

      • sessionId (string) --

        The ID of the session.

      • startTime (datetime) --

        The start time of the session.

      • status (string) --

        The status of the session.

      • username (string) --

        The username of the session.

ListSessions (new) Link ¶

Lists information for multiple secure browser sessions from a specific portal.

See also: AWS API Documentation

Request Syntax

client.list_sessions(
    maxResults=123,
    nextToken='string',
    portalId='string',
    sessionId='string',
    sortBy='StartTimeAscending'|'StartTimeDescending',
    status='Active'|'Terminated',
    username='string'
)
type maxResults:

integer

param maxResults:

The maximum number of results to be included in the next page.

type nextToken:

string

param nextToken:

The pagination token used to retrieve the next page of results for this operation.

type portalId:

string

param portalId:

[REQUIRED]

The ID of the web portal for the sessions.

type sessionId:

string

param sessionId:

The ID of the session.

type sortBy:

string

param sortBy:

The method in which the returned sessions should be sorted.

type status:

string

param status:

The status of the session.

type username:

string

param username:

The username of the session.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'sessions': [
        {
            'endTime': datetime(2015, 1, 1),
            'portalArn': 'string',
            'sessionId': 'string',
            'startTime': datetime(2015, 1, 1),
            'status': 'Active'|'Terminated',
            'username': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The pagination token used to retrieve the next page of results for this operation.

    • sessions (list) --

      The sessions in a list.

      • (dict) --

        Summary information about a secure browser session.

        • endTime (datetime) --

          The end time of the session.

        • portalArn (string) --

          The ARN of the web portal.

        • sessionId (string) --

          The ID of the session.

        • startTime (datetime) --

          The start time of the session.

        • status (string) --

          The status of the session.

        • username (string) --

          The username of the session.