Compartir a través de


File Shares - List

Lists all shares.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares?api-version=2024-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares?api-version=2024-01-01&$maxpagesize={$maxpagesize}&$filter={$filter}&$expand={$expand}

URI Parameters

Name In Required Type Description
accountName
path True

string

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Regex pattern: ^[a-z0-9]+$

resourceGroupName
path True

string

The name of the resource group within the user's subscription. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

$expand
query

string

Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ','

$filter
query

string

Optional. When specified, only share names starting with the filter will be listed.

$maxpagesize
query

string

Optional. Specified maximum number of shares that can be included in the list.

Responses

Name Type Description
200 OK

FileShareItems

OK -- List Shares operation completed successfully.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ListDeletedShares
ListShares
ListShareSnapshots
ListSharesPaidBursting
ListSharesProvisionedV2

ListDeletedShares

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2024-01-01&$expand=deleted

Sample response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890",
      "name": "share1644",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024,
        "version": "1234567890",
        "deleted": true,
        "deletedTime": "2019-12-14T08:20:47Z",
        "remainingRetentionDays": 30
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024
      }
    }
  ]
}

ListShares

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2024-01-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644",
      "name": "share1644",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024
      }
    }
  ],
  "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103"
}

ListShareSnapshots

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2024-01-01&$expand=snapshots

Sample response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2020-10-26T05:47:05.0000000Z",
        "shareQuota": 1024
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2020-10-26T05:47:05.0000000Z",
        "shareQuota": 1024,
        "snapshotTime": "2020-10-26T05:48:07.0000000Z"
      }
    }
  ]
}

ListSharesPaidBursting

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2024-01-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644",
      "name": "share1644",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024,
        "fileSharePaidBursting": {
          "paidBurstingEnabled": true,
          "paidBurstingMaxIops": 102400,
          "paidBurstingMaxBandwidthMibps": 10340
        }
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2019-05-14T08:20:47Z",
        "shareQuota": 1024,
        "fileSharePaidBursting": {
          "paidBurstingEnabled": true,
          "paidBurstingMaxIops": 102400,
          "paidBurstingMaxBandwidthMibps": 10340
        }
      }
    }
  ],
  "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103"
}

ListSharesProvisionedV2

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2024-01-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644",
      "name": "share1644",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "lastModifiedTime": "2024-10-25T01:50:50.0000000Z",
        "shareQuota": 100,
        "provisionedIops": 5000,
        "provisionedBandwidthMibps": 200,
        "includedBurstIops": 15000,
        "maxBurstCreditsForIops": 36000000,
        "nextAllowedQuotaDowngradeTime": "Sat, 26 Oct 2024 01:50:50 GMT",
        "nextAllowedProvisionedIopsDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT",
        "nextAllowedProvisionedBandwidthDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT"
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
      "name": "share4052",
      "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "lastModifiedTime": "2024-10-25T01:50:50.0000000Z",
        "shareQuota": 100,
        "provisionedIops": 5000,
        "provisionedBandwidthMibps": 200,
        "includedBurstIops": 15000,
        "maxBurstCreditsForIops": 36000000,
        "nextAllowedQuotaDowngradeTime": "Sat, 26 Oct 2024 01:50:50 GMT",
        "nextAllowedProvisionedIopsDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT",
        "nextAllowedProvisionedBandwidthDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT"
      }
    }
  ],
  "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103"
}

Definitions

Name Description
AccessPolicy
CloudError

An error response from the Storage service.

CloudErrorBody

An error response from the Storage service.

EnabledProtocols

The authentication protocol that is used for the file share. Can only be specified when creating a share.

FileShareItem

The file share properties be listed out.

FileShareItems

Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares.

FileSharePaidBursting

File Share Paid Bursting properties.

LeaseDuration

Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.

LeaseState

Lease state of the share.

LeaseStatus

The lease status of the share.

RootSquashType

The property is for NFS share only. The default is NoRootSquash.

ShareAccessTier

Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.

SignedIdentifier

AccessPolicy

Name Type Description
expiryTime

string

Expiry time of the access policy

permission

string

List of abbreviated permissions.

startTime

string

Start time of the access policy

CloudError

An error response from the Storage service.

Name Type Description
error

CloudErrorBody

An error response from the Storage service.

CloudErrorBody

An error response from the Storage service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

EnabledProtocols

The authentication protocol that is used for the file share. Can only be specified when creating a share.

Value Description
NFS
SMB

FileShareItem

The file share properties be listed out.

Name Type Description
etag

string

Resource Etag.

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.accessTier

ShareAccessTier

Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.

properties.accessTierChangeTime

string

Indicates the last modification time for share access tier.

properties.accessTierStatus

string

Indicates if there is a pending transition for access tier.

properties.deleted

boolean

Indicates whether the share was deleted.

properties.deletedTime

string

The deleted time if the share was deleted.

properties.enabledProtocols

EnabledProtocols

The authentication protocol that is used for the file share. Can only be specified when creating a share.

properties.fileSharePaidBursting

FileSharePaidBursting

File Share Paid Bursting properties.

properties.includedBurstIops

integer

The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type.

properties.lastModifiedTime

string

Returns the date and time the share was last modified.

properties.leaseDuration

LeaseDuration

Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.

properties.leaseState

LeaseState

Lease state of the share.

properties.leaseStatus

LeaseStatus

The lease status of the share.

properties.maxBurstCreditsForIops

integer

The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type.

properties.metadata

object

A name-value pair to associate with the share as metadata.

properties.nextAllowedProvisionedBandwidthDowngradeTime

string

Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type.

properties.nextAllowedProvisionedIopsDowngradeTime

string

Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type.

properties.nextAllowedQuotaDowngradeTime

string

Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type

properties.provisionedBandwidthMibps

integer

The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth.

properties.provisionedIops

integer

The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS.

properties.remainingRetentionDays

integer

Remaining retention days for share that was soft deleted.

properties.rootSquash

RootSquashType

The property is for NFS share only. The default is NoRootSquash.

properties.shareQuota

integer

The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size.

properties.shareUsageBytes

integer

The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.

properties.signedIdentifiers

SignedIdentifier[]

List of stored access policies specified on the share.

properties.snapshotTime

string

Creation time of share snapshot returned in the response of list shares with expand param "snapshots".

properties.version

string

The version of the share.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

FileShareItems

Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares.

Name Type Description
nextLink

string

Request URL that can be used to query next page of shares. Returned when total number of requested shares exceed maximum page size.

value

FileShareItem[]

List of file shares returned.

FileSharePaidBursting

File Share Paid Bursting properties.

Name Type Description
paidBurstingEnabled

boolean

Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned v1 SSD account type.

paidBurstingMaxBandwidthMibps

integer

The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for a share.

paidBurstingMaxIops

integer

The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the maximum allowed IOPS for a share.

LeaseDuration

Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.

Value Description
Fixed
Infinite

LeaseState

Lease state of the share.

Value Description
Available
Breaking
Broken
Expired
Leased

LeaseStatus

The lease status of the share.

Value Description
Locked
Unlocked

RootSquashType

The property is for NFS share only. The default is NoRootSquash.

Value Description
AllSquash
NoRootSquash
RootSquash

ShareAccessTier

Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.

Value Description
Cool
Hot
Premium
TransactionOptimized

SignedIdentifier

Name Type Description
accessPolicy

AccessPolicy

Access policy

id

string

An unique identifier of the stored access policy.