swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: Update location operation endpoints and objects.
  title: UpdateAdminClient
  version: 2016-05-01
  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/azsadmin/resource-manager/update/Microsoft.Update.Admin/preview/2016-05-01/UpdateLocations.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-UpdateLocations
  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:
  UpdateLocationParameter:
    description: The name of the update location.
    in: path
    name: updateLocation
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Update.Admin/updateLocations/":
    get:
      description: Get the list of update locations.
      operationId: UpdateLocations_List
      parameters:
        - 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
        - description: Resource group name.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/UpdateLocationList"
      tags:
        - UpdateLocations
      x-ms-examples:
        Get the list of update locations.:
          parameters:
            api-version: 2016-05-01
            resourceGroupName: System.Redmond
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/23d66fd1-4743-42ff-b391-e29dc51d799e/resourceGroups/System.Redmond/providers/Microsoft.Update.Admin/updateLocations/redmond
                    location: redmond
                    name: redmond
                    properties:
                      currentOemVersion: 1.0.1709.3
                      currentVersion: 1.0.180302.1
                      lastUpdated: 2018-03-03T08:09:12.8824552Z
                      state: AppliedSuccessfully
                    tags: {}
                    type: Microsoft.Update.Admin/updateLocations
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Update.Admin/updateLocations/{updateLocation}":
    get:
      description: Get an update location based on name.
      operationId: UpdateLocations_Get
      parameters:
        - 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
        - description: Resource group name.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/UpdateLocationParameter"
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/UpdateLocation"
      tags:
        - UpdateLocations
      x-ms-examples:
        Get an update location based on name.:
          parameters:
            api-version: 2016-05-01
            resourceGroupName: System.Redmond
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
            updateLocation: redmond
          responses:
            "200":
              body:
                id: /subscriptions/23d66fd1-4743-42ff-b391-e29dc51d799e/resourcegroups/System.Redmond/providers/Microsoft.Update.Admin/updateLocations/redmond
                location: redmond
                name: redmond
                properties:
                  currentOemVersion: 1.0.1709.3
                  currentVersion: 1.0.180302.1
                  lastUpdated: 2018-03-03T08:09:12.8824552Z
                  state: AppliedSuccessfully
                tags: {}
                type: Microsoft.Update.Admin/updateLocations
definitions:
  RegionUpdateState:
    description: State of the region in regard to update.
    enum:
      - Unknown
      - AppliedSuccessfully
      - AppliedUpdateAvailableSuccessfully
      - UpdateInProgress
      - UpdateFailed
    type: string
    x-ms-enum:
      modelAsString: true
      name: RegionUpdateState
  UpdateLocation:
    allOf:
      - description: Base Resource Object
        properties:
          id:
            description: URI of the resource.
            readOnly: true
            type: string
          location:
            description: Region location of resource.
            type: string
          name:
            description: Name of the resource.
            readOnly: true
            type: string
          tags:
            additionalProperties:
              type: string
            description: List of key-value pairs.
            type: object
          type:
            description: Type of resource.
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Information related to a location's update status.
    properties:
      properties:
        $ref: "#/definitions/UpdateLocationModel"
        description: Model which holds information related to update location.
        x-ms-client-flatten: true
    type: object
  UpdateLocationList:
    description: The list of update locations.
    properties:
      nextLink:
        description: The link to get the next page of update locations.
        type: string
      value:
        description: The list of update locations.
        items:
          $ref: "#/definitions/UpdateLocation"
        type: array
    type: object
  UpdateLocationModel:
    description: Model which holds information related to update location.
    properties:
      currentOemVersion:
        description: Current OEM version of your AzureStack deployment.
        type: string
      currentVersion:
        description: Current version of your AzureStack deployment.
        type: string
      lastUpdated:
        description: Date of last update.
        format: date-time
        type: string
      state:
        $ref: "#/definitions/RegionUpdateState"
        description: State with respect to the update.
    type: object
