public final class ContainerURL extends StorageURL
ServiceURL
object. This class does not hold any state about a particular blob but is instead a convenient way
of sending off appropriate requests to the resource on the service. It may also be used to construct URLs to blobs.
Please refer to the
Azure Docs
for more information on containers.Modifier and Type | Field and Description |
---|---|
static String |
LOG_CONTAINER_NAME |
static String |
ROOT_CONTAINER_NAME |
static String |
STATIC_WEBSITE_CONTAINER_NAME |
storageClient
Constructor and Description |
---|
ContainerURL(URL url,
com.microsoft.rest.v2.http.HttpPipeline pipeline) |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<ContainerAcquireLeaseResponse> |
acquireLease(String proposedID,
int duration,
HTTPAccessConditions httpAccessConditions)
Acquires a lease on the container for delete operations.
|
io.reactivex.Single<ContainerBreakLeaseResponse> |
breakLease(Integer breakPeriodInSeconds,
HTTPAccessConditions httpAccessConditions)
Breaks the container's previously-acquired lease.
|
io.reactivex.Single<ContainerChangeLeaseResponse> |
changeLease(String leaseID,
String proposedID,
HTTPAccessConditions httpAccessConditions)
Changes the container's leaseID.
|
io.reactivex.Single<ContainerCreateResponse> |
create(Metadata metadata,
PublicAccessType accessType)
Creates a new container within a storage account.
|
AppendBlobURL |
createAppendBlobURL(String blobName)
Creates creates a new AppendBlobURL object by concatenating blobName to the end of
ContainerURL's URL.
|
BlobURL |
createBlobURL(String blobName)
Creates a new BlobURL object by concatenating blobName to the end of
ContainerURL's URL.
|
BlockBlobURL |
createBlockBlobURL(String blobName)
Creates a new
BlockBlobURL object by concatenating the blobName to the end of
ContainerURL's URL. |
PageBlobURL |
createPageBlobURL(String blobName)
Creates creates a new PageBlobURL object by concatenating blobName to the end of
ContainerURL's URL.
|
io.reactivex.Single<ContainerDeleteResponse> |
delete(ContainerAccessConditions accessConditions)
Marks the specified container for deletion.
|
io.reactivex.Single<ContainerGetAccessPolicyResponse> |
getAccessPolicy(LeaseAccessConditions leaseAccessConditions)
Returns the container's permissions.
|
io.reactivex.Single<ContainerGetPropertiesResponse> |
getProperties(LeaseAccessConditions leaseAccessConditions)
Returns the container's metadata and system properties.
|
io.reactivex.Single<ContainerListBlobFlatSegmentResponse> |
listBlobsFlatSegment(String marker,
ListBlobsOptions options)
Returns a single segment of blobs starting from the specified Marker.
|
io.reactivex.Single<ContainerListBlobHierarchySegmentResponse> |
listBlobsHierarchySegment(String marker,
String delimiter,
ListBlobsOptions options)
Returns a single segment of blobs and blob prefixes starting from the specified Marker.
|
io.reactivex.Single<ContainerReleaseLeaseResponse> |
releaseLease(String leaseID,
HTTPAccessConditions httpAccessConditions)
Releases the container's previously-acquired lease.
|
io.reactivex.Single<ContainerRenewLeaseResponse> |
renewLease(String leaseID,
HTTPAccessConditions httpAccessConditions)
Renews the container's previously-acquired lease.
|
io.reactivex.Single<ContainerSetAccessPolicyResponse> |
setAccessPolicy(PublicAccessType accessType,
List<SignedIdentifier> identifiers,
ContainerAccessConditions accessConditions)
Sets the container's permissions.
|
io.reactivex.Single<ContainerSetMetadataResponse> |
setMetadata(Metadata metadata,
ContainerAccessConditions accessConditions)
Sets the container's metadata.
|
ContainerURL |
withPipeline(com.microsoft.rest.v2.http.HttpPipeline pipeline)
Creates a new
ContainerURL with the given pipeline. |
appendToURLPath, createPipeline, toString, toURL
public static final String ROOT_CONTAINER_NAME
public static final String STATIC_WEBSITE_CONTAINER_NAME
public static final String LOG_CONTAINER_NAME
public ContainerURL(URL url, com.microsoft.rest.v2.http.HttpPipeline pipeline)
public ContainerURL withPipeline(com.microsoft.rest.v2.http.HttpPipeline pipeline)
ContainerURL
with the given pipeline.pipeline
- An HttpPipeline
object to set.ContainerURL
object with the given pipeline.public BlockBlobURL createBlockBlobURL(String blobName)
BlockBlobURL
object by concatenating the blobName to the end of
ContainerURL's URL. The new BlockBlobUrl uses the same request policy pipeline as the ContainerURL.
To change the pipeline, create the BlockBlobUrl and then call its WithPipeline method passing in the
desired pipeline object. Or, call this package's NewBlockBlobUrl instead of calling this object's
NewBlockBlobUrl method.blobName
- A String
representing the name of the blob.BlockBlobURL
object which references the blob with the specified name in this container.public PageBlobURL createPageBlobURL(String blobName)
blobName
- A String
representing the name of the blob.PageBlobURL
object which references the blob with the specified name in this container.public AppendBlobURL createAppendBlobURL(String blobName)
blobName
- A String
representing the name of the blob.AppendBlobURL
object which references the blob with the specified name in this container.public BlobURL createBlobURL(String blobName)
blobName
- A String
representing the name of the blob.BlobURL
object which references the blob with the specified name in this container.public io.reactivex.Single<ContainerCreateResponse> create(Metadata metadata, PublicAccessType accessType)
metadata
- Metadata
accessType
- Specifies how the data in this container is available to the public. See the x-ms-blob-public-access header
in the Azure Docs for more information. Pass null for no public access.public io.reactivex.Single<ContainerDeleteResponse> delete(ContainerAccessConditions accessConditions)
accessConditions
- ContainerAccessConditions
public io.reactivex.Single<ContainerGetPropertiesResponse> getProperties(LeaseAccessConditions leaseAccessConditions)
leaseAccessConditions
- LeaseAccessConditions
public io.reactivex.Single<ContainerSetMetadataResponse> setMetadata(Metadata metadata, ContainerAccessConditions accessConditions)
metadata
- Metadata
accessConditions
- ContainerAccessConditions
public io.reactivex.Single<ContainerGetAccessPolicyResponse> getAccessPolicy(LeaseAccessConditions leaseAccessConditions)
leaseAccessConditions
- LeaseAccessConditions
public io.reactivex.Single<ContainerSetAccessPolicyResponse> setAccessPolicy(PublicAccessType accessType, List<SignedIdentifier> identifiers, ContainerAccessConditions accessConditions)
accessType
- Specifies how the data in this container is available to the public. See the x-ms-blob-public-access header
in the Azure Docs for more information. Pass null for no public access.identifiers
- A list of SignedIdentifier
objects that specify the permissions for the container. Please see
here
for more information. Passing null will clear all access policies.accessConditions
- ContainerAccessConditions
public io.reactivex.Single<ContainerAcquireLeaseResponse> acquireLease(String proposedID, int duration, HTTPAccessConditions httpAccessConditions)
proposedID
- A String
in any valid GUID format.duration
- The duration of the lease, in seconds, or negative one (-1) for a lease that never expires.
A non-infinite lease can be between 15 and 60 seconds.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<ContainerRenewLeaseResponse> renewLease(String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- The leaseId of the active lease on the container.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<ContainerReleaseLeaseResponse> releaseLease(String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- The leaseId of the active lease on the container.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<ContainerBreakLeaseResponse> breakLease(Integer breakPeriodInSeconds, HTTPAccessConditions httpAccessConditions)
breakPeriodInSeconds
- An optional Integer
representing the proposed duration of seconds that the lease should continue
before it is broken, between 0 and 60 seconds. This break period is only used if it is shorter than the time
remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be
available before the break period has expired, but the lease may be held for longer than the break period.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<ContainerChangeLeaseResponse> changeLease(String leaseID, String proposedID, HTTPAccessConditions httpAccessConditions)
leaseID
- The leaseId of the active lease on the container.proposedID
- A String
in any valid GUID format.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<ContainerListBlobFlatSegmentResponse> listBlobsFlatSegment(String marker, ListBlobsOptions options)
marker
- Identifies the portion of the list to be returned with the next list operation.
This value is returned in the response of a previous list operation as the
ListBlobsFlatSegmentResponse.body().nextMarker(). Set to null to list the first segment.options
- ListBlobsOptions
public io.reactivex.Single<ContainerListBlobHierarchySegmentResponse> listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options)
marker
- Identifies the portion of the list to be returned with the next list operation.
This value is returned in the response of a previous list operation as the
ListBlobsHierarchySegmentResponse.body().nextMarker(). Set to null to list the first segment.delimiter
- The operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs
whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may
be a single character or a string.options
- ListBlobsOptions
This documentation was released into the public domain.