az storage file
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 Learn more about extensions.
管理文件共享。
命令
az storage file delete
标记要删除的指定文件。
该文件稍后将在垃圾回收期间删除。
az storage file delete --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--sas-token]
[--timeout]
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file delete (storage-preview 扩展)
标记要删除的指定文件。
该文件稍后将在垃圾回收期间删除。
az storage file delete --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--sas-token]
[--timeout]
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file delete-batch
从Azure 存储文件共享中删除文件。
az storage file delete-batch --source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--file-endpoint]
[--pattern]
[--sas-token]
[--timeout]
示例
从Azure 存储文件共享中删除文件。 (autogenerated)
az storage file delete-batch --account-key 00000000 --account-name MyAccount --source /path/to/file
从Azure 存储文件共享中删除文件。 (autogenerated)
az storage file delete-batch --account-key 00000000 --account-name MyAccount --pattern "*.py" --source /path/to/file
必需参数
文件删除作的源。 源可以是文件共享 URL 或共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要删除的文件和 Blob。 不会发生实际数据删除。
属性 | 值 |
---|---|
默认值: | False |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file delete-batch (storage-preview 扩展)
从Azure 存储文件共享中删除文件。
az storage file delete-batch --source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--pattern]
[--sas-token]
[--timeout]
示例
从Azure 存储文件共享中删除文件。 (autogenerated)
az storage file delete-batch --account-key 00000000 --account-name MyAccount --source /path/to/file
从Azure 存储文件共享中删除文件。 (autogenerated)
az storage file delete-batch --account-key 00000000 --account-name MyAccount --pattern *.py --source /path/to/file
必需参数
文件删除作的源。 源可以是文件共享 URL 或共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要删除的文件和 Blob。 不会发生实际数据删除。
属性 | 值 |
---|---|
默认值: | False |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3.7/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file download
使用自动分块和进度通知将文件下载到文件路径。
返回包含属性和元数据的文件实例。
az storage file download --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--dest]
[--disallow-trailing-dot {false, true}]
[--end-range]
[--file-endpoint]
[--max-connections]
[--no-progress]
[--open-mode]
[--sas-token]
[--snapshot]
[--start-range]
[--timeout]
[--validate-content]
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要写入的文件的路径。 如果未指定,将使用源文件名。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
要用于下载文件的节的字节范围的结束。 如果给定了 --end-range,则必须提供 --start-range。 --start-range 和 --end-range 参数是包容性的。 例如:--start-range=0,--end-range=511 将下载前 512 字节的文件。
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要使用的并行连接的最大数目。
属性 | 值 |
---|---|
默认值: | 2 |
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
打开文件时要使用的模式。 请注意,仅指定追加open_mode会阻止并行下载。 因此,如果使用此 --open-mode,则必须将 --max-connections 设置为 1。
属性 | 值 |
---|---|
默认值: | wb |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
要用于下载文件的节的字节范围的开始。 如果未提供 --end-range,则会下载 --start-range 之后的所有字节。 --start-range 和 --end-range 参数是包容性的。 例如:--start-range=0,--end-range=511 将下载前 512 字节的文件。
请求超时(以秒为单位)。 适用于对服务的每个调用。
如果设置为 true,则验证文件的每个检索部分的 MD5 哈希。 如果使用 http 而不是 https 作为 https(默认值)已经验证,则这主要用于检测网络上的位剪辑。 由于区块大小减少,计算 MD5 需要处理时间,因此需要执行更多请求,延迟可能会增加一些。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file download (storage-preview 扩展)
使用自动分块和进度通知将文件下载到文件路径。
返回包含属性和元数据的文件实例。
az storage file download --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--dest]
[--disallow-trailing-dot {false, true}]
[--end-range]
[--max-connections]
[--no-progress]
[--open-mode]
[--sas-token]
[--snapshot]
[--start-range]
[--timeout]
[--validate-content]
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要写入的文件的路径。 如果未指定,将使用源文件名。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
要用于下载文件的节的字节范围的结束。 如果给定了 --end-range,则必须提供 --start-range。 --start-range 和 --end-range 参数是包容性的。 例如:--start-range=0,--end-range=511 将下载前 512 字节的文件。
要使用的并行连接的最大数目。
属性 | 值 |
---|---|
默认值: | 2 |
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
打开文件时要使用的模式。 请注意,仅指定追加open_mode会阻止并行下载。 因此,如果使用此 --open-mode,则必须将 --max-connections 设置为 1。
属性 | 值 |
---|---|
默认值: | wb |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
要用于下载文件的节的字节范围的开始。 如果未提供 --end-range,则会下载 --start-range 之后的所有字节。 --start-range 和 --end-range 参数是包容性的。 例如:--start-range=0,--end-range=511 将下载前 512 字节的文件。
请求超时(以秒为单位)。 适用于对服务的每个调用。
如果设置为 true,则验证文件的每个检索部分的 MD5 哈希。 如果使用 http 而不是 https 作为 https(默认值)已经验证,则这主要用于检测网络上的位剪辑。 由于区块大小减少,计算 MD5 需要处理时间,因此需要执行更多请求,延迟可能会增加一些。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file download-batch
在批处理操作中,将Azure 存储文件共享中的文件下载到本地目录。
az storage file download-batch --destination
--source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--file-endpoint]
[--max-connections]
[--no-progress]
[--pattern]
[--sas-token]
[--snapshot]
[--validate-content]
示例
在批处理操作中,将Azure 存储文件共享中的文件下载到本地目录。 (autogenerated)
az storage file download-batch --account-key 00000000 --account-name MyAccount --destination . --no-progress --source /path/to/file
必需参数
文件下载到的本地目录。 此目录必须已存在。
文件下载作的源。 源可以是文件共享 URL 或共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要下载的文件和 Blob。 不会发生实际数据传输。
属性 | 值 |
---|---|
默认值: | False |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要使用的并行连接的最大数目。 默认值为 1。
属性 | 值 |
---|---|
Parameter group: | Download Control Arguments |
默认值: | 1 |
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
如果已设置,则计算文件的每个范围的 MD5 哈希进行验证。
存储服务检查已到达的内容的哈希与发送的哈希相同。 如果使用 HTTP 而不是 HTTPS,则这在传输过程中检测位剪辑最为有用。 此哈希未存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file download-batch (storage-preview 扩展)
在批处理操作中,将Azure 存储文件共享中的文件下载到本地目录。
az storage file download-batch --destination
--source
[--account-key]
[--account-name]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--max-connections]
[--no-progress]
[--pattern]
[--sas-token]
[--snapshot]
[--validate-content]
示例
在批处理操作中,将Azure 存储文件共享中的文件下载到本地目录。 (autogenerated)
az storage file download-batch --account-key 00000000 --account-name MyAccount --destination . --no-progress --source /path/to/file
必需参数
文件下载到的本地目录。 此目录必须已存在。
文件下载作的源。 源可以是文件共享 URL 或共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要下载的文件和 Blob。 不会发生实际数据传输。
属性 | 值 |
---|---|
默认值: | False |
要使用的并行连接的最大数目。 默认值为 1。
属性 | 值 |
---|---|
Parameter group: | Download Control Arguments |
默认值: | 1 |
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3.7/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
如果已设置,则计算文件的每个范围的 MD5 哈希进行验证。
存储服务检查已到达的内容的哈希与发送的哈希相同。 如果使用 HTTP 而不是 HTTPS,则这在传输过程中检测位剪辑最为有用。 此哈希未存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file exists
检查文件是否存在。
az storage file exists --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--sas-token]
[--snapshot]
[--timeout]
示例
检查文件是否存在。 (autogenerated)
az storage file exists --account-key 00000000 --account-name MyAccount --path path/file.txt --share-name MyShare
检查文件是否存在。 (autogenerated)
az storage file exists --connection-string $connectionString --path path/file.txt --share-name MyShare
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file exists (storage-preview 扩展)
检查文件是否存在。
az storage file exists --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
示例
检查文件是否存在。 (autogenerated)
az storage file exists --account-key 00000000 --account-name MyAccount --path path/file.txt --share-name MyShare
检查文件是否存在。 (autogenerated)
az storage file exists --connection-string $connectionString --path path/file.txt --share-name MyShare
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file generate-sas
为文件生成共享访问签名。
az storage file generate-sas --path
--share-name
[--account-key]
[--account-name]
[--cache-control]
[--connection-string]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--expiry]
[--file-endpoint]
[--https-only]
[--ip]
[--permissions]
[--policy-name]
[--start]
示例
为文件生成 SAS 令牌。
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage file generate-sas -p path/file.txt -s MyShare --account-name MyStorageAccount --permissions rcdw --https-only --expiry $end
为文件生成共享访问签名。 (autogenerated)
az storage file generate-sas --account-name MyStorageAccount --expiry 2037-12-31T23:59:00Z --path path/file.txt --permissions rcdw --share-name MyShare --start 2019-01-01T12:20Z
为文件生成共享访问签名。 (autogenerated)
az storage file generate-sas --account-key 00000000 --account-name mystorageaccount --expiry 2037-12-31T23:59:00Z --https-only --path path/file.txt --permissions rcdw --share-name myshare
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
使用此共享访问签名访问资源时,Cache-Control 的响应标头值。
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
使用此共享访问签名访问资源时,Content-Disposition 的响应标头值。
使用此共享访问签名访问资源时,内容编码的响应标头值。
使用此共享访问签名访问资源时,Content-Language 的响应标头值。
使用此共享访问签名访问资源时,Content-Type 的响应标头值。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
指定 SAS 无效的 UTC 日期时间(Y-m-d'T'H:M'Z')。 如果使用指定此值的 --policy-name 引用存储的访问策略,请不要使用。
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
仅允许使用 HTTPS 协议发出的请求。 如果省略,则允许来自 HTTP 和 HTTPS 协议的请求。
指定要从中接受请求的 IP 地址或 IP 地址范围。 仅支持 IPv4 样式地址。
SAS 授予的权限。 允许的值:(c)reate (d)elete (r)ead (w)rite。 如果使用指定此值的 --id 引用存储访问策略,请不要使用。 可以组合使用。
容器 ACL 中存储的访问策略的名称。
指定 SAS 生效的 UTC 日期/时间(Y-m-d'T'H:M'Z')。 如果使用指定此值的 --policy-name 引用存储的访问策略,请不要使用。 默认为请求的时间。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file generate-sas (storage-preview 扩展)
为文件生成共享访问签名。
az storage file generate-sas --path
--share-name
[--account-key]
[--account-name]
[--cache-control]
[--connection-string]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--expiry]
[--https-only]
[--ip]
[--permissions]
[--policy-name]
[--start]
示例
为文件生成 SAS 令牌。
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage file generate-sas -p path/file.txt -s MyShare --account-name MyStorageAccount --permissions rcdw --https-only --expiry $end
为文件生成共享访问签名。 (autogenerated)
az storage file generate-sas --account-name MyStorageAccount --expiry 2037-12-31T23:59:00Z --path path/file.txt --permissions rcdw --share-name MyShare --start 2019-01-01T12:20Z
为文件生成共享访问签名。 (autogenerated)
az storage file generate-sas --account-key 00000000 --account-name mystorageaccount --expiry 2037-12-31T23:59:00Z --https-only --path path/file.txt --permissions rcdw --share-name myshare
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
使用此共享访问签名访问资源时,Cache-Control 的响应标头值。
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
使用此共享访问签名访问资源时,Content-Disposition 的响应标头值。
使用此共享访问签名访问资源时,内容编码的响应标头值。
使用此共享访问签名访问资源时,Content-Language 的响应标头值。
使用此共享访问签名访问资源时,Content-Type 的响应标头值。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
指定 SAS 无效的 UTC 日期时间(Y-m-d'T'H:M'Z')。 如果使用指定此值的 --policy-name 引用存储的访问策略,请不要使用。
仅允许使用 HTTPS 协议发出的请求。 如果省略,则允许来自 HTTP 和 HTTPS 协议的请求。
指定要从中接受请求的 IP 地址或 IP 地址范围。 仅支持 IPv4 样式地址。
SAS 授予的权限。 允许的值:(c)reate (d)elete (r)ead (w)rite。 如果使用指定此值的 --id 引用存储访问策略,请不要使用。 可以组合使用。
容器 ACL 中存储的访问策略的名称。
指定 SAS 生效的 UTC 日期/时间(Y-m-d'T'H:M'Z')。 如果使用指定此值的 --policy-name 引用存储的访问策略,请不要使用。 默认为请求的时间。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file list
列出共享中的文件和目录。
az storage file list --share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--exclude-dir]
[--exclude-extended-info]
[--file-endpoint]
[--marker]
[--num-results]
[--path]
[--sas-token]
[--snapshot]
[--timeout]
示例
列出共享中的文件和目录。 (autogenerated)
az storage file list --share-name MyShare
必需参数
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
仅列出给定共享中的文件。
属性 | 值 |
---|---|
默认值: | False |
指定从响应中排除“timestamps”、“Etag”、“Attributes”、“PermissionKey”信息。
属性 | 值 |
---|---|
默认值: | False |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
一个字符串值,该值标识要在下一个列表作中返回的容器列表部分。 如果列表作未返回剩余的所有容器,则返回响应正文中的 NextMarker 值,该容器将随当前页一起列出。 如果指定,此生成器将从上一个生成器停止的点开始返回结果。
指定要返回的最大数字。 如果请求未指定num_results,或指定大于 5000 的值,服务器将返回最多 5000 个项目。 请注意,如果列表操作跨越分区边界,则服务将返回一个继续标记,用于检索其余结果。 使用“*”以返回所有结果。
属性 | 值 |
---|---|
默认值: | 5000 |
文件共享中的目录路径。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file list (storage-preview 扩展)
列出共享中的文件和目录。
az storage file list --share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--exclude-dir]
[--exclude-extended-info]
[--marker]
[--num-results]
[--path]
[--sas-token]
[--snapshot]
[--timeout]
示例
列出共享中的文件和目录。 (autogenerated)
az storage file list --share-name MyShare
必需参数
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
仅列出给定共享中的文件。
属性 | 值 |
---|---|
默认值: | False |
指定从响应中排除“timestamps”、“Etag”、“Attributes”、“PermissionKey”信息。
属性 | 值 |
---|---|
默认值: | False |
一个字符串值,该值标识要在下一个列表作中返回的容器列表部分。 如果列表作未返回剩余的所有容器,则返回响应正文中的 NextMarker 值,该容器将随当前页一起列出。 如果指定,此生成器将从上一个生成器停止的点开始返回结果。
指定要返回的最大结果数。 使用“*”以返回所有结果。
属性 | 值 |
---|---|
默认值: | 5000 |
文件共享中的目录路径。
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file resize
将文件的大小调整为指定大小。
如果指定的字节值小于文件的当前大小,则会清除指定字节值上方的所有范围。
az storage file resize --path
--share-name
--size
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--sas-token]
[--timeout]
必需参数
文件共享中文件的路径。
文件共享名称。
要调整文件的大小(以字节为单位)。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file resize (storage-preview 扩展)
将文件的大小调整为指定大小。
如果指定的字节值小于文件的当前大小,则会清除指定字节值上方的所有范围。
az storage file resize --path
--share-name
--size
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--sas-token]
[--timeout]
必需参数
文件共享中文件的路径。
文件共享名称。
要调整文件的大小(以字节为单位)。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file show
返回文件的所有用户定义的元数据、标准 HTTP 属性和系统属性。
az storage file show --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--sas-token]
[--snapshot]
[--timeout]
示例
显示文件共享中的文件属性。
az storage file show -p dir/a.txt -s sharename --account-name myadlsaccount --account-key 0000-0000
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file show (storage-preview 扩展)
返回文件的所有用户定义的元数据、标准 HTTP 属性和系统属性。
az storage file show --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--sas-token]
[--snapshot]
[--timeout]
示例
显示文件共享中的文件属性。
az storage file show -p dir/a.txt -s sharename --account-name myadlsaccount --account-key 0000-0000
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
表示快照版本的字符串(如果适用)。
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file update
在文件上设置系统属性。
如果为content_settings设置了一个属性,则会重写所有属性。
az storage file update --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--clear-content-settings {false, true}]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--file-mode]
[--group]
[--owner]
[--sas-token]
[--timeout]
示例
在文件上设置系统属性。
az storage file update -p dir/a.txt -s sharename --account-name myadlsaccount --account-key 0000-0000 --content-type test/type
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
如果设置了此标志,则设置以下任何一个或多个属性(--content-cache-control、--content-disposition、-content-encoding、--content-language、--content-md5、--content-type)时,所有这些属性都设置在一起。 如果在设置以下至少一个属性时未为给定属性提供值,则将清除该属性。
属性 | 值 |
---|---|
接受的值: | false, true |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
内容编码类型。
内容语言。
内容的 MD5 哈希。
内容 MIME 类型。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
仅适用于 NFS 文件。 要对文件设置的模式权限。 支持符号(rwxrw-rw-)。 粘滞位也受支持,并且它由字母 t 或 T 表示为最终字符位置,具体取决于其他类别的执行位是分别设置还是未设置,缺少 t 或 T 表示未设置粘滞位。“。
仅适用于 NFS 文件。 要对文件设置的所有者组标识符(GID)。 默认值为 0(根组)。
仅适用于 NFS 文件。 要对文件设置的所有者用户标识符(UID)。 默认值为 0(root)。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file update (storage-preview 扩展)
在文件上设置系统属性。
如果为content_settings设置了一个属性,则会重写所有属性。
az storage file update --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--clear-content-settings {false, true}]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--sas-token]
[--timeout]
示例
在文件上设置系统属性。
az storage file update -p dir/a.txt -s sharename --account-name myadlsaccount --account-key 0000-0000 --content-type test/type
必需参数
文件共享中文件的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
如果设置了此标志,则设置以下任何一个或多个属性(--content-cache-control、--content-disposition、-content-encoding、--content-language、--content-md5、--content-type)时,所有这些属性都设置在一起。 如果在设置以下至少一个属性时未为给定属性提供值,则将清除该属性。
属性 | 值 |
---|---|
接受的值: | false, true |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
内容编码类型。
内容语言。
内容的 MD5 哈希。
内容 MIME 类型。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file upload
将文件上传到共享。
使用自动分块和进度通知从源路径创建或更新 Azure 文件。
az storage file upload --source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--file-mode]
[--file-url]
[--group]
[--max-connections]
[--metadata]
[--no-progress]
[--owner]
[--path]
[--sas-token]
[--share-name]
[--timeout]
[--validate-content]
示例
上传到本地文件到共享。
az storage file upload -s MyShare --source /path/to/file
将文件上传到共享。
az storage file upload --account-key 00000000 --account-name MyStorageAccount --path path/file.txt --share-name MyShare --source /path/to/file
必需参数
要作为文件内容上传的本地文件的路径。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
内容编码类型。
内容语言。
内容的 MD5 哈希。
内容 MIME 类型。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
仅适用于 NFS 文件。 要对文件设置的模式权限。 支持符号(rwxrw-rw-)。 粘滞位也受支持,并且它由字母 t 或 T 表示为最终字符位置,具体取决于其他类别的执行位是分别设置还是未设置,缺少 t 或 T 表示未设置粘滞位。“。
文件的完整终结点 URL,包括 SAS 令牌(如果使用)。
仅适用于 NFS 文件。 要对文件设置的所有者组标识符(GID)。 默认值为 0(根组)。
要使用的并行连接的最大数目。
属性 | 值 |
---|---|
默认值: | 2 |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
仅适用于 NFS 文件。 要对文件设置的所有者用户标识符(UID)。 默认值为 0(root)。
文件共享中文件的路径。 如果省略文件名,将使用源文件名称。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
文件共享名称。
请求超时(以秒为单位)。 适用于对服务的每个调用。
如果为 true,则计算文件的每个范围的 MD5 哈希。 存储服务检查随已发送的哈希一起到达的内容的哈希。 如果使用 http 而不是 https 作为 https(默认值)已经验证,则这主要用于检测网络上的位剪辑。 请注意,此 MD5 哈希未随文件一起存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file upload (storage-preview 扩展)
将文件上传到使用 SMB 3.0 协议的共享。
使用自动分块和进度通知从源路径创建或更新 Azure 文件。
az storage file upload --share-name
--source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--disallow-trailing-dot {false, true}]
[--max-connections]
[--metadata]
[--no-progress]
[--path]
[--sas-token]
[--timeout]
[--validate-content]
示例
上传到本地文件到共享。
az storage file upload -s MyShare --source /path/to/file
将文件上传到使用 SMB 3.0 协议的共享。 (autogenerated)
az storage file upload --account-key 00000000 --account-name MyStorageAccount --path path/file.txt --share-name MyShare --source /path/to/file
必需参数
文件共享名称。
要作为文件内容上传的本地文件的路径。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
内容编码类型。
内容语言。
内容的 MD5 哈希。
内容 MIME 类型。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
要使用的并行连接的最大数目。
属性 | 值 |
---|---|
默认值: | 2 |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
文件共享中文件的路径。 如果省略文件名,将使用源文件名称。
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
请求超时(以秒为单位)。 适用于对服务的每个调用。
如果为 true,则计算文件的每个范围的 MD5 哈希。 存储服务检查随已发送的哈希一起到达的内容的哈希。 如果使用 http 而不是 https 作为 https(默认值)已经验证,则这主要用于检测网络上的位剪辑。 请注意,此 MD5 哈希未随文件一起存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file upload-batch
在批处理操作中,将文件从本地目录上传到Azure 存储文件共享。
az storage file upload-batch --destination
--source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--destination-path]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--file-endpoint]
[--max-connections]
[--metadata]
[--no-progress]
[--pattern]
[--sas-token]
[--validate-content]
示例
在批处理操作中,将文件从本地目录上传到Azure 存储文件共享。
az storage file upload-batch --destination myshare --source . --account-name myaccount --account-key 00000000
使用批处理作中的 URL 将文件从本地目录上传到 Azure 存储文件共享。
az storage file upload-batch --destination https://myaccount.file.core.windows.net/myshare --source . --account-key 00000000
必需参数
上传作的目标。
目标可以是文件共享 URL 或共享名称。 当目标为共享 URL 时,将从 URL 分析存储帐户名称。
要从中上传文件的目录。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容编码类型。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容语言。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容的 MD5 哈希。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容 MIME 类型。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
将源数据复制到的目录。 如果省略,数据将复制到根目录。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要上传的文件和 Blob。 不会发生实际数据传输。
属性 | 值 |
---|---|
默认值: | False |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要使用的并行连接的最大数目。 默认值为 1。
属性 | 值 |
---|---|
Parameter group: | Download Control Arguments |
默认值: | 1 |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果已设置,则计算文件的每个范围的 MD5 哈希进行验证。
存储服务检查已到达的内容的哈希与发送的哈希相同。 如果使用 HTTP 而不是 HTTPS,则这在传输过程中检测位剪辑最为有用。 此哈希未存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file upload-batch (storage-preview 扩展)
在批处理操作中,将文件从本地目录上传到Azure 存储文件共享。
az storage file upload-batch --destination
--source
[--account-key]
[--account-name]
[--connection-string]
[--content-cache --content-cache-control]
[--content-disposition]
[--content-encoding]
[--content-language]
[--content-md5]
[--content-type]
[--destination-path]
[--disallow-trailing-dot {false, true}]
[--dryrun]
[--max-connections]
[--metadata]
[--no-progress]
[--pattern]
[--sas-token]
[--validate-content]
示例
在批处理操作中,将文件从本地目录上传到Azure 存储文件共享。
az storage file upload-batch --destination myshare --source . --account-name myaccount --account-key 00000000
使用批处理作中的 URL 将文件从本地目录上传到 Azure 存储文件共享。
az storage file upload-batch --destination https://myaccount.file.core.windows.net/myshare --source . --account-key 00000000
必需参数
上传作的目标。
目标可以是文件共享 URL 或共享名称。 当目标为共享 URL 时,将从 URL 分析存储帐户名称。
要从中上传文件的目录。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
缓存控制字符串。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
传达有关如何处理响应有效负载的其他信息,还可用于附加其他元数据。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容编码类型。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容语言。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容的 MD5 哈希。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
内容 MIME 类型。
属性 | 值 |
---|---|
Parameter group: | Content Settings Arguments |
将源数据复制到的目录。 如果省略,数据将复制到根目录。
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
列出要上传的文件和 Blob。 不会发生实际数据传输。
属性 | 值 |
---|---|
默认值: | False |
要使用的并行连接的最大数目。 默认值为 1。
属性 | 值 |
---|---|
Parameter group: | Download Control Arguments |
默认值: | 1 |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
包括此标志以禁用命令的进度报告。
属性 | 值 |
---|---|
默认值: | False |
用于文件填充的模式。 支持的模式为“*”、“?”、“[seq]”和“[!seq]”。 有关详细信息,请参阅 https://docs.python.org/3.7/library/fnmatch.html。
在 --pattern 中使用“*”时,它将匹配任何字符,包括目录分隔符“/”。
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果已设置,则计算文件的每个范围的 MD5 哈希进行验证。
存储服务检查已到达的内容的哈希与发送的哈希相同。 如果使用 HTTP 而不是 HTTPS,则这在传输过程中检测位剪辑最为有用。 此哈希未存储。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file url
创建 URL 以访问文件。
az storage file url --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--file-endpoint]
[--protocol {http, https}]
[--sas-token]
示例
创建 URL 以访问文件。 (autogenerated)
az storage file url --account-key 00000000 --account-name mystorageaccount --path path/file.txt --share-name myshare
必需参数
文件共享中文件/目录的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
存储数据服务终结点。 必须与存储帐户密钥或 SAS 令牌结合使用。 可以使用 .. 查找每个服务主终结点 az storage account show
。 环境变量:AZURE_STORAGE_SERVICE_ENDPOINT。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
要使用的协议。
属性 | 值 |
---|---|
默认值: | https |
接受的值: | http, https |
共享访问签名(SAS)。 必须与存储帐户名称或服务终结点结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage file url (storage-preview 扩展)
创建 URL 以访问文件。
az storage file url --path
--share-name
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--backup-intent --enable-file-backup-request-intent]
[--connection-string]
[--disallow-trailing-dot {false, true}]
[--protocol {http, https}]
[--sas-token]
示例
创建 URL 以访问文件。 (autogenerated)
az storage file url --account-key 00000000 --account-name mystorageaccount --path path/file.txt --share-name myshare
必需参数
文件共享中文件/目录的路径。
文件共享名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储帐户密钥。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_KEY。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。 必须与存储帐户密钥或 SAS 令牌结合使用。 如果两者都不存在,该命令将尝试使用经过身份验证的 Azure 帐户查询存储帐户密钥。 如果执行了大量存储命令,可能会达到 API 配额限制。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
运行命令的模式。 “登录”模式将直接使用登录凭据进行身份验证。 如果未提供帐户的身份验证参数,则旧版“密钥”模式将尝试查询帐户密钥。 环境变量:AZURE_STORAGE_AUTH_MODE。
属性 | 值 |
---|---|
接受的值: | key, login |
用于文件 OAuth (Azure AD) 身份验证所需的参数。 这将根据允许的数据作绕过任何文件/目录级别权限检查并允许访问,即使这些文件/目录存在 ACL。
属性 | 值 |
---|---|
默认值: | False |
存储帐户连接字符串。 环境变量:AZURE_STORAGE_CONNECTION_STRING。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
如果为 true,将从目标 URI 中剪裁尾随点。 默认值为 False。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
要使用的协议。
属性 | 值 |
---|---|
默认值: | https |
接受的值: | http, https |
共享访问签名(SAS)。 必须与存储帐户名称结合使用。 环境变量:AZURE_STORAGE_SAS_TOKEN。
属性 | 值 |
---|---|
Parameter group: | Storage Account Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |