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/shares.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-shares
  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: {}
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares":
    get:
      description: Returns a list of storage shares.
      operationId: Shares_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
      responses:
        "200":
          description: OK -- The list of storage shares has been returned.
          schema:
            $ref: "#/definitions/ShareList"
        "404":
          description: NOT FOUND -- The farm cannot be found.
      tags:
        - Shares
      x-ms-examples:
        Returns a list of storage shares.:
          parameters:
            api-version: 2015-12-01-preview
            farmId: 3cf03497-c44a-4e51-a56f-3987d88c70af
            resourceGroupName: System.local
            subscriptionId: 9ad61516-995c-4873-a21f-7e44904f0ed2
          responses:
            "200":
              body:
                - id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourceGroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/shares/||SU1FileServer.azurestack.local|SU1_ObjStore
                  location: local
                  name: 3cf03497-c44a-4e51-a56f-3987d88c70af/||SU1FileServer.azurestack.local|SU1_ObjStore
                  properties:
                    freeCapacity: 2327667589120
                    healthStatus: Healthy
                    shareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                    totalCapacity: 2728176648192
                    uncPath: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                    usedCapacity: 400509059072
                  type: Microsoft.Storage.Admin/farms/shares
            "404": {}
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}":
    get:
      description: Returns a storage share.
      operationId: Shares_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
        - 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 storage share has been returned.
          schema:
            $ref: "#/definitions/Share"
        "404":
          description: NOT FOUND -- The farm or storage share cannot be found.
      tags:
        - Shares
      x-ms-examples:
        Returns a storage share.:
          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:
                id: /subscriptions/9ad61516-995c-4873-a21f-7e44904f0ed2/resourceGroups/System.local/providers/Microsoft.Storage.Admin/farms/3cf03497-c44a-4e51-a56f-3987d88c70af/shares/||SU1FileServer.azurestack.local|SU1_ObjStore
                location: local
                name: 3cf03497-c44a-4e51-a56f-3987d88c70af/||SU1FileServer.azurestack.local|SU1_ObjStore
                properties:
                  freeCapacity: 2327667589120
                  healthStatus: Healthy
                  shareName: "||SU1FileServer.azurestack.local|SU1_ObjStore"
                  totalCapacity: 2728176648192
                  uncPath: \\\\SU1FileServer.azurestack.local\\SU1_ObjStore
                  usedCapacity: 400509059072
                type: Microsoft.Storage.Admin/farms/shares
            "404": {}
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}/metricdefinitions":
    get:
      description: Returns a list of metric definitions for a storage share.
      operationId: Shares_ListMetricDefinitions
      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 metric definitions has been returned.
          schema:
            description: Pageable list of metric definitions.
            properties:
              nextLink:
                description: URI to the next page.
                readOnly: true
                type: string
              value:
                description: List of metric definitions.
                items:
                  description: Metric definition.
                  properties:
                    metricAvailabilities:
                      description: Metric availabilities.
                      items:
                        description: Metric availability.
                        properties:
                          retention:
                            description: Retention of metric.
                            type: string
                          timeGrain:
                            description: Time grain.
                            type: string
                        type: object
                      readOnly: true
                      type: array
                    name:
                      description: Localizable string.
                      properties:
                        localizedValue:
                          description: Localized value of the string.
                          type: string
                        value:
                          description: Value of the string.
                          type: string
                      type: object
                    primaryAggregationType:
                      description: Aggregate type.
                      enum:
                        - None
                        - Average
                        - Total
                        - Minimum
                        - Maximum
                        - Last
                      readOnly: true
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: AggregateType
                    unit:
                      description: Metric unit.
                      enum:
                        - Count
                        - Bytes
                        - Seconds
                        - CountPerSecond
                        - BytesPerSecond
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: MetricUnit
                  type: object
                readOnly: true
                type: array
            type: object
        "404":
          description: NOT FOUND -- The farm cannot be found.
      tags:
        - Shares
      x-ms-examples:
        Returns a list of metric definitions for a storage share.:
          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:
                value:
                  - metricAvailabilities:
                      - retention: P30D
                        timeGrain: PT1H
                      - retention: P60D
                        timeGrain: P1D
                    name:
                      localizedValue: Total Capacity
                      value: TotalCapacity
                    primaryAggregationType: Average
                    unit: Count
                  - metricAvailabilities:
                      - retention: P30D
                        timeGrain: PT1H
                      - retention: P60D
                        timeGrain: P1D
                    name:
                      localizedValue: Used Capacity
                      value: UsedCapacity
                    primaryAggregationType: Average
                    unit: Count
                  - metricAvailabilities:
                      - retention: P30D
                        timeGrain: PT1H
                      - retention: P60D
                        timeGrain: P1D
                    name:
                      localizedValue: Free Space
                      value: FreeSpace
                    primaryAggregationType: Average
                    unit: Count
                  - metricAvailabilities:
                      - retention: P30D
                        timeGrain: PT1H
                      - retention: P60D
                        timeGrain: P1D
                    name:
                      localizedValue: Used Capacity Percentage
                      value: "UsedCapacityPercentage "
                    primaryAggregationType: Average
                    unit: Count
                  - metricAvailabilities:
                      - retention: P30D
                        timeGrain: PT1H
                      - retention: P60D
                        timeGrain: P1D
                    name:
                      localizedValue: Free Space Percentage
                      value: "FreeSpacePercentage "
                    primaryAggregationType: Average
                    unit: Count
            "404": {}
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage.Admin/farms/{farmId}/shares/{shareName}/metrics":
    get:
      description: Returns a list of metrics for a storage share.
      operationId: Shares_ListMetrics
      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 metrics has been returned.
          schema:
            description: Pageable list of metrics.
            properties:
              nextLink:
                description: URI to the next page.
                readOnly: true
                type: string
              value:
                description: List of metrics.
                items:
                  description: Metric information.
                  properties:
                    endTime:
                      description: Metric end time.
                      format: date-time
                      readOnly: true
                      type: string
                    metricUnit:
                      description: Metric unit.
                      enum:
                        - Count
                        - Bytes
                        - Seconds
                        - CountPerSecond
                        - BytesPerSecond
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: MetricUnit
                    metricValues:
                      description: List of metric values.
                      items:
                        description: Metric value.
                        properties:
                          average:
                            description: Average value of metric.
                            format: float
                            readOnly: true
                            type: number
                          count:
                            description: Count of metric values.
                            format: int32
                            readOnly: true
                            type: integer
                          maximum:
                            description: Maximum value of metric.
                            format: float
                            readOnly: true
                            type: number
                          minimum:
                            description: Minimum value of metric.
                            format: float
                            readOnly: true
                            type: number
                          properties:
                            description: Metric value properties.
                            readOnly: true
                            type: string
                          timeStamp:
                            description: Timestamp of metric value.
                            format: date-time
                            readOnly: true
                            type: string
                          total:
                            description: Total value of metric.
                            format: float
                            readOnly: true
                            type: number
                      readOnly: true
                      type: array
                    name:
                      description: Localizable string.
                      properties:
                        localizedValue:
                          description: Localized value of the string.
                          type: string
                        value:
                          description: Value of the string.
                          type: string
                      type: object
                    startTime:
                      description: Metric start time.
                      format: date-time
                      readOnly: true
                      type: string
                    timeGrain:
                      description: Metric time grain.
                      readOnly: true
                      type: string
                  type: object
                readOnly: true
                type: array
            type: object
        "404":
          description: NOT FOUND -- The farm or share cannot be found.
      tags:
        - Shares
      x-ms-examples:
        Returns a list of metrics for a storage share.:
          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:
                value:
                  - endTime: 2018-01-30T19:31:25.5502828Z
                    metricUnit: Count
                    metricValues:
                      - average: 2728176648192
                        timeStamp: 2018-01-29T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-28T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-27T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-26T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-25T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-24T00:00:00Z
                      - average: 2728176648192
                        timeStamp: 2018-01-23T00:00:00Z
                    name:
                      localizedValue: Total Capacity
                      value: TotalCapacity
                    startTime: 2018-01-23T00:00:00Z
                    timeGrain: P1D
                  - endTime: 2018-01-30T19:31:25.5502828Z
                    metricUnit: Count
                    metricValues:
                      - average: 389873692672
                        timeStamp: 2018-01-29T00:00:00Z
                      - average: 379637998762.6667
                        timeStamp: 2018-01-28T00:00:00Z
                      - average: 369550244352
                        timeStamp: 2018-01-27T00:00:00Z
                      - average: 359099803818.6667
                        timeStamp: 2018-01-26T00:00:00Z
                      - average: 348343386965.3333
                        timeStamp: 2018-01-25T00:00:00Z
                      - average: 338910678186.6667
                        timeStamp: 2018-01-24T00:00:00Z
                      - average: 330334962346.6667
                        timeStamp: 2018-01-23T00:00:00Z
                    name:
                      localizedValue: Used Capacity
                      value: UsedCapacity
                    startTime: 2018-01-23T00:00:00Z
                    timeGrain: P1D
                  - endTime: 2018-01-30T19:31:25.5502828Z
                    metricUnit: Count
                    metricValues:
                      - average: 2338302955520
                        timeStamp: 2018-01-29T00:00:00Z
                      - average: 2348538649429.3335
                        timeStamp: 2018-01-28T00:00:00Z
                      - average: 2358626403840
                        timeStamp: 2018-01-27T00:00:00Z
                      - average: 2369076844373.3335
                        timeStamp: 2018-01-26T00:00:00Z
                      - average: 2379833261226.6665
                        timeStamp: 2018-01-25T00:00:00Z
                      - average: 2389265970005.3335
                        timeStamp: 2018-01-24T00:00:00Z
                      - average: 2397841685845.3335
                        timeStamp: 2018-01-23T00:00:00Z
                    name:
                      localizedValue: Free Space
                      value: FreeSpace
                    startTime: 2018-01-23T00:00:00Z
                    timeGrain: P1D
                  - endTime: 2018-01-30T19:31:25.5502828Z
                    metricUnit: Count
                    metricValues:
                      - average: 0.1429063227743609
                        timeStamp: 2018-01-29T00:00:00Z
                      - average: 0.139154478510128
                        timeStamp: 2018-01-28T00:00:00Z
                      - average: 0.13545686075603133
                        timeStamp: 2018-01-27T00:00:00Z
                      - average: 0.13162630215189586
                        timeStamp: 2018-01-26T00:00:00Z
                      - average: 0.12768358940253569
                        timeStamp: 2018-01-25T00:00:00Z
                      - average: 0.1242260754673886
                        timeStamp: 2018-01-24T00:00:00Z
                      - average: 0.12108268816302059
                        timeStamp: 2018-01-23T00:00:00Z
                    name:
                      localizedValue: Used Capacity Percentage
                      value: "UsedCapacityPercentage "
                    startTime: 2018-01-23T00:00:00Z
                    timeGrain: P1D
                  - endTime: 2018-01-30T19:31:25.5502828Z
                    metricUnit: Count
                    metricValues:
                      - average: 0.857093677225639
                        timeStamp: 2018-01-29T00:00:00Z
                      - average: 0.8608455214898721
                        timeStamp: 2018-01-28T00:00:00Z
                      - average: 0.8645431392439686
                        timeStamp: 2018-01-27T00:00:00Z
                      - average: 0.8683736978481039
                        timeStamp: 2018-01-26T00:00:00Z
                      - average: 0.8723164105974645
                        timeStamp: 2018-01-25T00:00:00Z
                      - average: 0.8757739245326116
                        timeStamp: 2018-01-24T00:00:00Z
                      - average: 0.8789173118369794
                        timeStamp: 2018-01-23T00:00:00Z
                    name:
                      localizedValue: Free Space Percentage
                      value: "FreeSpacePercentage "
                    startTime: 2018-01-23T00:00:00Z
                    timeGrain: P1D
            "404": {}
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  Share:
    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:
        $ref: "#/definitions/ShareProperties"
        description: Storage share properties.
        readOnly: true
        x-ms-client-flatten: true
    type: object
  ShareList:
    description: List of storage shares.
    items:
      $ref: "#/definitions/Share"
    type: array
  ShareProperties:
    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
