BlobContainerPermissions Class

  • java.lang.Object
    • Permissions<T>
      • com.microsoft.azure.storage.blob.BlobContainerPermissions

public class BlobContainerPermissions extends Permissions

Represents the permissions for a container.

The container's permissions encompass two types of access settings for the container:

  • The container's public access setting, represented by the publicAccess property. The public access setting indicates whether the container and its blobs can be read via an anonymous request.

  • The container's access policies, represented by the getSharedAccessPolicies() method. This setting references a collection of shared access policies for the container. A shared access policy may be used to control the start time, expiry time, and permissions for one or more shared access signatures. A shared access signature provides delegated access to the container's resources.

For more information on managing container permissions, see Managing Access to Containers and Blobs.

Constructor Summary

Constructor Description
BlobContainerPermissions()

Creates an instance of the class.

Method Summary

Modifier and Type Method and Description
BlobContainerPublicAccessType getPublicAccess()

Gets the public access setting for the container.

The public access setting indicates whether the container and its blobs can be read via an anonymous request.

The BlobContainerPublicAccessType enumeration provides three levels of anonymous read access:

  • OFF, which prevents anonymous access.

  • BLOB, which permits anonymous read access to blob resources, but not to container metadata or to the list of blobs in the container.

  • CONTAINER, which permits anonymous read access to blob resources, container metadata, and the list of blobs in the container.

For more information on managing anonymous access to Blob service resources, see Setting Access Control for Containers.

void setPublicAccess(final BlobContainerPublicAccessType publicAccess)

Sets the public access setting for the container.

The public access setting indicates whether the container and its blobs can be read via an anonymous request.

The BlobContainerPublicAccessType enumeration provides three levels of anonymous read access:

  • OFF, which prevents anonymous access.

  • BLOB, which permits anonymous read access to blob resources, but not to container metadata or to the list of blobs in the container.

  • CONTAINER, which permits anonymous read access to blob resources, container metadata, and the list of blobs in the container.

For more information on managing anonymous access to Blob service resources, see Setting Access Control for Containers.

Inherited Members

Constructor Details

BlobContainerPermissions

public BlobContainerPermissions()

Creates an instance of the class.

Method Details

getPublicAccess

public BlobContainerPublicAccessType getPublicAccess()

Gets the public access setting for the container.

The public access setting indicates whether the container and its blobs can be read via an anonymous request.

The BlobContainerPublicAccessType enumeration provides three levels of anonymous read access:

  • OFF, which prevents anonymous access.

  • BLOB, which permits anonymous read access to blob resources, but not to container metadata or to the list of blobs in the container.

  • CONTAINER, which permits anonymous read access to blob resources, container metadata, and the list of blobs in the container.

For more information on managing anonymous access to Blob service resources, see Setting Access Control for Containers.

setPublicAccess

public void setPublicAccess(final BlobContainerPublicAccessType publicAccess)

Sets the public access setting for the container.

The public access setting indicates whether the container and its blobs can be read via an anonymous request.

The BlobContainerPublicAccessType enumeration provides three levels of anonymous read access:

  • OFF, which prevents anonymous access.

  • BLOB, which permits anonymous read access to blob resources, but not to container metadata or to the list of blobs in the container.

  • CONTAINER, which permits anonymous read access to blob resources, container metadata, and the list of blobs in the container.

For more information on managing anonymous access to Blob service resources, see Setting Access Control for Containers.

Parameters:

publicAccess

Applies to