swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: The Admin Storage Management Client.
  title: StorageManagementClient
  version: 2015-12-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/azsadmin/resource-manager/storage/Microsoft.Storage.Admin/preview/2015-12-01/containers.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-containers
  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:
  MaxCountParameter:
    description: The maximum number of containers.
    format: int32
    in: query
    name: MaxCount
    required: false
    type: integer
    x-ms-parameter-location: method
  MigrationIntentParameter:
    description: The container migration intent.
    in: query
    name: Intent
    required: true
    type: string
    x-ms-parameter-location: method
  MigrationParameterParameter:
    description: The parameters of container migration job.
    in: body
    name: migrationParameters
    required: true
    schema:
      $ref: "#/definitions/MigrationParameters"
    x-ms-parameter-location: method
  StartIndexParameter:
    description: The starting index the resource provider uses.
    format: int32
    in: query
    name: StartIndex
    required: false
    type: integer
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/operationresults/{operationId}":
    get:
      description: Returns the status of a container migration job.
      operationId: Containers_MigrationStatus
      parameters:
        - description: Subscription Id.
          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
        - description: Farm Id.
          in: path
          name: farmId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Operation Id.
          in: path
          name: operationId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- Operation has been accepted and processed
          schema:
            $ref: "#/definitions/MigrationResult"
      tags:
        - Containers
      x-ms-examples:
        Returns the status of a container migration job.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            operationId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
            resourceGroupName: System.local
            share: "||SU1FileServer.azurestack.local|SU1_ObjStore"
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body:
                containerName: ContainerName1
                destinationShareName: \192.168.1.1
                failureReason: ""
                jobId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
                migrationStatus: Active
                sourceShareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                storageAccountName: StorageAccountName1
                subEntitiesCompleted: 165
                subEntitiesFailed: 5
    post:
      description: Cancel a container migration job.
      operationId: Containers_CancelMigration
      parameters:
        - description: Subscription Id.
          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
        - description: Farm Id.
          in: path
          name: farmId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Operation Id.
          in: path
          name: operationId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- Operation has been accepted and processed
          schema:
            $ref: "#/definitions/MigrationResult"
        "202":
          description: ACCEPTED - Operation has been accepted will be processed asynchronously
          schema:
            $ref: "#/definitions/MigrationResult"
      tags:
        - Containers
      x-ms-examples:
        Cancel a container migration job.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            operationId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
            resourceGroupName: System.local
            share: "||SU1FileServer.azurestack.local|SU1_ObjStore"
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body:
                containerName: ContainerName1
                destinationShareName: \\192.168.1.1\DestinationShare
                failureReason: ""
                jobId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
                migrationStatus: Canceled
                sourceShareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                storageAccountName: StorageAccountName1
                subEntitiesCompleted: 165
                subEntitiesFailed: 5
            "202":
              body:
                containerName: ContainerName1
                destinationShareName: \\192.168.1.1\DestinationShare
                failureReason: ""
                jobId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
                migrationStatus: Rollback
                sourceShareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                storageAccountName: StorageAccountName1
                subEntitiesCompleted: 165
                subEntitiesFailed: 5
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}/containers":
    get:
      description: Returns the list of containers which can be migrated in the specified share.
      operationId: Containers_List
      parameters:
        - description: Subscription Id.
          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
        - description: Farm Id.
          in: path
          name: farmId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Share name.
          in: path
          name: shareName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/MigrationIntentParameter"
        - $ref: "#/parameters/MaxCountParameter"
        - $ref: "#/parameters/StartIndexParameter"
      responses:
        "200":
          description: OK -- The list of containers has been returned.
          schema:
            $ref: "#/definitions/ContainerList"
        "404":
          description: NOT FOUND -- The specified farm or share was not found.
      tags:
        - Containers
      x-ms-examples:
        Returns the list of containers which can be migrated in the specified share.:
          parameters:
            Intent: Migration
            MaxCount: 1000
            StartIndex: 0
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            shareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body:
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 22
                  containername: azurestackhealthrestrequestprocessed
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 2551603200
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 23
                  containername: azurestackhealthrestrequestaccept
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 2282553344
                - accountid: 0a6b4f6b1de14cc08aa1fefadcc481eb
                  accountname: frphealthaccount
                  containerState: Active
                  containerid: 6
                  containername: azurestackhealthazssecurity
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 880074752
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 30
                  containername: azurestackhealthtsqueueresponse
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 560037888
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 26
                  containername: azurestackhealthtsqueuerequest
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 541351936
                - accountid: c2a6bdd19e404154afe27e2637e64ee1
                  accountname: hrphealthaccount
                  containerState: Active
                  containerid: 37
                  containername: azurestackhealthcentralmaeventtable
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 456925184
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 17
                  containername: azurestackhealthblobsvcrpcverbose
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 343273472
                - accountid: 0a6b4f6b1de14cc08aa1fefadcc481eb
                  accountname: frphealthaccount
                  containerState: Active
                  containerid: 7
                  containername: azurestackhealthsystemperfcounter60s
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 208580608
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 31
                  containername: azurestackhealthtstableresponse
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 86974464
                - accountid: 3fe86317cc0d40e0a0d4833641a64fdb
                  accountname: srphealthaccount
                  containerState: Active
                  containerid: 28
                  containername: azurestackhealthtstablerequest
                  sharename: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedBytesInPrimaryVolume: 85082112
            "404": {}
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}/destinationshares":
    get:
      description: Returns a list of destination shares that the system considers as best candidates for migration.
      operationId: Containers_ListDestinationShares
      parameters:
        - description: Subscription Id.
          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
        - description: Farm Id.
          in: path
          name: farmId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Share name.
          in: path
          name: shareName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- The list of shares has been returned.
          schema:
            description: List of storage shares.
            items:
              allOf:
                - description: Base resource object.
                  properties:
                    id:
                      description: Resource ID.
                      type: string
                    location:
                      description: Resource location.
                      type: string
                    name:
                      description: Resource Name.
                      type: string
                    tags:
                      additionalProperties:
                        type: string
                      description: Resource tags.
                      type: object
                    type:
                      description: Resource type.
                      type: string
                  type: object
                  x-ms-azure-resource: true
              description: Storage share.
              properties:
                properties:
                  description: Storage share properties.
                  properties:
                    freeCapacity:
                      description: The free space of the storage share in bytes.
                      format: int64
                      readOnly: true
                      type: integer
                    healthStatus:
                      description: Current health status.
                      enum:
                        - Unknown
                        - Healthy
                        - Warning
                        - Critical
                      readOnly: true
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: HealthStatus
                    shareName:
                      description: The name of the storage share.
                      readOnly: true
                      type: string
                    totalCapacity:
                      description: The total capacity of the storage share in bytes.
                      format: int64
                      readOnly: true
                      type: integer
                    uncPath:
                      description: The UNC path to the storage share.
                      readOnly: true
                      type: string
                    usedCapacity:
                      description: The used capacity of the storage share in bytes.
                      format: int64
                      readOnly: true
                      type: integer
                  type: object
              type: object
            type: array
        "404":
          description: NOT FOUND -- The specified farm or share was not found.
      tags:
        - Containers
      x-ms-examples:
        Returns a list of destination shares that the system considers as best candidates for migration.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            shareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body: []
            "404": {}
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}/migrate":
    post:
      description: Starts a container migration job to migrate containers to the specified destination share.
      operationId: Containers_Migrate
      parameters:
        - description: Subscription Id.
          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
        - description: Farm Id.
          in: path
          name: farmId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Share name.
          in: path
          name: shareName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/MigrationParameterParameter"
      responses:
        "200":
          description: OK -- Container has been migrated
          schema:
            $ref: "#/definitions/MigrationResult"
        "202":
          description: ACCEPTED -- Operation accepted and will be performed asynchronously
          schema:
            $ref: "#/definitions/MigrationResult"
      tags:
        - Containers
      x-ms-examples:
        Starts a container migration job to migrate containers to the specified destination share.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            migrationParameters:
              containerName: ContainerName1
              destinationShareUncPath: \\192.168.1.1\DestinationShare
              storageAccountName: StorageAccountName1
            resourceGroupName: System.local
            shareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body:
                containerName: ContainerName1
                destinationShareName: \\192.168.1.1\DestinationShare
                failureReason: ""
                jobId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
                migrationStatus: Complete
                sourceShareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                storageAccountName: StorageAccountName1
                subEntitiesCompleted: 165
                subEntitiesFailed: 5
            "202":
              body:
                containerName: ContainerName1
                destinationShareName: \\192.168.1.1\DestinationShare
                failureReason: ""
                jobId: 3ada6328-89ae-4263-8bfd-b76504a2bf66
                migrationStatus: Active
                sourceShareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                storageAccountName: StorageAccountName1
                subEntitiesCompleted: 165
                subEntitiesFailed: 5
      x-ms-long-running-operation: true
