summary import { ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function getCloudServiceRoleInstance ( ) { const subscriptionId = "{subscription-id}" ; const roleInstanceName = "{roleInstance-name}" ; const resourceGroupName = "ConstosoRG" ; const cloudServiceName = "{cs-name}" ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . cloudServiceRoleInstances . get ( roleInstanceName , resourceGroupName , cloudServiceName ) ; console . log ( result ) ; } getCloudServiceRoleInstance ( ) . catch ( console . error ) ;