Type: String Required: No NextToken
The token to use to retrieve the next page of results.
Type: String Required: No Filters
Additional filters to apply to the request. Supported filters include:
• tag:key—The tags assigned to the session.
• owner—The session owner.
Type: String Required: No
Response parameters
Id
The unique ID of the session.
Name
The name of the session.
Owner
The owner of the session.
Server
Information about the server on which the session is running. This data structure includes the following nested response parameters:
• Ip
The IP address of the NICE DCV server host.
• Hostname
The hostname of the NICE DCV server host.
• Port
The port over which the NICE DCV server communicates with NICE DCV clients.
• Tags
The tags assigned to the session. This data structure includes the following nested response parameters:
• Key The tag key.
Example
• Value The tag value.
Type
The type of session.
State
The current state of the session. Possible values are:
• CREATING - the Broker is in the process of creating the session.
• READY - the session is ready to accept client connections.
• DELETING - the session is being deleted.
• DELETED - the session has been deleted.
• UNKNOWN - unable to determine the session's state. The Broker and the Agent might be unable to communicate.
CreationTime
The date and time the session was created.
LastDisconnectionTime
The date and time of the last client disconnection.
NumOfConnections
The number of active client connections.
StorageRoot
Specifies the path to the folder used for session storage. For more information about the NICE DCV session storage, see Enabling Session Storage in the NICE DCV Administrator Guide.
Type: String Required: No
Example
Python Request
The following example describes sessions that are owned by user1 and have a tag of os=windows.
from swagger_client.models.describe_sessions_request_data import DescribeSessionsRequestData
from swagger_client.models.key_value_pair import KeyValuePair def get_sessions_api():
api_instance =
swagger_client.SessionsApi(swagger_client.ApiClient(get_client_configuration()))
Example
set_request_headers(api_instance.api_client) return api_instance
def describe_sessions(session_ids=None, next_token=None, tags=None, owner=None):
filters = list()
filter_key_value_pair = KeyValuePair(key='owner', value=owner) filters.append(filter_key_value_pair)
request = DescribeSessionsRequestData(session_ids=session_ids, filters=filters, next_token=next_token)
print('Describe Sessions Request:', request) api_instance = get_sessions_api()
api_response = api_instance.describe_sessions(body=request) print('Describe Sessions Response', api_response)
def main():
describe_sessions(
owner='user1',
tags=[{'Key': 'os', 'Value': 'windows'}])
Response
The following is the sample output.
{ "Sessions": [
"LastDisconnectionTime": "2020-10-06T10:15:31.633Z", "NumOfConnections": 2,
DeleteSessions
"Port": "1222", "Tags": [ {
"Key": "os", "Value": "windows"
}, {
"Key": "ram", "Value": "4gb"
} ] },
"Type": "VIRTUAL", "State": "DELETING",
"CreationTime": "2020-10-06T10:15:31.633Z",
"LastDisconnectionTime": "2020-10-06T10:15:31.633Z", "NumOfConnections": 2,
"StorageRoot" : "/storage/root"
} ] }
DeleteSessions
Deletes the specified NICE DCV session and removes it from the Broker's cache.
Topics
• Request parameters (p. 4)
• Response parameters (p. 7)
• Example (p. 8)
Request parameters
SessionId
The ID of the session to delete.
Type: String Required: Yes Owner
The owner of the session to delete.
Type: String Required: Yes Force
Removes a session from the Broker's cache with attempting to delete it from the NICE DCV server.
This is useful for removing outdated sessions from the Broker's cache. For example, if a NICE DCV server was stopped, but the sessions are still registered on the Broker, use this flag to purge the sessions from the Broker's cache.
Keep in mind that if the session is still active, it is re-cached by the Broker.
Response parameters
Valid values: true | false Type: Boolean
Required: No
Response parameters
SessionId
The ID of the session State
Only returned if the sessions were successfully deleted. Indicates the current state of the session.
If the request completes successfully, the session transitions to the DELETING state. It could take a few minutes for the session to be deleted. When it has been deleted, the state transitions from DELETING to DELETED.
FailureReason
Only returned if some sessions could not be deleted. Indicates why the session could not be deleted.
Example
Python Request
The following example deletes two sessions—a session with an ID of SessionId123 that is owned by user1, and a session with an ID of SessionIdabc that is owned by user99.
from swagger_client.models.delete_session_request_data import DeleteSessionRequestData def get_sessions_api():
api_instance =
swagger_client.SessionsApi(swagger_client.ApiClient(get_client_configuration())) set_request_headers(api_instance.api_client)
return api_instance
def delete_sessions(sessions_to_delete, force=False):
delete_sessions_request = list()
for session_id, owner in sessions_to_delete:
a_request = DeleteSessionRequestData(session_id=session_id, owner=owner, force=force)
delete_sessions_request.append(a_request)
print('Delete Sessions Request:', delete_sessions_request) api_instance = get_sessions_api()
api_response = api_instance.delete_sessions(body=delete_sessions_request) print('Delete Sessions Response', api_response)
def main():
delete_sessions([('SessionId123', 'an owner user1'), ('SessionIdabc', 'user99')])
Response
The following is the sample output. SessionId123 was successfully deleted, while SessionIdabc could not be deleted.
GetSessionConnectionData
{ "RequestId": "10311636-df90-4cd1-bcf7-474e9675b7cd", "SuccessfulList": [
{
"SessionId": "SessionId123", "State": "DELETING"
} ],
"UnsuccessfulList": [ {
"SessionId": "SessionIdabc",
"FailureReason": "The requested dcvSession does not exist"
} ] }
GetSessionConnectionData
Gets connection information for a specific user's connection to a specific NICE DCV session.
Topics
• Request parameters (p. 4)
• Response parameters (p. 7)
• Additional info (p. 29)
• Example (p. 8)
Request parameters
SessionId
The ID of the session for which to view connection information.
Type: String Required: Yes User
The name of the user for which to view connection information.
Type: String Required: Yes
Response parameters
Id
The unique ID of the session.
Name
The name of the session.
Response parameters
Owner
The owner of the session.
Server
Information about the server on which the session is running. This data structure includes the following nested response parameters:
• Ip
The IP address of the NICE DCV server host.
• Hostname
The hostname of the NICE DCV server host.
• Port
The port over which the NICE DCV server communicates with NICE DCV clients.
• WebUrlPath
The path to the NICE DCV server's configuration file.
• Tags
The tags assigned to the session. This data structure includes the following nested response parameters:
• Key The tag key.
• Value The tag value.
Type
The type of session.
State
The current state of the session. Possible values are:
• CREATING - the Broker is in the process of creating the session.
• READY - the session is ready to accept client connections.
• DELETING - the session is being deleted.
• DELETED - the session has been deleted.
• UNKNOWN - unable to determine the session's state. The Broker and the Agent might be unable to communicate.
CreationTime
The date and time the session was created.
LastDisconnectionTime
The date and time of the last client disconnection.