swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: The Admin Compute Disk Management Client.
  title: ComputeDiskAdminManagementClient
  version: 2018-07-30-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/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/preview/2018-07-30-preview/Disks.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-Disks
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Authorization uses an Azure Active Directory OAuth2 flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    default: 2018-07-30-preview
    description: Client API Version.
    in: query
    name: api-version
    required: true
    type: string
  DiskCountParameter:
    description: The maximum number of disks to return.
    format: int32
    in: query
    name: count
    required: false
    type: integer
    x-ms-parameter-location: method
  DiskIdParameter:
    description: The disk guid as identity.
    in: path
    name: DiskId
    required: true
    type: string
    x-ms-parameter-location: method
  DiskStartParameter:
    description: The start index of disks in query.
    format: int32
    in: query
    name: start
    required: false
    type: integer
    x-ms-parameter-location: method
  DiskStateParameter:
    description: The parameters of disk state.
    in: query
    name: status
    required: false
    type: string
    x-ms-parameter-location: method
  SourceSharePathParameter:
    description: The source share which the resource belongs to.
    in: query
    name: sharePath
    required: false
    type: string
    x-ms-parameter-location: method
  UserSubscriptionIdParameter:
    description: User Subscription Id which the resource belongs to.
    in: query
    name: userSubscriptionId
    required: false
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks":
    get:
      description: Returns a list of disks.
      operationId: Disks_List
      parameters:
        - description: Subscription credentials that 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: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - description: User Subscription Id which the resource belongs to.
          in: query
          name: userSubscriptionId
          required: false
          type: string
          x-ms-parameter-location: method
        - description: The parameters of disk state.
          in: query
          name: status
          required: false
          type: string
          x-ms-parameter-location: method
        - description: The source share which the resource belongs to.
          in: query
          name: sharePath
          required: false
          type: string
          x-ms-parameter-location: method
        - description: The maximum number of disks to return.
          format: int32
          in: query
          name: count
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: The start index of disks in query.
          format: int32
          in: query
          name: start
          required: false
          type: integer
          x-ms-parameter-location: method
        - default: 2018-07-30-preview
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- The list of disks has been returned.
          schema:
            description: List of disks.
            properties:
              nextLink:
                description: URI to the next page.
                type: string
              value:
                description: List of disks.
                items:
                  allOf:
                    - description: Base resource object.
                      properties:
                        id:
                          description: ID of the resource.
                          readOnly: true
                          type: string
                        location:
                          description: Location of the resource.
                          type: string
                        name:
                          description: Name of the resource.
                          readOnly: true
                          type: string
                        type:
                          description: Type of Resource.
                          readOnly: true
                          type: string
                      type: object
                      x-ms-azure-resource: true
                  description: Managed Disk.
                  properties:
                    properties:
                      description: Managed disk properties.
                      properties:
                        actualSizeGB:
                          description: The actual size of disk in GB.
                          format: int64
                          readOnly: true
                          type: integer
                        diskId:
                          description: The disk id.
                          type: string
                        diskSku:
                          description: Disk Sku.
                          enum:
                            - Standard_LRS
                            - Standard_ZRS
                            - Standard_GRS
                            - Standard_RAGRS
                            - Premium_LRS
                            - StandardSSD_LRS
                            - UltraSSD_LRS
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: AccountType
                        diskType:
                          description: Disk resource type.
                          enum:
                            - Undefined
                            - Disk
                            - Snapshot
                            - RestorePoint
                            - ManagedBlob
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: DiskResourceType
                        managedBy:
                          description: Compute resource Uri which owns this disk.
                          readOnly: true
                          type: string
                        provisionSizeGB:
                          description: The provision size of disk in GB.
                          format: int64
                          readOnly: true
                          type: integer
                        sharePath:
                          description: The disk share path.
                          type: string
                        status:
                          description: Disk State.
                          enum:
                            - Undefined
                            - Unattached
                            - Attached
                            - Reserved
                            - ActiveSAS
                            - Unknown
                            - All
                            - Recommended
                            - OfflineMigration
                            - OnlineMigration
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: DiskState
                        userResourceId:
                          description: The disk resource Uri from user view.
                          readOnly: true
                          type: string
                      type: object
                  type: object
                type: array
            type: object
      tags:
        - Disks
      x-ms-examples:
        Returns a list of disks.:
          parameters:
            api-version: 2018-07-30-preview
            count: 100
            location: redmond
            start: 1
            status: Unattached
            subscriptionId: 04666444-56f0-4d4f-afc5-dbd6b134b084
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/423e4eb4-f791-4d13-ad5b-4d415733b0d6
                    location: redmond
                    name: redmond/423e4eb4-f791-4d13-ad5b-4d415733b0d6
                    properties:
                      actualSizeGB: 183
                      diskId: 423e4eb4-f791-4d13-ad5b-4d415733b0d6
                      diskSku: Standard_LRS
                      diskType: Disk
                      provisionSizeGB: 200
                      sharePath: \\SU1FileServer.mydomain.com\SU1_ObjStore_4
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Disks/diskrptest9vb55sb15w
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/48dc9b56-5883-4011-9dc3-0e527f33e6ab
                    location: redmond
                    name: redmond/48dc9b56-5883-4011-9dc3-0e527f33e6ab
                    properties:
                      actualSizeGB: 1
                      diskId: 48dc9b56-5883-4011-9dc3-0e527f33e6ab
                      diskSku: Standard_LRS
                      diskType: Snapshot
                      provisionSizeGB: 200
                      sharePath: \\SU1FileServer.mydomain.com\SU1_ObjStore_2
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Snapshots/diskrptestjrlt133h5g8t
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/5018f340-c41b-4e82-a553-248431c4df64
                    location: redmond
                    name: redmond/5018f340-c41b-4e82-a553-248431c4df64
                    properties:
                      actualSizeGB: 0
                      diskId: 5018f340-c41b-4e82-a553-248431c4df64
                      diskSku: Standard_LRS
                      diskType: Snapshot
                      provisionSizeGB: 200
                      sharePath: ""
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Snapshots/diskrptestlhy3gmrez379
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/8b5a40f9-c5d0-4273-a5b2-7ec4be371e30
                    location: redmond
                    name: redmond/8b5a40f9-c5d0-4273-a5b2-7ec4be371e30
                    properties:
                      actualSizeGB: 0
                      diskId: 8b5a40f9-c5d0-4273-a5b2-7ec4be371e30
                      diskSku: Standard_LRS
                      diskType: Disk
                      provisionSizeGB: 200
                      sharePath: ""
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Disks/diskrptest5wnmxirn
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/9664bba5-dcc1-4481-a85d-8a2dfca26c55
                    location: redmond
                    name: redmond/9664bba5-dcc1-4481-a85d-8a2dfca26c55
                    properties:
                      actualSizeGB: 0
                      diskId: 9664bba5-dcc1-4481-a85d-8a2dfca26c55
                      diskSku: Standard_LRS
                      diskType: Snapshot
                      sharePath: ""
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Snapshots/diskrptestj32ckp6df9v
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/cc79941f-5f42-4ac7-8428-7553f5e47e4b
                    location: redmond
                    name: redmond/cc79941f-5f42-4ac7-8428-7553f5e47e4b
                    properties:
                      actualSizeGB: 0
                      diskId: cc79941f-5f42-4ac7-8428-7553f5e47e4b
                      diskSku: Standard_LRS
                      diskType: Snapshot
                      provisionSizeGB: 200
                      sharePath: ""
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Snapshots/diskrptestthml7uzd3hs2
                    type: Microsoft.Compute.Admin/locations/disks
                  - id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/dfee6038-fc35-4e0f-acd9-597b097a0b52
                    location: redmond
                    name: redmond/dfee6038-fc35-4e0f-acd9-597b097a0b52
                    properties:
                      actualSizeGB: 0
                      diskId: dfee6038-fc35-4e0f-acd9-597b097a0b52
                      diskSku: Standard_LRS
                      diskType: Snapshot
                      provisionSizeGB: 200
                      sharePath: ""
                      status: Unattached
                      userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Snapshots/diskrptestn9wefmbaqiu
                    type: Microsoft.Compute.Admin/locations/disks
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks/{DiskId}":
    get:
      description: Returns the disk.
      operationId: Disks_Get
      parameters:
        - description: Subscription credentials that 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: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The disk guid as identity.
          in: path
          name: DiskId
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2018-07-30-preview
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- The disk has been returned.
          schema:
            allOf:
              - description: Base resource object.
                properties:
                  id:
                    description: ID of the resource.
                    readOnly: true
                    type: string
                  location:
                    description: Location of the resource.
                    type: string
                  name:
                    description: Name of the resource.
                    readOnly: true
                    type: string
                  type:
                    description: Type of Resource.
                    readOnly: true
                    type: string
                type: object
                x-ms-azure-resource: true
            description: Managed Disk.
            properties:
              properties:
                description: Managed disk properties.
                properties:
                  actualSizeGB:
                    description: The actual size of disk in GB.
                    format: int64
                    readOnly: true
                    type: integer
                  diskId:
                    description: The disk id.
                    type: string
                  diskSku:
                    description: Disk Sku.
                    enum:
                      - Standard_LRS
                      - Standard_ZRS
                      - Standard_GRS
                      - Standard_RAGRS
                      - Premium_LRS
                      - StandardSSD_LRS
                      - UltraSSD_LRS
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: AccountType
                  diskType:
                    description: Disk resource type.
                    enum:
                      - Undefined
                      - Disk
                      - Snapshot
                      - RestorePoint
                      - ManagedBlob
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: DiskResourceType
                  managedBy:
                    description: Compute resource Uri which owns this disk.
                    readOnly: true
                    type: string
                  provisionSizeGB:
                    description: The provision size of disk in GB.
                    format: int64
                    readOnly: true
                    type: integer
                  sharePath:
                    description: The disk share path.
                    type: string
                  status:
                    description: Disk State.
                    enum:
                      - Undefined
                      - Unattached
                      - Attached
                      - Reserved
                      - ActiveSAS
                      - Unknown
                      - All
                      - Recommended
                      - OfflineMigration
                      - OnlineMigration
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: DiskState
                  userResourceId:
                    description: The disk resource Uri from user view.
                    readOnly: true
                    type: string
                type: object
            type: object
      tags:
        - Disks
      x-ms-examples:
        Returns the requested disk.:
          parameters:
            DiskId: 423e4eb4-f791-4d13-ad5b-4d415733b0d6
            api-version: 2018-07-30-preview
            location: redmond
            subscriptionId: 04666444-56f0-4d4f-afc5-dbd6b134b084
          responses:
            "200":
              body:
                id: /subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/423e4eb4-f791-4d13-ad5b-4d415733b0d6
                location: redmond
                name: redmond/423e4eb4-f791-4d13-ad5b-4d415733b0d6
                properties:
                  actualSizeGB: 183
                  diskId: 423e4eb4-f791-4d13-ad5b-4d415733b0d6
                  diskSku: Standard_LRS
                  diskType: Disk
                  provisionSizeGB: 200
                  sharePath: \\SU1FileServer.mydomain.com\SU1_ObjStore_4
                  status: Unattached
                  userResourceId: /subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Disks/diskrptest9vb55sb15w
                type: Microsoft.Compute.Admin/locations/disks
