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/storageaccounts.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: azsadmin-storageaccounts
  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:
  AccountIdParameter:
    description: Internal storage account ID, which is not visible to tenant.
    in: path
    name: accountId
    required: true
    type: string
    x-ms-parameter-location: method
  SummaryParameter:
    description: Switch for whether summary or detailed information is returned.
    in: query
    name: summary
    required: true
    type: boolean
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/storageaccounts":
    get:
      description: Returns a list of storage accounts.
      operationId: StorageAccounts_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: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/SummaryParameter"
      responses:
        "200":
          description: OK -- The list of storage accounts has been returned.
          schema:
            $ref: "#/definitions/StorageAccountList"
        "404":
          description: NOT FOUND -- The specified farm was not found.
      tags:
        - StorageAccounts
      x-ms-examples:
        Returns a list of storage accounts.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
            summary: "false"
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/0180624c67694706a4066782d83057a5
                    location: local
                    name: 0180624c67694706a4066782d83057a5
                    properties:
                      accountId: 0180624c67694706a4066782d83057a5
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:27.41
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://adminkvlclproddata004.blob.local.azurestack.external/
                        queue: https://adminkvlclproddata004.queue.local.azurestack.external/
                        table: https://adminkvlclproddata004.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local.adminkeyvault
                      tenantStorageAccountName: adminkvlclproddata004
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local.adminkeyvault/providers/Microsoft.Storage/storageaccounts/adminkvlclproddata004
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/04106a84393f4a12ab8efdbc0a69bb65
                    location: local
                    name: 04106a84393f4a12ab8efdbc0a69bb65
                    properties:
                      accountId: 04106a84393f4a12ab8efdbc0a69bb65
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:27.847
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://adminkvlclproddata005.blob.local.azurestack.external/
                        queue: https://adminkvlclproddata005.queue.local.azurestack.external/
                        table: https://adminkvlclproddata005.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local.adminkeyvault
                      tenantStorageAccountName: adminkvlclproddata005
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local.adminkeyvault/providers/Microsoft.Storage/storageaccounts/adminkvlclproddata005
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/06e296e00b284f5cb5708dfabd6ad74c
                    location: local
                    name: 06e296e00b284f5cb5708dfabd6ad74c
                    properties:
                      accountId: 06e296e00b284f5cb5708dfabd6ad74c
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:12.47
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://wasphealthaccount.blob.local.azurestack.external/
                        queue: https://wasphealthaccount.queue.local.azurestack.external/
                        table: https://wasphealthaccount.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: wasphealthaccount
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/wasphealthaccount
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/0a6b4f6b1de14cc08aa1fefadcc481eb
                    location: local
                    name: 0a6b4f6b1de14cc08aa1fefadcc481eb
                    properties:
                      accountId: 0a6b4f6b1de14cc08aa1fefadcc481eb
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:02.527
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://frphealthaccount.blob.local.azurestack.external/
                        queue: https://frphealthaccount.queue.local.azurestack.external/
                        table: https://frphealthaccount.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: frphealthaccount
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/frphealthaccount
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/0d724e3f75004e48948c1bfa0b4a964a
                    location: local
                    name: 0d724e3f75004e48948c1bfa0b4a964a
                    properties:
                      accountId: 0d724e3f75004e48948c1bfa0b4a964a
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T01:56:29.467
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://systemgallery.blob.local.azurestack.external/
                        queue: https://systemgallery.queue.local.azurestack.external/
                        table: https://systemgallery.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: systemgallery
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/systemgallery
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/0dda0879146341178603ba151d7da010
                    location: local
                    name: 0dda0879146341178603ba151d7da010
                    properties:
                      accountId: 0dda0879146341178603ba151d7da010
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:23.84
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://nrpeventsaccount.blob.local.azurestack.external/
                        queue: https://nrpeventsaccount.queue.local.azurestack.external/
                        table: https://nrpeventsaccount.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: nrpeventsaccount
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/nrpeventsaccount
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/15612011f6094654abcb6031a4394ef5
                    location: local
                    name: 15612011f6094654abcb6031a4394ef5
                    properties:
                      accountId: 15612011f6094654abcb6031a4394ef5
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:36.193
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://kvrphealthaccount.blob.local.azurestack.external/
                        queue: https://kvrphealthaccount.queue.local.azurestack.external/
                        table: https://kvrphealthaccount.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: kvrphealthaccount
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/kvrphealthaccount
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
                  - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/17829fa81c154239ad8a6fae05f44793
                    location: local
                    name: 17829fa81c154239ad8a6fae05f44793
                    properties:
                      accountId: 17829fa81c154239ad8a6fae05f44793
                      accountStatus: Active
                      accountType: Standard_LRS
                      acquisitionOperationCount: 0
                      creationTime: 2018-01-17T02:10:15.38
                      currentOperation: None
                      permissions: Full
                      primaryEndpoints:
                        blob: https://srpusageaccount.blob.local.azurestack.external/
                        queue: https://srpusageaccount.queue.local.azurestack.external/
                        table: https://srpusageaccount.table.local.azurestack.external/
                      primaryLocation: local
                      provisioningState: Succeeded
                      statusOfPrimary: Available
                      tenantResourceGroupName: system.local
                      tenantStorageAccountName: srpusageaccount
                      tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                      tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/srpusageaccount
                      wacInternalState: Active
                    type: Microsoft.Storage.Admin/storageaccounts
            "404": {}
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/storageaccounts/{accountId}":
    get:
      description: Returns the requested storage account.
      operationId: StorageAccounts_Get
      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
        - $ref: "#/parameters/AccountIdParameter"
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- The storage account has been returned.
          schema:
            $ref: "#/definitions/StorageAccount"
        "404":
          description: NOT FOUND -- The storage account or farm was not found.
      tags:
        - StorageAccounts
      x-ms-examples:
        Returns the requested storage account.:
          parameters:
            accountId: f93c9df9e7af487fbda484a9201d9c18
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
            summary: "false"
          responses:
            "200":
              body:
                id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/storageaccounts/f93c9df9e7af487fbda484a9201d9c18
                location: local
                name: f93c9df9e7af487fbda484a9201d9c18
                properties:
                  accountId: f93c9df9e7af487fbda484a9201d9c18
                  accountStatus: Active
                  accountType: Standard_LRS
                  acquisitionOperationCount: 0
                  creationTime: 2018-01-17T01:56:30.983
                  currentOperation: None
                  permissions: Full
                  primaryEndpoints:
                    blob: https://authprod.blob.local.azurestack.external/
                    queue: https://authprod.queue.local.azurestack.external/
                    table: https://authprod.table.local.azurestack.external/
                  primaryLocation: local
                  provisioningState: Succeeded
                  statusOfPrimary: Available
                  tenantResourceGroupName: system.local
                  tenantStorageAccountName: authprod
                  tenantSubscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
                  tenantViewId: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourcegroups/system.local/providers/Microsoft.Storage/storageaccounts/authprod
                  wacInternalState: Active
                type: Microsoft.Storage.Admin/storageaccounts
            "404": {}
    post:
      description: Undelete a deleted storage account.
      operationId: StorageAccounts_Undelete
      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
        - $ref: "#/parameters/AccountIdParameter"
        - description: REST Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK -- Undelete either has been performed or account was not deleted.
      tags:
        - StorageAccounts
      x-ms-examples:
        Undelete a deleted storage account.:
          parameters:
            accountId: f93c9df9e7af487fbda484a9201d9c18
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
            summary: "false"
          responses:
            "200": {}
