CloudAccountDiagnosticMonitorExtensions.CreateDeploymentDiagnosticManager Method
Creates a new instance of the DeploymentDiagnosticManager class for the specified deployment.
Namespace: Microsoft.WindowsAzure.Diagnostics.Management
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
[ExtensionAttribute] public static DeploymentDiagnosticManager CreateDeploymentDiagnosticManager ( CloudStorageAccount storageAccount, string deploymentId )
/** @attribute ExtensionAttribute() */ public static DeploymentDiagnosticManager CreateDeploymentDiagnosticManager ( CloudStorageAccount storageAccount, String deploymentId )
ExtensionAttribute public static function CreateDeploymentDiagnosticManager ( storageAccount : CloudStorageAccount, deploymentId : String ) : DeploymentDiagnosticManager
Parameters
- storageAccount
Type: Microsoft.WindowsAzure.CloudStorageAccount
A CloudStorageAccount object.
- deploymentId
Type: System.String
The deployment ID for the current deployment.
Return Value
Type: Microsoft.WindowsAzure.Diagnostics.Management.DeploymentDiagnosticManagerA DeploymentDiagnosticManager object.The CreateDeploymentDiagnosticManager extension method enables you to use a CloudStorageAccount reference to create a DeploymentDiagnosticManager. The method will create the DeploymentDiagnosticManager and use the CloudStorageAccount to access the diagnostics configuration.
Example
The following code snippet creates a new CloudStorageAccount and also creates a DeploymentDiagnosticManager.
// Create a StorageCredentialsAccountAndKey object for the storage account.
StorageCredentialsAccountAndKey storageCredentials = new StorageCredentialsAccountAndKey("MyAccountName", MyKey);
// Create a new DeploymentDiagnosticManager object using the CreateDeploymentDiagnosticManager extension method.
CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, true);
DeploymentDiagnosticManager deploymentDiagMgr = storageAccount.CreateDeploymentDiagnosticManager("28281fc7754b44faa9ccf4911983edf1");
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 2008Target Platforms