Share via


az storage share-rm

Manage Azure file shares using the Microsoft.Storage resource provider.

Commands

Name Description Type Status
az storage share-rm create

Create a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.

Core GA
az storage share-rm delete

Delete the specified Azure file share or share snapshot.

Core GA
az storage share-rm exists

Check for the existence of an Azure file share.

Core GA
az storage share-rm list

List all shares.

Core GA
az storage share-rm restore

Restore a file share within a valid retention days if share soft delete is enabled.

Core GA
az storage share-rm show

Show the properties for a specified Azure file share or share snapshot.

Core GA
az storage share-rm snapshot

Create a snapshot of an existing share under the specified account.

Core Preview
az storage share-rm stats

Get the usage bytes of the data stored on the share.

Core GA
az storage share-rm update

Update a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.

Core GA

az storage share-rm create

Create a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.

az storage share-rm create --account-name --storage-account
                           --name --share-name
                           [--access-tier {Cool, Hot, Premium, TransactionOptimized}]
                           [--bursting-max-mibps --paid-bursting-max-bandwidth-mibps]
                           [--enabled-protocols {NFS, SMB}]
                           [--metadata]
                           [--paid-bursting-enabled {0, 1, f, false, n, no, t, true, y, yes}]
                           [--paid-bursting-max-iops]
                           [--provisioned-bandwidth --provisioned-bandwidth-mibps]
                           [--provisioned-iops]
                           [--quota]
                           [--resource-group]
                           [--root-squash {AllSquash, NoRootSquash, RootSquash}]

Examples

Create a new Azure file share 'myfileshare' with metadata and quota as 10 GB under the storage account 'mystorageaccount'(account name) in resource group 'MyResourceGroup'.

az storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2

Create a new Azure file share 'myfileshare' with metadata and quota as 6000 GB under the storage account 'mystorageaccount'(account name) which enables large file share in resource group 'MyResourceGroup'.

az storage account update -g MyResourceGroup --name mystorageaccount --enable-large-file-share
az storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 6000 --metadata key1=value1 key2=value2

Create a new Azure file share 'myfileshare' with metadata and quota as 10 GB under the storage account 'mystorageaccount' (account id).

az storage share-rm create --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2

Create a new Azure file share 'myfileshare' under the storage account 'mystorageaccount' which enables provisionedv2 in resource group 'MyResourceGroup'.

az storage account create -g res3376 --name sto328 --sku StandardV2_LRS --kind FileStorage
az storage share-rm create --storage-account sto328  -g res3376  -n share1 --provisioned-bandwidth-mibps 60 --provisioned-iops 500

Required Parameters

--account-name --storage-account

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.

--name --share-name -n

The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--access-tier

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

Property Value
Parameter group: Properties Arguments
Accepted values: Cool, Hot, Premium, TransactionOptimized
--bursting-max-mibps --paid-bursting-max-bandwidth-mibps

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.

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
--enabled-protocols

The authentication protocol that is used for the file share. NFS protocol will be only available for premium file shares (file shares in the FileStorage account type). Can only be specified when creating a share.

Property Value
Parameter group: Properties Arguments
Accepted values: NFS, SMB
--metadata

A name-value pair to associate with the share as metadata. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--paid-bursting-enabled

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

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--paid-bursting-max-iops

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.

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
--provisioned-bandwidth --provisioned-bandwidth-mibps

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.

Property Value
Parameter group: Provisioned V2 Arguments
--provisioned-iops

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.

Property Value
Parameter group: Provisioned V2 Arguments
--quota -q

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.

Property Value
Parameter group: Properties Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--root-squash

Reduction of the access rights for the remote superuser. The property is for NFS share only. The default is NoRootSquash.

Property Value
Parameter group: Properties Arguments
Accepted values: AllSquash, NoRootSquash, RootSquash
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm delete

Delete the specified Azure file share or share snapshot.

Delete the specified Azure file share or share snapshot. BREAKING CHANGE: Snapshot can not be deleted by default and we have added a new parameter to use if you want to include sanpshots for delete operation.

