public class ContainerACL extends Object
com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String) and
com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String, BlobServiceOptions), and passed
as a parameter to calls to implementations of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) and
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)
.
See the Get Container ACL and the Set Container ACL documentation on MSDN for details of the underlying Blob Service REST API operations.
| Modifier and Type | Class and Description |
|---|---|
static class |
ContainerACL.AccessPolicy
An inner class representing the start time, expiration time, and
permissions associated with an access policy.
|
static class |
ContainerACL.PublicAccessType
An enumeration type for the public access levels that can be set on a
blob container.
|
static class |
ContainerACL.SignedIdentifier
A static inner class representing a container-level access policy with a
unique name.
|
static class |
ContainerACL.SignedIdentifiers
A static inner class representing a collection of container-level access
policies.
|
| Constructor and Description |
|---|
ContainerACL() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSignedIdentifier(String id,
Date start,
Date expiry,
String permission)
Adds a container-level access policy to the list associated with this
ContainerACL instance. |
String |
getEtag()
Gets the Etag value associated with this
ContainerACL instance. |
Date |
getLastModified()
Gets the last modified time associated with this
ContainerACL
instance. |
ContainerACL.PublicAccessType |
getPublicAccess()
Gets the public access level associated with this
ContainerACL
instance. |
List<ContainerACL.SignedIdentifier> |
getSignedIdentifiers()
Gets the list of container-level access policies associated with this
ContainerACL instance. |
ContainerACL |
setEtag(String etag)
Sets the Etag value to associate with this
ContainerACL instance. |
ContainerACL |
setLastModified(Date lastModified)
Sets the last modified time to associate with this
ContainerACL
instance. |
ContainerACL |
setPublicAccess(ContainerACL.PublicAccessType publicAccess)
Sets the public access level to associate with this
ContainerACL
instance. |
ContainerACL |
setSignedIdentifiers(List<ContainerACL.SignedIdentifier> signedIdentifiers)
Sets the list of container-level access policies to associate with this
ContainerACL instance. |
public String getEtag()
ContainerACL instance. This is the value returned for a container
by a Blob service REST API Get Container ACL operation, or the value to
set on a container with a Set Container ACL operation.String containing the Etag value
associated with this ContainerACL instance.public ContainerACL setEtag(String etag)
ContainerACL instance.
This value is only set on a container when this ContainerACL
instance is passed as a parameter to a call to an implementation of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) or
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions).
etag - A String containing the Etag value to
associate with this ContainerACL instance.ContainerACL instance.public Date getLastModified()
ContainerACL
instance. This is the value returned for a container by a Blob service
REST API Get Container ACL operation, or the value to set on a container
with a Set Container ACL operation.Date containing the last modified time associated with
this ContainerACL instance.public ContainerACL setLastModified(Date lastModified)
ContainerACL
instance.
This value is only set on a container when this ContainerACL
instance is passed as a parameter to a call to an implementation of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) or
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions).
lastModified - A Date containing the last modified time to
associate with this ContainerACL instance.ContainerACL instance.public ContainerACL.PublicAccessType getPublicAccess()
ContainerACL
instance. This is the value returned for a container by a Blob service
REST API Get Container ACL operation, or the value to set on a container
with a Set Container ACL operation.ContainerACL.PublicAccessType value representing the public access
level associated with this ContainerACL instance.public ContainerACL setPublicAccess(ContainerACL.PublicAccessType publicAccess)
ContainerACL
instance.
This value is only set on a container when this ContainerACL
instance is passed as a parameter to a call to an implementation of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) or
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions).
publicAccess - A ContainerACL.PublicAccessType value representing the public
access level to associate with this ContainerACL
instance.ContainerACL instance.public List<ContainerACL.SignedIdentifier> getSignedIdentifiers()
ContainerACL instance. This is the value returned for a container
by a Blob service REST API Get Container ACL operation, or the value to
set on a container with a Set Container ACL operation.List of ContainerACL.SignedIdentifier instances containing
up to five container-level access policies associated with this
ContainerACL instance.public ContainerACL setSignedIdentifiers(List<ContainerACL.SignedIdentifier> signedIdentifiers)
ContainerACL instance.
This value is only set on a container when this ContainerACL
instance is passed as a parameter to a call to an implementation of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) or
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions).
signedIdentifiers - A List of ContainerACL.SignedIdentifier instances
containing up to five container-level access policies to
associate with this ContainerACL instance.ContainerACL instance.public void addSignedIdentifier(String id, Date start, Date expiry, String permission)
ContainerACL instance. A container may have up to five
container-level access policies.
Use the id parameter to specify a name for the access policy. The name may be up to 64 characters in length and must be unique within the container.
Use the start parameter to specify the start time for valid
access to a resource using the access policy. If this value is
null, the start time for any resource request using the
access policy is assumed to be the time when the Blob service receives
the request.
Use the expiry parameter to specify the expiration time for
valid access to a resource using the access policy. If this value is
null, the expiry time must be included in the Shared Access
Signature for any resource request using the access policy.
Use the permission parameter to specify the operations that can be performed on a blob that is accessed with the access policy. Supported permissions include read (r), write (w), delete (d), and list (l). Permissions may be grouped so as to allow multiple operations to be performed with the access policy. For example, to grant all permissions to a resource, specify "rwdl" for the parameter. To grant only read/write permissions, specify "rw" for the parameter.
This value is only set on a container when this ContainerACL
instance is passed as a parameter to a call to an implementation of
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL) or
com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions).
id - A String containing the name for the access policy.start - A Date representing the start time for the access
policy. If this value is null, any Shared Access
Signature that refers to this policy may specify the start
time.expiry - A Date representing the expiration time for the access
policy. If this value is null, any Shared Access
Signature that refers to this policy must specify the expiry
value. Resource access using a Shared Access Signature that
refers to this policy after this time is not valid.permission - A String containing the permissions specified for the
access policy./**
* 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.
*/