Azure DevTest Labs Users API

The Users API from Azure DevTest Labs — 2 operation(s) for users.

OpenAPI Specification

azure-test-labs-users-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: The DevTest Labs Client.
  title: DevTestLabsClient ArmTemplates Users API
  version: '2018-09-15'
  x-apisguru-categories:
  - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
  - format: swagger
    url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json
    version: '2.0'
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: devtestlabs-DTL
  x-tags:
  - Azure
  - Microsoft
host: management.azure.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- azure_auth:
  - user_impersonation
tags:
- name: Users
paths:
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users:
    get:
      description: List user profiles in a given lab.
      operationId: Users_List
      parameters:
      - $ref: '#/parameters/subscriptionId'
      - $ref: '#/parameters/resourceGroupName'
      - description: The name of the lab.
        in: path
        name: labName
        required: true
        type: string
        example: example-value
      - description: 'Specify the $expand query. Example: ''properties($select=identity)'''
        in: query
        name: $expand
        type: string
        example: example-value
      - description: 'The filter to apply to the operation. Example: ''$filter=contains(name,''myName'')'
        in: query
        name: $filter
        type: string
        example: example-value
      - description: 'The maximum number of resources to return from the operation. Example: ''$top=10'''
        format: int32
        in: query
        name: $top
        type: integer
        example: example-value
      - description: 'The ordering expression for the results, using OData notation. Example: ''$orderby=name desc'''
        in: query
        name: $orderby
        type: string
        example: example-value
      - $ref: '#/parameters/api-version'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/UserList'
        default:
          description: BadRequest
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Users
      x-ms-odata: '#/definitions/User'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Azure DevTest Labs Users_ List
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}
  : delete:
      description: Delete user profile. This operation can take a while to complete.
      operationId: Users_Delete
      parameters:
      - $ref: '#/parameters/subscriptionId'
      - $ref: '#/parameters/resourceGroupName'
      - description: The name of the lab.
        in: path
        name: labName
        required: true
        type: string
        example: example-value
      - description: The name of the user profile.
        in: path
        name: name
        required: true
        type: string
        example: example-value
      - $ref: '#/parameters/api-version'
      responses:
        '200':
          description: OK
        '202':
          description: Accepted
        '204':
          description: No Content
        default:
          description: BadRequest
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Users
      x-ms-long-running-operation: true
      summary: Azure DevTest Labs Users_ Delete
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get user profile.
      operationId: Users_Get
      parameters:
      - $ref: '#/parameters/subscriptionId'
      - $ref: '#/parameters/resourceGroupName'
      - description: The name of the lab.
        in: path
        name: labName
        required: true
        type: string
        example: example-value
      - description: The name of the user profile.
        in: path
        name: name
        required: true
        type: string
        example: example-value
      - description: 'Specify the $expand query. Example: ''properties($select=identity)'''
        in: query
        name: $expand
        type: string
        example: example-value
      - $ref: '#/parameters/api-version'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/User'
        default:
          description: BadRequest
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Users
      summary: Azure DevTest Labs Users_ Get
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Allows modifying tags of user profiles. All other properties will be ignored.
      operationId: Users_Update
      parameters:
      - $ref: '#/parameters/subscriptionId'
      - $ref: '#/parameters/resourceGroupName'
      - description: The name of the lab.
        in: path
        name: labName
        required: true
        type: string
        example: example-value
      - description: The name of the user profile.
        in: path
        name: name
        required: true
        type: string
        example: example-value
      - description: Profile of a lab user.
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/UserFragment'
        example: example-value
      - $ref: '#/parameters/api-version'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/User'
        default:
          description: BadRequest
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Users
      summary: Azure DevTest Labs Users_ Update
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      description: Create or replace an existing user profile. This operation can take a while to complete.
      operationId: Users_CreateOrUpdate
      parameters:
      - $ref: '#/parameters/subscriptionId'
      - $ref: '#/parameters/resourceGroupName'
      - description: The name of the lab.
        in: path
        name: labName
        required: true
        type: string
        example: example-value
      - description: The name of the user profile.
        in: path
        name: name
        required: true
        type: string
        example: example-value
      - description: Profile of a lab user.
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/User'
        example: example-value
      - $ref: '#/parameters/api-version'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/User'
        '201':
          description: Created
          schema:
            $ref: '#/definitions/User'
        default:
          description: BadRequest
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Users
      x-ms-long-running-operation: true
      summary: Azure DevTest Labs Users_ Create or Update
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
definitions:
  UserProperties:
    description: Properties of a lab user profile.
    properties:
      createdDate:
        description: The creation date of the user profile.
        format: date-time
        readOnly: true
        type: string
      identity:
        $ref: '#/definitions/UserIdentity'
        description: The identity of the user.
      provisioningState:
        description: The provisioning status of the resource.
        readOnly: true
        type: string
      secretStore:
        $ref: '#/definitions/UserSecretStore'
        description: The secret store of the user.
      uniqueIdentifier:
        description: The unique immutable identifier of a resource (Guid).
        readOnly: true
        type: string
    type: object
  Resource:
    description: An Azure resource.
    properties:
      id:
        description: The identifier of the resource.
        readOnly: true
        type: string
      location:
        description: The location of the resource.
        type: string
      name:
        description: The name of the resource.
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: The tags of the resource.
        type: object
      type:
        description: The type of the resource.
        readOnly: true
        type: string
    type: object
    x-ms-azure-resource: true
  UserIdentity:
    description: Identity attributes of a lab user.
    properties:
      appId:
        description: Set to the app Id of the client JWT making the request.
        type: string
      objectId:
        description: Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
        type: string
      principalId:
        description: Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
        type: string
      principalName:
        description: Set to the principal name / UPN of the client JWT making the request.
        type: string
      tenantId:
        description: Set to the tenant ID of the client JWT making the request.
        type: string
    type: object
  User:
    allOf:
    - $ref: '#/definitions/Resource'
    description: Profile of a lab user.
    properties:
      properties:
        $ref: '#/definitions/UserProperties'
        description: The properties of the resource.
        x-ms-client-flatten: true
    type: object
  CloudError:
    description: Error from a REST request.
    properties:
      error:
        $ref: '#/definitions/CloudErrorBody'
        description: The cloud error that occurred
    type: object
    x-ms-external: true
  UserList:
    description: The response of a list operation.
    properties:
      nextLink:
        description: Link for next set of results.
        type: string
      value:
        description: Results of the list operation.
        items:
          $ref: '#/definitions/User'
        type: array
    type: object
  UserPropertiesFragment:
    description: Properties of a lab user profile.
    properties:
      identity:
        $ref: '#/definitions/UserIdentityFragment'
        description: The identity of the user.
      secretStore:
        $ref: '#/definitions/UserSecretStoreFragment'
        description: The secret store of the user.
    type: object
  UserSecretStoreFragment:
    description: Properties of a user's secret store.
    properties:
      keyVaultId:
        description: The ID of the user's Key vault.
        type: string
      keyVaultUri:
        description: The URI of the user's Key vault.
        type: string
    type: object
  UserSecretStore:
    description: Properties of a user's secret store.
    properties:
      keyVaultId:
        description: The ID of the user's Key vault.
        type: string
      keyVaultUri:
        description: The URI of the user's Key vault.
        type: string
    type: object
  CloudErrorBody:
    description: Body of an error from a REST request.
    properties:
      code:
        description: The error code.
        type: string
      details:
        description: Inner errors.
        items:
          $ref: '#/definitions/CloudErrorBody'
        type: array
      message:
        description: The error message.
        type: string
      target:
        description: The error target.
        type: string
    type: object
    x-ms-external: true
  UpdateResource:
    description: Represents an update resource
    properties:
      tags:
        additionalProperties:
          type: string
        description: The tags of the resource.
        type: object
    type: object
  UserFragment:
    allOf:
    - $ref: '#/definitions/UpdateResource'
    description: Profile of a lab user.
    properties:
      properties:
        $ref: '#/definitions/UserPropertiesFragment'
        description: The properties of the resource.
        x-ms-client-flatten: true
    type: object
  UserIdentityFragment:
    description: Identity attributes of a lab user.
    properties:
      appId:
        description: Set to the app Id of the client JWT making the request.
        type: string
      objectId:
        description: Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
        type: string
      principalId:
        description: Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
        type: string
      principalName:
        description: Set to the principal name / UPN of the client JWT making the request.
        type: string
      tenantId:
        description: Set to the tenant ID of the client JWT making the request.
        type: string
    type: object
parameters:
  resourceGroupName:
    description: The name of the resource group.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  subscriptionId:
    description: The subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
  api-version:
    default: '2018-09-15'
    description: Client API version.
    in: query
    name: api-version
    required: true
    type: string
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: OAuth2 Implicit Grant
    flow: implicit
    scopes:
      user_impersonation: Access Microsoft Azure
    type: oauth2