az storage share-rm delete [--account-name --storage-account]
                           [--ids]
                           [--include]
                           [--name --share-name]
                           [--resource-group]
                           [--snapshot]
                           [--subscription]
                           [--yes]

Examples

Delete an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.

az storage share-rm delete -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Delete an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).

az storage share-rm delete --storage-account mystorageaccount --name myfileshare

Delete an Azure file share by resource id.

az storage share-rm delete --ids file-share-id

Delete an Azure file share snapshot.

az storage share-rm delete --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"

Delete an Azure file share and all its snapshots.

az storage share-rm delete --include snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Delete an Azure file share and all its snapshots (leased/unleased).

az storage share-rm delete --include leased-snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name --storage-account

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.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--include

Optional. Valid values are: snapshots, leased-snapshots, none. The default value is none. For 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails.

Property Value
Default value: none
--name --share-name -n

The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--snapshot

Optional, used to delete a snapshot.The DateTime value that specifies the share snapshot to retrieve.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm exists

Check for the existence of an Azure file share.

az storage share-rm exists [--ids]
                           [--name]
                           [--resource-group]
                           [--storage-account]
                           [--subscription]

Examples

Check for the existence of an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.

az storage share-rm exists -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Check for the existence of an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).

az storage share-rm exists --storage-account mystorageaccount --name myfileshare

Check for the existence of an Azure file share by resource id.

az storage share-rm exists --ids file-share-id

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The file share name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--storage-account

The name or ID of the storage account.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm list

List all shares.

az storage share-rm list --account-name --storage-account
                         [--filter]
                         [--include-deleted {0, 1, f, false, n, no, t, true, y, yes}]
                         [--include-snapshot {0, 1, f, false, n, no, t, true, y, yes}]
                         [--max-items]
                         [--maxpagesize]
                         [--next-token]
                         [--resource-group]

Examples

List the Azure file shares under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.

az storage share-rm list -g MyResourceGroup --storage-account mystorageaccount

List the Azure file shares under the storage account 'mystorageaccount' (account id).

az storage share-rm list --storage-account mystorageaccount

List all file shares include deleted under the storage account 'mystorageaccount' .

az storage share-rm list --storage-account mystorageaccount --include-deleted

List all file shares include its all snapshots under the storage account 'mystorageaccount'

az storage share-rm list --storage-account mystorageaccount --include-snapshot

List all file shares include its all snapshots and deleted file shares under the storage account 'mystorageaccount'

az storage share-rm list --storage-account mystorageaccount --include-deleted --include-snapshot

Required Parameters

--account-name --storage-account

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.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter

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

--include-deleted

Include soft deleted file shares when specified.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--include-snapshot

Include file share snapshots when specified.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--maxpagesize

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

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm restore

Restore a file share within a valid retention days if share soft delete is enabled.

az storage share-rm restore --deleted-version
                            [--ids]
                            [--name]
                            [--resource-group]
                            [--restored-name]
                            [--storage-account]
                            [--subscription]

Examples

Restore a file share within a valid retention days if share soft delete is enabled.

az storage share-rm restore -n deletedshare --deleted-version 01D64EB9886F00C4 -g MyResourceGroup --storage-account mystorageaccount

Restore a file share within a valid retention days if share soft delete is enabled to a new name.

az storage share-rm restore -n deletedshare --deleted-version 01D64EB9886F00C4 --restored-name newname -g MyResourceGroup --storage-account mystorageaccount

Required Parameters

--deleted-version

Identify the version of the deleted share that will be restored.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The file share name. Identify the name of the deleted share that will be restored.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--restored-name

A new file share name to be restored. If not specified, deleted share name will be used.

--storage-account

The name or ID of the storage account.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm show

Show the properties for a specified Azure file share or share snapshot.

az storage share-rm show [--account-name --storage-account]
                         [--expand]
                         [--ids]
                         [--name --share-name]
                         [--resource-group]
                         [--snapshot]
                         [--subscription]

Examples

Show the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.

az storage share-rm show -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Show the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).

az storage share-rm show --storage-account mystorageaccount --name myfileshare

Show the properties of an Azure file share by resource id.

