Adding support for sending request headers in azure core rest request API (#16443)

* Adding support for sending additional headers in azure http requests

* Added session ids in all azure rest calls

* Fixed param name

* Adding default parameter value for request headers
This commit is contained in:
Aasim Khan
2021-07-27 12:36:50 -07:00
committed by GitHub
parent 35207a1e04
commit 7a35d4aeeb
11 changed files with 79 additions and 53 deletions

View File

@@ -743,7 +743,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
public async getSqlMigrationServiceValues(subscription: azureResource.AzureResourceSubscription, managedInstance: SqlManagedInstance, resourceGroupName: string): Promise<azdata.CategoryValue[]> {
let sqlMigrationServiceValues: azdata.CategoryValue[] = [];
try {
this._sqlMigrationServices = (await getSqlMigrationServices(this._azureAccount, subscription, managedInstance.location)).filter(sms => sms.location.toLowerCase() === this._targetServerInstance.location.toLowerCase() && sms.properties.resourceGroup.toLowerCase() === resourceGroupName?.toLowerCase());
this._sqlMigrationServices = (await getSqlMigrationServices(this._azureAccount, subscription, this._sessionId)).filter(sms => sms.location.toLowerCase() === this._targetServerInstance.location.toLowerCase() && sms.properties.resourceGroup.toLowerCase() === resourceGroupName?.toLowerCase());
this._sqlMigrationServices.forEach((sqlMigrationService) => {
sqlMigrationServiceValues.push({
name: sqlMigrationService.id,
@@ -839,7 +839,8 @@ export class MigrationStateModel implements Model, vscode.Disposable {
this._sqlMigrationService?.location!,
this._targetServerInstance,
this._targetDatabaseNames[i],
requestBody
requestBody,
this._sessionId
);
response.databaseMigration.properties.sourceDatabaseName = this._migrationDbs[i];
response.databaseMigration.properties.backupConfiguration = requestBody.properties.backupConfiguration!;