SALES: 1-800-867-1380

DiagnosticMonitor.UpdateStorageAccount Method

Updates the storage account information for the current diagnostic monitor.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

'Usage
Dim instance As DiagnosticMonitor
Dim storageAccount As CloudStorageAccount

instance.UpdateStorageAccount(storageAccount)

[EditorBrowsableAttribute(EditorBrowsableState.Advanced)] 
public void UpdateStorageAccount (
	CloudStorageAccount storageAccount
)
/** @attribute EditorBrowsableAttribute(EditorBrowsableState.Advanced) */ 
public void UpdateStorageAccount (
	CloudStorageAccount storageAccount
)
EditorBrowsableAttribute(EditorBrowsableState.Advanced) 
public function UpdateStorageAccount (
	storageAccount : CloudStorageAccount
)

Parameters

storageAccount

Type: Microsoft.WindowsAzure.CloudStorageAccount

A CloudStorageAccount for updating the diagnostic monitor’s storage configuration.

The storage configuration for a role instance’s DiagnosticMonitor is updated with the CloudStorageAccount input parameter. The diagnostic monitor’s configuration is updated immediately using the new storage account, you do not need to restart the DiagnosticMonitor.

Example

The following code snippet creates a new CloudStorageAccount and calls the UpdateStorageAccount method:

// Create a CloudStorageAccount object using your credentials.
StorageCredentialsAccountAndKey credentials = new StorageCredentialsAccountAndKey(accountName, accountKey);
CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, true);

// Update the DiagnosticMonitor with the new storage account information.
diagMonitor.UpdateStorageAccount(storageAccount);


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft