swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: The Hybrid Compute Management Client.
  title: HybridComputeManagementClient
  version: 2019-03-18-preview
  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/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2019-03-18/HybridCompute.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: hybridcompute-HybridCompute
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  SubscriptionIdParameter:
    description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  /providers/Microsoft.HybridCompute/operations:
    get:
      description: Gets a list of hybrid compute operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - operations
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines":
    get:
      description: Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines.
      operationId: Machines_ListBySubscription
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MachineListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines":
    get:
      description: Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines.
      operationId: Machines_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MachineListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}":
    delete:
      description: The operation to remove a hybrid machine identity in Azure.
      operationId: Machines_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the hybrid machine.
          in: path
          name: name
          required: true
          type: string
      responses:
        "200":
          description: OK
        "204":
          description: No Content
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
    get:
      description: Retrieves information about the model view or the instance view of a hybrid machine.
      operationId: Machines_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the hybrid machine.
          in: path
          name: name
          required: true
          type: string
        - description: The expand expression to apply on the operation.
          enum:
            - instanceView
          in: query
          name: $expand
          required: false
          type: string
          x-ms-enum:
            modelAsString: false
            name: InstanceViewTypes
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Machine"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
    patch:
      description: The operation to update a hybrid machine.
      operationId: Machines_Update
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the hybrid machine.
          in: path
          name: name
          required: true
          type: string
        - description: Parameters supplied to the Update hybrid machine operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/MachineUpdate"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Machine"
        "204":
          description: No Content
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
    put:
      description: The operation to create or update a hybrid machine resource identity in Azure.
      operationId: Machines_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the hybrid machine.
          in: path
          name: name
          required: true
          type: string
        - description: Parameters supplied to the Create hybrid machine operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Machine"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Machine"
        "204":
          description: No Content
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect":
    post:
      description: The operation to reconnect a hybrid machine resource to its identity in Azure.
      operationId: Machines_Reconnect
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the hybrid machine.
          in: path
          name: name
          required: true
          type: string
        - description: Parameters supplied to the Reconnect hybrid machine operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/MachineReconnect"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Machine"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - machines
      x-ms-examples: {}