definitions:
  Container:
    description: Container properties.
    properties:
      accountid:
        description: The ID of the storage account.
        readOnly: true
        type: string
      accountname:
        description: The name of storage account where the container locates.
        readOnly: true
        type: string
      containerState:
        description: The current state of the container.
        readOnly: true
        type: string
      containerid:
        description: The container ID.
        format: int64
        readOnly: true
        type: integer
      containername:
        description: Container name.
        readOnly: true
        type: string
      sharename:
        description: The name of the share where the container locates.
        readOnly: true
        type: string
      usedBytesInPrimaryVolume:
        description: The used space, in bytes, of the container in the primary volume.
        format: int64
        readOnly: true
        type: integer
    type: object
  ContainerList:
    description: List of containers.
    items:
      $ref: "#/definitions/Container"
    type: array
  MigrationParameters:
    description: Parameters of container migration job.
    properties:
      containerName:
        description: The name of the container to be migrated.
        type: string
      destinationShareUncPath:
        description: The UNC path of the destination share for migration.
        type: string
      storageAccountName:
        description: The name of the storage account where the container locates.
        type: string
    required:
      - storageAccountName
      - containerName
      - destinationShareUncPath
    type: object
  MigrationResult:
    description: The result of the container migration.
    properties:
      containerName:
        description: The name of the container to be migrated.
        readOnly: true
        type: string
      destinationShareName:
        description: The name of the destination storage share.
        readOnly: true
        type: string
      failureReason:
        description: The migration failure reason.
        readOnly: true
        type: string
      jobId:
        description: The migration job ID.
        readOnly: true
        type: string
      migrationStatus:
        $ref: "#/definitions/MigrationState"
        description: The migration status.
        readOnly: true
      sourceShareName:
        description: The name of the source storage share.
        readOnly: true
        type: string
      storageAccountName:
        description: The storage account name.
        readOnly: true
        type: string
      subEntitiesCompleted:
        description: The number of entities which have been migrated.
        format: int64
        readOnly: true
        type: integer
      subEntitiesFailed:
        description: The number of entities which failed in migration.
        format: int64
        readOnly: true
        type: integer
    type: object
  MigrationState:
    enum:
      - Active
      - Paused
      - Deleted
      - Rollback
      - Complete
      - Canceled
      - Failed
      - All
    type: string
    x-ms-enum:
      modelAsString: true
      name: MigrationState
