导出 (0) 打印
全部展开

DiagnosticMonitor.UpdateStorageAccount 方法

Updates the storage account information for the current diagnostic monitor.

命名空间: Microsoft.WindowsAzure.Diagnostics
程序集: Microsoft.WindowsAzure.Diagnostics(在 microsoft.windowsazure.diagnostics.dll 中)

用法
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
)

参数

storageAccount

Type: 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);


此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

开发平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目标平台

社区附加资源

显示:
© 2014 Microsoft