C# Class Elastacloud.AzureManagement.Fluent.Clients.BlobClient

Inheritance: IBlobClient
Show file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
BlobClient ( string accountName, string accountKey ) : System

Used to create a blob client with an account name and key

BlobClient ( string subscriptionId, string containerName, string accountName, X509Certificate2 certificate ) : System

This is the BlobClient and is used to create the account without the key and get the key automatically

BlobClient ( string subscriptionId, string containerName, string accountName, string accountKey ) : System

Used to construct the BlobClient

CheckStorageAccountHasResolved ( int timeoutInSeconds = 300 ) : bool

Checks to see whether a stroage account has completed a name resolution with an automatic checking timout of 5 minutes

CopyBlobsFromContainerSas ( string containerSas, string destinationContainer ) : void

Given the shared access signature of a container generates a set blob SaS's

CopyDirectoryTo ( string accountName, string accountKey, string sourceContainerName, string directoryName, string destinationContanerName, string copyDirectoryPrefix = "" ) : Task

Copies the log directory to the

CopyStorageAnalyticsLogsTo ( string accountName, string accountKey, string destinationContainer, string sourceDirectory, string prefix ) : Task

Copies the storage analytics logs to a new storage account

CreatBlobContainer ( ) : bool

Creates a blob container given a valid container name

CreateAndUploadBlob ( string blobName, string filenamePath ) : string

Creates an uploads a blob given a file path

DeleteBlob ( string blobName ) : void

Deletes a blob

DeleteContainer ( ) : void

Deletes a blob container

DeleteStorageAccount ( ) : void

Deletes the current storage account

EnableStorageAnalytics ( AnalyticsMetricsType metricsType = AnalyticsMetricsType.Logging ) : void

Used to enable storage analytics for a particular blob type

GetAccountKey ( ) : string

Gets the blob account key

IsStorageAnalyticsEnabled ( AnalyticsMetricsType metricsType = AnalyticsMetricsType.Logging ) : bool

Used to enable storage analytics for a particular blob type

Private Methods

Method Description
LoadKeyIfNotExists ( ) : void

loads the account key if it is not present

Method Details

BlobClient() public method

Used to create a blob client with an account name and key
public BlobClient ( string accountName, string accountKey ) : System
accountName string
accountKey string
return System

BlobClient() public method

This is the BlobClient and is used to create the account without the key and get the key automatically
public BlobClient ( string subscriptionId, string containerName, string accountName, X509Certificate2 certificate ) : System
subscriptionId string
containerName string
accountName string
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
return System

BlobClient() public method

Used to construct the BlobClient
public BlobClient ( string subscriptionId, string containerName, string accountName, string accountKey ) : System
subscriptionId string
containerName string
accountName string
accountKey string
return System

CheckStorageAccountHasResolved() public method

Checks to see whether a stroage account has completed a name resolution with an automatic checking timout of 5 minutes
public CheckStorageAccountHasResolved ( int timeoutInSeconds = 300 ) : bool
timeoutInSeconds int
return bool

CopyBlobsFromContainerSas() public method

Given the shared access signature of a container generates a set blob SaS's
public CopyBlobsFromContainerSas ( string containerSas, string destinationContainer ) : void
containerSas string
destinationContainer string
return void

CopyDirectoryTo() public method

Copies the log directory to the
public CopyDirectoryTo ( string accountName, string accountKey, string sourceContainerName, string directoryName, string destinationContanerName, string copyDirectoryPrefix = "" ) : Task
accountName string
accountKey string
sourceContainerName string
directoryName string
destinationContanerName string
copyDirectoryPrefix string
return Task

CopyStorageAnalyticsLogsTo() public method

Copies the storage analytics logs to a new storage account
public CopyStorageAnalyticsLogsTo ( string accountName, string accountKey, string destinationContainer, string sourceDirectory, string prefix ) : Task
accountName string
accountKey string
destinationContainer string
sourceDirectory string
prefix string
return Task

CreatBlobContainer() public method

Creates a blob container given a valid container name
public CreatBlobContainer ( ) : bool
return bool

CreateAndUploadBlob() public method

Creates an uploads a blob given a file path
public CreateAndUploadBlob ( string blobName, string filenamePath ) : string
blobName string the name of the blob to create
filenamePath string The name of the file to read an copy to blob storage
return string

DeleteBlob() public method

Deletes a blob
public DeleteBlob ( string blobName ) : void
blobName string The name of a valid blob
return void

DeleteContainer() public method

Deletes a blob container
public DeleteContainer ( ) : void
return void

DeleteStorageAccount() public method

Deletes the current storage account
public DeleteStorageAccount ( ) : void
return void

EnableStorageAnalytics() public method

Used to enable storage analytics for a particular blob type
public EnableStorageAnalytics ( AnalyticsMetricsType metricsType = AnalyticsMetricsType.Logging ) : void
metricsType AnalyticsMetricsType
return void

GetAccountKey() public method

Gets the blob account key
public GetAccountKey ( ) : string
return string

IsStorageAnalyticsEnabled() public method

Used to enable storage analytics for a particular blob type
public IsStorageAnalyticsEnabled ( AnalyticsMetricsType metricsType = AnalyticsMetricsType.Logging ) : bool
metricsType AnalyticsMetricsType
return bool