"use strict" ; import * as msRest from "../lib/msRest" ; const clientOptions = { requestPolicyFactories : ( factories ) => factories . concat ( [ msRest . logPolicy ( ) ] ) , } ; const subscriptionId = process . env [ "AZURE_SUBSCRIPTION_ID" ] || "subscriptionId" ; const token = process . env [ "ACCESS_TOKEN" ] || "token" ; const creds = new msRest . TokenCredentials ( token ) ; const client = new msRest . ServiceClient ( creds , clientOptions ) ; const req = { url : `https://management.azure.com/subscriptions/${ subscriptionId }/providers/Microsoft.Storage/storageAccounts?api-version=2015-06-15` , method : "GET" , } ; client . sendRequest ( req ) . then ( function ( res ) { console . log ( res . bodyAsText ) ; } ) ;