definitions:
  ErrorDetail:
    properties:
      code:
        description: The error's code.
        type: string
      details:
        description: Additional error details.
        items:
          $ref: "#/definitions/ErrorDetail"
        type: array
      message:
        description: A human readable error message.
        type: string
      target:
        description: Indicates which property in the request is responsible for the error.
        type: string
    required:
      - code
      - message
    title: Error details.
    type: object
  ErrorResponse:
    description: Contains details when the response code indicates an error.
    properties:
      error:
        $ref: "#/definitions/ErrorDetail"
        description: The error details.
    required:
      - error
    title: Error response.
    type: object
  Identity:
    properties:
      principalId:
        description: The identity's principal id.
        readOnly: true
        type: string
      tenantId:
        description: The identity's tenant id.
        readOnly: true
        type: string
      type:
        description: The identity type.
        type: string
    title: Managed Identity.
    type: object
  Machine:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Describes a hybrid machine.
    properties:
      properties:
        $ref: "#/definitions/MachineProperties"
        description: Hybrid Compute Machine properties
        x-ms-client-flatten: true
  MachineListResult:
    description: The List hybrid machine operation response.
    properties:
      nextLink:
        description: The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of hybrid machines.
        type: string
      value:
        description: The list of hybrid machines.
        items:
          $ref: "#/definitions/Machine"
        type: array
    required:
      - value
  MachineProperties:
    description: Describes the properties of a hybrid machine.
    properties:
      agentVersion:
        description: The hybrid machine agent full version.
        readOnly: true
        type: string
      clientPublicKey:
        description: Public Key that the client provides to be used during initial resource onboarding
        type: string
      displayName:
        description: Specifies the hybrid machine display name.
        readOnly: true
        type: string
      errorDetails:
        description: Details about the error state.
        items:
          $ref: "#/definitions/ErrorDetail"
        readOnly: true
        type: array
      lastStatusChange:
        description: The time of the last status change.
        format: date-time
        readOnly: true
        type: string
      machineFqdn:
        description: Specifies the hybrid machine FQDN.
        readOnly: true
        type: string
      osName:
        description: The Operating System running on the hybrid machine.
        readOnly: true
        type: string
      osProfile:
        $ref: "#/definitions/OSProfile"
        description: Specifies the operating system settings for the hybrid machine.
      osVersion:
        description: The version of Operating System running on the hybrid machine.
        readOnly: true
        type: string
      physicalLocation:
        description: Resource's Physical Location
        type: string
      provisioningState:
        description: The provisioning state, which only appears in the response.
        readOnly: true
        type: string
      status:
        description: The status of the hybrid machine agent.
        enum:
          - Connected
          - Disconnected
          - Error
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: false
          name: StatusTypes
      vmId:
        description: Specifies the hybrid machine unique ID.
        readOnly: true
        type: string
  MachineReconnect:
    description: Describes a hybrid machine reconnect.
    properties:
      properties:
        $ref: "#/definitions/MachineReconnectProperties"
        description: Hybrid Compute Machine properties
        x-ms-client-flatten: true
  MachineReconnectProperties:
    description: Describes the properties required to reconnect a hybrid machine.
    properties:
      clientPublicKey:
        description: Public Key that the client provides to be used during initial resource onboarding.
        type: string
      vmId:
        description: Specifies the hybrid machine unique ID.
        type: string
  MachineUpdate:
    allOf:
      - $ref: "#/definitions/UpdateResource"
    description: Describes a hybrid machine Update.
    properties:
      identity:
        $ref: "#/definitions/Identity"
        description: Hybrid Compute Machine Managed Identity
        x-ms-client-flatten: true
      properties:
        $ref: "#/definitions/MachineUpdateProperties"
        description: Hybrid Compute Machine properties
        x-ms-client-flatten: true
  MachineUpdateProperties:
    description: Describes the ARM updatable properties of a hybrid machine.
    properties:
      physicalLocation:
        description: Resource's Physical Location
        type: string
  OSProfile:
    description: Specifies the operating system settings for the hybrid machine.
    properties:
      computerName:
        description: Specifies the host OS name of the hybrid machine.
        readOnly: true
        type: string
    readOnly: true
  OperationListResult:
    description: The List Compute Operation operation response.
    properties:
      value:
        description: The list of compute operations
        items:
          $ref: "#/definitions/OperationValue"
        readOnly: true
        type: array
  OperationValue:
    description: Describes the properties of a Compute Operation value.
    properties:
      display:
        $ref: "#/definitions/OperationValueDisplay"
        description: Display properties
        x-ms-client-flatten: true
      name:
        description: The name of the compute operation.
        readOnly: true
        type: string
      origin:
        description: The origin of the compute operation.
        readOnly: true
        type: string
  OperationValueDisplay:
    description: Describes the properties of a Hybrid Compute Operation Value Display.
    properties:
      description:
        description: The description of the operation.
        readOnly: true
        type: string
      operation:
        description: The display name of the compute operation.
        readOnly: true
        type: string
      provider:
        description: The resource provider for the operation.
        readOnly: true
        type: string
      resource:
        description: The display name of the resource the operation applies to.
        readOnly: true
        type: string
  Resource:
    description: The Resource model definition.
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      identity:
        $ref: "#/definitions/Identity"
        description: Hybrid Compute Machine Managed Identity
        x-ms-client-flatten: true
      location:
        description: Resource location
        type: string
        x-ms-mutability:
          - create
          - read
      name:
        description: Resource name
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
      type:
        description: Resource type
        readOnly: true
        type: string
    required:
      - location
    x-ms-azure-resource: true
  UpdateResource:
    description: The Update Resource model definition.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
