public final class BlobContainerPermissions extends Permissions<SharedAccessBlobPolicy>
The container's permissions encompass two types of access settings for the container:
publicAccess
property. The public access
setting indicates whether the container and its blobs can be read via an anonymous request.Permissions.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 and Description |
---|
BlobContainerPermissions()
Creates an instance of the
BlobContainerPermissions class. |
Modifier and Type | Method and Description |
---|---|
BlobContainerPublicAccessType |
getPublicAccess()
Gets the public access setting for the container.
|
void |
setPublicAccess(BlobContainerPublicAccessType publicAccess)
Sets the public access setting for the container.
|
getSharedAccessPolicies, setSharedAccessPolicies
public BlobContainerPermissions()
BlobContainerPermissions
class.public BlobContainerPublicAccessType getPublicAccess()
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:
BlobContainerPublicAccessType.OFF
, which prevents anonymous access.BlobContainerPublicAccessType.BLOB
, which permits anonymous read access to blob resources, but not to
container metadata or to the list of blobs in the container.BlobContainerPublicAccessType.CONTAINER
, which permits anonymous read access to blob resources,
container metadata, and the list of blobs in the container.public void setPublicAccess(BlobContainerPublicAccessType publicAccess)
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:
BlobContainerPublicAccessType.OFF
, which prevents anonymous access.BlobContainerPublicAccessType.BLOB
, which permits anonymous read access to blob resources, but not to
container metadata or to the list of blobs in the container.BlobContainerPublicAccessType.CONTAINER
, which permits anonymous read access to blob resources,
container metadata, and the list of blobs in the container./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/