Azure Bastion Bastion Hosts API

The BastionHosts API from Azure Bastion — 9 operation(s) for bastionhosts.

GitHub OpenAPI

Operations 12

DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName} Bastion hosts delete #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName} Bastion hosts get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName} Bastion hosts create or update #
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName} Bastion hosts update tags #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts Bastion hosts list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts Bastion hosts list by resource group #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken Delete bastion shareable link by token #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions Get active sessions #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions Disconnect active sessions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-bastion:microsoft-azure-bastion-bastionhosts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-bastion-bastionhosts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NetworkManagementClient Bastion Hosts API
  description: The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.
  version: '2025-03-01'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: BastionHosts
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}
  : delete:
      tags:
      - BastionHosts
      operationId: BastionHosts_Delete
      description: Deletes the specified Bastion Host.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '202':
          description: Accepted and the operation will complete asynchronously.
        '204':
          description: Request successful. Resource with the specified name does not exist.
        '200':
          description: Delete successful.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      summary: Bastion hosts delete
      x-summary-source: derived
    get:
      tags:
      - BastionHosts
      operationId: BastionHosts_Get
      description: Gets the specified Bastion Host.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: Request successful. The operation returns an BastionHost resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHost'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Bastion hosts get
      x-summary-source: derived
    put:
      tags:
      - BastionHosts
      operationId: BastionHosts_CreateOrUpdate
      description: Creates or updates the specified Bastion Host.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '201':
          description: Create successful. The operation returns the resulting Bastion Host resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHost'
        '200':
          description: Update successful. The operation returns the resulting Bastion Host resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHost'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BastionHost'
        description: Parameters supplied to the create or update Bastion Host operation.
        required: true
      summary: Bastion hosts create or update
      x-summary-source: derived
    patch:
      tags:
      - BastionHosts
      operationId: BastionHosts_UpdateTags
      description: Updates Tags for BastionHost resource
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Update successful. The operation returns the resulting BastionHost resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHost'
        '202':
          description: Accepted and the operation will complete asynchronously.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagsObject'
        description: Parameters supplied to update BastionHost tags.
        required: true
      summary: Bastion hosts update tags
      x-summary-source: derived
  /subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts:
    get:
      tags:
      - BastionHosts
      operationId: BastionHosts_List
      description: Lists all Bastion Hosts in a subscription.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: Success. The operation returns a list of Bastion Host resources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHostListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Bastion hosts list
      x-summary-source: derived
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts:
    get:
      tags:
      - BastionHosts
      operationId: BastionHosts_ListByResourceGroup
      description: Lists all Bastion Hosts in a resource group.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: Success. The operation returns a list of BastionHost resources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionHostListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Bastion hosts list by resource group
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks
  : post:
      tags:
      - BastionHosts
      operationId: PutBastionShareableLink
      description: Creates a Bastion Shareable Links for all the VMs specified in the request.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/BastionShareableLinkRequest'
      responses:
        '200':
          description: Success. The operation returns a list of shareable links for the specified VMs, giving appropriate error messages as needed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionShareableLinkListResult'
        '202':
          description: Accepted and the operation will complete asynchronously.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Put bastion shareable link
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks
  : post:
      tags:
      - BastionHosts
      operationId: DeleteBastionShareableLink
      description: Deletes the Bastion Shareable Links for all the VMs specified in the request.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/BastionShareableLinkRequest'
      responses:
        '200':
          description: Success. The operation deleted the BastionShareableLinks associated with the VMs, if they existed. No return body.
        '202':
          description: Accepted and the operation will complete asynchronously.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      summary: Delete bastion shareable link
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken
  : post:
      tags:
      - BastionHosts
      operationId: DeleteBastionShareableLinkByToken
      description: Deletes the Bastion Shareable Links for all the tokens specified in the request.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/BastionShareableLinkTokenRequest'
      responses:
        '202':
          description: Accepted and the operation will complete asynchronously.
          headers:
            Location:
              schema:
                type: string
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      summary: Delete bastion shareable link by token
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks
  : post:
      tags:
      - BastionHosts
      operationId: GetBastionShareableLink
      description: Return the Bastion Shareable Links for all the VMs specified in the request.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/BastionShareableLinkRequest'
      responses:
        '200':
          description: Success. The operation returns a list of shareable links for the specified VMs, giving appropriate error messages as needed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionShareableLinkListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Get bastion shareable link
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions
  : post:
      tags:
      - BastionHosts
      operationId: GetActiveSessions
      description: Returns the list of currently active sessions on the Bastion.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: Success. The operation returns a list of active sessions on the Bastion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionActiveSessionListResult'
        '202':
          description: Accepted and the operation will complete asynchronously.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Get active sessions
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions
  : post:
      tags:
      - BastionHosts
      operationId: DisconnectActiveSessions
      description: Returns the list of currently active sessions on the Bastion.
      parameters:
      - $ref: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/BastionHostName'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/SessionIdsParameters'
      responses:
        '200':
          description: Success. The operation returns a list of sessions with the state of deleted/failed/not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BastionSessionDeleteResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Disconnect active sessions
      x-summary-source: derived
