From dd775dc2b97bcd16fb83307744928578f2e6b34a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 7 Apr 2022 06:05:49 +0000 Subject: [PATCH] CodeGen from PR 18593 in Azure/azure-rest-api-specs Merge ac897f7778335d11b9861e7d211514f741b3acb5 into 7b1704ef8c30413208328fe69a6784119727e02d --- .../arm-datamigration/CHANGELOG.md | 4 +- .../arm-datamigration/_meta.json | 9 +- .../arm-datamigration/api-extractor.json | 25 +- .../arm-datamigration/package.json | 36 +- .../review/arm-datamigration.api.md | 157 ++- .../src/dataMigrationManagementClient.ts | 8 +- .../arm-datamigration/src/models/index.ts | 484 +++++-- .../arm-datamigration/src/models/mappers.ts | 1116 ++++++++++++----- .../src/models/parameters.ts | 61 +- .../src/operations/databaseMigrationsSqlDb.ts | 439 +++++++ .../src/operations/databaseMigrationsSqlMi.ts | 32 +- .../src/operations/databaseMigrationsSqlVm.ts | 16 +- .../arm-datamigration/src/operations/files.ts | 4 +- .../arm-datamigration/src/operations/index.ts | 1 + .../src/operations/projects.ts | 4 +- .../src/operations/serviceTasks.ts | 4 +- .../src/operations/services.ts | 8 +- .../src/operations/sqlMigrationServices.ts | 25 +- .../arm-datamigration/src/operations/tasks.ts | 6 +- .../databaseMigrationsSqlDb.ts | 134 ++ .../databaseMigrationsSqlMi.ts | 14 +- .../databaseMigrationsSqlVm.ts | 14 +- .../src/operationsInterfaces/index.ts | 1 + .../sqlMigrationServices.ts | 17 +- .../arm-datamigration/tsconfig.json | 19 +- sdk/datamigration/ci.mgmt.yml | 7 +- 26 files changed, 2069 insertions(+), 576 deletions(-) create mode 100644 sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlDb.ts create mode 100644 sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlDb.ts diff --git a/sdk/datamigration/arm-datamigration/CHANGELOG.md b/sdk/datamigration/arm-datamigration/CHANGELOG.md index e4f2ddb910a9..a914ba40476c 100644 --- a/sdk/datamigration/arm-datamigration/CHANGELOG.md +++ b/sdk/datamigration/arm-datamigration/CHANGELOG.md @@ -1,8 +1,8 @@ # Release History -## 3.0.0-beta.1 (2022-01-18) +## 3.0.0-beta.2 (2022-04-07) -The package of @azure/arm-datamigration is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes. +The package of @azure/arm-datamigration is using our next generation design principles since version 3.0.0-beta.2, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/datamigration/arm-datamigration/_meta.json b/sdk/datamigration/arm-datamigration/_meta.json index e0620020082d..aef79236285c 100644 --- a/sdk/datamigration/arm-datamigration/_meta.json +++ b/sdk/datamigration/arm-datamigration/_meta.json @@ -1,7 +1,8 @@ { - "commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d", + "commit": "463ab716b683877a27b128ec0e595089cc42ec89", "readme": "specification/datamigration/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/datamigration/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" +} \ No newline at end of file diff --git a/sdk/datamigration/arm-datamigration/api-extractor.json b/sdk/datamigration/arm-datamigration/api-extractor.json index a59a60147e00..1613066a4220 100644 --- a/sdk/datamigration/arm-datamigration/api-extractor.json +++ b/sdk/datamigration/arm-datamigration/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-datamigration.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/datamigration/arm-datamigration/package.json b/sdk/datamigration/arm-datamigration/package.json index b7dbf00d1182..18ca31a594c6 100644 --- a/sdk/datamigration/arm-datamigration/package.json +++ b/sdk/datamigration/arm-datamigration/package.json @@ -3,8 +3,10 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataMigrationManagementClient.", - "version": "3.0.0-beta.1", - "engines": { "node": ">=12.0.0" }, + "version": "3.0.0-beta.2", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -14,7 +16,13 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -41,7 +49,9 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -88,19 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/DataMigrationManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": ["azure"], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datamigration?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/datamigration/arm-datamigration/review/arm-datamigration.api.md b/sdk/datamigration/arm-datamigration/review/arm-datamigration.api.md index d2c1a9ce737b..086927174397 100644 --- a/sdk/datamigration/arm-datamigration/review/arm-datamigration.api.md +++ b/sdk/datamigration/arm-datamigration/review/arm-datamigration.api.md @@ -50,9 +50,10 @@ export interface AvailableServiceSkuSku { // @public export interface AzureActiveDirectoryApp { - appKey: string; - applicationId: string; - tenantId: string; + appKey?: string; + applicationId?: string; + ignoreAzurePermissions?: boolean; + tenantId?: string; } // @public @@ -100,7 +101,7 @@ export type BackupType = string; // @public export interface BlobShare { - sasUri: string; + sasUri?: string; } // @public @@ -233,6 +234,7 @@ export interface ConnectToSourceSqlServerTaskInput { collectDatabases?: boolean; collectLogins?: boolean; collectTdeCertificateInfo?: boolean; + encryptedKeyForSecureFields?: string; sourceConnectionInfo: SqlConnectionInfo; validateSsisCatalogOnly?: boolean; } @@ -295,6 +297,7 @@ export type ConnectToSourceSqlServerTaskProperties = ProjectTaskProperties & { taskType: "ConnectToSource.SqlServer"; input?: ConnectToSourceSqlServerTaskInput; readonly output?: ConnectToSourceSqlServerTaskOutputUnion[]; + taskId?: string; }; // @public @@ -386,6 +389,7 @@ export type ConnectToTargetSqlDbSyncTaskProperties = ProjectTaskProperties & { // @public export interface ConnectToTargetSqlDbTaskInput { + queryObjectCounts?: boolean; targetConnectionInfo: SqlConnectionInfo; } @@ -402,6 +406,7 @@ export type ConnectToTargetSqlDbTaskProperties = ProjectTaskProperties & { taskType: "ConnectToTarget.SqlDb"; input?: ConnectToTargetSqlDbTaskInput; readonly output?: ConnectToTargetSqlDbTaskOutput[]; + createdOn?: string; }; // @public @@ -449,6 +454,21 @@ export type ConnectToTargetSqlMITaskProperties = ProjectTaskProperties & { readonly output?: ConnectToTargetSqlMITaskOutput[]; }; +// @public +export interface CopyProgressDetails { + readonly copyDuration?: number; + readonly copyStart?: Date; + readonly copyThroughput?: number; + readonly dataRead?: number; + readonly dataWritten?: number; + readonly parallelCopyType?: string; + readonly rowsCopied?: number; + readonly rowsRead?: number; + readonly status?: string; + readonly tableName?: string; + readonly usedParallelCopies?: number; +} + // @public export type CreatedByType = string; @@ -531,7 +551,7 @@ export interface DatabaseMigrationListResult { // @public export interface DatabaseMigrationProperties { readonly endedOn?: Date; - kind: "SqlMi" | "SqlVm"; + kind: "SqlDb" | "SqlMi" | "SqlVm"; readonly migrationFailureError?: ErrorInfo; migrationOperationId?: string; migrationService?: string; @@ -539,10 +559,22 @@ export interface DatabaseMigrationProperties { readonly provisioningState?: string; scope?: string; sourceDatabaseName?: string; + readonly sourceServerName?: string; sourceSqlConnection?: SqlConnectionInformation; readonly startedOn?: Date; } +// @public +export type DatabaseMigrationPropertiesSqlDb = DatabaseMigrationProperties & { + kind: "SqlDb"; + readonly migrationStatusDetails?: SqlDbMigrationStatusDetails; + targetSqlConnection?: SqlConnectionInformation; + readonly offlineConfiguration?: SqlDbOfflineConfiguration; + tableList?: string[]; + targetDatabaseCollation?: string; + provisioningError?: string; +}; + // @public export type DatabaseMigrationPropertiesSqlMi = DatabaseMigrationProperties & { kind: "SqlMi"; @@ -564,7 +596,13 @@ export type DatabaseMigrationPropertiesSqlVm = DatabaseMigrationProperties & { }; // @public (undocumented) -export type DatabaseMigrationPropertiesUnion = DatabaseMigrationProperties | DatabaseMigrationPropertiesSqlMi | DatabaseMigrationPropertiesSqlVm; +export type DatabaseMigrationPropertiesUnion = DatabaseMigrationProperties | DatabaseMigrationPropertiesSqlDb | DatabaseMigrationPropertiesSqlMi | DatabaseMigrationPropertiesSqlVm; + +// @public +export type DatabaseMigrationSqlDb = ProxyResource & { + readonly systemData?: SystemData; + properties?: DatabaseMigrationPropertiesSqlDb; +}; // @public export type DatabaseMigrationSqlMi = ProxyResource & { @@ -578,6 +616,48 @@ export type DatabaseMigrationSqlVm = ProxyResource & { properties?: DatabaseMigrationPropertiesSqlVm; }; +// @public +export interface DatabaseMigrationsSqlDb { + beginCancel(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, parameters: MigrationOperationInput, options?: DatabaseMigrationsSqlDbCancelOptionalParams): Promise, void>>; + beginCancelAndWait(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, parameters: MigrationOperationInput, options?: DatabaseMigrationsSqlDbCancelOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, parameters: DatabaseMigrationSqlDb, options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams): Promise, DatabaseMigrationsSqlDbCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, parameters: DatabaseMigrationSqlDb, options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, options?: DatabaseMigrationsSqlDbDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, options?: DatabaseMigrationsSqlDbDeleteOptionalParams): Promise; + get(resourceGroupName: string, sqlDbInstanceName: string, targetDbName: string, options?: DatabaseMigrationsSqlDbGetOptionalParams): Promise; +} + +// @public +export interface DatabaseMigrationsSqlDbCancelOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DatabaseMigrationsSqlDbCreateOrUpdateResponse = DatabaseMigrationSqlDb; + +// @public +export interface DatabaseMigrationsSqlDbDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DatabaseMigrationsSqlDbGetOptionalParams extends coreClient.OperationOptions { + expand?: string; + migrationOperationId?: string; +} + +// @public +export type DatabaseMigrationsSqlDbGetResponse = DatabaseMigrationSqlDb; + // @public export interface DatabaseMigrationsSqlMi { beginCancel(resourceGroupName: string, managedInstanceName: string, targetDbName: string, parameters: MigrationOperationInput, options?: DatabaseMigrationsSqlMiCancelOptionalParams): Promise, void>>; @@ -723,6 +803,8 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + databaseMigrationsSqlDb: DatabaseMigrationsSqlDb; + // (undocumented) databaseMigrationsSqlMi: DatabaseMigrationsSqlMi; // (undocumented) databaseMigrationsSqlVm: DatabaseMigrationsSqlVm; @@ -791,6 +873,7 @@ export interface DataMigrationServiceList { // @public export interface DataMigrationServiceStatusResponse { + agentConfiguration?: Record; agentVersion?: string; status?: string; supportedTaskTypes?: string[]; @@ -1022,6 +1105,7 @@ export type GetUserTablesSqlSyncTaskProperties = ProjectTaskProperties & { // @public export interface GetUserTablesSqlTaskInput { connectionInfo: SqlConnectionInfo; + encryptedKeyForSecureFields?: string; selectedDatabases: string[]; } @@ -1037,6 +1121,7 @@ export type GetUserTablesSqlTaskProperties = ProjectTaskProperties & { taskType: "GetUserTables.Sql"; input?: GetUserTablesSqlTaskInput; readonly output?: GetUserTablesSqlTaskOutput[]; + taskId?: string; }; // @public @@ -1556,6 +1641,8 @@ export enum KnownResourceSkuRestrictionsType { // @public export enum KnownResourceType { + // (undocumented) + SqlDb = "SqlDb", // (undocumented) SqlMi = "SqlMi", // (undocumented) @@ -1943,6 +2030,7 @@ export interface MigrateMySqlAzureDbForMySqlOfflineDatabaseInput { // @public export interface MigrateMySqlAzureDbForMySqlOfflineTaskInput { + encryptedKeyForSecureFields?: string; makeSourceServerReadOnly?: boolean; optionalAgentSettings?: { [propertyName: string]: string; @@ -2028,6 +2116,8 @@ export type MigrateMySqlAzureDbForMySqlOfflineTaskProperties = ProjectTaskProper taskType: "Migrate.MySql.AzureDbForMySql"; input?: MigrateMySqlAzureDbForMySqlOfflineTaskInput; readonly output?: MigrateMySqlAzureDbForMySqlOfflineTaskOutputUnion[]; + isCloneable?: boolean; + taskId?: string; }; // @public @@ -2240,8 +2330,9 @@ export type MigrateOracleAzureDbPostgreSqlSyncTaskOutputUnion = MigrateOracleAzu // @public export interface MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { + readonly id?: string; migrationSetting?: { - [propertyName: string]: string; + [propertyName: string]: any; }; name?: string; selectedTables?: MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput[]; @@ -2264,6 +2355,7 @@ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { encryptedKeyForSecureFields?: string; selectedDatabases: MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput[]; sourceConnectionInfo: PostgreSqlConnectionInfo; + readonly startedOn?: Date; targetConnectionInfo: PostgreSqlConnectionInfo; } @@ -2350,6 +2442,7 @@ export type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties = ProjectTas readonly output?: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion[]; taskId?: string; createdOn?: string; + isCloneable?: boolean; }; // @public @@ -2417,6 +2510,7 @@ export type MigrateSchemaSqlServerSqlDbTaskProperties = ProjectTaskProperties & readonly output?: MigrateSchemaSqlServerSqlDbTaskOutputUnion[]; createdOn?: string; taskId?: string; + isCloneable?: boolean; }; // @public (undocumented) @@ -2643,6 +2737,7 @@ export type MigrateSqlServerSqlDbTaskProperties = ProjectTaskProperties & { readonly output?: MigrateSqlServerSqlDbTaskOutputUnion[]; taskId?: string; isCloneable?: boolean; + createdOn?: string; }; // @public @@ -2655,7 +2750,9 @@ export interface MigrateSqlServerSqlMIDatabaseInput { } // @public -export type MigrateSqlServerSqlMISyncTaskInput = SqlServerSqlMISyncTaskInput & {}; +export type MigrateSqlServerSqlMISyncTaskInput = SqlServerSqlMISyncTaskInput & { + numberOfParallelDatabaseMigrations?: number; +}; // @public export interface MigrateSqlServerSqlMISyncTaskOutput { @@ -2709,6 +2806,7 @@ export type MigrateSqlServerSqlMISyncTaskProperties = ProjectTaskProperties & { taskType: "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS"; input?: MigrateSqlServerSqlMISyncTaskInput; readonly output?: MigrateSqlServerSqlMISyncTaskOutputUnion[]; + createdOn?: string; }; // @public @@ -2721,6 +2819,7 @@ export type MigrateSqlServerSqlMITaskInput = SqlMigrationTaskInput & { backupBlobShare: BlobShare; backupMode?: BackupMode; aadDomainName?: string; + encryptedKeyForSecureFields?: string; }; // @public @@ -2801,6 +2900,9 @@ export type MigrateSqlServerSqlMITaskProperties = ProjectTaskProperties & { input?: MigrateSqlServerSqlMITaskInput; readonly output?: MigrateSqlServerSqlMITaskOutputUnion[]; taskId?: string; + createdOn?: string; + parentTaskId?: string; + isCloneable?: boolean; }; // @public @@ -2869,6 +2971,7 @@ export type MigrateSyncCompleteCommandProperties = CommandProperties & { commandType: "Migrate.Sync.Complete.Database"; input?: MigrateSyncCompleteCommandInput; readonly output?: MigrateSyncCompleteCommandOutput; + commandId?: string; }; // @public @@ -3017,9 +3120,13 @@ export type MongoDbConnectionInfo = ConnectionInfo & { dataSource?: string; encryptConnection?: boolean; serverBrandVersion?: string; + serverVersion?: string; + serverName?: string; + trustServerCertificate?: boolean; enforceSSL?: boolean; port?: number; additionalSettings?: string; + authentication?: AuthenticationType; }; // @public @@ -3152,7 +3259,7 @@ export type MongoDbShardKeyOrder = string; // @public export interface MongoDbShardKeySetting { fields: MongoDbShardKeyField[]; - isUnique: boolean; + isUnique?: boolean; } // @public @@ -3169,6 +3276,8 @@ export type MySqlConnectionInfo = ConnectionInfo & { dataSource?: string; port: number; encryptConnection?: boolean; + authentication?: AuthenticationType; + additionalSettings?: string; }; // @public @@ -3309,6 +3418,10 @@ export type OperationsListResponse = OperationListResult; export type OracleConnectionInfo = ConnectionInfo & { type: "OracleConnectionInfo"; dataSource: string; + serverName?: string; + serverVersion?: string; + port?: number; + authentication?: AuthenticationType; }; // @public @@ -3337,13 +3450,16 @@ export type PostgreSqlConnectionInfo = ConnectionInfo & { port: number; encryptConnection?: boolean; trustServerCertificate?: boolean; + additionalSettings?: string; + serverBrandVersion?: string; + authentication?: AuthenticationType; }; // @public export type Project = TrackedResource & { - eTag?: string; + etag?: string; sourcePlatform?: ProjectSourcePlatform; - azureAuthenticationInfo?: string; + azureAuthenticationInfo?: AzureActiveDirectoryApp; targetPlatform?: ProjectTargetPlatform; readonly creationTime?: Date; sourceConnectionInfo?: ConnectionInfoUnion; @@ -3648,7 +3764,7 @@ export interface SelectedCertificateInput { } // @public -export type ServerLevelPermissionsGroup = "Default" | "MigrationFromSqlServerToAzureDB" | "MigrationFromSqlServerToAzureMI" | "MigrationFromMySQLToAzureDBForMySQL"; +export type ServerLevelPermissionsGroup = "Default" | "MigrationFromSqlServerToAzureDB" | "MigrationFromSqlServerToAzureMI" | "MigrationFromMySQLToAzureDBForMySQL" | "MigrationFromSqlServerToAzureVM"; // @public export interface ServerProperties { @@ -3896,6 +4012,7 @@ export type Severity = string; export interface SourceLocation { azureBlob?: AzureBlob; fileShare?: SqlFileShare; + readonly fileStorageType?: string; } // @public @@ -3930,7 +4047,9 @@ export type SqlConnectionInfo = ConnectionInfo & { type: "SqlConnectionInfo"; dataSource: string; serverName?: string; - port?: string; + port?: number; + serverVersion?: string; + serverBrandVersion?: string; resourceId?: string; authentication?: AuthenticationType; encryptConnection?: boolean; @@ -3949,6 +4068,18 @@ export interface SqlConnectionInformation { userName?: string; } +// @public +export interface SqlDbMigrationStatusDetails { + readonly listOfCopyProgressDetails?: CopyProgressDetails[]; + readonly migrationState?: string; + readonly sqlDataCopyErrors?: string[]; +} + +// @public +export interface SqlDbOfflineConfiguration { + readonly offline?: boolean; +} + // @public export interface SqlFileShare { password?: string; diff --git a/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts b/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts index d4015dc282d3..3932058aa5ef 100644 --- a/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts +++ b/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts @@ -9,6 +9,7 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + DatabaseMigrationsSqlDbImpl, DatabaseMigrationsSqlMiImpl, DatabaseMigrationsSqlVmImpl, OperationsImpl, @@ -22,6 +23,7 @@ import { FilesImpl } from "./operations"; import { + DatabaseMigrationsSqlDb, DatabaseMigrationsSqlMi, DatabaseMigrationsSqlVm, Operations, @@ -68,7 +70,7 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-datamigration/3.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-datamigration/3.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -91,7 +93,8 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-10-30-preview"; + this.apiVersion = options.apiVersion || "2022-03-30-preview"; + this.databaseMigrationsSqlDb = new DatabaseMigrationsSqlDbImpl(this); this.databaseMigrationsSqlMi = new DatabaseMigrationsSqlMiImpl(this); this.databaseMigrationsSqlVm = new DatabaseMigrationsSqlVmImpl(this); this.operations = new OperationsImpl(this); @@ -105,6 +108,7 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { this.files = new FilesImpl(this); } + databaseMigrationsSqlDb: DatabaseMigrationsSqlDb; databaseMigrationsSqlMi: DatabaseMigrationsSqlMi; databaseMigrationsSqlVm: DatabaseMigrationsSqlVm; operations: Operations; diff --git a/sdk/datamigration/arm-datamigration/src/models/index.ts b/sdk/datamigration/arm-datamigration/src/models/index.ts index a41c1ae39904..3887f5d3e00f 100644 --- a/sdk/datamigration/arm-datamigration/src/models/index.ts +++ b/sdk/datamigration/arm-datamigration/src/models/index.ts @@ -10,6 +10,7 @@ import * as coreClient from "@azure/core-client"; export type DatabaseMigrationPropertiesUnion = | DatabaseMigrationProperties + | DatabaseMigrationPropertiesSqlDb | DatabaseMigrationPropertiesSqlMi | DatabaseMigrationPropertiesSqlVm; export type ProjectTaskPropertiesUnion = @@ -152,6 +153,187 @@ export interface SystemData { lastModifiedAt?: Date; } +/** Detailed status of current Sql Db migration. */ +export interface SqlDbMigrationStatusDetails { + /** + * Current State of Migration. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationState?: string; + /** + * Sql Data Copy errors, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sqlDataCopyErrors?: string[]; + /** + * Details on progress of ADF copy activities. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly listOfCopyProgressDetails?: CopyProgressDetails[]; +} + +/** Details on progress of ADF copy activity */ +export interface CopyProgressDetails { + /** + * Table Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tableName?: string; + /** + * Status of the Copy activity (InProgress, Succeeded, Failed, Canceled). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Type of parallel copy (Dynamic range, Physical partition, none). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly parallelCopyType?: string; + /** + * The degree of parallelization. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedParallelCopies?: number; + /** + * Bytes read + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataRead?: number; + /** + * Bytes written + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataWritten?: number; + /** + * Rows read + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rowsRead?: number; + /** + * Rows Copied + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rowsCopied?: number; + /** + * Copy Start + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly copyStart?: Date; + /** + * Copy throughput in KBps + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly copyThroughput?: number; + /** + * Copy Duration in seconds + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly copyDuration?: number; +} + +/** Source SQL Connection */ +export interface SqlConnectionInformation { + /** Data source. */ + dataSource?: string; + /** Authentication type. */ + authentication?: string; + /** User name to connect to source SQL. */ + userName?: string; + /** + * Password to connect to source SQL. + * This value contains a credential. Consider obscuring before showing to users + */ + password?: string; + /** Whether to encrypt connection or not. */ + encryptConnection?: boolean; + /** Whether to trust server certificate or not. */ + trustServerCertificate?: boolean; +} + +/** Offline configuration */ +export interface SqlDbOfflineConfiguration { + /** + * Offline migration + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly offline?: boolean; +} + +/** Database Migration Resource properties. */ +export interface DatabaseMigrationProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "SqlDb" | "SqlMi" | "SqlVm"; + /** Resource Id of the target resource (SQL VM or SQL Managed Instance). */ + scope?: string; + /** + * Provisioning State of migration. ProvisioningState as Succeeded implies that validations have been performed and migration has started. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * Migration status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationStatus?: string; + /** + * Database migration start time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startedOn?: Date; + /** + * Database migration end time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endedOn?: Date; + /** Source SQL Server connection details. */ + sourceSqlConnection?: SqlConnectionInformation; + /** Name of the source database. */ + sourceDatabaseName?: string; + /** + * Name of the source sql server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceServerName?: string; + /** Resource Id of the Migration Service. */ + migrationService?: string; + /** ID tracking current migration operation. */ + migrationOperationId?: string; + /** + * Error details in case of migration failure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationFailureError?: ErrorInfo; +} + +/** Error details */ +export interface ErrorInfo { + /** + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +export interface ProxyResource { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly id?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly name?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly type?: string; +} + +/** Migration Operation Input */ +export interface MigrationOperationInput { + /** ID tracking migration operation. */ + migrationOperationId?: string; +} + /** Detailed status of current migration. */ export interface MigrationStatusDetails { /** @@ -338,6 +520,11 @@ export interface SourceLocation { fileShare?: SqlFileShare; /** Source Azure Blob. */ azureBlob?: AzureBlob; + /** + * Backup storage Type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileStorageType?: string; } /** File share */ @@ -376,92 +563,6 @@ export interface OfflineConfiguration { lastBackupName?: string; } -/** Database Migration Resource properties. */ -export interface DatabaseMigrationProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "SqlMi" | "SqlVm"; - /** Scope of the database. */ - scope?: string; - /** - * Provisioning State of migration. ProvisioningState as Succeeded implies that validations have been performed and migration has started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * Migration status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly migrationStatus?: string; - /** - * Database migration start time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedOn?: Date; - /** - * Database migration end time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endedOn?: Date; - /** Source SQL Server connection details. */ - sourceSqlConnection?: SqlConnectionInformation; - /** Name of the source database. */ - sourceDatabaseName?: string; - /** Resource Id of the Migration Service. */ - migrationService?: string; - /** ID tracking current migration operation. */ - migrationOperationId?: string; - /** - * Error details in case of migration failure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly migrationFailureError?: ErrorInfo; -} - -/** Source SQL Connection */ -export interface SqlConnectionInformation { - /** Data source. */ - dataSource?: string; - /** Authentication type. */ - authentication?: string; - /** User name to connect to source SQL. */ - userName?: string; - /** Password to connect to source SQL. */ - password?: string; - /** Whether to encrypt connection or not. */ - encryptConnection?: boolean; - /** Whether to trust server certificate or not. */ - trustServerCertificate?: boolean; -} - -/** Error details */ -export interface ErrorInfo { - /** - * Error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * Error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - -export interface ProxyResource { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; -} - -/** Migration Operation Input */ -export interface MigrationOperationInput { - /** ID tracking migration operation. */ - migrationOperationId?: string; -} - /** Result of the request to list SQL operations. */ export interface OperationListResult { /** NOTE: This property will not be serialized. It can only be populated by the server. */ @@ -810,6 +911,8 @@ export interface ServiceSku { export interface DataMigrationServiceStatusResponse { /** The DMS instance agent version */ agentVersion?: string; + /** Agent Configuration */ + agentConfiguration?: Record; /** The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed' */ status?: string; /** The services virtual machine size, such as 'Standard_D2_v2' */ @@ -1003,6 +1106,18 @@ export interface ProjectList { nextLink?: string; } +/** Azure Active Directory Application */ +export interface AzureActiveDirectoryApp { + /** Application ID of the Azure Active Directory Application */ + applicationId?: string; + /** Key used to authenticate to the Azure Active Directory Application */ + appKey?: string; + /** Tenant id of the customer */ + tenantId?: string; + /** Ignore checking azure permissions on the AAD app */ + ignoreAzurePermissions?: boolean; +} + /** Defines the connection properties of a server */ export interface ConnectionInfo { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -1141,16 +1256,6 @@ export interface MigrateMISyncCompleteCommandOutput { errors?: ReportableException[]; } -/** Azure Active Directory Application */ -export interface AzureActiveDirectoryApp { - /** Application ID of the Azure Active Directory Application */ - applicationId: string; - /** Key used to authenticate to the Azure Active Directory Application */ - appKey: string; - /** Tenant id of the customer */ - tenantId: string; -} - /** Information of backup set */ export interface BackupSetInfo { /** Id for the set of backup files */ @@ -1221,6 +1326,8 @@ export interface ConnectToSourceSqlServerTaskInput { collectTdeCertificateInfo?: boolean; /** Flag for whether to validate SSIS catalog is reachable on the source server. */ validateSsisCatalogOnly?: boolean; + /** encrypted key for secure fields */ + encryptedKeyForSecureFields?: string; } /** Output for the task that validates connection to SQL Server and also validates source server requirements */ @@ -1348,6 +1455,8 @@ export interface ConnectToTargetAzureDbForMySqlTaskOutput { export interface ConnectToTargetSqlDbTaskInput { /** Connection information for target SQL DB */ targetConnectionInfo: SqlConnectionInfo; + /** Boolean flag indicating whether to query object counts for each database on the target server */ + queryObjectCounts?: boolean; } /** Output for the task that validates connection to SQL DB and target server requirements */ @@ -1617,6 +1726,8 @@ export interface GetUserTablesSqlTaskInput { connectionInfo: SqlConnectionInfo; /** List of database names to collect tables for */ selectedDatabases: string[]; + /** encrypted key for secure fields */ + encryptedKeyForSecureFields?: string; } /** Output of the task that collects user tables for the given list of databases */ @@ -1754,16 +1865,26 @@ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { sourceConnectionInfo: PostgreSqlConnectionInfo; /** encrypted key for secure fields */ encryptedKeyForSecureFields?: string; + /** + * Migration start time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startedOn?: Date; } /** Database specific information for PostgreSQL to Azure Database for PostgreSQL migration task inputs */ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { /** Name of the database */ name?: string; + /** + * Result identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; /** Name of target database. Note: Target database will be truncated before starting migration. */ targetDatabaseName?: string; /** Migration settings which tune the migration behavior */ - migrationSetting?: { [propertyName: string]: string }; + migrationSetting?: { [propertyName: string]: any }; /** Source settings to tune source endpoint migration behavior */ sourceSetting?: { [propertyName: string]: string }; /** Target settings to tune target endpoint migration behavior */ @@ -2174,7 +2295,7 @@ export interface MigrateSqlServerSqlMISyncTaskOutput { /** Blob container storage information. */ export interface BlobShare { /** SAS URI of Azure Storage Account Container. */ - sasUri: string; + sasUri?: string; } /** Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance. */ @@ -2320,7 +2441,7 @@ export interface MongoDbShardKeySetting { /** The fields within the shard key */ fields: MongoDbShardKeyField[]; /** Whether the shard key is unique */ - isUnique: boolean; + isUnique?: boolean; } /** Describes how an individual MongoDB database should be migrated */ @@ -2724,6 +2845,8 @@ export interface MigrateMySqlAzureDbForMySqlOfflineTaskInput { startedOn?: Date; /** Optional parameters for fine tuning the data transfer rate during migration */ optionalAgentSettings?: { [propertyName: string]: string }; + /** encrypted key for secure fields */ + encryptedKeyForSecureFields?: string; } /** Database specific information for offline MySQL to Azure Database for MySQL migration task inputs */ @@ -3186,6 +3309,30 @@ export interface StartMigrationScenarioServerRoleResult { readonly exceptionsAndWarnings?: ReportableException[]; } +/** Database Migration Resource properties for SQL database. */ +export type DatabaseMigrationPropertiesSqlDb = DatabaseMigrationProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "SqlDb"; + /** + * Detailed migration status. Not included by default. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationStatusDetails?: SqlDbMigrationStatusDetails; + /** Target SQL DB connection details. */ + targetSqlConnection?: SqlConnectionInformation; + /** + * Offline configuration. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly offlineConfiguration?: SqlDbOfflineConfiguration; + /** List of tables to copy. */ + tableList?: string[]; + /** Database collation to be used for the target database. */ + targetDatabaseCollation?: string; + /** Error message for migration provisioning failure, if any. */ + provisioningError?: string; +}; + /** Database Migration Resource properties for SQL Managed Instance. */ export type DatabaseMigrationPropertiesSqlMi = DatabaseMigrationProperties & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -3224,6 +3371,17 @@ export type DatabaseMigrationPropertiesSqlVm = DatabaseMigrationProperties & { offlineConfiguration?: OfflineConfiguration; }; +/** Database Migration Resource for SQL Database. */ +export type DatabaseMigrationSqlDb = ProxyResource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Database Migration Resource properties for SQL database. */ + properties?: DatabaseMigrationPropertiesSqlDb; +}; + /** Database Migration Resource for SQL Managed Instance. */ export type DatabaseMigrationSqlMi = ProxyResource & { /** @@ -3299,11 +3457,11 @@ export type DataMigrationService = TrackedResource & { /** A project resource */ export type Project = TrackedResource & { /** HTTP strong entity tag value. This is ignored if submitted. */ - eTag?: string; + etag?: string; /** Source platform for the project */ sourcePlatform?: ProjectSourcePlatform; /** Field that defines the Azure active directory application info, used to connect to the target Azure resource */ - azureAuthenticationInfo?: string; + azureAuthenticationInfo?: AzureActiveDirectoryApp; /** Target platform for the project */ targetPlatform?: ProjectTargetPlatform; /** @@ -3339,6 +3497,8 @@ export type MigrateSchemaSqlServerSqlDbTaskProperties = ProjectTaskProperties & createdOn?: string; /** Task id */ taskId?: string; + /** whether the task can be cloned or not */ + isCloneable?: boolean; }; /** Properties for the task that checks for OCI drivers. */ @@ -3404,6 +3564,8 @@ export type ConnectToSourceSqlServerTaskProperties = ProjectTaskProperties & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: ConnectToSourceSqlServerTaskOutputUnion[]; + /** Task id */ + taskId?: string; }; /** Properties for the task that validates connection to SQL Server and source server requirements for online migration */ @@ -3469,6 +3631,8 @@ export type ConnectToTargetSqlDbTaskProperties = ProjectTaskProperties & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: ConnectToTargetSqlDbTaskOutput[]; + /** DateTime in UTC when the task was created */ + createdOn?: string; }; /** Properties for the task that validates connection to SQL DB and target server requirements for online migration */ @@ -3521,6 +3685,8 @@ export type GetUserTablesSqlTaskProperties = ProjectTaskProperties & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: GetUserTablesSqlTaskOutput[]; + /** Task id */ + taskId?: string; }; /** Properties for the task that collects user tables for the given list of databases */ @@ -3637,6 +3803,12 @@ export type MigrateSqlServerSqlMITaskProperties = ProjectTaskProperties & { readonly output?: MigrateSqlServerSqlMITaskOutputUnion[]; /** task id */ taskId?: string; + /** DateTime in UTC when the task was created */ + createdOn?: string; + /** parent task id */ + parentTaskId?: string; + /** whether the task can be cloned or not */ + isCloneable?: boolean; }; /** Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance sync scenario */ @@ -3650,6 +3822,8 @@ export type MigrateSqlServerSqlMISyncTaskProperties = ProjectTaskProperties & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: MigrateSqlServerSqlMISyncTaskOutputUnion[]; + /** DateTime in UTC when the task was created */ + createdOn?: string; }; /** Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database */ @@ -3667,6 +3841,8 @@ export type MigrateSqlServerSqlDbTaskProperties = ProjectTaskProperties & { taskId?: string; /** whether the task can be cloned or not */ isCloneable?: boolean; + /** DateTime in UTC when the task was created */ + createdOn?: string; }; /** Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations */ @@ -3706,6 +3882,10 @@ export type MigrateMySqlAzureDbForMySqlOfflineTaskProperties = ProjectTaskProper * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: MigrateMySqlAzureDbForMySqlOfflineTaskOutputUnion[]; + /** whether the task can be cloned or not */ + isCloneable?: boolean; + /** Task id */ + taskId?: string; }; /** Properties for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations */ @@ -3723,6 +3903,8 @@ export type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties = ProjectTas taskId?: string; /** DateTime in UTC when the task was created */ createdOn?: string; + /** whether the task can be cloned or not */ + isCloneable?: boolean; }; /** Properties for the task that migrates Oracle to Azure Database for PostgreSQL for online migrations */ @@ -3840,6 +4022,8 @@ export type MigrateSyncCompleteCommandProperties = CommandProperties & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly output?: MigrateSyncCompleteCommandOutput; + /** Command id */ + commandId?: string; }; /** Properties for the command that completes online migration for an Azure SQL Database Managed Instance. */ @@ -3917,11 +4101,19 @@ export type MongoDbConnectionInfo = ConnectionInfo & { encryptConnection?: boolean; /** server brand version */ serverBrandVersion?: string; + /** server version */ + serverVersion?: string; + /** name of the server */ + serverName?: string; + /** Whether to trust the server certificate */ + trustServerCertificate?: boolean; enforceSSL?: boolean; /** port for server */ port?: number; /** Additional connection settings */ additionalSettings?: string; + /** Authentication type to use for connection */ + authentication?: AuthenticationType; }; /** Information for connecting to SQL database server */ @@ -3932,8 +4124,12 @@ export type SqlConnectionInfo = ConnectionInfo & { dataSource: string; /** name of the server */ serverName?: string; - /** port for server */ - port?: string; + /** Port for Server */ + port?: number; + /** server version */ + serverVersion?: string; + /** server brand version */ + serverBrandVersion?: string; /** Represents the ID of an HTTP resource represented by an Azure resource provider. */ resourceId?: string; /** Authentication type to use for connection */ @@ -3960,6 +4156,10 @@ export type MySqlConnectionInfo = ConnectionInfo & { port: number; /** Whether to encrypt the connection */ encryptConnection?: boolean; + /** Authentication type to use for connection */ + authentication?: AuthenticationType; + /** Additional connection settings */ + additionalSettings?: string; }; /** Information for connecting to Oracle server */ @@ -3968,6 +4168,14 @@ export type OracleConnectionInfo = ConnectionInfo & { type: "OracleConnectionInfo"; /** EZConnect or TNSName connection string. */ dataSource: string; + /** name of the server */ + serverName?: string; + /** server version */ + serverVersion?: string; + /** port for server */ + port?: number; + /** Authentication type to use for connection */ + authentication?: AuthenticationType; }; /** Information for connecting to PostgreSQL server */ @@ -3988,6 +4196,12 @@ export type PostgreSqlConnectionInfo = ConnectionInfo & { encryptConnection?: boolean; /** Whether to trust the server certificate */ trustServerCertificate?: boolean; + /** Additional connection settings */ + additionalSettings?: string; + /** server brand version */ + serverBrandVersion?: string; + /** Authentication type to use for connection */ + authentication?: AuthenticationType; }; /** Properties required to create a connection to Azure SQL database Managed instance */ @@ -4194,6 +4408,8 @@ export type MigrateSqlServerSqlMITaskInput = SqlMigrationTaskInput & { backupMode?: BackupMode; /** Azure Active Directory domain name in the format of 'contoso.com' for federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, required if and only if Windows logins are selected */ aadDomainName?: string; + /** encrypted key for secure fields */ + encryptedKeyForSecureFields?: string; }; /** Input for task that migrates SSIS packages from SQL Server to Azure SQL Database Managed Instance. */ @@ -5189,7 +5405,10 @@ export type DatabaseSummaryResult = DataItemMigrationSummaryResult & { }; /** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ -export type MigrateSqlServerSqlMISyncTaskInput = SqlServerSqlMISyncTaskInput & {}; +export type MigrateSqlServerSqlMISyncTaskInput = SqlServerSqlMISyncTaskInput & { + /** Number of database migrations to start in parallel */ + numberOfParallelDatabaseMigrations?: number; +}; /** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ export type ValidateMigrationInputSqlServerSqlMISyncTaskInput = SqlServerSqlMISyncTaskInput & {}; @@ -6139,7 +6358,8 @@ export type CreatedByType = string; /** Known values of {@link ResourceType} that the service accepts. */ export enum KnownResourceType { SqlMi = "SqlMi", - SqlVm = "SqlVm" + SqlVm = "SqlVm", + SqlDb = "SqlDb" } /** @@ -6148,7 +6368,8 @@ export enum KnownResourceType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **SqlMi** \ - * **SqlVm** + * **SqlVm** \ + * **SqlDb** */ export type ResourceType = string; @@ -7384,14 +7605,59 @@ export type ServerLevelPermissionsGroup = | "Default" | "MigrationFromSqlServerToAzureDB" | "MigrationFromSqlServerToAzureMI" - | "MigrationFromMySQLToAzureDBForMySQL"; + | "MigrationFromMySQLToAzureDBForMySQL" + | "MigrationFromSqlServerToAzureVM"; + +/** Optional parameters. */ +export interface DatabaseMigrationsSqlDbGetOptionalParams + extends coreClient.OperationOptions { + /** Optional migration operation ID. If this is provided, then details of migration operation for that ID are retrieved. If not provided (default), then details related to most recent or current operation are retrieved. */ + migrationOperationId?: string; + /** Complete migration details be included in the response. */ + expand?: string; +} + +/** Contains response data for the get operation. */ +export type DatabaseMigrationsSqlDbGetResponse = DatabaseMigrationSqlDb; + +/** Optional parameters. */ +export interface DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseMigrationsSqlDbCreateOrUpdateResponse = DatabaseMigrationSqlDb; + +/** Optional parameters. */ +export interface DatabaseMigrationsSqlDbDeleteOptionalParams + extends coreClient.OperationOptions { + /** Optional force delete boolean. If this is provided as true, migration will be deleted even if active. */ + force?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseMigrationsSqlDbCancelOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ export interface DatabaseMigrationsSqlMiGetOptionalParams extends coreClient.OperationOptions { /** Optional migration operation ID. If this is provided, then details of migration operation for that ID are retrieved. If not provided (default), then details related to most recent or current operation are retrieved. */ migrationOperationId?: string; - /** The child resources to include in the response. */ + /** Complete migration details be included in the response. */ expand?: string; } @@ -7433,7 +7699,7 @@ export interface DatabaseMigrationsSqlVmGetOptionalParams extends coreClient.OperationOptions { /** Optional migration operation ID. If this is provided, then details of migration operation for that ID are retrieved. If not provided (default), then details related to most recent or current operation are retrieved. */ migrationOperationId?: string; - /** The child resources to include in the response. */ + /** Complete migration details be included in the response. */ expand?: string; } diff --git a/sdk/datamigration/arm-datamigration/src/models/mappers.ts b/sdk/datamigration/arm-datamigration/src/models/mappers.ts index fdcb6b5f5a0d..d3c4c7994eba 100644 --- a/sdk/datamigration/arm-datamigration/src/models/mappers.ts +++ b/sdk/datamigration/arm-datamigration/src/models/mappers.ts @@ -53,6 +53,356 @@ export const SystemData: coreClient.CompositeMapper = { } }; +export const SqlDbMigrationStatusDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDbMigrationStatusDetails", + modelProperties: { + migrationState: { + serializedName: "migrationState", + readOnly: true, + type: { + name: "String" + } + }, + sqlDataCopyErrors: { + serializedName: "sqlDataCopyErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + listOfCopyProgressDetails: { + serializedName: "listOfCopyProgressDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CopyProgressDetails" + } + } + } + } + } + } +}; + +export const CopyProgressDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CopyProgressDetails", + modelProperties: { + tableName: { + serializedName: "tableName", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + parallelCopyType: { + serializedName: "parallelCopyType", + readOnly: true, + type: { + name: "String" + } + }, + usedParallelCopies: { + serializedName: "usedParallelCopies", + readOnly: true, + type: { + name: "Number" + } + }, + dataRead: { + serializedName: "dataRead", + readOnly: true, + type: { + name: "Number" + } + }, + dataWritten: { + serializedName: "dataWritten", + readOnly: true, + type: { + name: "Number" + } + }, + rowsRead: { + serializedName: "rowsRead", + readOnly: true, + type: { + name: "Number" + } + }, + rowsCopied: { + serializedName: "rowsCopied", + readOnly: true, + type: { + name: "Number" + } + }, + copyStart: { + serializedName: "copyStart", + readOnly: true, + type: { + name: "DateTime" + } + }, + copyThroughput: { + serializedName: "copyThroughput", + readOnly: true, + type: { + name: "Number" + } + }, + copyDuration: { + serializedName: "copyDuration", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const SqlConnectionInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlConnectionInformation", + modelProperties: { + dataSource: { + serializedName: "dataSource", + type: { + name: "String" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } + }, + userName: { + serializedName: "userName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + encryptConnection: { + serializedName: "encryptConnection", + type: { + name: "Boolean" + } + }, + trustServerCertificate: { + serializedName: "trustServerCertificate", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SqlDbOfflineConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDbOfflineConfiguration", + modelProperties: { + offline: { + serializedName: "offline", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const DatabaseMigrationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseMigrationProperties", + uberParent: "DatabaseMigrationProperties", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + modelProperties: { + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + migrationStatus: { + serializedName: "migrationStatus", + readOnly: true, + type: { + name: "String" + } + }, + startedOn: { + serializedName: "startedOn", + readOnly: true, + type: { + name: "DateTime" + } + }, + endedOn: { + serializedName: "endedOn", + readOnly: true, + type: { + name: "DateTime" + } + }, + sourceSqlConnection: { + serializedName: "sourceSqlConnection", + type: { + name: "Composite", + className: "SqlConnectionInformation" + } + }, + sourceDatabaseName: { + serializedName: "sourceDatabaseName", + type: { + name: "String" + } + }, + sourceServerName: { + serializedName: "sourceServerName", + readOnly: true, + type: { + name: "String" + } + }, + migrationService: { + serializedName: "migrationService", + type: { + name: "String" + } + }, + migrationOperationId: { + serializedName: "migrationOperationId", + type: { + name: "String" + } + }, + migrationFailureError: { + serializedName: "migrationFailureError", + type: { + name: "Composite", + className: "ErrorInfo" + } + } + } + } +}; + +export const ErrorInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorInfo", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MigrationOperationInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrationOperationInput", + modelProperties: { + migrationOperationId: { + serializedName: "migrationOperationId", + type: { + name: "Uuid" + } + } + } + } +}; + export const MigrationStatusDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -306,320 +656,130 @@ export const SqlBackupFileInfo: coreClient.CompositeMapper = { name: "Number" } }, - copyThroughput: { - serializedName: "copyThroughput", - readOnly: true, - type: { - name: "Number" - } - }, - copyDuration: { - serializedName: "copyDuration", - readOnly: true, - type: { - name: "Number" - } - }, - familySequenceNumber: { - serializedName: "familySequenceNumber", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const BackupConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackupConfiguration", - modelProperties: { - sourceLocation: { - serializedName: "sourceLocation", - type: { - name: "Composite", - className: "SourceLocation" - } - }, - targetLocation: { - serializedName: "targetLocation", - type: { - name: "Composite", - className: "TargetLocation" - } - } - } - } -}; - -export const SourceLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SourceLocation", - modelProperties: { - fileShare: { - serializedName: "fileShare", - type: { - name: "Composite", - className: "SqlFileShare" - } - }, - azureBlob: { - serializedName: "azureBlob", - type: { - name: "Composite", - className: "AzureBlob" - } - } - } - } -}; - -export const SqlFileShare: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlFileShare", - modelProperties: { - path: { - serializedName: "path", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - type: { - name: "String" - } - } - } - } -}; - -export const AzureBlob: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureBlob", - modelProperties: { - storageAccountResourceId: { - serializedName: "storageAccountResourceId", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", - type: { - name: "String" - } - }, - blobContainerName: { - serializedName: "blobContainerName", - type: { - name: "String" - } - } - } - } -}; - -export const TargetLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TargetLocation", - modelProperties: { - storageAccountResourceId: { - serializedName: "storageAccountResourceId", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", - type: { - name: "String" - } - } - } - } -}; - -export const OfflineConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OfflineConfiguration", - modelProperties: { - offline: { - serializedName: "offline", - type: { - name: "Boolean" - } - }, - lastBackupName: { - serializedName: "lastBackupName", - type: { - name: "String" - } - } - } - } -}; - -export const DatabaseMigrationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseMigrationProperties", - uberParent: "DatabaseMigrationProperties", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - modelProperties: { - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - migrationStatus: { - serializedName: "migrationStatus", - readOnly: true, - type: { - name: "String" - } - }, - startedOn: { - serializedName: "startedOn", - readOnly: true, - type: { - name: "DateTime" - } - }, - endedOn: { - serializedName: "endedOn", - readOnly: true, - type: { - name: "DateTime" - } - }, - sourceSqlConnection: { - serializedName: "sourceSqlConnection", + copyThroughput: { + serializedName: "copyThroughput", + readOnly: true, type: { - name: "Composite", - className: "SqlConnectionInformation" + name: "Number" } }, - sourceDatabaseName: { - serializedName: "sourceDatabaseName", + copyDuration: { + serializedName: "copyDuration", + readOnly: true, type: { - name: "String" + name: "Number" } }, - migrationService: { - serializedName: "migrationService", + familySequenceNumber: { + serializedName: "familySequenceNumber", + readOnly: true, type: { - name: "String" + name: "Number" } - }, - migrationOperationId: { - serializedName: "migrationOperationId", + } + } + } +}; + +export const BackupConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupConfiguration", + modelProperties: { + sourceLocation: { + serializedName: "sourceLocation", type: { - name: "String" + name: "Composite", + className: "SourceLocation" } }, - migrationFailureError: { - serializedName: "migrationFailureError", + targetLocation: { + serializedName: "targetLocation", type: { name: "Composite", - className: "ErrorInfo" + className: "TargetLocation" } } } } }; -export const SqlConnectionInformation: coreClient.CompositeMapper = { +export const SourceLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlConnectionInformation", + className: "SourceLocation", modelProperties: { - dataSource: { - serializedName: "dataSource", + fileShare: { + serializedName: "fileShare", type: { - name: "String" + name: "Composite", + className: "SqlFileShare" } }, - authentication: { - serializedName: "authentication", + azureBlob: { + serializedName: "azureBlob", type: { - name: "String" + name: "Composite", + className: "AzureBlob" } }, - userName: { - serializedName: "userName", + fileStorageType: { + serializedName: "fileStorageType", + readOnly: true, type: { name: "String" } - }, - password: { - serializedName: "password", + } + } + } +}; + +export const SqlFileShare: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlFileShare", + modelProperties: { + path: { + serializedName: "path", type: { name: "String" } }, - encryptConnection: { - serializedName: "encryptConnection", + username: { + serializedName: "username", type: { - name: "Boolean" + name: "String" } }, - trustServerCertificate: { - serializedName: "trustServerCertificate", + password: { + serializedName: "password", type: { - name: "Boolean" + name: "String" } } } } }; -export const ErrorInfo: coreClient.CompositeMapper = { +export const AzureBlob: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorInfo", + className: "AzureBlob", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + storageAccountResourceId: { + serializedName: "storageAccountResourceId", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + accountKey: { + serializedName: "accountKey", + type: { + name: "String" + } + }, + blobContainerName: { + serializedName: "blobContainerName", type: { name: "String" } @@ -628,28 +788,19 @@ export const ErrorInfo: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const TargetLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "TargetLocation", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, + storageAccountResourceId: { + serializedName: "storageAccountResourceId", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + accountKey: { + serializedName: "accountKey", type: { name: "String" } @@ -658,15 +809,21 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; -export const MigrationOperationInput: coreClient.CompositeMapper = { +export const OfflineConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MigrationOperationInput", + className: "OfflineConfiguration", modelProperties: { - migrationOperationId: { - serializedName: "migrationOperationId", + offline: { + serializedName: "offline", type: { - name: "Uuid" + name: "Boolean" + } + }, + lastBackupName: { + serializedName: "lastBackupName", + type: { + name: "String" } } } @@ -1462,6 +1619,13 @@ export const DataMigrationServiceStatusResponse: coreClient.CompositeMapper = { name: "String" } }, + agentConfiguration: { + serializedName: "agentConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, status: { serializedName: "status", type: { @@ -1872,6 +2036,39 @@ export const ProjectList: coreClient.CompositeMapper = { } }; +export const AzureActiveDirectoryApp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryApp", + modelProperties: { + applicationId: { + serializedName: "applicationId", + type: { + name: "String" + } + }, + appKey: { + serializedName: "appKey", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + ignoreAzurePermissions: { + serializedName: "ignoreAzurePermissions", + type: { + name: "Boolean" + } + } + } + } +}; + export const ConnectionInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2232,36 +2429,6 @@ export const MigrateMISyncCompleteCommandOutput: coreClient.CompositeMapper = { } }; -export const AzureActiveDirectoryApp: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureActiveDirectoryApp", - modelProperties: { - applicationId: { - serializedName: "applicationId", - required: true, - type: { - name: "String" - } - }, - appKey: { - serializedName: "appKey", - required: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - required: true, - type: { - name: "String" - } - } - } - } -}; - export const BackupSetInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2411,7 +2578,8 @@ export const ConnectToSourceMySqlTaskInput: coreClient.CompositeMapper = { "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", - "MigrationFromMySQLToAzureDBForMySQL" + "MigrationFromMySQLToAzureDBForMySQL", + "MigrationFromSqlServerToAzureVM" ] } }, @@ -2446,7 +2614,8 @@ export const ConnectToSourceSqlServerTaskInput: coreClient.CompositeMapper = { "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", - "MigrationFromMySQLToAzureDBForMySQL" + "MigrationFromMySQLToAzureDBForMySQL", + "MigrationFromSqlServerToAzureVM" ] } }, @@ -2484,6 +2653,12 @@ export const ConnectToSourceSqlServerTaskInput: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -2763,6 +2938,12 @@ export const ConnectToTargetSqlDbTaskInput: coreClient.CompositeMapper = { name: "Composite", className: "SqlConnectionInfo" } + }, + queryObjectCounts: { + serializedName: "queryObjectCounts", + type: { + name: "Boolean" + } } } } @@ -3385,6 +3566,12 @@ export const GetUserTablesSqlTaskInput: coreClient.CompositeMapper = { } } } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -3719,6 +3906,13 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput: coreClient.Comp type: { name: "String" } + }, + startedOn: { + serializedName: "startedOn", + readOnly: true, + type: { + name: "DateTime" + } } } } @@ -3735,6 +3929,13 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput: coreClient. name: "String" } }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, targetDatabaseName: { serializedName: "targetDatabaseName", type: { @@ -3745,7 +3946,7 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput: coreClient. serializedName: "migrationSetting", type: { name: "Dictionary", - value: { type: { name: "String" } } + value: { type: { name: "any" } } } }, sourceSetting: { @@ -4669,7 +4870,6 @@ export const BlobShare: coreClient.CompositeMapper = { modelProperties: { sasUri: { serializedName: "sasUri", - required: true, type: { name: "String" } @@ -5105,7 +5305,6 @@ export const MongoDbShardKeySetting: coreClient.CompositeMapper = { }, isUnique: { serializedName: "isUnique", - required: true, type: { name: "Boolean" } @@ -6091,8 +6290,14 @@ export const MigrateMySqlAzureDbForMySqlOfflineTaskInput: coreClient.CompositeMa optionalAgentSettings: { serializedName: "optionalAgentSettings", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" } } } @@ -7089,6 +7294,64 @@ export const StartMigrationScenarioServerRoleResult: coreClient.CompositeMapper } }; +export const DatabaseMigrationPropertiesSqlDb: coreClient.CompositeMapper = { + serializedName: "SqlDb", + type: { + name: "Composite", + className: "DatabaseMigrationPropertiesSqlDb", + uberParent: "DatabaseMigrationProperties", + polymorphicDiscriminator: + DatabaseMigrationProperties.type.polymorphicDiscriminator, + modelProperties: { + ...DatabaseMigrationProperties.type.modelProperties, + migrationStatusDetails: { + serializedName: "migrationStatusDetails", + type: { + name: "Composite", + className: "SqlDbMigrationStatusDetails" + } + }, + targetSqlConnection: { + serializedName: "targetSqlConnection", + type: { + name: "Composite", + className: "SqlConnectionInformation" + } + }, + offlineConfiguration: { + serializedName: "offlineConfiguration", + type: { + name: "Composite", + className: "SqlDbOfflineConfiguration" + } + }, + tableList: { + serializedName: "tableList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + targetDatabaseCollation: { + serializedName: "targetDatabaseCollation", + type: { + name: "String" + } + }, + provisioningError: { + serializedName: "provisioningError", + type: { + name: "String" + } + } + } + } +}; + export const DatabaseMigrationPropertiesSqlMi: coreClient.CompositeMapper = { serializedName: "SqlMi", type: { @@ -7183,6 +7446,30 @@ export const DatabaseMigrationPropertiesSqlVm: coreClient.CompositeMapper = { } }; +export const DatabaseMigrationSqlDb: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseMigrationSqlDb", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DatabaseMigrationPropertiesSqlDb" + } + } + } + } +}; + export const DatabaseMigrationSqlMi: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7351,8 +7638,8 @@ export const Project: coreClient.CompositeMapper = { className: "Project", modelProperties: { ...TrackedResource.type.modelProperties, - eTag: { - serializedName: "eTag", + etag: { + serializedName: "etag", type: { name: "String" } @@ -7366,7 +7653,8 @@ export const Project: coreClient.CompositeMapper = { azureAuthenticationInfo: { serializedName: "properties.azureAuthenticationInfo", type: { - name: "String" + name: "Composite", + className: "AzureActiveDirectoryApp" } }, targetPlatform: { @@ -7460,6 +7748,12 @@ export const MigrateSchemaSqlServerSqlDbTaskProperties: coreClient.CompositeMapp type: { name: "String" } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } } } } @@ -7630,6 +7924,12 @@ export const ConnectToSourceSqlServerTaskProperties: coreClient.CompositeMapper } } } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -7800,6 +8100,12 @@ export const ConnectToTargetSqlDbTaskProperties: coreClient.CompositeMapper = { } } } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -7937,6 +8243,12 @@ export const GetUserTablesSqlTaskProperties: coreClient.CompositeMapper = { } } } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -8249,6 +8561,24 @@ export const MigrateSqlServerSqlMITaskProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } + }, + parentTaskId: { + serializedName: "parentTaskId", + type: { + name: "String" + } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } } } } @@ -8283,6 +8613,12 @@ export const MigrateSqlServerSqlMISyncTaskProperties: coreClient.CompositeMapper } } } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -8329,6 +8665,12 @@ export const MigrateSqlServerSqlDbTaskProperties: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -8431,6 +8773,18 @@ export const MigrateMySqlAzureDbForMySqlOfflineTaskProperties: coreClient.Compos } } } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -8477,6 +8831,12 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: coreClient type: { name: "String" } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } } } } @@ -8776,6 +9136,12 @@ export const MigrateSyncCompleteCommandProperties: coreClient.CompositeMapper = name: "Composite", className: "MigrateSyncCompleteCommandOutput" } + }, + commandId: { + serializedName: "commandId", + type: { + name: "String" + } } } } @@ -8962,6 +9328,25 @@ export const MongoDbConnectionInfo: coreClient.CompositeMapper = { name: "String" } }, + serverVersion: { + serializedName: "serverVersion", + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + type: { + name: "String" + } + }, + trustServerCertificate: { + defaultValue: false, + serializedName: "trustServerCertificate", + type: { + name: "Boolean" + } + }, enforceSSL: { serializedName: "enforceSSL", type: { @@ -8979,6 +9364,12 @@ export const MongoDbConnectionInfo: coreClient.CompositeMapper = { type: { name: "String" } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } } } } @@ -9008,6 +9399,18 @@ export const SqlConnectionInfo: coreClient.CompositeMapper = { }, port: { serializedName: "port", + type: { + name: "Number" + } + }, + serverVersion: { + serializedName: "serverVersion", + type: { + name: "String" + } + }, + serverBrandVersion: { + serializedName: "serverBrandVersion", type: { name: "String" } @@ -9089,6 +9492,18 @@ export const MySqlConnectionInfo: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } + }, + additionalSettings: { + serializedName: "additionalSettings", + type: { + name: "String" + } } } } @@ -9109,6 +9524,30 @@ export const OracleConnectionInfo: coreClient.CompositeMapper = { type: { name: "String" } + }, + serverName: { + serializedName: "serverName", + type: { + name: "String" + } + }, + serverVersion: { + serializedName: "serverVersion", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } } } } @@ -9168,6 +9607,24 @@ export const PostgreSqlConnectionInfo: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + additionalSettings: { + serializedName: "additionalSettings", + type: { + name: "String" + } + }, + serverBrandVersion: { + serializedName: "serverBrandVersion", + type: { + name: "String" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } } } } @@ -9614,6 +10071,12 @@ export const MigrateSqlServerSqlMITaskInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -11283,7 +11746,13 @@ export const MigrateSqlServerSqlMISyncTaskInput: coreClient.CompositeMapper = { name: "Composite", className: "MigrateSqlServerSqlMISyncTaskInput", modelProperties: { - ...SqlServerSqlMISyncTaskInput.type.modelProperties + ...SqlServerSqlMISyncTaskInput.type.modelProperties, + numberOfParallelDatabaseMigrations: { + serializedName: "numberOfParallelDatabaseMigrations", + type: { + name: "Number" + } + } } } }; @@ -12920,6 +13389,7 @@ export let discriminators = { MongoDbProgress: MongoDbProgress, MigrateOracleAzureDbPostgreSqlSyncTaskOutput: MigrateOracleAzureDbPostgreSqlSyncTaskOutput, MigrateMySqlAzureDbForMySqlOfflineTaskOutput: MigrateMySqlAzureDbForMySqlOfflineTaskOutput, + "DatabaseMigrationProperties.SqlDb": DatabaseMigrationPropertiesSqlDb, "DatabaseMigrationProperties.SqlMi": DatabaseMigrationPropertiesSqlMi, "DatabaseMigrationProperties.SqlVm": DatabaseMigrationPropertiesSqlVm, "ProjectTaskProperties.MigrateSchemaSqlServerSqlDb": MigrateSchemaSqlServerSqlDbTaskProperties, diff --git a/sdk/datamigration/arm-datamigration/src/models/parameters.ts b/sdk/datamigration/arm-datamigration/src/models/parameters.ts index eab420a209c7..52c6bbf76034 100644 --- a/sdk/datamigration/arm-datamigration/src/models/parameters.ts +++ b/sdk/datamigration/arm-datamigration/src/models/parameters.ts @@ -12,8 +12,9 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - DatabaseMigrationSqlMi as DatabaseMigrationSqlMiMapper, + DatabaseMigrationSqlDb as DatabaseMigrationSqlDbMapper, MigrationOperationInput as MigrationOperationInputMapper, + DatabaseMigrationSqlMi as DatabaseMigrationSqlMiMapper, DatabaseMigrationSqlVm as DatabaseMigrationSqlVmMapper, SqlMigrationService as SqlMigrationServiceMapper, SqlMigrationServiceUpdate as SqlMigrationServiceUpdateMapper, @@ -62,10 +63,10 @@ export const resourceGroupName: OperationURLParameter = { } }; -export const managedInstanceName: OperationURLParameter = { - parameterPath: "managedInstanceName", +export const sqlDbInstanceName: OperationURLParameter = { + parameterPath: "sqlDbInstanceName", mapper: { - serializedName: "managedInstanceName", + serializedName: "sqlDbInstanceName", required: true, type: { name: "String" @@ -118,7 +119,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-10-30-preview", + defaultValue: "2022-03-30-preview", isConstant: true, serializedName: "api-version", type: { @@ -141,7 +142,17 @@ export const contentType: OperationParameter = { export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: DatabaseMigrationSqlMiMapper + mapper: DatabaseMigrationSqlDbMapper +}; + +export const force: OperationQueryParameter = { + parameterPath: ["options", "force"], + mapper: { + serializedName: "force", + type: { + name: "Boolean" + } + } }; export const parameters1: OperationParameter = { @@ -149,6 +160,22 @@ export const parameters1: OperationParameter = { mapper: MigrationOperationInputMapper }; +export const managedInstanceName: OperationURLParameter = { + parameterPath: "managedInstanceName", + mapper: { + serializedName: "managedInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseMigrationSqlMiMapper +}; + export const sqlVirtualMachineName: OperationURLParameter = { parameterPath: "sqlVirtualMachineName", mapper: { @@ -160,7 +187,7 @@ export const sqlVirtualMachineName: OperationURLParameter = { } }; -export const parameters2: OperationParameter = { +export const parameters3: OperationParameter = { parameterPath: "parameters", mapper: DatabaseMigrationSqlVmMapper }; @@ -188,27 +215,27 @@ export const sqlMigrationServiceName: OperationURLParameter = { } }; -export const parameters3: OperationParameter = { +export const parameters4: OperationParameter = { parameterPath: "parameters", mapper: SqlMigrationServiceMapper }; -export const parameters4: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: SqlMigrationServiceUpdateMapper }; -export const parameters5: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: RegenAuthKeysMapper }; -export const parameters6: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: DeleteNodeMapper }; -export const parameters7: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: DataMigrationServiceMapper }; @@ -245,7 +272,7 @@ export const deleteRunningTasks: OperationQueryParameter = { } }; -export const parameters8: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: NameAvailabilityRequestMapper }; @@ -282,7 +309,7 @@ export const taskType: OperationQueryParameter = { } }; -export const parameters9: OperationParameter = { +export const parameters10: OperationParameter = { parameterPath: "parameters", mapper: ProjectTaskMapper }; @@ -298,12 +325,12 @@ export const taskName: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", mapper: CommandPropertiesMapper }; -export const parameters11: OperationParameter = { +export const parameters12: OperationParameter = { parameterPath: "parameters", mapper: ProjectMapper }; @@ -319,7 +346,7 @@ export const fileName: OperationURLParameter = { } }; -export const parameters12: OperationParameter = { +export const parameters13: OperationParameter = { parameterPath: "parameters", mapper: ProjectFileMapper }; diff --git a/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlDb.ts b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlDb.ts new file mode 100644 index 000000000000..069f2d587ef8 --- /dev/null +++ b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlDb.ts @@ -0,0 +1,439 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DatabaseMigrationsSqlDb } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationManagementClient } from "../dataMigrationManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DatabaseMigrationsSqlDbGetOptionalParams, + DatabaseMigrationsSqlDbGetResponse, + DatabaseMigrationSqlDb, + DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams, + DatabaseMigrationsSqlDbCreateOrUpdateResponse, + DatabaseMigrationsSqlDbDeleteOptionalParams, + MigrationOperationInput, + DatabaseMigrationsSqlDbCancelOptionalParams +} from "../models"; + +/** Class containing DatabaseMigrationsSqlDb operations. */ +export class DatabaseMigrationsSqlDbImpl implements DatabaseMigrationsSqlDb { + private readonly client: DataMigrationManagementClient; + + /** + * Initialize a new instance of the class DatabaseMigrationsSqlDb class. + * @param client Reference to the service client + */ + constructor(client: DataMigrationManagementClient) { + this.client = client; + } + + /** + * Retrieve the Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sqlDbInstanceName, targetDbName, options }, + getOperationSpec + ); + } + + /** + * Create or Update Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Details of Sql Db migration resource. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: DatabaseMigrationSqlDb, + options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabaseMigrationsSqlDbCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + sqlDbInstanceName, + targetDbName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Create or Update Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Details of Sql Db migration resource. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: DatabaseMigrationSqlDb, + options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + sqlDbInstanceName, + targetDbName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, sqlDbInstanceName, targetDbName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Delete Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sqlDbInstanceName, + targetDbName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Stop on going migration for the database. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Required migration operation ID for which cancel will be initiated. + * @param options The options parameters. + */ + async beginCancel( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: MigrationOperationInput, + options?: DatabaseMigrationsSqlDbCancelOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + sqlDbInstanceName, + targetDbName, + parameters, + options + }, + cancelOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Stop on going migration for the database. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Required migration operation ID for which cancel will be initiated. + * @param options The options parameters. + */ + async beginCancelAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: MigrationOperationInput, + options?: DatabaseMigrationsSqlDbCancelOptionalParams + ): Promise { + const poller = await this.beginCancel( + resourceGroupName, + sqlDbInstanceName, + targetDbName, + parameters, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseMigrationSqlDb + }, + default: {} + }, + queryParameters: [ + Parameters.migrationOperationId, + Parameters.expand, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.sqlDbInstanceName, + Parameters.targetDbName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseMigrationSqlDb + }, + 201: { + bodyMapper: Mappers.DatabaseMigrationSqlDb + }, + 202: { + bodyMapper: Mappers.DatabaseMigrationSqlDb + }, + 204: { + bodyMapper: Mappers.DatabaseMigrationSqlDb + }, + default: {} + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.sqlDbInstanceName, + Parameters.targetDbName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.sqlDbInstanceName, + Parameters.targetDbName, + Parameters.subscriptionId + ], + serializer +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.sqlDbInstanceName, + Parameters.targetDbName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlMi.ts b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlMi.ts index d5f565833cfa..163a84de63a3 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlMi.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlMi.ts @@ -37,7 +37,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Retrieve the Database Migration resource. + * Retrieve the specified database migration for a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -57,7 +57,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -134,7 +134,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -160,7 +160,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Stop migrations in progress for the database + * Stop in-progress database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -232,7 +232,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Stop migrations in progress for the database + * Stop in-progress database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -258,7 +258,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Initiate cutover for online migration in progress for the database. + * Initiate cutover for in-progress online database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -330,7 +330,7 @@ export class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi { } /** - * Initiate cutover for online migration in progress for the database. + * Initiate cutover for in-progress online database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -376,9 +376,9 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.managedInstanceName, Parameters.targetDbName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer @@ -402,14 +402,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters, + requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.managedInstanceName, Parameters.targetDbName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -425,9 +425,9 @@ const cancelOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.managedInstanceName, Parameters.targetDbName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.contentType], mediaType: "json", @@ -443,9 +443,9 @@ const cutoverOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.managedInstanceName, Parameters.targetDbName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.contentType], mediaType: "json", diff --git a/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlVm.ts b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlVm.ts index 81c15452c31d..9242cf1493b2 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlVm.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlVm.ts @@ -37,7 +37,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Retrieve the Database Migration resource. + * Retrieve the specified database migration for a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -57,7 +57,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -134,7 +134,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -160,7 +160,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Stop ongoing migration for the database. + * Stop in-progress database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -232,7 +232,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Stop ongoing migration for the database. + * Stop in-progress database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -258,7 +258,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Cutover online migration operation for the database. + * Initiate cutover for in-progress online database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -330,7 +330,7 @@ export class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm { } /** - * Cutover online migration operation for the database. + * Initiate cutover for in-progress online database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -402,7 +402,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/files.ts b/sdk/datamigration/arm-datamigration/src/operations/files.ts index bae6ac2eb714..85fe913acdb2 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/files.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/files.ts @@ -358,7 +358,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -407,7 +407,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/index.ts b/sdk/datamigration/arm-datamigration/src/operations/index.ts index cfb4920408d2..ad06cc11346b 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/index.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./databaseMigrationsSqlDb"; export * from "./databaseMigrationsSqlMi"; export * from "./databaseMigrationsSqlVm"; export * from "./operations"; diff --git a/sdk/datamigration/arm-datamigration/src/operations/projects.ts b/sdk/datamigration/arm-datamigration/src/operations/projects.ts index 685957f88723..84a78a51a11b 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/projects.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/projects.ts @@ -261,7 +261,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -331,7 +331,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts b/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts index 067456903c73..11274d4142f3 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts @@ -287,7 +287,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -357,7 +357,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/services.ts b/sdk/datamigration/arm-datamigration/src/operations/services.ts index 3ae4287eb759..bc277594baf0 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/services.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/services.ts @@ -845,7 +845,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -923,7 +923,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1037,7 +1037,7 @@ const checkChildrenNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1099,7 +1099,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts b/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts index 18a61b1affc2..e2d9d9ef9d9a 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts @@ -231,7 +231,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Retrieve the Migration Service. + * Retrieve the Database Migration Service * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -249,7 +249,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Create or Update SQL Migration Service. + * Create or Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -318,7 +318,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Create or Update SQL Migration Service. + * Create or Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -341,7 +341,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Delete SQL Migration Service. + * Delete Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -403,7 +403,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Delete SQL Migration Service. + * Delete Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -423,7 +423,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Update SQL Migration Service. + * Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -492,7 +492,7 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Update SQL Migration Service. + * Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -607,7 +607,8 @@ export class SqlMigrationServicesImpl implements SqlMigrationServices { } /** - * Retrieve the Monitoring Data. + * Retrieve the registered Integration Runtime nodes and their monitoring data for a given Database + * Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -732,7 +733,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters3, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -777,7 +778,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -838,7 +839,7 @@ const regenerateAuthKeysOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -860,7 +861,7 @@ const deleteNodeOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operations/tasks.ts b/sdk/datamigration/arm-datamigration/src/operations/tasks.ts index ee9ca70cb75b..07cbbb59bae5 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/tasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/tasks.ts @@ -345,7 +345,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -418,7 +418,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -468,7 +468,7 @@ const commandOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlDb.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlDb.ts new file mode 100644 index 000000000000..61d7d629b8e5 --- /dev/null +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlDb.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DatabaseMigrationsSqlDbGetOptionalParams, + DatabaseMigrationsSqlDbGetResponse, + DatabaseMigrationSqlDb, + DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams, + DatabaseMigrationsSqlDbCreateOrUpdateResponse, + DatabaseMigrationsSqlDbDeleteOptionalParams, + MigrationOperationInput, + DatabaseMigrationsSqlDbCancelOptionalParams +} from "../models"; + +/** Interface representing a DatabaseMigrationsSqlDb. */ +export interface DatabaseMigrationsSqlDb { + /** + * Retrieve the Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbGetOptionalParams + ): Promise; + /** + * Create or Update Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Details of Sql Db migration resource. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: DatabaseMigrationSqlDb, + options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabaseMigrationsSqlDbCreateOrUpdateResponse + > + >; + /** + * Create or Update Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Details of Sql Db migration resource. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: DatabaseMigrationSqlDb, + options?: DatabaseMigrationsSqlDbCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbDeleteOptionalParams + ): Promise, void>>; + /** + * Delete Database Migration resource. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + options?: DatabaseMigrationsSqlDbDeleteOptionalParams + ): Promise; + /** + * Stop on going migration for the database. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Required migration operation ID for which cancel will be initiated. + * @param options The options parameters. + */ + beginCancel( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: MigrationOperationInput, + options?: DatabaseMigrationsSqlDbCancelOptionalParams + ): Promise, void>>; + /** + * Stop on going migration for the database. + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param sqlDbInstanceName + * @param targetDbName The name of the target database. + * @param parameters Required migration operation ID for which cancel will be initiated. + * @param options The options parameters. + */ + beginCancelAndWait( + resourceGroupName: string, + sqlDbInstanceName: string, + targetDbName: string, + parameters: MigrationOperationInput, + options?: DatabaseMigrationsSqlDbCancelOptionalParams + ): Promise; +} diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlMi.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlMi.ts index cea3cd271004..92a6213720ac 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlMi.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlMi.ts @@ -21,7 +21,7 @@ import { /** Interface representing a DatabaseMigrationsSqlMi. */ export interface DatabaseMigrationsSqlMi { /** - * Retrieve the Database Migration resource. + * Retrieve the specified database migration for a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -35,7 +35,7 @@ export interface DatabaseMigrationsSqlMi { options?: DatabaseMigrationsSqlMiGetOptionalParams ): Promise; /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -56,7 +56,7 @@ export interface DatabaseMigrationsSqlMi { > >; /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -72,7 +72,7 @@ export interface DatabaseMigrationsSqlMi { options?: DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams ): Promise; /** - * Stop migrations in progress for the database + * Stop in-progress database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -88,7 +88,7 @@ export interface DatabaseMigrationsSqlMi { options?: DatabaseMigrationsSqlMiCancelOptionalParams ): Promise, void>>; /** - * Stop migrations in progress for the database + * Stop in-progress database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -104,7 +104,7 @@ export interface DatabaseMigrationsSqlMi { options?: DatabaseMigrationsSqlMiCancelOptionalParams ): Promise; /** - * Initiate cutover for online migration in progress for the database. + * Initiate cutover for in-progress online database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName @@ -120,7 +120,7 @@ export interface DatabaseMigrationsSqlMi { options?: DatabaseMigrationsSqlMiCutoverOptionalParams ): Promise, void>>; /** - * Initiate cutover for online migration in progress for the database. + * Initiate cutover for in-progress online database migration to SQL Managed Instance. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param managedInstanceName diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlVm.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlVm.ts index e2caa5cbd00c..732c62005d3b 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlVm.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/databaseMigrationsSqlVm.ts @@ -21,7 +21,7 @@ import { /** Interface representing a DatabaseMigrationsSqlVm. */ export interface DatabaseMigrationsSqlVm { /** - * Retrieve the Database Migration resource. + * Retrieve the specified database migration for a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -35,7 +35,7 @@ export interface DatabaseMigrationsSqlVm { options?: DatabaseMigrationsSqlVmGetOptionalParams ): Promise; /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -56,7 +56,7 @@ export interface DatabaseMigrationsSqlVm { > >; /** - * Create or Update Database Migration resource. + * Create a new database migration to a given SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -72,7 +72,7 @@ export interface DatabaseMigrationsSqlVm { options?: DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams ): Promise; /** - * Stop ongoing migration for the database. + * Stop in-progress database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -88,7 +88,7 @@ export interface DatabaseMigrationsSqlVm { options?: DatabaseMigrationsSqlVmCancelOptionalParams ): Promise, void>>; /** - * Stop ongoing migration for the database. + * Stop in-progress database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -104,7 +104,7 @@ export interface DatabaseMigrationsSqlVm { options?: DatabaseMigrationsSqlVmCancelOptionalParams ): Promise; /** - * Cutover online migration operation for the database. + * Initiate cutover for in-progress online database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName @@ -120,7 +120,7 @@ export interface DatabaseMigrationsSqlVm { options?: DatabaseMigrationsSqlVmCutoverOptionalParams ): Promise, void>>; /** - * Cutover online migration operation for the database. + * Initiate cutover for in-progress online database migration to SQL VM. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlVirtualMachineName diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/index.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/index.ts index cfb4920408d2..ad06cc11346b 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/index.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./databaseMigrationsSqlDb"; export * from "./databaseMigrationsSqlMi"; export * from "./databaseMigrationsSqlVm"; export * from "./operations"; diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/sqlMigrationServices.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/sqlMigrationServices.ts index 57daeb82095f..1f1046e125c7 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/sqlMigrationServices.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/sqlMigrationServices.ts @@ -67,7 +67,7 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesListBySubscriptionOptionalParams ): PagedAsyncIterableIterator; /** - * Retrieve the Migration Service. + * Retrieve the Database Migration Service * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -79,7 +79,7 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesGetOptionalParams ): Promise; /** - * Create or Update SQL Migration Service. + * Create or Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -98,7 +98,7 @@ export interface SqlMigrationServices { > >; /** - * Create or Update SQL Migration Service. + * Create or Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -112,7 +112,7 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesCreateOrUpdateOptionalParams ): Promise; /** - * Delete SQL Migration Service. + * Delete Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -124,7 +124,7 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesDeleteOptionalParams ): Promise, void>>; /** - * Delete SQL Migration Service. + * Delete Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -136,7 +136,7 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesDeleteOptionalParams ): Promise; /** - * Update SQL Migration Service. + * Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -155,7 +155,7 @@ export interface SqlMigrationServices { > >; /** - * Update SQL Migration Service. + * Update Database Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. @@ -209,7 +209,8 @@ export interface SqlMigrationServices { options?: SqlMigrationServicesDeleteNodeOptionalParams ): Promise; /** - * Retrieve the Monitoring Data. + * Retrieve the registered Integration Runtime nodes and their monitoring data for a given Database + * Migration Service. * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this * value from the Azure Resource Manager API or the portal. * @param sqlMigrationServiceName Name of the SQL Migration Service. diff --git a/sdk/datamigration/arm-datamigration/tsconfig.json b/sdk/datamigration/arm-datamigration/tsconfig.json index cdd6536f04f7..3e6ae96443f3 100644 --- a/sdk/datamigration/arm-datamigration/tsconfig.json +++ b/sdk/datamigration/arm-datamigration/tsconfig.json @@ -9,12 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { "@azure/arm-datamigration": ["./src/index"] } + "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/datamigration/ci.mgmt.yml b/sdk/datamigration/ci.mgmt.yml index 84f05594422a..e6f594d3e3f5 100644 --- a/sdk/datamigration/ci.mgmt.yml +++ b/sdk/datamigration/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/datamigration/ci.mgmt.yml - sdk/datamigration/arm-datamigration/ + - sdk/datamigration/arm-datamigration pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/datamigration/ci.mgmt.yml - sdk/datamigration/arm-datamigration/ - + - sdk/datamigration/arm-datamigration extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: datamigration Artifacts: - name: azure-arm-datamigration - safeName: azurearmdatamigration \ No newline at end of file + safeName: azurearmdatamigration