swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Dev Spaces REST API
  title: DevSpacesManagement
  version: 2018-06-01-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/devspaces/resource-manager/Microsoft.DevSpaces/preview/2018-06-01-preview/devspaces.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: devspaces
  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
parameters:
  ApiVersionParameter:
    description: Client API version.
    in: query
    name: api-version
    required: true
    type: string
  NameParameter:
    description: Name of the resource.
    in: path
    maxLength: 31
    minLength: 3
    name: name
    pattern: ^[a-zA-Z0-9](-?[a-zA-Z0-9])*$
    required: true
    type: string
    x-ms-parameter-location: method
  ResourceGroupParameter:
    description: Resource group to which the resource belongs.
    in: path
    maxLength: 90
    minLength: 1
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Azure subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  "/providers/Microsoft.DevSpaces/locations/{location}/checkContainerHostMapping":
    post:
      operationId: ContainerHostMappings_GetContainerHostMapping
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - in: body
          name: containerHostMapping
          required: true
          schema:
            $ref: "#/definitions/ContainerHostMapping"
        - description: Location of the container host.
          in: path
          name: location
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema: {}
      summary: Returns container host mapping object for a container host resource ID if an associated controller exists.
      tags:
        - ContainerHostMappings
      x-ms-examples:
        ContainerHostMappingsGetContainerHostMapping:
          parameters:
            api-version: 2018-06-01-preview
            containerHostMapping:
              containerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
            location: eastus
          responses:
            "200":
              body:
                containerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                mappedControllerResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myController
  /providers/Microsoft.DevSpaces/operations:
    get:
      description: Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: The request was successful; response contains the list of operations under Microsoft.DevSpaces resource provider.
          schema:
            $ref: "#/definitions/ResourceProviderOperationList"
      summary: Lists operations for the resource provider.
      tags:
        - Operations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.DevSpaces/controllers":
    get:
      description: Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
      operationId: Controllers_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: The request was successful; response contains the list of Azure Dev Spaces Controllers in the subscription.
          schema:
            $ref: "#/definitions/ControllerList"
        default:
          description: Error response describing the reason for operation failure.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Lists the Azure Dev Spaces Controllers in a subscription.
      tags:
        - Controllers
      x-ms-examples:
        ControllersList:
          parameters:
            api-version: 2018-06-01-preview
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                    location: eastus
                    name: myControllerResource
                    properties:
                      dataPlaneFqdn: dataplane.azds.io
                      hostSuffix: suffix
                      provisioningState: Succeeded
                      targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                    sku:
                      name: S1
                      tier: Standard
                    tags: {}
                    type: Microsoft.DevSpaces/controllers
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers":
    get:
      description: Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and subscription.
      operationId: Controllers_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
      responses:
        "200":
          description: The request was successful; response contains the list of Azure Dev Spaces Controllers in the resource group.
          schema:
            $ref: "#/definitions/ControllerList"
        default:
          description: Error response describing the reason for operation failure.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Lists the Azure Dev Spaces Controllers in a resource group.
      tags:
        - Controllers
      x-ms-examples:
        ControllersListByResourceGroup:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                    location: eastus
                    name: myControllerResource
                    properties:
                      dataPlaneFqdn: dataplane.azds.io
                      hostSuffix: suffix
                      provisioningState: Succeeded
                      targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                    sku:
                      name: S1
                      tier: Standard
                    tags: {}
                    type: Microsoft.DevSpaces/controllers
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}":
    delete:
      description: Deletes an existing Azure Dev Spaces Controller.
      operationId: Controllers_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/NameParameter"
      responses:
        "200":
          description: The request was successful; the Azure Dev Spaces Controller is deleted.
        "202":
          description: The request was successful; Azure Dev Spaces Controller is being deleted.
        "204":
          description: The request was successful; Azure Dev Spaces Controller does not exist.
        default:
          description: Error response describing the reason for operation failure. 409 - Conflict(Azure Dev Spaces Controller is already getting deleted.)
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Deletes an Azure Dev Spaces Controller.
      tags:
        - Controllers
      x-ms-examples:
        ControllersDelete:
          parameters:
            api-version: 2018-06-01-preview
            name: myControllerResource
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200": {}
            "202":
              headers:
                Location: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevSpaces/operationresults/00000000-0000-0000-0000-000000000000
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets the properties for an Azure Dev Spaces Controller.
      operationId: Controllers_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/NameParameter"
      responses:
        "200":
          description: The request was successful; response contains the Azure Dev Spaces Controller.
          schema:
            $ref: "#/definitions/Controller"
        default:
          description: Error response describing the reason for operation failure. 404 - NotFound(Azure Dev Spaces Controller doesn't exist.)
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Gets an Azure Dev Spaces Controller.
      tags:
        - Controllers
      x-ms-examples:
        ControllersGet:
          parameters:
            api-version: 2018-06-01-preview
            name: myControllerResource
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                location: eastus
                name: myControllerResource
                properties:
                  dataPlaneFqdn: dataplane.azds.io
                  hostSuffix: suffix
                  provisioningState: Succeeded
                  targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                sku:
                  name: S1
                  tier: Standard
                tags: {}
                type: Microsoft.DevSpaces/controllers
    patch:
      description: Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
      operationId: Controllers_Update
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/NameParameter"
        - description: Parameters for updating the Azure Dev Spaces Controller.
          in: body
          name: controllerUpdateParameters
          required: true
          schema:
            $ref: "#/definitions/ControllerUpdateParameters"
      responses:
        "200":
          description: The request was successful; response contains the updated Azure Dev Spaces Controller .
          schema:
            $ref: "#/definitions/Controller"
        default:
          description: Error response describing the reason for operation failure. 404 - NotFound(Azure Dev Spaces Controller doesn't exist.), 400 - BadRequest(One or more update parameters are invalid.)
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Updates an Azure Dev Spaces Controller.
      tags:
        - Controllers
      x-ms-examples:
        ControllersUpdate:
          parameters:
            api-version: 2018-06-01-preview
            controllerUpdateParameters:
              tags:
                key: value
            name: myControllerResource
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                location: eastus
                name: myControllerResource
                properties:
                  dataPlaneFqdn: dataplane.azds.io
                  hostSuffix: suffix
                  provisioningState: Succeeded
                  targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                sku:
                  name: S1
                  tier: Standard
                tags:
                  key: value
                type: Microsoft.DevSpaces/controllers
    put:
      description: Creates an Azure Dev Spaces Controller with the specified create parameters.
      operationId: Controllers_Create
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/NameParameter"
        - description: Controller create parameters.
          in: body
          name: controller
          required: true
          schema:
            $ref: "#/definitions/Controller"
      responses:
        "200":
          description: The request was successful; response contains the created Azure Dev Spaces Controller .
          schema:
            $ref: "#/definitions/Controller"
        "201":
          description: The request was successful; Azure Dev Spaces Controller is being created.
          schema:
            $ref: "#/definitions/Controller"
        default:
          description: Error response describing the reason for operation failure. 404 - NotFound(Azure Dev Spaces Controller doesn't exist.), 400 - BadRequest(One or more creation parameters are invalid.)
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Creates an Azure Dev Spaces Controller.
      tags:
        - Controllers
      x-ms-examples:
        ControllersCreate:
          parameters:
            api-version: 2018-06-01-preview
            controller:
              location: eastus
              properties:
                hostSuffix: suffix
                targetContainerHostCredentialsBase64: QmFzZTY0IEVuY29kZWQgVmFsdWUK
                targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
              sku:
                name: S1
                tier: Standard
              tags: {}
            name: myControllerResource
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                location: eastus
                name: myControllerResource
                properties:
                  dataPlaneFqdn: dataplane.azds.io
                  hostSuffix: suffix
                  provisioningState: Succeeded
                  targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                sku:
                  name: S1
                  tier: Standard
                tags: {}
                type: Microsoft.DevSpaces/controllers
            "201":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DevSpaces/controllers/myControllerResource
                location: eastus
                name: myControllerResource
                properties:
                  dataPlaneFqdn: dataplane.azds.io
                  hostSuffix: suffix
                  provisioningState: Creating
                  targetContainerHostResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedCluster/myCluster
                sku:
                  name: S1
                  tier: Standard
                tags: {}
                type: Microsoft.DevSpaces/controllers
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}/listConnectionDetails":
    post:
      description: Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
      operationId: Controllers_ListConnectionDetails
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/NameParameter"
      responses:
        "200":
          description: The request was successful; response contains the list of connection details for the Azure Dev Spaces Controller .
          schema:
            $ref: "#/definitions/ControllerConnectionDetailsList"
        default:
          description: Error response describing the reason for operation failure. 404 - NotFound(Azure Dev Spaces Controller doesn't exist.)
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Lists connection details for an Azure Dev Spaces Controller.
      tags:
        - Controllers
      x-ms-examples:
        ControllersListConnectionDetails:
          parameters:
            api-version: 2018-06-01-preview
            name: myControllerResource
            resourceGroupName: myResourceGroup
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                connectionDetailsList:
                  - authKey: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                    orchestratorSpecificConnectionDetails:
                      instanceType: Kubernetes
                      kubeConfig: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                    workspaceStorageAccountName: storageAccount
                    workspaceStorageSasToken: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
definitions:
  ContainerHostMapping:
    description: Container host mapping object specifying the Container host resource ID and its associated Controller resource.
    properties:
      containerHostResourceId:
        description: ARM ID of the Container Host resource
        type: string
      mappedControllerResourceId:
        description: ARM ID of the mapped Controller resource
        readOnly: true
        type: string
  Controller:
    allOf:
      - $ref: "#/definitions/TrackedResource"
    properties:
      properties:
        $ref: "#/definitions/ControllerProperties"
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
    required:
      - properties
      - sku
      - location
  ControllerConnectionDetails:
    properties:
      authKey:
        description: Authentication key for communicating with services.
        readOnly: true
        type: string
      orchestratorSpecificConnectionDetails:
        $ref: "#/definitions/OrchestratorSpecificConnectionDetails"
      workspaceStorageAccountName:
        description: Workspace storage account name.
        readOnly: true
        type: string
      workspaceStorageSasToken:
        description: Workspace storage account SAS token.
        readOnly: true
        type: string
  ControllerConnectionDetailsList:
    properties:
      connectionDetailsList:
        description: List of Azure Dev Spaces Controller connection details.
        items:
          $ref: "#/definitions/ControllerConnectionDetails"
        type: array
  ControllerList:
    properties:
      nextLink:
        description: The URI that can be used to request the next page for list of Azure Dev Spaces Controllers.
        readOnly: true
        type: string
      value:
        description: List of Azure Dev Spaces Controllers.
        items:
          $ref: "#/definitions/Controller"
        type: array
  ControllerProperties:
    properties:
      dataPlaneFqdn:
        description: DNS name for accessing DataPlane services
        readOnly: true
        type: string
      hostSuffix:
        description: DNS suffix for public endpoints running in the Azure Dev Spaces Controller.
        type: string
        x-ms-mutability:
          - read
          - create
      provisioningState:
        description: Provisioning state of the Azure Dev Spaces Controller.
        enum:
          - Succeeded
          - Failed
          - Canceled
          - Updating
          - Creating
          - Deleting
          - Deleted
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProvisioningState
      targetContainerHostCredentialsBase64:
        description: Credentials of the target container host (base64).
        type: string
        x-ms-mutability:
          - create
      targetContainerHostResourceId:
        description: Resource ID of the target container host
        type: string
        x-ms-mutability:
          - read
          - create
    required:
      - hostSuffix
      - targetContainerHostResourceId
      - targetContainerHostCredentialsBase64
  ControllerUpdateParameters:
    description: Parameters for updating an Azure Dev Spaces Controller.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Tags for the Azure Dev Spaces Controller.
  ErrorDetails:
    properties:
      code:
        description: Status code for the error.
        readOnly: true
        type: string
      message:
        description: Error message describing the error in detail.
        readOnly: true
        type: string
      target:
        description: The target of the particular error.
        readOnly: true
        type: string
  ErrorResponse:
    description: Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
    properties:
      error:
        $ref: "#/definitions/ErrorDetails"
        description: The details of the error.
  KubernetesConnectionDetails:
    allOf:
      - $ref: "#/definitions/OrchestratorSpecificConnectionDetails"
    description: Contains information used to connect to a Kubernetes cluster
    properties:
      kubeConfig:
        description: Gets the kubeconfig for the cluster.
        type: string
    x-ms-discriminator-value: Kubernetes
  OrchestratorSpecificConnectionDetails:
    description: Base class for types that supply values used to connect to container orchestrators
    discriminator: instanceType
    properties:
      instanceType:
        description: Gets the Instance type.
        readOnly: true
        type: string
  Resource:
    description: An Azure resource.
    properties:
      id:
        description: Fully qualified resource Id for the resource.
        readOnly: true
        type: string
      name:
        description: The name of the resource.
        readOnly: true
        type: string
      type:
        description: The type of the resource.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ResourceProviderOperationDefinition:
    properties:
      display:
        $ref: "#/definitions/ResourceProviderOperationDisplay"
      name:
        description: Resource provider operation name.
        type: string
  ResourceProviderOperationDisplay:
    properties:
      description:
        description: Description of the resource provider operation.
        type: string
      operation:
        description: Name of the resource provider operation.
        type: string
      provider:
        description: Name of the resource provider.
        type: string
      resource:
        description: Name of the resource type.
        type: string
  ResourceProviderOperationList:
    properties:
      nextLink:
        description: The URI that can be used to request the next page for list of Azure operations.
        readOnly: true
        type: string
      value:
        description: Resource provider operations list.
        items:
          $ref: "#/definitions/ResourceProviderOperationDefinition"
        type: array
  Sku:
    description: Model representing SKU for Azure Dev Spaces Controller.
    properties:
      name:
        description: The name of the SKU for Azure Dev Spaces Controller.
        enum:
          - S1
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuName
      tier:
        description: The tier of the SKU for Azure Dev Spaces Controller.
        enum:
          - Standard
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuTier
    required:
      - name
  TrackedResource:
    allOf:
      - $ref: "#/definitions/Resource"
    description: The resource model definition for a ARM tracked top level resource.
    properties:
      location:
        description: Region where the Azure resource is located.
        type: string
        x-ms-mutability:
          - read
          - create
      tags:
        additionalProperties:
          type: string
        description: Tags for the Azure resource.
        type: object
        x-ms-mutability:
          - read
          - create
          - update
