Class BlobHttpWebRequestFactory
- Namespace
- Microsoft.WindowsAzure.Storage.Blob.Protocol
- Assembly
- Microsoft.WindowsAzure.Storage.dll
A factory class for constructing HTTP web requests for the Blob service.
public static class BlobHttpWebRequestFactory
- Inheritance
-
BlobHttpWebRequestFactory
- Inherited Members
Methods
AbortCopy(Uri, int?, string, AccessCondition, OperationContext)
Generates a web request to abort a copy operation.
public static HttpWebRequest AbortCopy(Uri uri, int? timeout, string copyId, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
copyId
stringThe ID string of the copy operation to be aborted.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. Only lease conditions are supported for this operation.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
AbortCopy(Uri, int?, string, AccessCondition, bool, OperationContext)
Generates a web request to abort a copy operation.
public static HttpWebRequest AbortCopy(Uri uri, int? timeout, string copyId, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
copyId
stringThe ID string of the copy operation to be aborted.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. Only lease conditions are supported for this operation.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
AddMetadata(HttpWebRequest, IDictionary<string, string>)
Adds user-defined metadata to the request as one or more name-value pairs.
public static void AddMetadata(HttpWebRequest request, IDictionary<string, string> metadata)
Parameters
request
HttpWebRequestA HttpWebRequest object.
metadata
IDictionary<string, string>A Dictionary<TKey, TValue> object containing the user-defined metadata.
AddMetadata(HttpWebRequest, string, string)
Adds user-defined metadata to the request as a single name-value pair.
public static void AddMetadata(HttpWebRequest request, string name, string value)
Parameters
request
HttpWebRequestA HttpWebRequest object.
name
stringA string containing the metadata name.
value
stringA string containing the metadata value.
AppendBlock(Uri, int?, AccessCondition, OperationContext)
Constructs a web request to commit a block to an append blob.
public static HttpWebRequest AppendBlock(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
AppendBlock(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to commit a block to an append blob.
public static HttpWebRequest AppendBlock(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
CopyFrom(Uri, int?, Uri, AccessCondition, AccessCondition, OperationContext)
Generates a web request to copy a blob or file to another blob.
public static HttpWebRequest CopyFrom(Uri uri, int? timeout, Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the destination blob.
timeout
int?An integer specifying the server timeout interval.
source
UriA System.Uri specifying the absolute URI to the source object, including any necessary authentication parameters.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the source object in order for the request to proceed.
destAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the destination blob in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
CopyFrom(Uri, int?, Uri, AccessCondition, AccessCondition, bool, OperationContext)
Generates a web request to copy a blob or file to another blob.
public static HttpWebRequest CopyFrom(Uri uri, int? timeout, Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the destination blob.
timeout
int?An integer specifying the server timeout interval.
source
UriA System.Uri specifying the absolute URI to the source object, including any necessary authentication parameters.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the source object in order for the request to proceed.
destAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the destination blob in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
CopyFrom(Uri, int?, Uri, bool, AccessCondition, AccessCondition, bool, OperationContext)
Generates a web request to copy a blob or file to another blob.
public static HttpWebRequest CopyFrom(Uri uri, int? timeout, Uri source, bool incrementalCopy, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the destination blob.
timeout
int?An integer specifying the server timeout interval.
source
UriA System.Uri specifying the absolute URI to the source object, including any necessary authentication parameters.
incrementalCopy
boolA boolean indicating whether or not this is an incremental copy.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the source object in order for the request to proceed.
destAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the destination blob in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
CopyFrom(Uri, int?, Uri, bool, PremiumPageBlobTier?, AccessCondition, AccessCondition, bool, OperationContext)
Generates a web request to copy a blob or file to another blob.
public static HttpWebRequest CopyFrom(Uri uri, int? timeout, Uri source, bool incrementalCopy, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the destination blob.
timeout
int?An integer specifying the server timeout interval.
source
UriA System.Uri specifying the absolute URI to the source object, including any necessary authentication parameters.
incrementalCopy
boolA boolean indicating whether or not this is an incremental copy.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the source object in order for the request to proceed.
destAccessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met on the destination blob in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Delete(Uri, int?, DateTimeOffset?, DeleteSnapshotsOption, AccessCondition, bool, OperationContext)
Constructs a web request to delete a blob.
public static HttpWebRequest Delete(Uri uri, int? timeout, DateTimeOffset? snapshot, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to delete only blobs, only snapshots, or both.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Get(Uri, int?, DateTimeOffset?, AccessCondition, OperationContext)
Constructs a web request to get the blob's content, properties, and metadata.
public static HttpWebRequest Get(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot version, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Get(Uri, int?, DateTimeOffset?, AccessCondition, bool, OperationContext)
Constructs a web request to get the blob's content, properties, and metadata.
public static HttpWebRequest Get(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot version, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Get(Uri, int?, DateTimeOffset?, long?, long?, bool, AccessCondition, OperationContext)
Constructs a web request to return a specified range of the blob's content, together with its properties and metadata.
public static HttpWebRequest Get(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, bool rangeContentMD5, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot version, if the blob is a snapshot.
offset
long?The byte offset at which to begin returning content.
count
long?The number of bytes to return, or
null
to return all bytes through the end of the blob.rangeContentMD5
boolIf set to
true
, an MD5 header is requested for the specified range.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A web request to use to perform the operation.
Get(Uri, int?, DateTimeOffset?, long?, long?, bool, AccessCondition, bool, OperationContext)
Constructs a web request to return a specified range of the blob's content, together with its properties and metadata.
public static HttpWebRequest Get(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, bool rangeContentMD5, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot version, if the blob is a snapshot.
offset
long?The byte offset at which to begin returning content.
count
long?The number of bytes to return, or
null
to return all bytes through the end of the blob.rangeContentMD5
boolIf set to
true
, an MD5 header is requested for the specified range.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A web request to use to perform the operation.
GetAccountProperties(Uri, UriQueryBuilder, int?, OperationContext)
Creates a web request to get the properties of the Blob service account.
public static HttpWebRequest GetAccountProperties(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
builder
UriQueryBuilderA UriQueryBuilder object specifying additional parameters to add to the URI query string.
timeout
int?The server timeout interval, in seconds.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetBlockList(Uri, int?, DateTimeOffset?, BlockListingFilter, AccessCondition, OperationContext)
Constructs a web request to return the list of blocks for a block blob.
public static HttpWebRequest GetBlockList(Uri uri, int? timeout, DateTimeOffset? snapshot, BlockListingFilter typesOfBlocks, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
typesOfBlocks
BlockListingFilterA BlockListingFilter enumeration value.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetBlockList(Uri, int?, DateTimeOffset?, BlockListingFilter, AccessCondition, bool, OperationContext)
Constructs a web request to return the list of blocks for a block blob.
public static HttpWebRequest GetBlockList(Uri uri, int? timeout, DateTimeOffset? snapshot, BlockListingFilter typesOfBlocks, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
typesOfBlocks
BlockListingFilterA BlockListingFilter enumeration value.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetMetadata(Uri, int?, DateTimeOffset?, AccessCondition, OperationContext)
Constructs a web request to return the user-defined metadata for the blob.
public static HttpWebRequest GetMetadata(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetMetadata(Uri, int?, DateTimeOffset?, AccessCondition, bool, OperationContext)
Constructs a web request to return the user-defined metadata for the blob.
public static HttpWebRequest GetMetadata(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetPageRanges(Uri, int?, DateTimeOffset?, long?, long?, AccessCondition, OperationContext)
Constructs a web request to return the list of valid page ranges for a page blob.
public static HttpWebRequest GetPageRanges(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
count
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetPageRanges(Uri, int?, DateTimeOffset?, long?, long?, AccessCondition, bool, OperationContext)
Constructs a web request to return the list of valid page ranges for a page blob.
public static HttpWebRequest GetPageRanges(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
count
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetPageRangesDiff(Uri, int?, DateTimeOffset?, DateTimeOffset, long?, long?, AccessCondition, bool, OperationContext)
Constructs a web request to return the list of page ranges that differ between a specified snapshot and this object.
public static HttpWebRequest GetPageRangesDiff(Uri uri, int? timeout, DateTimeOffset? snapshot, DateTimeOffset previousSnapshotTime, long? offset, long? count, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
count
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetProperties(Uri, int?, DateTimeOffset?, AccessCondition, OperationContext)
Constructs a web request to return the blob's system properties.
public static HttpWebRequest GetProperties(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetProperties(Uri, int?, DateTimeOffset?, AccessCondition, bool, OperationContext)
Constructs a web request to return the blob's system properties.
public static HttpWebRequest GetProperties(Uri uri, int? timeout, DateTimeOffset? snapshot, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
snapshot
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetServiceProperties(Uri, UriQueryBuilder, int?, OperationContext)
Creates a web request to get the properties of the Blob service.
public static HttpWebRequest GetServiceProperties(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
builder
UriQueryBuilderA UriQueryBuilder object specifying additional parameters to add to the URI query string.
timeout
int?The server timeout interval, in seconds.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
GetServiceStats(Uri, UriQueryBuilder, int?, OperationContext)
Creates a web request to get the stats of the Blob service.
public static HttpWebRequest GetServiceStats(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
builder
UriQueryBuilderA UriQueryBuilder object specifying additional parameters to add to the URI query string.
timeout
int?The server timeout interval, in seconds.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Lease(Uri, int?, LeaseAction, string, int?, int?, AccessCondition, OperationContext)
Generates a web request to use to acquire, renew, change, release or break the lease for the blob.
public static HttpWebRequest Lease(Uri uri, int? timeout, LeaseAction action, string proposedLeaseId, int? leaseDuration, int? leaseBreakPeriod, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?The server timeout interval, in seconds.
action
LeaseActionA LeaseAction enumeration value indicating the lease action to perform.
proposedLeaseId
stringA string specifying the lease ID to propose for the result of an acquire or change operation, or
null
if no ID is proposed for an acquire operation. This parameter should benull
for renew, release, and break operations.leaseDuration
int?The lease duration, in seconds, for acquire operations. If this is -1 then an infinite duration is specified. This should be
null
for renew, change, release, and break operations.leaseBreakPeriod
int?The amount of time to wait, in seconds, after a break operation before the lease is broken. If this is
null
then the default time is used. This should benull
for acquire, renew, change, and release operations.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Lease(Uri, int?, LeaseAction, string, int?, int?, AccessCondition, bool, OperationContext)
Generates a web request to use to acquire, renew, change, release or break the lease for the blob.
public static HttpWebRequest Lease(Uri uri, int? timeout, LeaseAction action, string proposedLeaseId, int? leaseDuration, int? leaseBreakPeriod, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?The server timeout interval, in seconds.
action
LeaseActionA LeaseAction enumeration value indicating the lease action to perform.
proposedLeaseId
stringA string specifying the lease ID to propose for the result of an acquire or change operation, or
null
if no ID is proposed for an acquire operation. This parameter should benull
for renew, release, and break operations.leaseDuration
int?The lease duration, in seconds, for acquire operations. If this is -1 then an infinite duration is specified. This should be
null
for renew, change, release, and break operations.leaseBreakPeriod
int?The amount of time to wait, in seconds, after a break operation before the lease is broken. If this is
null
then the default time is used. This should benull
for acquire, renew, change, and release operations.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Put(Uri, int?, BlobProperties, BlobType, long, AccessCondition, OperationContext)
Constructs a web request to create a new block blob or page blob, or to update the content of an existing block blob.
public static HttpWebRequest Put(Uri uri, int? timeout, BlobProperties properties, BlobType blobType, long pageBlobSize, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesA BlobProperties object.
blobType
BlobTypeA BlobType enumeration value.
pageBlobSize
longFor a page blob, the size of the blob. This parameter is ignored for block blobs.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Put(Uri, int?, BlobProperties, BlobType, long, PremiumPageBlobTier?, AccessCondition, bool, OperationContext)
Constructs a web request to create a new block blob or page blob, or to update the content of an existing block blob.
public static HttpWebRequest Put(Uri uri, int? timeout, BlobProperties properties, BlobType blobType, long pageBlobSize, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesA BlobProperties object.
blobType
BlobTypeA BlobType enumeration value.
pageBlobSize
longFor a page blob, the size of the blob. This parameter is ignored for block blobs.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlock(Uri, int?, string, AccessCondition, OperationContext)
Constructs a web request to write a block to a block blob.
public static HttpWebRequest PutBlock(Uri uri, int? timeout, string blockId, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
blockId
stringA string specifying the block ID for this block.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlock(Uri, int?, string, AccessCondition, bool, OperationContext)
Constructs a web request to write a block to a block blob.
public static HttpWebRequest PutBlock(Uri uri, int? timeout, string blockId, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
blockId
stringA string specifying the block ID for this block.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlock(Uri, Uri, long?, long?, string, int?, string, AccessCondition, OperationContext)
Constructs a web request to write a block to a block blob.
public static HttpWebRequest PutBlock(Uri uri, Uri sourceUri, long? offset, long? count, string contentMD5, int? timeout, string blockId, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
sourceUri
UriA System.Uri specifying the absolute URI to the source blob.
offset
long?The byte offset at which to begin returning content.
count
long?The number of bytes to return, or
null
to return all bytes through the end of the blob.contentMD5
stringThe MD5 calculated for the range of bytes of the source.
timeout
int?An integer specifying the server timeout interval.
blockId
stringA string specifying the block ID for this block.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlock(Uri, Uri, long?, long?, string, int?, string, AccessCondition, bool, OperationContext)
Constructs a web request to write a block to a block blob.
public static HttpWebRequest PutBlock(Uri uri, Uri sourceUri, long? offset, long? count, string contentMD5, int? timeout, string blockId, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
sourceUri
UriA System.Uri specifying the absolute URI to the source blob.
offset
long?The byte offset at which to begin returning content.
count
long?The number of bytes to return, or
null
to return all bytes through the end of the blob.contentMD5
stringThe MD5 calculated for the range of bytes of the source.
timeout
int?An integer specifying the server timeout interval.
blockId
stringA string specifying the block ID for this block.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlockList(Uri, int?, BlobProperties, AccessCondition, OperationContext)
Constructs a web request to create or update a blob by committing a block list.
public static HttpWebRequest PutBlockList(Uri uri, int? timeout, BlobProperties properties, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesA BlobProperties object specifying the properties to set for the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutBlockList(Uri, int?, BlobProperties, AccessCondition, bool, OperationContext)
Constructs a web request to create or update a blob by committing a block list.
public static HttpWebRequest PutBlockList(Uri uri, int? timeout, BlobProperties properties, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesA BlobProperties object specifying the properties to set for the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutPage(Uri, int?, PageRange, PageWrite, AccessCondition, OperationContext)
Constructs a web request to write or clear a range of pages in a page blob.
public static HttpWebRequest PutPage(Uri uri, int? timeout, PageRange pageRange, PageWrite pageWrite, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
pageRange
PageRangeA PageRange object.
pageWrite
PageWriteA PageWrite enumeration value indicating the operation to perform on the page blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
PutPage(Uri, int?, PageRange, PageWrite, AccessCondition, bool, OperationContext)
Constructs a web request to write or clear a range of pages in a page blob.
public static HttpWebRequest PutPage(Uri uri, int? timeout, PageRange pageRange, PageWrite pageWrite, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
pageRange
PageRangeA PageRange object.
pageWrite
PageWriteA PageWrite enumeration value indicating the operation to perform on the page blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A web request to use to perform the operation.
Resize(Uri, int?, long, AccessCondition, OperationContext)
Constructs a web request to resize a page blob.
public static HttpWebRequest Resize(Uri uri, int? timeout, long newBlobSize, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
newBlobSize
longThe new blob size, if the blob is a page blob. Set this parameter to
null
to keep the existing blob size.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Resize(Uri, int?, long, AccessCondition, bool, OperationContext)
Constructs a web request to resize a page blob.
public static HttpWebRequest Resize(Uri uri, int? timeout, long newBlobSize, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
newBlobSize
longThe new blob size, if the blob is a page blob. Set this parameter to
null
to keep the existing blob size.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetBlobTier(Uri, int?, string, bool, OperationContext)
Generates a web request to set the tier for a blob.
public static HttpWebRequest SetBlobTier(Uri uri, int? timeout, string blobTier, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?The server timeout interval, in seconds.
blobTier
stringThe blob tier to set as a string.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetMetadata(Uri, int?, AccessCondition, OperationContext)
Constructs a web request to set user-defined metadata for the blob.
public static HttpWebRequest SetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetMetadata(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to set user-defined metadata for the blob.
public static HttpWebRequest SetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetProperties(Uri, int?, BlobProperties, AccessCondition, OperationContext)
Constructs a web request to set system properties for a blob.
public static HttpWebRequest SetProperties(Uri uri, int? timeout, BlobProperties properties, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesThe blob's properties.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetProperties(Uri, int?, BlobProperties, AccessCondition, bool, OperationContext)
Constructs a web request to set system properties for a blob.
public static HttpWebRequest SetProperties(Uri uri, int? timeout, BlobProperties properties, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
properties
BlobPropertiesThe blob's properties.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetSequenceNumber(Uri, int?, SequenceNumberAction, long?, AccessCondition, OperationContext)
Constructs a web request to set a page blob's sequence number.
public static HttpWebRequest SetSequenceNumber(Uri uri, int? timeout, SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
if this operation is an increment action.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetSequenceNumber(Uri, int?, SequenceNumberAction, long?, AccessCondition, bool, OperationContext)
Constructs a web request to set a page blob's sequence number.
public static HttpWebRequest SetSequenceNumber(Uri uri, int? timeout, SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
if this operation is an increment action.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
SetServiceProperties(Uri, UriQueryBuilder, int?, OperationContext)
Creates a web request to set the properties of the Blob service.
public static HttpWebRequest SetServiceProperties(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
builder
UriQueryBuilderA UriQueryBuilder object specifying additional parameters to add to the URI query string.
timeout
int?The server timeout interval, in seconds.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Snapshot(Uri, int?, AccessCondition, OperationContext)
Constructs a web request to create a snapshot of a blob.
public static HttpWebRequest Snapshot(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Snapshot(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to create a snapshot of a blob.
public static HttpWebRequest Snapshot(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Undelete(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to undelete a soft-deleted blob.
public static HttpWebRequest Undelete(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
WriteServiceProperties(ServiceProperties, Stream)
Writes Blob service properties to a stream, formatted in XML.
public static void WriteServiceProperties(ServiceProperties properties, Stream outputStream)
Parameters
properties
ServicePropertiesA ServiceProperties object.
outputStream
StreamThe Stream object to which the formatted properties are to be written.