components:
  schemas:
    BastionHostIPConfiguration:
      properties:
        properties:
          x-ms-client-flatten: true
          $ref: '#/components/schemas/BastionHostIPConfigurationPropertiesFormat'
          description: Represents the ip configuration associated with the resource.
        name:
          type: string
          description: Name of the resource that is unique within a resource group. This name can be used to access the resource.
        etag:
          type: string
          readOnly: true
          description: A unique read-only string that changes whenever the resource is updated.
        type:
          readOnly: true
          type: string
          description: Ip configuration type.
      allOf:
      - $ref: '#/components/schemas/SubResource'
      description: IP configuration of an Bastion Host.
    BastionShareableLinkTokenListRequest:
      type: object
      properties:
        tokens:
          type: array
          items:
            type: string
          description: List of Bastion Shareable Link Token.
      description: Post request for Delete Bastion Shareable Link By Token endpoint.
    Sku:
      description: The sku of this Bastion Host.
      properties:
        name:
          type: string
          description: The name of the sku of this Bastion Host.
          enum:
          - Basic
          - Standard
          - Developer
          - Premium
          default: Standard
          x-ms-enum:
            name: BastionHostSkuName
            modelAsString: true
      type: object
    BastionShareableLinkListRequest:
      properties:
        vms:
          type: array
          items:
            $ref: '#/components/schemas/BastionShareableLink'
          description: List of VM references.
      description: Post request for Create/Delete/Get Bastion Shareable Link endpoints.
    BastionActiveSessionListResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/BastionActiveSession'
          description: List of active sessions on the bastion.
        nextLink:
          type: string
          description: The URL to get the next set of results.
      description: Response for GetActiveSessions.
    CloudError:
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: Cloud error body.
      description: An error response from the service.
    BastionSessionState:
      properties:
        sessionId:
          type: string
          readOnly: true
          description: A unique id for the session.
        message:
          type: string
          readOnly: true
          description: Used for extra information.
        state:
          type: string
          readOnly: true
          description: The state of the session. Disconnected/Failed/NotFound.
      description: The session state detail for a target.
    BastionHost:
      properties:
        properties:
          x-ms-client-flatten: true
          $ref: '#/components/schemas/BastionHostPropertiesFormat'
          description: Represents the bastion host resource.
        zones:
          type: array
          items:
            type: string
          description: A list of availability zones denoting where the resource needs to come from.
        etag:
          type: string
          readOnly: true
          description: A unique read-only string that changes whenever the resource is updated.
        sku:
          description: The sku of this Bastion Host.
          $ref: '#/components/schemas/Sku'
      allOf:
      - $ref: '#/components/schemas/Resource'
      description: Bastion Host resource.
    BastionHostIPConfigurationPropertiesFormat:
      properties:
        subnet:
          $ref: '#/components/schemas/SubResource'
          description: Reference of the subnet resource.
        publicIPAddress:
          $ref: '#/components/schemas/SubResource'
          description: Reference of the PublicIP resource. Null for private only bastion
        provisioningState:
          readOnly: true
          $ref: '#/components/schemas/ProvisioningState'
          description: The provisioning state of the bastion host IP configuration resource.
        privateIPAllocationMethod:
          $ref: '#/components/schemas/IPAllocationMethod'
          description: Private IP allocation method.
      required:
      - subnet
      description: Properties of IP configuration of an Bastion Host.
    BastionShareableLink:
      properties:
        vm:
          $ref: '#/components/schemas/VM'
          description: Reference of the virtual machine resource.
        bsl:
          type: string
          readOnly: true
          description: The unique Bastion Shareable Link to the virtual machine.
        createdAt:
          type: string
          readOnly: true
          description: The time when the link was created.
        message:
          type: string
          readOnly: true
          description: Optional field indicating the warning or error message related to the vm in case of partial failure.
      required:
      - vm
      description: Bastion Shareable Link.
    TagsObject:
      properties:
        tags:
          type: object
          additionalProperties:
            type: string
          description: Resource tags.
      description: Tags object for patch operations.
    IPAllocationMethod:
      type: string
      description: IP address allocation method.
      enum:
      - Static
      - Dynamic
      x-ms-enum:
        name: IPAllocationMethod
        modelAsString: true
    IPRule:
      properties:
        addressPrefix:
          type: string
          description: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
      type: object
    SubResource:
      properties:
        id:
          type: string
          description: Resource ID.
      description: Reference to another subresource.
      x-ms-azure-resource: true
    VM:
      allOf:
      - $ref: '#/components/schemas/Resource'
      description: Describes a Virtual Machine.
    BastionShareableLinkListResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/BastionShareableLink'
          description: List of Bastion Shareable Links for the request.
        nextLink:
          type: string
          description: The URL to get the next set of results.
      description: Response for all the Bastion Shareable Link endpoints.
    Resource:
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          readOnly: true
          type: string
          description: Resource name.
        type:
          readOnly: true
          type: string
          description: Resource type.
        location:
          type: string
          description: Resource location.
        tags:
          type: object
          additionalProperties:
            type: string
          description: Resource tags.
      description: Common resource representation.
      x-ms-azure-resource: true
    BastionHostListResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/BastionHost'
          description: List of Bastion Hosts in a resource group.
        nextLink:
          type: string
          description: URL to get the next set of results.
      description: Response for ListBastionHosts API service call.
    ProvisioningState:
      type: string
      readOnly: true
      description: The current provisioning state.
      enum:
      - Succeeded
      - Updating
      - Deleting
      - Failed
      x-ms-enum:
        name: ProvisioningState
        modelAsString: true
    SessionIds:
      properties:
        sessionIds:
          type: array
          items:
            type: string
          description: List of session IDs.
      description: List of session IDs.
    BastionHostPropertiesFormat:
      properties:
        ipConfigurations:
          type: array
          items:
            $ref: '#/components/schemas/BastionHostIPConfiguration'
          description: IP configuration of the Bastion Host resource.
        dnsName:
          type: string
          description: FQDN for the endpoint on which bastion host is accessible.
        virtualNetwork:
          $ref: '#/components/schemas/SubResource'
          description: Reference to an existing virtual network required for Developer Bastion Host only.
        networkAcls:
          properties:
            ipRules:
              type: array
              items:
                description: IP rule with specific IP or IP range in CIDR format.
                $ref: '#/components/schemas/IPRule'
              description: Sets the IP ACL rules for Developer Bastion Host.
        provisioningState:
          readOnly: true
          $ref: '#/components/schemas/ProvisioningState'
          description: The provisioning state of the bastion host resource.
        scaleUnits:
          type: integer
          format: int32
          description: The scale units for the Bastion Host resource.
          minimum: 2
          maximum: 50
        disableCopyPaste:
          type: boolean
          default: false
          description: Enable/Disable Copy/Paste feature of the Bastion Host resource.
        enableFileCopy:
          type: boolean
          default: false
          description: Enable/Disable File Copy feature of the Bastion Host resource.
        enableIpConnect:
          type: boolean
          default: false
          description: Enable/Disable IP Connect feature of the Bastion Host resource.
        enableShareableLink:
          type: boolean
          default: false
          description: Enable/Disable Shareable Link of the Bastion Host resource.
        enableTunneling:
          type: boolean
          default: false
          description: Enable/Disable Tunneling feature of the Bastion Host resource.
        enableKerberos:
          type: boolean
          default: false
          description: Enable/Disable Kerberos feature of the Bastion Host resource.
        enableSessionRecording:
          type: boolean
          default: false
          description: Enable/Disable Session Recording feature of the Bastion Host resource.
        enablePrivateOnlyBastion:
          type: boolean
          default: false
          description: Enable/Disable Private Only feature of the Bastion Host resource.
      description: Properties of the Bastion Host.
    BastionActiveSession:
      properties:
        sessionId:
          type: string
          readOnly: true
          description: A unique id for the session.
        startTime:
          type: object
          readOnly: true
          description: The time when the session started.
        targetSubscriptionId:
          type: string
          readOnly: true
          description: The subscription id for the target virtual machine.
        resourceType:
          type: string
          readOnly: true
          description: The type of the resource.
        targetHostName:
          type: string
          readOnly: true
          description: The host name of the target.
        targetResourceGroup:
          type: string
          readOnly: true
          description: The resource group of the target.
        userName:
          type: string
          readOnly: true
          description: The user name who is active on this session.
        targetIpAddress:
          type: string
          readOnly: true
          description: The IP Address of the target.
        protocol:
          type: string
          readOnly: true
          description: The protocol used to connect to the target.
          enum:
          - SSH
          - RDP
          x-ms-enum:
            name: BastionConnectProtocol
            modelAsString: true
        targetResourceId:
          type: string
          readOnly: true
          description: The resource id of the target.
        sessionDurationInMins:
          type: number
          readOnly: true
          description: Duration in mins the session has been active.
      description: The session detail for a target.
    BastionSessionDeleteResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/BastionSessionState'
          description: List of sessions with their corresponding state.
        nextLink:
          type: string
          description: The URL to get the next set of results.
      description: Response for DisconnectActiveSessions.
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client API version.
      schema:
        type: string
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
      schema:
        type: string
    BastionShareableLinkTokenRequest:
      name: bslTokenRequest
      in: body
      required: true
      schema:
        $ref: '#/components/schemas/BastionShareableLinkTokenListRequest'
      description: Post request for Delete Bastion Shareable Link By Token endpoint.
      x-ms-parameter-location: method
    SessionIdsParameters:
      name: sessionIds
      in: body
      required: true
      schema:
        $ref: '#/components/schemas/SessionIds'
      description: The list of sessionids to disconnect.
      x-ms-parameter-location: method
    BastionShareableLinkRequest:
      name: bslRequest
      in: body
      required: true
      schema:
        $ref: '#/components/schemas/BastionShareableLinkListRequest'
      description: Post request for Create/Delete/Get Bastion Shareable Link endpoints.
      x-ms-parameter-location: method
    ResourceGroupName:
      name: resourceGroupName
      in: path
      required: true
      description: The name of the resource group.
      x-ms-parameter-location: method
      schema:
        type: string
    BastionHostName:
      name: bastionHostName
      in: path
      required: true
      description: The name of the Bastion Host.
      x-ms-parameter-location: method
      schema:
        type: string
  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.