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