Class ContainerHttpWebRequestFactory
- Namespace
- Microsoft.WindowsAzure.Storage.Blob.Protocol
- Assembly
- Microsoft.WindowsAzure.Storage.dll
A factory class for constructing a web request to manage containers in the Blob service.
public static class ContainerHttpWebRequestFactory
- Inheritance
-
ContainerHttpWebRequestFactory
- Inherited Members
Methods
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.
Create(Uri, int?, OperationContext)
Constructs a web request to create a new container.
public static HttpWebRequest Create(Uri uri, int? timeout, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
Create(Uri, int?, OperationContext, BlobContainerPublicAccessType)
Constructs a web request to create a new container.
public static HttpWebRequest Create(Uri uri, int? timeout, OperationContext operationContext, BlobContainerPublicAccessType accessType)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
accessType
BlobContainerPublicAccessTypeAn BlobContainerPublicAccessType object that specifies whether data in the container may be accessed publicly and the level of access.
Returns
- HttpWebRequest
A HttpWebRequest object.
Create(Uri, int?, bool, OperationContext)
Constructs a web request to create a new container.
public static HttpWebRequest Create(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
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.
Create(Uri, int?, bool, OperationContext, BlobContainerPublicAccessType)
Constructs a web request to create a new container.
public static HttpWebRequest Create(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext, BlobContainerPublicAccessType accessType)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
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.
accessType
BlobContainerPublicAccessTypeAn BlobContainerPublicAccessType object that specifies whether data in the container may be accessed publicly and the level of access.
Returns
- HttpWebRequest
A HttpWebRequest object.
Delete(Uri, int?, AccessCondition, OperationContext)
Constructs a web request to delete the container and all of the blobs within it.
public static HttpWebRequest Delete(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
Delete(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to delete the container and all of the blobs within it.
public static HttpWebRequest Delete(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
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.
GetAcl(Uri, int?, AccessCondition, OperationContext)
Constructs a web request to return the ACL for a container.
public static HttpWebRequest GetAcl(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
GetAcl(Uri, int?, AccessCondition, bool, OperationContext)
Constructs a web request to return the ACL for a container.
public static HttpWebRequest GetAcl(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
GetMetadata(Uri, int?, AccessCondition, OperationContext)
Generates a web request to return the user-defined metadata for this container.
public static HttpWebRequest GetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
GetMetadata(Uri, int?, AccessCondition, bool, OperationContext)
Generates a web request to return the user-defined metadata for this container.
public static HttpWebRequest GetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
GetProperties(Uri, int?, AccessCondition, OperationContext)
Generates a web request to return the properties and user-defined metadata for this container.
public static HttpWebRequest GetProperties(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
GetProperties(Uri, int?, AccessCondition, bool, OperationContext)
Generates a web request to return the properties and user-defined metadata for this container.
public static HttpWebRequest GetProperties(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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.
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 container.
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 container.
timeout
int?An integer specifying the server timeout interval.
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 container.
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 container.
timeout
int?An integer specifying the server timeout interval.
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.
List(Uri, int?, ListingContext, ContainerListingDetails, OperationContext)
Constructs a web request to return a listing of all containers in this storage account.
public static HttpWebRequest List(Uri uri, int? timeout, ListingContext listingContext, ContainerListingDetails detailsIncluded, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
timeout
int?An integer specifying the server timeout interval.
listingContext
ListingContextA ListingContext object.
detailsIncluded
ContainerListingDetailsA ContainerListingDetails enumeration value that indicates whether to return container metadata with the listing.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A web request for the specified operation.
List(Uri, int?, ListingContext, ContainerListingDetails, bool, OperationContext)
Constructs a web request to return a listing of all containers in this storage account.
public static HttpWebRequest List(Uri uri, int? timeout, ListingContext listingContext, ContainerListingDetails detailsIncluded, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the Blob service endpoint.
timeout
int?An integer specifying the server timeout interval.
listingContext
ListingContextA ListingContext object.
detailsIncluded
ContainerListingDetailsA ContainerListingDetails enumeration value that indicates whether to return container metadata with the listing.
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 for the specified operation.
ListBlobs(Uri, int?, BlobListingContext, OperationContext)
Generates a web request to return a listing of all blobs in the container.
public static HttpWebRequest ListBlobs(Uri uri, int? timeout, BlobListingContext listingContext, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
listingContext
BlobListingContextA ListingContext object.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- HttpWebRequest
A HttpWebRequest object.
ListBlobs(Uri, int?, BlobListingContext, bool, OperationContext)
Generates a web request to return a listing of all blobs in the container.
public static HttpWebRequest ListBlobs(Uri uri, int? timeout, BlobListingContext listingContext, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
listingContext
BlobListingContextA ListingContext object.
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.
SetAcl(Uri, int?, BlobContainerPublicAccessType, AccessCondition, OperationContext)
Constructs a web request to set the ACL for a container.
public static HttpWebRequest SetAcl(Uri uri, int? timeout, BlobContainerPublicAccessType publicAccess, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
publicAccess
BlobContainerPublicAccessTypeThe type of public access to allow for the container.
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.
SetAcl(Uri, int?, BlobContainerPublicAccessType, AccessCondition, bool, OperationContext)
Constructs a web request to set the ACL for a container.
public static HttpWebRequest SetAcl(Uri uri, int? timeout, BlobContainerPublicAccessType publicAccess, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
timeout
int?An integer specifying the server timeout interval.
publicAccess
BlobContainerPublicAccessTypeThe type of public access to allow for the container.
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.
SetMetadata(Uri, int?, AccessCondition, OperationContext)
Generates a web request to set user-defined metadata for the container.
public static HttpWebRequest SetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, OperationContext operationContext)
Parameters
uri
UriA System.Uri specifying the absolute URI to the container.
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)
Generates a web request to set user-defined metadata for the container.
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 container.
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.