definitions:
  LocationStatus:
    description: Gets the status indicating whether the primary location of the storage account is available or unavailable.
    enum:
      - Available
      - Unavailable
    readOnly: true
    type: string
    x-ms-enum:
      modelAsString: true
      name: LocationStatus
  StorageAccount:
    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: Properties of the storage account.
    properties:
      properties:
        $ref: "#/definitions/StorageAccountProperties"
        description: Properties of the storage account.
        readOnly: true
        x-ms-client-flatten: true
    type: object
  StorageAccountList:
    description: Pageable list of storage accounts.
    properties:
      nextLink:
        description: URI to the next page.
        readOnly: true
        type: string
      value:
        description: List of storage accounts.
        items:
          $ref: "#/definitions/StorageAccount"
        readOnly: true
        type: array
    type: object
  StorageAccountOperation:
    description: The permissions of storage account in WAC.
    enum:
      - None
      - Create
      - Update
      - Suspend
      - Delete
      - Undelete
    readOnly: true
    type: string
    x-ms-enum:
      modelAsString: true
      name: StorageAccountOperation
  StorageAccountProperties:
    description: Properties of a storage account.
    properties:
      accountId:
        description: Internal storage account ID, which is not visible to tenant.
        readOnly: true
        type: string
      accountStatus:
        $ref: "#/definitions/StorageAccountStatus"
        description: The status of storage account.
      accountType:
        $ref: "#/definitions/StorageAccountType"
        description: Storage account type.
        readOnly: true
      acquisitionOperationCount:
        description: The count of acquisitions in the storage account.
        format: int32
        readOnly: true
        type: integer
      alternateName:
        description: Alternative storage account name being used during undelete operation.
        readOnly: true
        type: string
      creationTime:
        description: The creation date and time of storage account in UTC.
        readOnly: true
        type: string
      currentOperation:
        $ref: "#/definitions/StorageAccountOperation"
        description: Current operation being performed on Storage Account
        readOnly: true
      customDomain:
        description: The custom domain the user assigned to this storage account.
        readOnly: true
        type: string
      deletedTime:
        description: The date-time when the storage account was deleted.
        format: date-time
        readOnly: true
        type: string
      permissions:
        $ref: "#/definitions/WacAccountPermissions"
        description: The permissions on the storage account.
        readOnly: true
      primaryEndpoints:
        additionalProperties:
          type: string
        description: The URLs that are used to perform a retrieval of a public BLOB, queue, or table object.
        readOnly: true
      primaryLocation:
        description: The primary location for the storage account.
        readOnly: true
        type: string
      provisioningState:
        $ref: "#/definitions/StorageAccountState"
        description: The provisioning state of storage account.
        readOnly: true
      recoveredTime:
        description: The time when the storage account is undeleted.
        format: date-time
        readOnly: true
        type: string
      recycledTime:
        description: The time when the storage account is physically deleted.
        format: date-time
        readOnly: true
        type: string
      resourceAdminApiVersion:
        description: Storage admin REST API version.
        readOnly: true
        type: string
      statusOfPrimary:
        $ref: "#/definitions/LocationStatus"
        description: The status of primary location of storage account.
        readOnly: true
      tenantResourceGroupName:
        description: The name of resource group under which the storage account locates.
        readOnly: true
        type: string
      tenantStorageAccountName:
        description: Storage account name from tenant view.
        readOnly: true
        type: string
      tenantSubscriptionId:
        description: Subscription ID of the subscription under which the storage account locates.
        readOnly: true
        type: string
      tenantViewId:
        description: Resource URI of storage account from tenant view.
        readOnly: true
        type: string
      wacInternalState:
        $ref: "#/definitions/WacAccountStates"
        description: The internal state of storage account in WAC.
        readOnly: true
    type: object
  StorageAccountState:
    description: Storage account state.
    enum:
      - Creating
      - Succeeded
      - Suspended
    readOnly: true
    type: string
    x-ms-enum:
      modelAsString: true
      name: StorageAccountState
  StorageAccountStatus:
    description: The state of storage account in WAC.
    enum:
      - Active
      - Deleted
      - OutOfRetentionPeriod
      - Recycled
    type: string
    x-ms-enum:
      modelAsString: true
      name: StorageAccountStatus
  StorageAccountType:
    description: Storage account type.
    enum:
      - Standard_LRS
      - Standard_GRS
      - Standard_ZRS
      - Standard_RAGRS
      - Premium_LRS
    type: string
    x-ms-enum:
      modelAsString: true
      name: StorageAccountType
  WacAccountPermissions:
    description: Current operation being performed on Storage Account
    enum:
      - Empty
      - None
      - Read
      - Delete
      - Write
      - Full
    type: string
    x-ms-enum:
      modelAsString: true
      name: WacAccountPermissions
  WacAccountStates:
    description: Current operation being performed on Storage Account
    enum:
      - None
      - Active
      - Deleted
      - AboveQuota
      - Suspended
      - All
    type: string
    x-ms-enum:
      modelAsString: true
      name: WacAccountStates