definitions:
  AccountType:
    description: Disk Sku.
    enum:
      - Standard_LRS
      - Standard_ZRS
      - Standard_GRS
      - Standard_RAGRS
      - Premium_LRS
      - StandardSSD_LRS
      - UltraSSD_LRS
    type: string
    x-ms-enum:
      modelAsString: true
      name: AccountType
  Disk:
    allOf:
      - description: Base resource object.
        properties:
          id:
            description: ID of the resource.
            readOnly: true
            type: string
          location:
            description: Location of the resource.
            type: string
          name:
            description: Name of the resource.
            readOnly: true
            type: string
          type:
            description: Type of Resource.
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Managed Disk.
    properties:
      properties:
        description: Managed disk properties.
        properties:
          actualSizeGB:
            description: The actual size of disk in GB.
            format: int64
            readOnly: true
            type: integer
          diskId:
            description: The disk id.
            type: string
          diskSku:
            description: Disk Sku.
            enum:
              - Standard_LRS
              - Standard_ZRS
              - Standard_GRS
              - Standard_RAGRS
              - Premium_LRS
              - StandardSSD_LRS
              - UltraSSD_LRS
            type: string
            x-ms-enum:
              modelAsString: true
              name: AccountType
          diskType:
            description: Disk resource type.
            enum:
              - Undefined
              - Disk
              - Snapshot
              - RestorePoint
              - ManagedBlob
            type: string
            x-ms-enum:
              modelAsString: true
              name: DiskResourceType
          managedBy:
            description: Compute resource Uri which owns this disk.
            readOnly: true
            type: string
          provisionSizeGB:
            description: The provision size of disk in GB.
            format: int64
            readOnly: true
            type: integer
          sharePath:
            description: The disk share path.
            type: string
          status:
            description: Disk State.
            enum:
              - Undefined
              - Unattached
              - Attached
              - Reserved
              - ActiveSAS
              - Unknown
              - All
              - Recommended
              - OfflineMigration
              - OnlineMigration
            type: string
            x-ms-enum:
              modelAsString: true
              name: DiskState
          userResourceId:
            description: The disk resource Uri from user view.
            readOnly: true
            type: string
        type: object
    type: object
  DiskList:
    description: List of disks.
    properties:
      nextLink:
        description: URI to the next page.
        type: string
      value:
        description: List of disks.
        items:
          allOf:
            - description: Base resource object.
              properties:
                id:
                  description: ID of the resource.
                  readOnly: true
                  type: string
                location:
                  description: Location of the resource.
                  type: string
                name:
                  description: Name of the resource.
                  readOnly: true
                  type: string
                type:
                  description: Type of Resource.
                  readOnly: true
                  type: string
              type: object
              x-ms-azure-resource: true
          description: Managed Disk.
          properties:
            properties:
              description: Managed disk properties.
              properties:
                actualSizeGB:
                  description: The actual size of disk in GB.
                  format: int64
                  readOnly: true
                  type: integer
                diskId:
                  description: The disk id.
                  type: string
                diskSku:
                  description: Disk Sku.
                  enum:
                    - Standard_LRS
                    - Standard_ZRS
                    - Standard_GRS
                    - Standard_RAGRS
                    - Premium_LRS
                    - StandardSSD_LRS
                    - UltraSSD_LRS
                  type: string
                  x-ms-enum:
                    modelAsString: true
                    name: AccountType
                diskType:
                  description: Disk resource type.
                  enum:
                    - Undefined
                    - Disk
                    - Snapshot
                    - RestorePoint
                    - ManagedBlob
                  type: string
                  x-ms-enum:
                    modelAsString: true
                    name: DiskResourceType
                managedBy:
                  description: Compute resource Uri which owns this disk.
                  readOnly: true
                  type: string
                provisionSizeGB:
                  description: The provision size of disk in GB.
                  format: int64
                  readOnly: true
                  type: integer
                sharePath:
                  description: The disk share path.
                  type: string
                status:
                  description: Disk State.
                  enum:
                    - Undefined
                    - Unattached
                    - Attached
                    - Reserved
                    - ActiveSAS
                    - Unknown
                    - All
                    - Recommended
                    - OfflineMigration
                    - OnlineMigration
                  type: string
                  x-ms-enum:
                    modelAsString: true
                    name: DiskState
                userResourceId:
                  description: The disk resource Uri from user view.
                  readOnly: true
                  type: string
              type: object
          type: object
        type: array
    type: object
  DiskProperties:
    description: Managed disk properties.
    properties:
      actualSizeGB:
        description: The actual size of disk in GB.
        format: int64
        readOnly: true
        type: integer
      diskId:
        description: The disk id.
        type: string
      diskSku:
        description: Disk Sku.
        enum:
          - Standard_LRS
          - Standard_ZRS
          - Standard_GRS
          - Standard_RAGRS
          - Premium_LRS
          - StandardSSD_LRS
          - UltraSSD_LRS
        type: string
        x-ms-enum:
          modelAsString: true
          name: AccountType
      diskType:
        description: Disk resource type.
        enum:
          - Undefined
          - Disk
          - Snapshot
          - RestorePoint
          - ManagedBlob
        type: string
        x-ms-enum:
          modelAsString: true
          name: DiskResourceType
      managedBy:
        description: Compute resource Uri which owns this disk.
        readOnly: true
        type: string
      provisionSizeGB:
        description: The provision size of disk in GB.
        format: int64
        readOnly: true
        type: integer
      sharePath:
        description: The disk share path.
        type: string
      status:
        description: Disk State.
        enum:
          - Undefined
          - Unattached
          - Attached
          - Reserved
          - ActiveSAS
          - Unknown
          - All
          - Recommended
          - OfflineMigration
          - OnlineMigration
        type: string
        x-ms-enum:
          modelAsString: true
          name: DiskState
      userResourceId:
        description: The disk resource Uri from user view.
        readOnly: true
        type: string
    type: object
  DiskResourceType:
    description: Disk resource type.
    enum:
      - Undefined
      - Disk
      - Snapshot
      - RestorePoint
      - ManagedBlob
    type: string
    x-ms-enum:
      modelAsString: true
      name: DiskResourceType
  DiskState:
    description: Disk State.
    enum:
      - Undefined
      - Unattached
      - Attached
      - Reserved
      - ActiveSAS
      - Unknown
      - All
      - Recommended
      - OfflineMigration
      - OnlineMigration
    type: string
    x-ms-enum:
      modelAsString: true
      name: DiskState
