Class CloudStorageAccount
- Namespace
- Microsoft.WindowsAzure.Storage
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a Microsoft Azure Storage account.
public class CloudStorageAccount
- Inheritance
-
CloudStorageAccount
- Inherited Members
Remarks
Examples
It looks like the sample you are looking for does not exist.
Constructors
CloudStorageAccount(StorageCredentials, StorageUri, StorageUri, StorageUri, StorageUri)
Initializes a new instance of the CloudStorageAccount class using the specified account credentials and service endpoints.
public CloudStorageAccount(StorageCredentials storageCredentials, StorageUri blobStorageUri, StorageUri queueStorageUri, StorageUri tableStorageUri, StorageUri fileStorageUri)
Parameters
storageCredentials
StorageCredentialsA StorageCredentials object.
blobStorageUri
StorageUriA StorageUri specifying the Blob service endpoint or endpoints.
queueStorageUri
StorageUriA StorageUri specifying the Queue service endpoint or endpoints.
tableStorageUri
StorageUriA StorageUri specifying the Table service endpoint or endpoints.
fileStorageUri
StorageUriA StorageUri specifying the File service endpoint or endpoints.
CloudStorageAccount(StorageCredentials, bool)
Initializes a new instance of the CloudStorageAccount class using the specified credentials, and specifies whether to use HTTP or HTTPS to connect to the storage services.
public CloudStorageAccount(StorageCredentials storageCredentials, bool useHttps)
Parameters
storageCredentials
StorageCredentialsA StorageCredentials object.
useHttps
booltrue
to use HTTPS to connect to storage service endpoints; otherwise,false
.
Remarks
Using HTTPS to connect to the storage services is recommended.
CloudStorageAccount(StorageCredentials, string, bool)
Initializes a new instance of the CloudStorageAccount class using the specified credentials and endpoint suffix, and specifies whether to use HTTP or HTTPS to connect to the storage services.
public CloudStorageAccount(StorageCredentials storageCredentials, string endpointSuffix, bool useHttps)
Parameters
storageCredentials
StorageCredentialsA StorageCredentials object.
endpointSuffix
stringThe DNS endpoint suffix for all storage services, e.g. "core.windows.net".
useHttps
booltrue
to use HTTPS to connect to storage service endpoints; otherwise,false
.
Remarks
Using HTTPS to connect to the storage services is recommended.
CloudStorageAccount(StorageCredentials, string, string, bool)
Initializes a new instance of the CloudStorageAccount class using the specified credentials and endpoint suffix, and specifies whether to use HTTP or HTTPS to connect to the storage services.
public CloudStorageAccount(StorageCredentials storageCredentials, string accountName, string endpointSuffix, bool useHttps)
Parameters
storageCredentials
StorageCredentialsA StorageCredentials object.
accountName
stringThe name of the account.
endpointSuffix
stringThe DNS endpoint suffix for all storage services, e.g. "core.windows.net".
useHttps
booltrue
to use HTTPS to connect to storage service endpoints; otherwise,false
.
Remarks
Using HTTPS to connect to the storage services is recommended.
CloudStorageAccount(StorageCredentials, Uri, Uri, Uri, Uri)
Initializes a new instance of the CloudStorageAccount class using the specified credentials and service endpoints.
public CloudStorageAccount(StorageCredentials storageCredentials, Uri blobEndpoint, Uri queueEndpoint, Uri tableEndpoint, Uri fileEndpoint)
Parameters
storageCredentials
StorageCredentialsA StorageCredentials object.
blobEndpoint
UriA System.Uri specifying the primary Blob service endpoint.
queueEndpoint
UriA System.Uri specifying the primary Queue service endpoint.
tableEndpoint
UriA System.Uri specifying the primary Table service endpoint.
fileEndpoint
UriA System.Uri specifying the primary File service endpoint.
Properties
BlobEndpoint
Gets the primary endpoint for the Blob service, as configured for the storage account.
public Uri BlobEndpoint { get; }
Property Value
- Uri
A System.Uri containing the primary Blob service endpoint.
BlobStorageUri
Gets the endpoints for the Blob service at the primary and secondary location, as configured for the storage account.
public StorageUri BlobStorageUri { get; }
Property Value
- StorageUri
A StorageUri containing the Blob service endpoints.
Credentials
Gets the credentials used to create this CloudStorageAccount object.
public StorageCredentials Credentials { get; }
Property Value
- StorageCredentials
A StorageCredentials object.
DevelopmentStorageAccount
Gets a CloudStorageAccount object that references the well-known development storage account.
public static CloudStorageAccount DevelopmentStorageAccount { get; }
Property Value
- CloudStorageAccount
A CloudStorageAccount object representing the development storage account.
FileEndpoint
Gets the primary endpoint for the File service, as configured for the storage account.
public Uri FileEndpoint { get; }
Property Value
- Uri
A System.Uri containing the primary File service endpoint.
FileStorageUri
Gets the endpoints for the File service at the primary and secondary location, as configured for the storage account.
public StorageUri FileStorageUri { get; }
Property Value
- StorageUri
A StorageUri containing the File service endpoints.
QueueEndpoint
Gets the primary endpoint for the Queue service, as configured for the storage account.
public Uri QueueEndpoint { get; }
Property Value
- Uri
A System.Uri containing the primary Queue service endpoint.
QueueStorageUri
Gets the endpoints for the Queue service at the primary and secondary location, as configured for the storage account.
public StorageUri QueueStorageUri { get; }
Property Value
- StorageUri
A StorageUri containing the Queue service endpoints.
TableEndpoint
Gets the primary endpoint for the Table service, as configured for the storage account.
public Uri TableEndpoint { get; }
Property Value
- Uri
A System.Uri containing the primary Table service endpoint.
TableStorageUri
Gets the endpoints for the Table service at the primary and secondary location, as configured for the storage account.
public StorageUri TableStorageUri { get; }
Property Value
- StorageUri
A StorageUri containing the Table service endpoints.
UseV1MD5
Gets or sets a value indicating whether the FISMA MD5 setting will be used.
public static bool UseV1MD5 { get; set; }
Property Value
- bool
false
to use the FISMA MD5 setting;true
to use the .NET default implementation.
Methods
CreateCloudAnalyticsClient()
Creates an analytics client.
public CloudAnalyticsClient CreateCloudAnalyticsClient()
Returns
- CloudAnalyticsClient
A CloudAnalyticsClient object.
CreateCloudBlobClient()
Creates the Blob service client.
public virtual CloudBlobClient CreateCloudBlobClient()
Returns
- CloudBlobClient
A CloudBlobClient object.
Remarks
Examples
It looks like the sample you are looking for does not exist.
CreateCloudFileClient()
Creates the File service client.
public virtual CloudFileClient CreateCloudFileClient()
Returns
- CloudFileClient
A client object that specifies the File service endpoint.
CreateCloudQueueClient()
Creates the Queue service client.
public virtual CloudQueueClient CreateCloudQueueClient()
Returns
- CloudQueueClient
A CloudQueueClient object.
CreateCloudTableClient()
Creates the Table service client.
public virtual CloudTableClient CreateCloudTableClient()
Returns
- CloudTableClient
A CloudTableClient object.
GetSharedAccessSignature(SharedAccessAccountPolicy)
Returns a shared access signature for the account.
public string GetSharedAccessSignature(SharedAccessAccountPolicy policy)
Parameters
policy
SharedAccessAccountPolicyA SharedAccessAccountPolicy object specifying the access policy for the shared access signature.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
Parse(string)
Parses a connection string and returns a CloudStorageAccount created from the connection string.
public static CloudStorageAccount Parse(string connectionString)
Parameters
connectionString
stringA valid connection string.
Returns
- CloudStorageAccount
A CloudStorageAccount object constructed from the values provided in the connection string.
Exceptions
- ArgumentNullException
Thrown if
connectionString
is null or empty.- FormatException
Thrown if
connectionString
is not a valid connection string.- ArgumentException
Thrown if
connectionString
cannot be parsed.
ToString()
Returns a connection string for this storage account, without sensitive data.
public override string ToString()
Returns
- string
A connection string.
ToString(bool)
Returns a connection string for the storage account, optionally with sensitive data.
public string ToString(bool exportSecrets)
Parameters
exportSecrets
boolTrue
to include sensitive data in the string; otherwise,false
.
Returns
- string
A connection string.
TryParse(string, out CloudStorageAccount)
Indicates whether a connection string can be parsed to return a CloudStorageAccount object.
public static bool TryParse(string connectionString, out CloudStorageAccount account)
Parameters
connectionString
stringThe connection string to parse.
account
CloudStorageAccountA CloudStorageAccount object to hold the instance returned if the connection string can be parsed.
Returns
- bool
true if the connection string was successfully parsed; otherwise, false.