이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

Naming Containers, Blobs, and Metadata

업데이트 날짜: 2010년 11월

The Blob service defines container and blob resources beneath the storage account. A container is a set of blobs. A blob is any single entity comprised of binary data, such as a file or an image.

Containers are organized by account. A URL that refers to a container includes the account name and the container name, as follows. It also includes a query parameter to indicate that it is a container, as opposed to a blob in the root container.

http://myaccount.blob.core.windows.net/mycontainer?restype=container

Note that containers are not nested, so it's not possible for one container to contain another container.

Blobs are organized by container. A URL to refer to a blob includes the account name, the container name, and the blob name, as follows.

http://myaccount.blob.core.windows.net/mycontainer/myblob

A storage account may have a root container, a default container that can be omitted from the URL. A blob in the root container can be referenced without naming the container; alternatively, the root container can be explicitly referenced by its name ($root). The following URLs both refer to a blob in the root container:


http://myaccount.blob.core.windows.net/myblob
http://myaccount.blob.core.windows.net/$root/myblob

For more information on the root container, see Working with the Root Container.

The URL to reference a container or a blob must be unique. Because every account name is unique, two accounts can have containers with the same name. However, within a given storage account, every container must have a unique name. Every blob within a given container must also have a unique name within that container.

If you attempt to create a container or blob with a name that violates the naming rules described below, the request will fail with status code 400 (Bad Request).

The container name must be a valid DNS name, conforming to the following naming rules:

  1. Container names must start with a letter or number, and can contain only letters, numbers, and the dash (-) character.

  2. Every dash (-) character must be immediately preceded and followed by a letter or number; consecutive dashes are not permitted in container names.

  3. All letters in a container name must be lowercase.

  4. Container names must be from 3 through 63 characters long.

A blob name can contain any combination of characters, but reserved URL characters must be properly escaped. A blob name must be at least one character long and cannot be more than 1,024 characters long.

note참고
Avoid blob names that end with a dot (.), a forward slash (/), or a sequence or combination of the two. The URL that identifies a blob is constructed with the .NET Uri class, which compacts a URL that ends with these sequences. A blob with a name that contains such a sequence may not be accessible via its original name. For example, if you specify a blob name of myBlob. on the URL, the Blob service will read the blob name as myBlob, because the .NET URI class trims the trailing dot (.). For this reason, these types of names should be avoided.

The Blob service is based on a flat storage scheme, not a hierarchical scheme. However, you may specify a delimiter within a blob name to create a virtual hierarchy. For example, the following are all valid and unique blob names:

  • /a

  • /a.txt

  • /a/b

  • /a/b.txt

You can take advantage of the delimiter character when enumerating blobs. By specifying the delimiter character in the delimiter parameter of the List Blobs operation, you can limit the list to blobs with the same name preceding the delimiter, effectively limiting the results to a virtual node.

Metadata for a container or blob resource is stored as a name-value pair associated with the resource. Beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers.

Existing metadata names that do not adhere to these naming rules can be used with earlier versions of the Blob service, but not with version 2009-09-19 or later.

Note that metadata names preserve the case with which they were created, but are case-insensitive when set or read. If two or more metadata headers with the same name are submitted for a resource, the Blob service returns status code 400 (Bad Request).

참고 항목

이 정보가 도움이 되었습니까?
(1500자 남음)

커뮤니티 추가 항목

Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter