CloudAccountDiagnosticMonitorExtensions.CreateRoleInstanceDiagnosticManager Method
Creates an new instance of the RoleInstanceDiagnosticManager class for the specified deployment, role, and instance.
Namespace: Microsoft.WindowsAzure.Diagnostics.Management
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
'Usage Dim storageAccount As CloudStorageAccount Dim deploymentId As String Dim roleName As String Dim roleInstanceId As String Dim returnValue As RoleInstanceDiagnosticManager returnValue = CloudAccountDiagnosticMonitorExtensions.CreateRoleInstanceDiagnosticManager(storageAccount, deploymentId, roleName, roleInstanceId)
[ExtensionAttribute] public static RoleInstanceDiagnosticManager CreateRoleInstanceDiagnosticManager ( CloudStorageAccount storageAccount, string deploymentId, string roleName, string roleInstanceId )
/** @attribute ExtensionAttribute() */ public static RoleInstanceDiagnosticManager CreateRoleInstanceDiagnosticManager ( CloudStorageAccount storageAccount, String deploymentId, String roleName, String roleInstanceId )
ExtensionAttribute public static function CreateRoleInstanceDiagnosticManager ( storageAccount : CloudStorageAccount, deploymentId : String, roleName : String, roleInstanceId : String ) : RoleInstanceDiagnosticManager
Parameters
- storageAccount
Type: Microsoft.WindowsAzure.CloudStorageAccount
A CloudStorageAccount object.
- deploymentId
Type: System.String
The deployment ID for the current deployment.
- roleName
Type: System.String
The name of the role in the specified deployment.
- roleInstanceId
Type: System.String
The role instance ID.
Return Value
Type: Microsoft.WindowsAzure.Diagnostics.Management.RoleInstanceDiagnosticManagerA RoleInstanceDiagnosticManager object.The CreateRoleInstanceDiagnosticManager extension method enables you to use a CloudStorageAccount reference to create a RoleInstanceDiagnosticManager. The method will create the RoleInstanceDiagnosticManager using the CloudStorageAccount to access the diagnostics configuration.
Example
The following code snippet creates a new CloudStorageAccount and also creates a RoleInstanceDiagnosticManager.
// Create a StorageCredentialsAccountAndKey object for the storage account.
StorageCredentialsAccountAndKey storageCredentials = new StorageCredentialsAccountAndKey("MyAccountName", key);
// Create a new RoleInstanceDiagnosticManager object using the CreateRoleInstanceDiagnosticManager extension method.
CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, true);
RoleInstanceDiagnosticManager roleInstanceDiagMgr = storageAccount.CreateRoleInstanceDiagnosticManager(
"28281fc7754b44faa9ccf4911983edf1",
"MyWebRole",
"deployment(1).MyAzureProject.WebRole1.0");
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