← 返回命令列表

Linux command

az-storage-container 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a container

az storage container create -n [container-name] --account-name [account]

Create with public blob access

az storage container create -n [container-name] --public-access blob --account-name [account]

List all containers

az storage container list --account-name [account] -o table

Check if a container exists

az storage container exists -n [container-name] --account-name [account]

Show container properties

az storage container show -n [container-name] --account-name [account]

Generate a SAS token

az storage container generate-sas -n [container-name] --permissions [dlrw] --expiry [2024-12-31T00:00Z] --account-name [account]

Delete a container

az storage container delete -n [container-name] --account-name [account]

Restore a soft-deleted container

az storage container restore -n [container-name] --deleted-version [version] --account-name [account]

说明

az storage container manages blob storage containers in Azure Storage accounts. Containers provide a grouping of blobs similar to directories in a file system. Containers can have different access levels: private (default), blob (anonymous read for blobs), or container (anonymous read for container and blobs). All blobs must reside in a container.

参数

-n, --name _value_
Name of the container
--account-name _value_
Storage account name
--account-key _value_
Storage account key
--public-access _value_
Public access level: off, blob, container
--fail-on-exist
Fail if the container already exists
--permissions _value_
SAS permissions: (a)dd, (c)reate, (d)elete, (l)ist, (r)ead, (w)rite
--expiry _value_
SAS token expiration datetime (UTC)

FAQ

What is the az-storage-container command used for?

az storage container manages blob storage containers in Azure Storage accounts. Containers provide a grouping of blobs similar to directories in a file system. Containers can have different access levels: private (default), blob (anonymous read for blobs), or container (anonymous read for container and blobs). All blobs must reside in a container.

How do I run a basic az-storage-container example?

Run `az storage container create -n [container-name] --account-name [account]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --name _value_ do in az-storage-container?

Name of the container