BlobContainerPermissions Class
- java.
lang. Object - Permissions<T>
- com.
microsoft. azure. storage. blob. BlobContainerPermissions
- com.
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.
Constructor Summary
Constructor | Description |
---|---|
BlobContainerPermissions() |
Creates an instance of the class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Blob |
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:
|
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:
|
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.
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.
Parameters:
Applies to
Azure SDK for Java