酒量小的春卷 · cardview imageview 圆角-掘金· 10 月前 · |
傻傻的香烟 · feign.codec.DecodeExce ...· 11 月前 · |
豪情万千的楼梯 · mysql查看执行过程命令_mob649e8 ...· 1 年前 · |
才高八斗的烈酒 · Jinja2:使用Python进行模板渲染的 ...· 1 年前 · |
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge More info about Internet Explorer and Microsoft EdgeManage object storage for unstructured data (blobs).
Please specify one of the following authentication parameters for your commands: --auth-mode, --account-key, --connection-string, --sas-token. You also can use corresponding environment variables to store your authentication credentials, e.g. AZURE_STORAGE_KEY, AZURE_STORAGE_CONNECTION_STRING and AZURE_STORAGE_SAS_TOKEN.
The blob is marked for later deletion during garbage collection. In order to delete a blob, all of its snapshots must also be deleted. Both can be removed at the same time.
az storage blob delete [--account-key]
[--account-name]
[--auth-mode {key, login}]
[--blob-endpoint]
[--blob-url]
[--connection-string]
[--container-name]
[--delete-snapshots {include, only}]
[--if-match]
[--if-modified-since]
[--if-none-match]
[--if-unmodified-since]
[--lease-id]
[--name]
[--sas-token]
[--snapshot]
[--tags-condition]
[--timeout]
Delete a blob.
az storage blob delete -c mycontainer -n MyBlob
Delete a blob using login credentials.
az storage blob delete -c mycontainer -n MyBlob --account-name mystorageaccount --auth-mode login
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
Required if the blob has associated snapshots. Values include: "only": Deletes only the blobs snapshots. "include": Deletes the blob along with all snapshots.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
The blob name.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to delete.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
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.
Delete all blobs ending with ".py" in a container that have not been modified for 10 days.
date=`date -d "10 days ago" '+%Y-%m-%dT%H:%MZ'`
az storage blob delete-batch -s mycontainer --account-name mystorageaccount --pattern *.py --if-unmodified-since $date --auth-mode login
Delete all the blobs in a directory named "dir" in a container named "mycontainer".
az storage blob delete-batch -s mycontainer --pattern dir/*
Delete the blobs with the format 'cli-2018-xx-xx.txt' or 'cli-2019-xx-xx.txt' in a container.
az storage blob delete-batch -s mycontainer --pattern cli-201[89]-??-??.txt
Delete all blobs with the format 'cli-201x-xx-xx.txt' except cli-2018-xx-xx.txt' and 'cli-2019-xx-xx.txt' in a container.
az storage blob delete-batch -s mycontainer --pattern cli-201[!89]-??-??.txt
The blob container from where the files will be deleted.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Required if the blob has associated snapshots.
Show the summary of the operations to be taken instead of actually deleting the file(s).
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character (*).
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
The active lease id for the blob.
The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. For more information, please refer to https://docs.python.org/3.7/library/fnmatch.html .
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.
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.
Download a blob.
az storage blob download -f /path/to/file -c mycontainer -n MyBlob
Download a blob content to stdout(pipe support).
az storage blob download -c mycontainer -n myblob --account-name mystorageaccount --account-key myaccountkey
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
End of byte range to use for downloading a section of the blob. If end_range is given, start_range must be provided. The start_range and end_range params are inclusive. Ex: start_range=0, end_range=511 will download first 512 bytes of blob.
Path of file to write out to. If not specified, stdout will be used and max_connections will be set to 1.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
The number of parallel connections with which to download.
The blob name.
Include this flag to disable progress reporting for the command.
Mode to use when opening the file. Note that specifying append only open_mode prevents parallel download. So, max_connections must be set to 1 if this open_mode is used.
Overwrite an existing file when specified. Default value is true.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.
Start of byte range to use for downloading a section of the blob. If no end_range is given, all bytes after the start_range will be downloaded. The start_range and end_range params are inclusive. Ex: start_range=0, end_range=511 will download first 512 bytes of blob.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
If true, calculates an MD5 hash for each chunk of the blob. The storage service checks the hash of the content that has arrived with the hash that was sent. This is primarily valuable for detecting bitflips on the wire if using http instead of https, as https (the default), will already validate. Note that this MD5 hash is not stored with the blob. Also note that if enabled, the memory-efficient algorithm will not be used because computing the MD5 hash requires buffering entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
An optional blob version ID. This parameter is only for versioning enabled account.
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.
Download all blobs that end with .py
az storage blob download-batch -d . --pattern *.py -s mycontainer --account-name mystorageaccount --account-key 00000000
Download all blobs in a directory named "dir" from container named "mycontainer".
az storage blob download-batch -d . -s mycontainer --pattern dir/*
Download all blobs with the format 'cli-2018-xx-xx.txt' or 'cli-2019-xx-xx.txt' in container to current path.
az storage blob download-batch -d . -s mycontainer --pattern cli-201[89]-??-??.txt
Download all blobs with the format 'cli-201x-xx-xx.txt' except cli-2018-xx-xx.txt' and 'cli-2019-xx-xx.txt' in container to current path.
az storage blob download-batch -d . -s mycontainer --pattern cli-201[!89]-??-??.txt
The existing destination folder for this download operation.
The blob container from where the files will be downloaded.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Show the summary of the operations to be taken instead of actually downloading the file(s).
The number of parallel connections with which to download.
Include this flag to disable progress reporting for the command.
Overwrite an existing file when specified. Default value is false.
The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. For more information, please refer to https://docs.python.org/3.7/library/fnmatch.html .
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
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.
Check for the existence of a blob in a container. (autogenerated)
az storage blob exists --account-key 00000000 --account-name MyAccount --container-name mycontainer --name MyBlob
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
The blob name.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The snapshot parameter is an opaque DateTime value that, when present, specifies the snapshot.
Request timeout in seconds. Applies to each call to the service.
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.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Used when you want to list blobs under a specified container.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
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.
Generate a sas token for a blob with read-only permissions.
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage blob generate-sas -c myycontainer -n MyBlob --permissions r --expiry $end --https-only
Generate a sas token for a blob with ip range specified.
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage blob generate-sas -c myycontainer -n MyBlob --ip "176.134.171.0-176.134.171.255" --permissions r --expiry $end --https-only
Generate a shared access signature for the blob. (autogenerated)
az storage blob generate-sas --account-key 00000000 --account-name MyStorageAccount --container-name mycontainer --expiry 2018-01-01T00:00:00Z --name MyBlob --permissions r
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.
Indicates that this command return the SAS signed with the user delegation key. The expiry parameter and '--auth-mode login' are required if this argument is specified.
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
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.
The container name.
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.
A predefined encryption scope used to encrypt the data on the service.
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.
Indicates that this command return the full blob URI and the shared access signature token.
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 blob name.
The permissions the SAS grants. Allowed values: (a)dd (c)reate (d)elete (e)xecute (i)set_immutability_policy (m)ove (r)ead (t)ag (w)rite (x)delete_previous_version (y)permanent_delete. 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 container's ACL.
An optional blob snapshot ID. Opaque DateTime value that, when present, specifies the blob snapshot to grant permission.
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.
Request timeout in seconds. Applies to each call to the service.
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.
List all storage blobs in a container whose names start with 'foo'; will match names such as 'foo', 'foobar', and 'foo/bar'
az storage blob list -c mycontainer --prefix foo
The container name.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
When the request includes this parameter, the operation returns a BlobPrefix element in the result list that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string.
Specify one or more additional datasets to include in the response. Options include: (c)opy, (d)eleted, (m)etadata, (s)napshots, (v)ersions, (t)ags, (i)mmutabilitypolicy, (l)egalhold, (d)eletedwithversions. Can be combined.
A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. 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.
Show nextMarker in result when specified.
Request timeout in seconds. Applies to each call to the service.
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.
Move a blob in a storage container.
az storage blob move -c MyContainer -d DestinationBlobPath -s SourceBlobPath --account-name MyStorageAccount
The container name.
The destination blob name. It should be an absolute path under the container. e.g.'topdir1/dirbar'.
The source blob name. It should be an absolute path under the container. e.g.'topdir1/dirsubfoo'.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Optional. A lease ID for the new_path. The new_path must have an active lease and the lease ID must match.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Optional. An ETag value. Specify this header to perform the rename operation only if the source's ETag matches the value specified.
Optional. A date and time value. Specify this header to perform the rename operation only if the source has been modified since the specified date and time.
Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the rename operation only if the source's ETag does not match the value specified.
Optional. A date and time value. Specify this header to perform the rename operation only if the source has not been modified since the specified date and time.
Optional. A lease ID for the source_path. The source_path must have an active lease and the lease ID must match.
Request timeout in seconds. Applies to each call to the service.
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.
Enable users to select/project on blob by providing simple query expressions.
az storage blob query -c mycontainer -n myblob --query-expression "SELECT _2 from BlobStorage"
Enable users to select/project on blob by providing simple query expressions and save in target file.
az storage blob query -c mycontainer -n myblob --query-expression "SELECT _2 from BlobStorage" --result-file result.csv
The query expression in SQL. The maximum size of the query expression is 256KiB. For more information about the expression syntax, please see https://docs.microsoft.com/azure/storage/blobs/query-acceleration-sql-reference .
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
The string used to separate columns.
The string used as an escape character. Default to empty.
Whether the blob data includes headers in the first line. The default value is False, meaning that the data will be returned inclusive of the first line. If set to True, the data will be returned exclusive of the first line.
The string used to separate records.
The string used to quote a specific field.
The string used to separate records.
Serialization type of the data currently stored in the blob. The default is to treat the blob data as CSV data formatted in the default dialect.The blob data will be reformatted according to that profile when blob format is specified. If you choose
json
, please specify
Output Json Text Configuration Arguments
accordingly; If you choose
csv
, please specify
Output Delimited Text Configuration Arguments
.
Required if the blob has an active lease.
The blob name.
The string used to separate columns.
The string used as an escape character. Default to empty.
Whether the blob data includes headers in the first line. The default value is False, meaning that the data will be returned inclusive of the first line. If set to True, the data will be returned exclusive of the first line.
The string used to separate records.
The string used to quote a specific field.
The string used to separate records.
Output serialization type for the data stream. By default the data will be returned as it is represented in the blob. By providing an output format, the blob data will be reformatted according to that profile. If you choose
json
, please specify
Output Json Text Configuration Arguments
accordingly; If you choose
csv
, please specify
Output Delimited Text Configuration Arguments
.
Specify the file path to save result.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
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.
Restore blobs in two specified blob ranges. For examples, (container1/blob1, container2/blob2) and (container2/blob3..container2/blob4).
az storage blob restore --account-name mystorageaccount -g MyResourceGroup -t 2020-02-27T03:59:59Z -r container1/blob1 container2/blob2 -r container2/blob3 container2/blob4
Restore blobs in the specified blob ranges from account start to account end.
az storage blob restore --account-name mystorageaccount -g MyResourceGroup -t 2020-02-27T03:59:59Z -r "" ""
Restore blobs in the specified blob range.
time=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage blob restore --account-name mystorageaccount -g MyResourceGroup -t $time -r container0/blob1 container0/blob2
Restore blobs in the specified blob range without wait and query blob restore status with 'az storage account show'.
time=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage blob restore --account-name mystorageaccount -g MyResourceGroup -t $time -r container0/blob1 container0/blob2 --no-wait
The storage account name.
Restore blob to the specified time, which should be UTC datetime in (Y-m-d'T'H:M:S'Z').
Blob ranges to restore. You need to two values to specify start_range and end_range for each blob range, e.g. -r blob1 blob2. Note: Empty means account start as start range value, and means account end for end range.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using
az configure --defaults group=<name>
.
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.
[--sas-token] [--tags-condition] [--tier {Archive, Cool, Hot, P10, P15, P20, P30, P4, P40, P50, P6, P60, P70, P80}] [--timeout]Update encryption scope for existing blob.
az storage blob rewrite --source-uri https://srcaccount.blob.core.windows.net/mycontainer/myblob?<sastoken> --encryption-scope newscope -c mycontainer -n myblob --account-name mystorageaccount --account-key 0000-0000
The container name.
The blob name.
A URL of up to 2 KB in length that specifies a file or blob. The value should be URL-encoded as it would appear in a request URI. If the source is in another account, the source must either be public or must be authenticated via a shared access signature. If the source is public, no authentication is required.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
A predefined encryption scope used to encrypt the data on the service. An encryption scope can be created using the Management API and referenced here by name. If a default encryption scope has been defined at the container, this value will override it if the container-level scope is configured to allow overrides. Otherwise an error will be raised.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease. Value can be a BlobLeaseClient object or the lease ID as a string.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts.
Request timeout in seconds. Applies to each call to the service.
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.
Configure blob legal hold.
az storage blob set-legal-hold --legal-hold -c mycontainer -n myblob --account-name mystorageaccount --account-key 0000-0000
Clear blob legal hold.
az storage blob set-legal-hold --legal-hold false -c mycontainer -n myblob --account-name mystorageaccount --account-key 0000-0000
The container name.
Specified if a legal hold should be set on the blob.
The blob name.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
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.
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.
For block blob this command only supports block blob on standard storage accounts. For page blob, this command only supports for page blobs on premium accounts.
az storage blob set-tier --tier
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--blob-endpoint]
[--blob-url]
[--connection-string]
[--container-name]
[--name]
[--rehydrate-priority {High, Standard}]
[--sas-token]
[--timeout]
[--type {block, page}]
Set the block or page tiers on the blob. (autogenerated)
az storage blob set-tier --account-key 00000000 --account-name MyAccount --container-name mycontainer --name MyBlob --tier P10
The tier value to set the blob to.
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
The blob name.
Indicate the priority with which to rehydrate an archived blob. The priority can be set on a blob only once, default value is Standard.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to each call individually.
The blob type.
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.
Show all properties of a blob.
az storage blob show -c mycontainer -n MyBlob
Get the details of a blob (autogenerated)
az storage blob show --account-name mystorageccount --account-key 00000000 --container-name mycontainer --name MyBlob
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
The blob name.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
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.
A snapshot is a read-only version of a blob that's taken at a point in time. It can be read, copied, or deleted, but not modified. Snapshots provide a way to back up a blob as it appears at a moment in time. A snapshot of a blob has the same name as the base blob from which the snapshot is taken, with a DateTime value appended to indicate the time at which the snapshot was taken.
az storage blob snapshot [--account-key]
[--account-name]
[--auth-mode {key, login}]
[--blob-endpoint]
[--blob-url]
[--connection-string]
[--container-name]
[--if-match]
[--if-modified-since]
[--if-none-match]
[--if-unmodified-since]
[--lease-id]
[--metadata]
[--name]
[--sas-token]
[--tags-condition]
[--timeout]
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
The blob name.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
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.
Sync a single blob to a container.
az storage blob sync -c mycontainer -s "path/to/file" -d NewBlob
Sync a directory to a container.
az storage blob sync -c mycontainer --account-name mystorageccount --account-key 00000000 -s "path/to/directory"
Sync a directory to a container with azcopy options pass-through (in this case capping the upload bandwith to 20 MBit/s).
az storage blob sync -c mycontainer --account-name mystorageccount --account-key 00000000 -s "path/to/directory" -- --cap-mbps=20
The sync destination container.
The source file path to sync from.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Defines whether to delete extra files from the destination that are not present at the source. Could be set to true, false, or prompt. If set to prompt, the user will be asked a question before scheduling files and blobs for deletion.
The destination path that will be prepended to the blob name.
Exclude these paths. This option does not support wildcard characters (*). Checks relative path prefix. For example: myFolder;myFolder/subDirName/file.pdf.
Exclude these files where the name matches the pattern list. For example: .jpg; .pdf;exactName. This option supports wildcard characters (*).
Include only these files where the name matches the pattern list. For example: .jpg; .pdf;exactName. This option supports wildcard characters (*).
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Other options which will be passed through to azcopy as it is. Please put all the extra options after a
--
.
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.
Operation will only be successful if used within the specified number of days set in the delete retention policy. Attempting to undelete a blob or snapshot that is not soft deleted will succeed without any changes.
az storage blob undelete [--account-key]
[--account-name]
[--auth-mode {key, login}]
[--blob-endpoint]
[--blob-url]
[--connection-string]
[--container-name]
[--name]
[--sas-token]
[--timeout]
Undelete a blob.
az storage blob undelete -c mycontainer -n MyBlob
Undelete a blob using login credentials.
az storage blob undelete -c mycontainer -n MyBlob --account-name mystorageaccount --auth-mode login
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
The blob name.
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.
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.
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.
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.
If this flag is set, then if any one or more of the following properties (--content-cache-control, --content-disposition, --content-encoding, --content-language, --content-md5, --content-type) is set, then all of these properties are set together. If a value is not provided for a given property when at least one of the properties listed below is set, then that property will be cleared.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The cache control string.
Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.
The content encoding type.
The content language.
The content's MD5 hash.
The content MIME type.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
Request timeout in seconds. Applies to each call to the service.
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.
Create a new blob from a file path, or updates the content of an existing blob with automatic chunking and progress notifications.
az storage blob upload [--account-key]
[--account-name]
[--auth-mode {key, login}]
[--blob-endpoint]
[--blob-url]
[--connection-string]
[--container-name]
[--content-cache]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--data]
[--encryption-scope]
[--file]
[--if-match]
[--if-modified-since]
[--if-none-match]
[--if-unmodified-since]
[--lease-id]
[--length]
[--max-connections]
[--maxsize-condition]
[--metadata]
[--name]
[--no-progress]
[--overwrite {false, true}]
[--sas-token]
[--socket-timeout]
[--tags]
[--tags-condition]
[--tier]
[--timeout]
[--type {append, block, page}]
[--validate-content]
Upload to a blob.
az storage blob upload -f /path/to/file -c mycontainer -n MyBlob
Upload to a blob with blob sas url.
az storage blob upload -f /path/to/file --blob-url https://mystorageaccount.blob.core.windows.net/mycontainer/myblob?sv=2019-02-02&st=2020-12-22T07%3A07%3A29Z&se=2020-12-23T07%3A07%3A29Z&sr=b&sp=racw&sig=redacted
Upload a file to a storage blob. (autogenerated)
az storage blob upload --account-name mystorageaccount --account-key 0000-0000 --container-name mycontainer --file /path/to/file --name myblob
Upload a string to a blob.
az storage blob upload --data "teststring" -c mycontainer -n myblob --account-name mystorageaccount --account-key 0000-0000
Upload to a through pipe.
echo $data | az storage blob upload --data @- -c mycontainer -n myblob --account-name mystorageaccount --account-key 0000-0000
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.
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.
The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current
location_mode
.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The container name.
The cache control string.
Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.
The content encoding type.
The content language.
The content's MD5 hash.
The content MIME type.
The blob data to upload.
A predefined encryption scope used to encrypt the data on the service.
Path of the file to upload as the blob content.
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character ( ). Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character ( ) to perform the operation only if the resource does not exist, and fail the operation if it does exist.
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
Required if the blob has an active lease.
Number of bytes to read from the stream. This is optional, but should be supplied for optimal performance. Cooperate with --data.
Maximum number of parallel connections to use when the blob size exceeds 64MB.
The max length in bytes permitted for an append blob.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
The blob name.
Include this flag to disable progress reporting for the command.
Whether the blob to be uploaded should overwrite the current data. If True, blob upload operation will overwrite the existing data. If set to False, the operation will fail with ResourceExistsError. The exception to the above is with Append blob types: if set to False and the data already exists, an error will not be raised and the data will be appended to the existing blob. If set overwrite=True, then the existing append blob will be deleted, and a new one created. Defaults to False.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The socket timeout(secs), used by the service to regulate data flow.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
The tier value to set the blob to. For page blob, the tier correlates to the size of the blob and number of allowed IOPS. Possible values are P10, P15, P20, P30, P4, P40, P50, P6, P60, P70, P80 and this is only applicable to page blobs on premium storage accounts; For block blob, possible values are Archive, Cool and Hot. This is only applicable to block blobs on standard storage accounts.
Request timeout in seconds. Applies to each call to the service.
Default to 'page' for *.vhd files, or 'block' otherwise.
Specify that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived.
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.
Upload all files that end with .py unless blob exists and has been modified since given date.
az storage blob upload-batch -d mycontainer --account-name mystorageaccount --account-key 00000000 -s <path-to-directory> --pattern *.py --if-unmodified-since 2018-08-27T20:51Z
Upload all files from local path directory to a container named "mycontainer".
az storage blob upload-batch -d mycontainer -s <path-to-directory>
Upload all files with the format 'cli-2018-xx-xx.txt' or 'cli-2019-xx-xx.txt' in local path directory.
az storage blob upload-batch -d mycontainer -s <path-to-directory> --pattern cli-201[89]-??-??.txt
Upload all files with the format 'cli-201x-xx-xx.txt' except cli-2018-xx-xx.txt' and 'cli-2019-xx-xx.txt' in a container.
az storage blob upload-batch -d mycontainer -s <path-to-directory> --pattern cli-201[!89]-??-??.txt
The blob container where the files will be uploaded.
The directory where the files to be uploaded are located.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The cache control string.
Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.
The content encoding type.
The content language.
The content's MD5 hash.
The content MIME type.
The destination path that will be prepended to the blob name.
Show the summary of the operations to be taken instead of actually uploading the file(s).
An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.
Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').
An ETag value, or the wildcard character (*).
Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').
The active lease id for the blob.
Maximum number of parallel connections to use when the blob size exceeds 64MB.
The max length in bytes permitted for an append blob.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
Include this flag to disable progress reporting for the command.
Whether the blob to be uploaded should overwrite the current data. If True, blob upload operation will overwrite the existing data. If set to False, the operation will fail with ResourceExistsError. The exception to the above is with Append blob types: if set to False and the data already exists, an error will not be raised and the data will be appended to the existing blob. If set overwrite=True, then the existing append blob will be deleted, and a new one created. Defaults to False.
The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. For more information, please refer to https://docs.python.org/3.7/library/fnmatch.html .
A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
The tier value to set the blob to. For page blob, the tier correlates to the size of the blob and number of allowed IOPS. Possible values are P10, P15, P20, P30, P4, P40, P50, P6, P60, P70, P80 and this is only applicable to page blobs on premium storage accounts; For block blob, possible values are Archive, Cool and Hot. This is only applicable to block blobs on standard storage accounts.
Request timeout in seconds. Applies to each call to the service.
Defaults to 'page' for *.vhd files, or 'block' otherwise. The setting will override blob types for every file.
Specifies that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived.
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.
Create the url to access a blob (autogenerated)
az storage blob url --connection-string $connectionString --container-name container1 --name blob1
Create the url to access a blob (autogenerated)
az storage blob url --account-name storageacct --account-key 00000000 --container-name container1 --name blob1
The container name.
The blob name.
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.
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.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
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.
An string value that uniquely identifies the snapshot. The value of this query parameter indicates the snapshot version.
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.
酒量小的春卷 · cardview imageview 圆角-掘金 10 月前 |