az storage share
Note
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Manage file shares.
Commands
Name | Description | Type | Status |
---|---|---|---|
az storage share close-handle |
Close file handles of a file share. |
Core | GA |
az storage share close-handle (storage-preview extension) |
Close file handles of a file share. |
Extension | GA |
az storage share create |
Creates a new share under the specified account. |
Core | GA |
az storage share delete |
Mark the specified share for deletion. |
Core | GA |
az storage share exists |
Check for the existence of a file share. |
Core | GA |
az storage share generate-sas |
Generate a shared access signature for the share. |
Core | GA |
az storage share list |
List the file shares in a storage account. |
Core | GA |
az storage share list-handle |
List file handles of a file share. |
Core | GA |
az storage share list-handle (storage-preview extension) |
List file handles of a file share. |
Extension | GA |
az storage share metadata |
Manage the metadata of a file share. |
Core | GA |
az storage share metadata show |
Return all user-defined metadata for the specified share. |
Core | GA |
az storage share metadata update |
Set one or more user-defined name-value pairs for the specified share. |
Core | GA |
az storage share policy |
Manage shared access policies of a storage file share. |
Core | GA |
az storage share policy create |
Create a stored access policy on the containing object. |
Core | GA |
az storage share policy delete |
Delete a stored access policy on a containing object. |
Core | GA |
az storage share policy list |
List stored access policies on a containing object. |
Core | GA |
az storage share policy show |
Show a stored access policy on a containing object. |
Core | GA |
az storage share policy update |
Set a stored access policy on a containing object. |
Core | GA |
az storage share show |
Return all user-defined metadata and system properties for the specified share. |
Core | GA |
az storage share snapshot |
Create a snapshot of an existing share under the specified account. |
Core | GA |
az storage share stats |
Get the approximate size of the data stored on the share, rounded up to the nearest gigabyte. |
Core | GA |
az storage share update |
Set service-defined properties for the specified share. |
Core | GA |
az storage share url |
Create a URI to access a file share. |
Core | GA |
az storage share close-handle
Close file handles of a file share.
az storage share close-handle --name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent]
[--close-all {false, true}]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--handle-id]
[--path]
[--recursive {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
Examples
Close all file handles of a file share recursively.
az storage share close-handle --account-name MyAccount --name MyFileShare --close-all --recursive
az storage share close-handle --account-name MyAccount --name MyFileShare --handle-id "*" --recursive
Close all file handles of a file directory recursively.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1' --close-all --recursive
Close all file handles of a file.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt' --close-all
Close file handle with a specific handle-id of a file.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt' --handle-id "id"
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Required parameter to use with OAuth (Azure AD) Authentication for Files. This will bypass any file/directory level permission checks and allow access, based on the allowed data actions, even if there are ACLs in place for those files/directories.
Whether or not to close all the file handles. Specify close-all or a specific handle-id.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
If true, the trailing dot will be trimmed from the target URI. Default to False.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Specifies handle ID opened on the file or directory to be closed. Astrix (‘*’) is a wildcard that specifies all handles.
The path to the file/directory within the file share.
Boolean that specifies if operation should apply to the directory specified in the URI, its files, with its subdirectories and their files.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share close-handle (storage-preview extension)
Close file handles of a file share.
az storage share close-handle --name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent]
[--close-all {false, true}]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--handle-id]
[--path]
[--recursive {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
Examples
Close all file handles of a file share recursively.
az storage share close-handle --account-name MyAccount --name MyFileShare --close-all --recursive
az storage share close-handle --account-name MyAccount --name MyFileShare --handle-id "*" --recursive
Close all file handles of a file directory recursively.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1' --close-all --recursive
Close all file handles of a file.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt' --close-all
Close file handle with a specific handle-id of a file.
az storage share close-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt' --handle-id "id"
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Required parameter to use with OAuth (Azure AD) Authentication for Files. This will bypass any file/directory level permission checks and allow access, based on the allowed data actions, even if there are ACLs in place for those files/directories.
Whether or not to close all the file handles. Specify close-all or a specific handle-id.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
If true, the trailing dot will be trimmed from the target URI. Default to False.
Specifies handle ID opened on the file or directory to be closed. Astrix (‘*’) is a wildcard that specifies all handles.
The path to the file/directory within the file share.
Boolean that specifies if operation should apply to the directory specified in the URI, its files, with its subdirectories and their files.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share create
Creates a new share under the specified account.
az storage share create --name
[--account-key]
[--account-name]
[--connection-string]
[--fail-on-exist]
[--file-endpoint]
[--metadata]
[--quota]
[--sas-token]
[--timeout]
Examples
Creates a new share under the specified account. (autogenerated)
az storage share create --account-name MyAccount --name MyFileShare
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Specify whether to throw an exception when the share exists. False by default.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
Specifies the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120).
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share delete
Mark the specified share for deletion.
If the share does not exist, the operation fails on the service. By default, the exception is swallowed by the client. To expose the exception, specify True for fail_not_exist.
az storage share delete --name
[--account-key]
[--account-name]
[--connection-string]
[--delete-snapshots {include, include-leased}]
[--fail-not-exist]
[--file-endpoint]
[--sas-token]
[--snapshot]
[--timeout]
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Specify the deletion strategy when the share has snapshots.
Specify whether to throw an exception when the share doesn't exists. False by default.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.Specify this argument to delete a specific snapshot only. delete_snapshots must be None if this is specified.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share exists
Check for the existence of a file share.
az storage share exists --name
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--sas-token]
[--snapshot]
[--timeout]
Examples
Check for the existence of a file share. (autogenerated)
az storage share exists --account-key 00000000 --account-name MyAccount --name MyFileShare
Check for the existence of a file share (autogenerated)
az storage share exists --connection-string $connectionString --name MyFileShare
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share generate-sas
Generate a shared access signature for the share.
az storage share generate-sas --name
[--account-key]
[--account-name]
[--cache-control]
[--connection-string]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-type]
[--expiry]
[--file-endpoint]
[--https-only]
[--ip]
[--permissions]
[--policy-name]
[--start]
Examples
Generate a sas token for a fileshare and use it to upload a file.
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
sas=`az storage share generate-sas -n MyShare --account-name MyStorageAccount --https-only --permissions dlrw --expiry $end -o tsv`
az storage file upload -s MyShare --account-name MyStorageAccount --source file.txt --sas-token $sas
Generate a shared access signature for the share. (autogenerated)
az storage share generate-sas --account-key 00000000 --account-name MyStorageAccount --expiry 2037-12-31T23:59:00Z --name MyShare --permissions dlrw
Generate a shared access signature for the share. (autogenerated)
az storage share generate-sas --connection-string $connectionString --expiry 2019-02-01T12:20Z --name MyShare --permissions dlrw
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Response header value for Cache-Control when resource is accessed using this shared access signature.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Response header value for Content-Disposition when resource is accessed using this shared access signature.
Response header value for Content-Encoding when resource is accessed using this shared access signature.
Response header value for Content-Language when resource is accessed using this shared access signature.
Response header value for Content-Type when resource is accessed using this shared access signature.
Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes invalid. Do not use if a stored access policy is referenced with --policy-name that specifies this value.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Only permit requests made with the HTTPS protocol. If omitted, requests from both the HTTP and HTTPS protocol are permitted.
Specifies the IP address or range of IP addresses from which to accept requests. Supports only IPv4 style addresses.
The permissions the SAS grants. Allowed values: (c)reate (d)elete (l)ist (r)ead (w)rite. Do not use if a stored access policy is referenced with --id that specifies this value. Can be combined.
The name of a stored access policy within the share's ACL.
Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes valid. Do not use if a stored access policy is referenced with --policy-name that specifies this value. Defaults to the time of the request.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share list
List the file shares in a storage account.
az storage share list [--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--include-metadata]
[--include-snapshots]
[--marker]
[--num-results]
[--prefix]
[--sas-token]
[--timeout]
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Specifies that share metadata be returned in the response.
Specifies that share snapshots be returned in the response.
An opaque continuation token. This value can be retrieved from the next_marker field of a previous generator object if num_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped.
Specify the maximum number to return. If the request does not specify num_results, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remaining of the results. Provide "*" to return all.
Filter the results to return only blobs whose name begins with the specified prefix.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share list-handle
List file handles of a file share.
az storage share list-handle --name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--marker]
[--max-results]
[--path]
[--recursive {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
Examples
List all file handles of a file share recursively.
az storage share list-handle --account-name MyAccount --name MyFileShare --recursive
List all file handles of a file directory recursively.
az storage share list-handle --account-name MyAccount --name MyFileShare --path 'dir1' --recursive
List all file handles of a file.
az storage share list-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt'
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Required parameter to use with OAuth (Azure AD) Authentication for Files. This will bypass any file/directory level permission checks and allow access, based on the allowed data actions, even if there are ACLs in place for those files/directories.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
If true, the trailing dot will be trimmed from the target URI. Default to False.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
An opaque continuation token. This value can be retrieved from the next_marker field of a previous generator object if max_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped.
Specifies the maximum number of handles taken on files and/or directories to return. If the request does not specify max_results or specifies a value greater than 5,000, the server will return up to 5,000 items. Setting max_results to a value less than or equal to zero results in error response code 400 (Bad Request).
The path to the file/directory within the file share.
Boolean that specifies if operation should apply to the directory specified in the URI, its files, with its subdirectories and their files.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share list-handle (storage-preview extension)
List file handles of a file share.
az storage share list-handle --name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--marker]
[--max-results]
[--path]
[--recursive {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
Examples
List all file handles of a file share recursively.
az storage share list-handle --account-name MyAccount --name MyFileShare --recursive
List all file handles of a file directory recursively.
az storage share list-handle --account-name MyAccount --name MyFileShare --path 'dir1' --recursive
List all file handles of a file.
az storage share list-handle --account-name MyAccount --name MyFileShare --path 'dir1/test.txt'
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Required parameter to use with OAuth (Azure AD) Authentication for Files. This will bypass any file/directory level permission checks and allow access, based on the allowed data actions, even if there are ACLs in place for those files/directories.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
If true, the trailing dot will be trimmed from the target URI. Default to False.
An opaque continuation token. This value can be retrieved from the next_marker field of a previous generator object if max_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped.
Specifies the maximum number of handles taken on files and/or directories to return. If the request does not specify max_results or specifies a value greater than 5,000, the server will return up to 5,000 items. Setting max_results to a value less than or equal to zero results in error response code 400 (Bad Request).
The path to the file/directory within the file share.
Boolean that specifies if operation should apply to the directory specified in the URI, its files, with its subdirectories and their files.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share show
Return all user-defined metadata and system properties for the specified share.
The data returned does not include the shares's list of files or directories.
az storage share show --name
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--sas-token]
[--snapshot]
[--timeout]
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
A string that represents the snapshot version, if applicable.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share snapshot
Create a snapshot of an existing share under the specified account.
az storage share snapshot --name
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--metadata]
[--quota]
[--sas-token]
[--timeout]
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
Specifies the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5 TB (5120 GB).
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share stats
Get the approximate size of the data stored on the share, rounded up to the nearest gigabyte.
Note that this value may not include all recently created or recently re-sized files.
az storage share stats --name
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--sas-token]
[--timeout]
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share update
Set service-defined properties for the specified share.
az storage share update --name
--quota
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--sas-token]
[--timeout]
Required Parameters
The file share name.
Specifies the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5 TB (5120 GB).
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage share url
Create a URI to access a file share.
az storage share url --name
[--account-key]
[--account-name]
[--connection-string]
[--file-endpoint]
[--protocol {http, https}]
[--sas-token]
[--unc]
Examples
Create a URI to access a file share. (autogenerated)
az storage share url --account-key 00000000 --account-name MyAccount --name MyFileShare
Required Parameters
The file share name.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show
. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.
Protocol to use.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Output UNC network path.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.