summary import { Disk , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createAManagedDiskWithSecurityProfile ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const diskName = "myDisk" ; const disk = { creationData : { createOption : "FromImage" , imageReference : { id : "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" } } , location : "North Central US" , osType : "Windows" , securityProfile : { securityType : "TrustedLaunch" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . disks . beginCreateOrUpdateAndWait ( resourceGroupName , diskName , disk ) ; console . log ( result ) ; } createAManagedDiskWithSecurityProfile ( ) . catch ( console . error ) ;