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)
Creates a
ContainerURL object pointing to the account specified by the URL and using the provided
pipeline to make HTTP requests. |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<ContainerAcquireLeaseResponse> |
acquireLease(String proposedId,
int duration)
Acquires a lease on the container for delete operations.
|
io.reactivex.Single<ContainerAcquireLeaseResponse> |
acquireLease(String proposedID,
int duration,
ModifiedAccessConditions modifiedAccessConditions,
com.microsoft.rest.v2.Context context)
Acquires a lease on the container for delete operations.
|
io.reactivex.Single<ContainerBreakLeaseResponse> |
breakLease()
Breaks the container's previously-acquired lease.
|
io.reactivex.Single<ContainerBreakLeaseResponse> |
breakLease(Integer breakPeriodInSeconds,
ModifiedAccessConditions modifiedAccessConditions,
com.microsoft.rest.v2.Context context)
Breaks the container's previously-acquired lease.
|
io.reactivex.Single<ContainerChangeLeaseResponse> |
changeLease(String leaseID,
String proposedID)
Changes the container's leaseAccessConditions.
|
io.reactivex.Single<ContainerChangeLeaseResponse> |
changeLease(String leaseID,
String proposedID,
ModifiedAccessConditions modifiedAccessConditions,
com.microsoft.rest.v2.Context context)
Changes the container's leaseAccessConditions.
|
io.reactivex.Single<ContainerCreateResponse> |
create()
Creates a new container within a storage account.
|
io.reactivex.Single<ContainerCreateResponse> |
create(Metadata metadata,
PublicAccessType accessType,
com.microsoft.rest.v2.Context context)
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()
Marks the specified container for deletion.
|
io.reactivex.Single<ContainerDeleteResponse> |
delete(ContainerAccessConditions accessConditions,
com.microsoft.rest.v2.Context context)
Marks the specified container for deletion.
|
io.reactivex.Single<ContainerGetAccessPolicyResponse> |
getAccessPolicy()
Returns the container's permissions.
|
io.reactivex.Single<ContainerGetAccessPolicyResponse> |
getAccessPolicy(LeaseAccessConditions leaseAccessConditions,
com.microsoft.rest.v2.Context context)
Returns the container's permissions.
|
io.reactivex.Single<ContainerGetAccountInfoResponse> |
getAccountInfo()
Returns the sku name and account kind for the account.
|
io.reactivex.Single<ContainerGetAccountInfoResponse> |
getAccountInfo(com.microsoft.rest.v2.Context context)
Returns the sku name and account kind for the account.
|
io.reactivex.Single<ContainerGetPropertiesResponse> |
getProperties()
Returns the container's metadata and system properties.
|
io.reactivex.Single<ContainerGetPropertiesResponse> |
getProperties(LeaseAccessConditions leaseAccessConditions,
com.microsoft.rest.v2.Context context)
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<ContainerListBlobFlatSegmentResponse> |
listBlobsFlatSegment(String marker,
ListBlobsOptions options,
com.microsoft.rest.v2.Context context)
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<ContainerListBlobHierarchySegmentResponse> |
listBlobsHierarchySegment(String marker,
String delimiter,
ListBlobsOptions options,
com.microsoft.rest.v2.Context context)
Returns a single segment of blobs and blob prefixes starting from the specified Marker.
|
io.reactivex.Single<ContainerReleaseLeaseResponse> |
releaseLease(String leaseID)
Releases the container's previously-acquired lease.
|
io.reactivex.Single<ContainerReleaseLeaseResponse> |
releaseLease(String leaseID,
ModifiedAccessConditions modifiedAccessConditions,
com.microsoft.rest.v2.Context context)
Releases the container's previously-acquired lease.
|
io.reactivex.Single<ContainerRenewLeaseResponse> |
renewLease(String leaseID)
Renews the container's previously-acquired lease.
|
io.reactivex.Single<ContainerRenewLeaseResponse> |
renewLease(String leaseID,
ModifiedAccessConditions modifiedAccessConditions,
com.microsoft.rest.v2.Context context)
Renews the container's previously-acquired lease.
|
io.reactivex.Single<ContainerSetAccessPolicyResponse> |
setAccessPolicy(PublicAccessType accessType,
List<SignedIdentifier> identifiers)
Sets the container's permissions.
|
io.reactivex.Single<ContainerSetAccessPolicyResponse> |
setAccessPolicy(PublicAccessType accessType,
List<SignedIdentifier> identifiers,
ContainerAccessConditions accessConditions,
com.microsoft.rest.v2.Context context)
Sets the container's permissions.
|
io.reactivex.Single<ContainerSetMetadataResponse> |
setMetadata(Metadata metadata)
Sets the container's metadata.
|
io.reactivex.Single<ContainerSetMetadataResponse> |
setMetadata(Metadata metadata,
ContainerAccessConditions accessConditions,
com.microsoft.rest.v2.Context context)
Sets the container's metadata.
|
ContainerURL |
withPipeline(com.microsoft.rest.v2.http.HttpPipeline pipeline)
Creates a new
ContainerURL with the given pipeline. |
appendToURLPath, createPipeline, createPipeline, createPipeline, 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)
ContainerURL
object pointing to the account specified by the URL and using the provided
pipeline to make HTTP requests.url
- A URL
to an Azure Storage container.pipeline
- A HttpPipeline
which configures the behavior of HTTP exchanges. Please refer to
StorageURL.createPipeline(ICredentials, PipelineOptions)
for more information.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()
public io.reactivex.Single<ContainerCreateResponse> create(Metadata metadata, PublicAccessType accessType, com.microsoft.rest.v2.Context context)
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.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerDeleteResponse> delete()
public io.reactivex.Single<ContainerDeleteResponse> delete(ContainerAccessConditions accessConditions, com.microsoft.rest.v2.Context context)
accessConditions
- ContainerAccessConditions
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerGetPropertiesResponse> getProperties()
public io.reactivex.Single<ContainerGetPropertiesResponse> getProperties(LeaseAccessConditions leaseAccessConditions, com.microsoft.rest.v2.Context context)
leaseAccessConditions
- By setting lease access conditions, requests will fail if the provided lease does not match the active
lease on the blob.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerSetMetadataResponse> setMetadata(Metadata metadata)
metadata
- Metadata
public io.reactivex.Single<ContainerSetMetadataResponse> setMetadata(Metadata metadata, ContainerAccessConditions accessConditions, com.microsoft.rest.v2.Context context)
metadata
- Metadata
accessConditions
- ContainerAccessConditions
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerGetAccessPolicyResponse> getAccessPolicy()
public io.reactivex.Single<ContainerGetAccessPolicyResponse> getAccessPolicy(LeaseAccessConditions leaseAccessConditions, com.microsoft.rest.v2.Context context)
leaseAccessConditions
- By setting lease access conditions, requests will fail if the provided lease does not match the active
lease on the blob.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerSetAccessPolicyResponse> setAccessPolicy(PublicAccessType accessType, List<SignedIdentifier> identifiers)
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.public io.reactivex.Single<ContainerSetAccessPolicyResponse> setAccessPolicy(PublicAccessType accessType, List<SignedIdentifier> identifiers, ContainerAccessConditions accessConditions, com.microsoft.rest.v2.Context context)
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
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerAcquireLeaseResponse> acquireLease(String proposedId, int duration)
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.public io.reactivex.Single<ContainerAcquireLeaseResponse> acquireLease(String proposedID, int duration, ModifiedAccessConditions modifiedAccessConditions, com.microsoft.rest.v2.Context context)
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.modifiedAccessConditions
- Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used
to construct conditions related to when the blob was changed relative to the given request. The request
will fail if the specified condition is not satisfied.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerRenewLeaseResponse> renewLease(String leaseID)
leaseID
- The leaseId of the active lease on the container.public io.reactivex.Single<ContainerRenewLeaseResponse> renewLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions, com.microsoft.rest.v2.Context context)
leaseID
- The leaseId of the active lease on the container.modifiedAccessConditions
- Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used
to construct conditions related to when the blob was changed relative to the given request. The request
will fail if the specified condition is not satisfied.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerReleaseLeaseResponse> releaseLease(String leaseID)
leaseID
- The leaseId of the active lease on the container.public io.reactivex.Single<ContainerReleaseLeaseResponse> releaseLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions, com.microsoft.rest.v2.Context context)
leaseID
- The leaseId of the active lease on the container.modifiedAccessConditions
- Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used
to construct conditions related to when the blob was changed relative to the given request. The request
will fail if the specified condition is not satisfied.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerBreakLeaseResponse> breakLease()
public io.reactivex.Single<ContainerBreakLeaseResponse> breakLease(Integer breakPeriodInSeconds, ModifiedAccessConditions modifiedAccessConditions, com.microsoft.rest.v2.Context context)
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.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.modifiedAccessConditions
- Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used
to construct conditions related to when the blob was changed relative to the given request. The request
will fail if the specified condition is not satisfied.public io.reactivex.Single<ContainerChangeLeaseResponse> changeLease(String leaseID, String proposedID)
leaseID
- The leaseId of the active lease on the container.proposedID
- A String
in any valid GUID format.public io.reactivex.Single<ContainerChangeLeaseResponse> changeLease(String leaseID, String proposedID, ModifiedAccessConditions modifiedAccessConditions, com.microsoft.rest.v2.Context context)
leaseID
- The leaseId of the active lease on the container.proposedID
- A String
in any valid GUID format.modifiedAccessConditions
- Standard HTTP Access conditions related to the modification of data. ETag and LastModifiedTime are used
to construct conditions related to when the blob was changed relative to the given request. The request
will fail if the specified condition is not satisfied.context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.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<ContainerListBlobFlatSegmentResponse> listBlobsFlatSegment(String marker, ListBlobsOptions options, com.microsoft.rest.v2.Context context)
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
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.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
public io.reactivex.Single<ContainerListBlobHierarchySegmentResponse> listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options, com.microsoft.rest.v2.Context context)
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
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.public io.reactivex.Single<ContainerGetAccountInfoResponse> getAccountInfo()
public io.reactivex.Single<ContainerGetAccountInfoResponse> getAccountInfo(com.microsoft.rest.v2.Context context)
context
- Context
offers a means of passing arbitrary data (key/value pairs) to an
HttpPipeline
's policy objects. Most applications do not need to pass
arbitrary data to the pipeline and can pass Context.NONE
or null
. Each context object is
immutable. The withContext
with data method creates a new Context
object that refers to its
parent, forming a linked list.Copyright © 2019 Microsoft Corporation. All rights reserved.