summary import { Snapshot , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const snapshotName = "mySnapshot1" ; const snapshot = { creationData : { createOption : "Import" , sourceUri : "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" , storageAccountId : "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" } , location : "West US" } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . snapshots . beginCreateOrUpdateAndWait ( resourceGroupName , snapshotName , snapshot ) ; console . log ( result ) ; } createASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription ( ) . catch ( console . error ) ;