Adding support for multi cloud in azure rest api calls (#16454)

This commit is contained in:
Aasim Khan
2021-07-29 10:14:15 -07:00
committed by GitHub
parent 01671b118d
commit 0e9d956ee5
5 changed files with 51 additions and 5 deletions

View File

@@ -396,7 +396,7 @@ export async function makeHttpRequest(account: azdata.Account, subscription: azu
if (host) {
requestUrl = `${host}${path}`;
} else {
requestUrl = `https://management.azure.com${path}`;
requestUrl = `${account.properties.providerSettings.settings.armResource.endpoint}${path}`;
}
let response;
@@ -494,7 +494,7 @@ export async function getBlobs(account: azdata.Account, subscription: azureResou
try {
const sharedKeyCredential = new StorageSharedKeyCredential(storageAccount.name, storageKeys.keyName1);
const blobServiceClient = new BlobServiceClient(
`https://${storageAccount.name}.blob.core.windows.net`,
`https://${storageAccount.name}.blob${account.properties.providerSettings.settings.azureStorageResource.endpointSuffix}`,
sharedKeyCredential
);
const containerClient = blobServiceClient.getContainerClient(containerName);