az storage share-rm show --ids file-share-id

Show the properties of an Azure file share snapshot

az storage share-rm show --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name --storage-account

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.

Property Value
Parameter group: Resource Id Arguments
--expand

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

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --share-name -n

The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--snapshot

Optional, used to delete a snapshot.The DateTime value that specifies the share snapshot to retrieve.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm snapshot

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a snapshot of an existing share under the specified account.

az storage share-rm snapshot [--access-tier {Cool, Hot, Premium, TransactionOptimized}]
                             [--enabled-protocols {NFS, SMB}]
                             [--ids]
                             [--metadata]
                             [--name]
                             [--quota]
                             [--resource-group]
                             [--root-squash {AllSquash, NoRootSquash, RootSquash}]
                             [--storage-account]
                             [--subscription]

Examples

Create a snapshot of an existing share under the specified account.

az storage share-rm snapshot -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--access-tier

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

Property Value
Accepted values: Cool, Hot, Premium, TransactionOptimized
--enabled-protocols

Immutable property for file shares protocol. NFS protocol will be only available for premium file shares (file shares in the FileStorage account type).

Property Value
Accepted values: NFS, SMB
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--metadata

Metadata in space-separated key=value pairs that is associated with the share. This overwrites any existing metadata.

--name -n

The file share name.

Property Value
Parameter group: Resource Id Arguments
--quota -q

The maximum size of the share in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--root-squash

Reduction of the access rights for the remote superuser.

Property Value
Accepted values: AllSquash, NoRootSquash, RootSquash
--storage-account

The name or ID of the storage account.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm stats

Get the usage bytes of the data stored on the share.

az storage share-rm stats [--ids]
                          [--name]
                          [--resource-group]
                          [--storage-account]
                          [--subscription]

Examples

Get the usage bytes of the data stored on the share.

az storage share-rm stats -g MyResourceGroup --storage-account mystorageaccount --name myfileshare

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The file share name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--storage-account

The name or ID of the storage account.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az storage share-rm update

Update a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.

az storage share-rm update [--access-tier {Cool, Hot, Premium, TransactionOptimized}]
                           [--account-name --storage-account]
                           [--add]
                           [--bursting-max-mibps --paid-bursting-max-bandwidth-mibps]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--ids]
                           [--metadata]
                           [--name --share-name]
                           [--paid-bursting-enabled {0, 1, f, false, n, no, t, true, y, yes}]
                           [--paid-bursting-max-iops]
                           [--provisioned-bandwidth --provisioned-bandwidth-mibps]
                           [--provisioned-iops]
                           [--quota]
                           [--remove]
                           [--resource-group]
                           [--root-squash {AllSquash, NoRootSquash, RootSquash}]
                           [--set]
                           [--subscription]

Examples

Update the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.

az storage share-rm update -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2

Update the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).

az storage share-rm update --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2

Update the properties for an Azure file shares by resource id.

az storage share-rm update --ids file-share-id --quota 3 --metadata key1=value1 key2=value2

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--access-tier

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

Property Value
Parameter group: Properties Arguments
Accepted values: Cool, Hot, Premium, TransactionOptimized
--account-name --storage-account

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.

Property Value
Parameter group: Resource Id Arguments
--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
--bursting-max-mibps --paid-bursting-max-bandwidth-mibps

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.

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--metadata

A name-value pair to associate with the share as metadata. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--name --share-name -n

The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

Property Value
Parameter group: Resource Id Arguments
--paid-bursting-enabled

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

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--paid-bursting-max-iops

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.

Property Value
Parameter group: Provisioned V1 Paid Bursting Arguments
--provisioned-bandwidth --provisioned-bandwidth-mibps

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.

Property Value
Parameter group: Provisioned V2 Arguments
--provisioned-iops

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.

Property Value
Parameter group: Provisioned V2 Arguments
--quota -q

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.

Property Value
Parameter group: Properties Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--root-squash

Reduction of the access rights for the remote superuser. The property is for NFS share only. The default is NoRootSquash.

Property Value
Parameter group: Properties Arguments
Accepted values: AllSquash, NoRootSquash, RootSquash
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False