openapi: 3.2.0 info: version: 2023-11-01-preview title: Microsoft Azure Desktop Virtualization API Client User… servers: - url: https://management.azure.com tags: - name: User Session paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions : get: tags: - User Session operationId: microsoftAzureUsersessionsListbyhostpool description: List userSessions. x-ms-examples: UserSession_ListByHostPool: $ref: ./examples/UserSession_ListByHostPool.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - name: $filter in: query required: false description: OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. schema: type: string - name: pageSize in: query required: false description: Number of items per page. schema: type: integer format: int32 - name: isDescending in: query required: false description: Indicates whether the collection is descending. schema: type: boolean - name: initialSkip in: query required: false description: Initial number of items to skip. schema: type: integer format: int32 responses: '200': description: Successfully retrieved user sessions in host pool. content: application/json: schema: $ref: '#/components/schemas/UserSessionList' default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' x-ms-pageable: nextLinkName: nextLink summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId} : get: tags: - User Session operationId: microsoftAzureUsersessionsGet description: Get a userSession. x-ms-examples: UserSession_Get: $ref: ./examples/UserSession_Get.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - $ref: '#/components/parameters/SessionHostNameParameter' - $ref: '#/components/parameters/UserSessionIdParameter' responses: '200': description: Successfully retrieved user session. content: application/json: schema: $ref: '#/components/schemas/UserSession' default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… delete: tags: - User Session operationId: microsoftAzureUsersessionsDelete description: Remove a userSession. x-ms-examples: UserSession_Delete: $ref: ./examples/UserSession_Delete.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - $ref: '#/components/parameters/SessionHostNameParameter' - $ref: '#/components/parameters/UserSessionIdParameter' - name: force in: query required: false description: Force flag to login off userSession. schema: type: boolean responses: '200': description: Successfully removed user session. '204': description: User session does not exist. default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions : get: tags: - User Session operationId: microsoftAzureUsersessionsList description: List userSessions. x-ms-examples: UserSession_List: $ref: ./examples/UserSession_List.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - $ref: '#/components/parameters/SessionHostNameParameter' - name: pageSize in: query required: false description: Number of items per page. schema: type: integer format: int32 - name: isDescending in: query required: false description: Indicates whether the collection is descending. schema: type: boolean - name: initialSkip in: query required: false description: Initial number of items to skip. schema: type: integer format: int32 responses: '200': description: Successfully retrieved user sessions in session host. content: application/json: schema: $ref: '#/components/schemas/UserSessionList' default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' x-ms-pageable: nextLinkName: nextLink summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect : post: tags: - User Session operationId: microsoftAzureUsersessionsDisconnect description: Disconnect a userSession. x-ms-examples: UserSession_Disconnect_Post: $ref: ./examples/UserSession_Disconnect_Post.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - $ref: '#/components/parameters/SessionHostNameParameter' - $ref: '#/components/parameters/UserSessionIdParameter' responses: '200': description: Successfully disconnected user session. default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage : post: tags: - User Session operationId: microsoftAzureUsersessionsSendmessage description: Send a message to a user. x-ms-examples: UserSession_SendMessage_Post: $ref: ./examples/UserSession_SendMessage_Post.json parameters: - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/HostPoolNameParameter' - $ref: '#/components/parameters/SessionHostNameParameter' - $ref: '#/components/parameters/UserSessionIdParameter' responses: '200': description: Successfully sent message to user session. default: description: Automation error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… requestBody: content: application/json: schema: $ref: '#/components/schemas/SendMessage' description: Object containing message includes title and message body components: schemas: CloudError: description: Cloud error object. type: object x-ms-external: true properties: error: $ref: '#/components/schemas/CloudErrorProperties' UserSession: type: object description: Represents a UserSession definition. allOf: - $ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/Resource properties: systemData: $ref: ../../../../../common-types/resource-management/v2/types.json#/definitions/systemData description: Metadata pertaining to creation and last modification of the resource. properties: description: Detailed properties for UserSession x-ms-client-flatten: true $ref: '#/components/schemas/UserSessionProperties' UserSessionList: type: object title: UserSessionList description: List of UserSession definitions. properties: value: type: array description: List of UserSession definitions. items: $ref: '#/components/schemas/UserSession' nextLink: type: string readOnly: true description: Link to the next page of results. CloudErrorProperties: description: Cloud error object properties. type: object properties: code: description: Error code type: string message: description: Error message indicating why the operation failed. type: string SendMessage: description: Represents message sent to a UserSession. type: object properties: messageTitle: type: string description: Title of message. messageBody: type: string description: Body of message. UserSessionProperties: description: Schema for UserSession properties. type: object properties: objectId: type: string description: ObjectId of user session. (internal use) readOnly: true userPrincipalName: type: string description: The user principal name. applicationType: enum: - RemoteApp - Desktop x-ms-enum: name: ApplicationType modelAsString: true type: string description: Application type of application. sessionState: enum: - Unknown - Active - Disconnected - Pending - LogOff - UserProfileDiskMounted x-ms-enum: name: SessionState modelAsString: true type: string description: State of user session. activeDirectoryUserName: type: string description: The active directory user name. createTime: format: date-time type: string description: The timestamp of the user session create. parameters: SessionHostNameParameter: name: sessionHostName in: path required: true description: The name of the session host within the specified host pool x-ms-parameter-location: method schema: type: string maxLength: 48 minLength: 3 HostPoolNameParameter: name: hostPoolName in: path required: true description: The name of the host pool within the specified resource group x-ms-parameter-location: method schema: type: string maxLength: 64 minLength: 3 UserSessionIdParameter: name: userSessionId in: path required: true description: The name of the user session within the specified session host x-ms-parameter-location: method schema: type: string maxLength: 24 minLength: 1 securitySchemes: azure_auth: type: oauth2 flows: implicit: scopes: user_impersonation: impersonate your user account authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: Azure Active Directory OAuth2 Flow