diff --git a/sdk/datamigration/arm-datamigration/CHANGELOG.md b/sdk/datamigration/arm-datamigration/CHANGELOG.md index cd7c80b52d03..ec8b9a654624 100644 --- a/sdk/datamigration/arm-datamigration/CHANGELOG.md +++ b/sdk/datamigration/arm-datamigration/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 3.0.0-beta.4 (2023-02-09) -## 3.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.0.0-beta.3 (2022-11-21) - -The package of @azure/arm-datamigration is using our next generation design principles since version 3.0.0-beta.3, which contains breaking changes. +The package of @azure/arm-datamigration is using our next generation design principles since version 3.0.0-beta.4, 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/LICENSE b/sdk/datamigration/arm-datamigration/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/datamigration/arm-datamigration/LICENSE +++ b/sdk/datamigration/arm-datamigration/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/datamigration/arm-datamigration/_meta.json b/sdk/datamigration/arm-datamigration/_meta.json index 4b5427e40097..7d8da7af6b44 100644 --- a/sdk/datamigration/arm-datamigration/_meta.json +++ b/sdk/datamigration/arm-datamigration/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d", - "readme": "specification\\datamigration\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datamigration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "4fead4be3528d4f65f2f5b9c46e78875bc02516f", + "readme": "specification/datamigration/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/datamigration/arm-datamigration/package.json b/sdk/datamigration/arm-datamigration/package.json index 466ada14027b..016b4643d47f 100644 --- a/sdk/datamigration/arm-datamigration/package.json +++ b/sdk/datamigration/arm-datamigration/package.json @@ -110,13 +110,5 @@ } ] }, - "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 975f753667b6..519753360964 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; } @@ -294,6 +296,7 @@ export type ConnectToSourceSqlServerTaskOutputUnion = ConnectToSourceSqlServerTa export interface ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { input?: ConnectToSourceSqlServerTaskInput; readonly output?: ConnectToSourceSqlServerTaskOutputUnion[]; + taskId?: string; taskType: "ConnectToSource.SqlServer"; } @@ -386,6 +389,7 @@ export interface ConnectToTargetSqlDbSyncTaskProperties extends ProjectTaskPrope // @public export interface ConnectToTargetSqlDbTaskInput { + queryObjectCounts?: boolean; targetConnectionInfo: SqlConnectionInfo; } @@ -399,6 +403,7 @@ export interface ConnectToTargetSqlDbTaskOutput { // @public export interface ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { + createdOn?: string; input?: ConnectToTargetSqlDbTaskInput; readonly output?: ConnectToTargetSqlDbTaskOutput[]; taskType: "ConnectToTarget.SqlDb"; @@ -449,6 +454,21 @@ export interface ConnectToTargetSqlMITaskProperties extends ProjectTaskPropertie taskType: "ConnectToTarget.AzureSqlDbMI"; } +// @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,16 +551,28 @@ export interface DatabaseMigrationListResult { // @public export interface DatabaseMigrationProperties { readonly endedOn?: Date; - kind: "SqlMi" | "SqlVm"; + kind: "SqlDb" | "SqlMi" | "SqlVm"; readonly migrationFailureError?: ErrorInfo; migrationOperationId?: string; migrationService?: string; readonly migrationStatus?: string; + provisioningError?: string; readonly provisioningState?: string; scope?: string; sourceDatabaseName?: string; + readonly sourceServerName?: string; sourceSqlConnection?: SqlConnectionInformation; readonly startedOn?: Date; + targetDatabaseCollation?: string; +} + +// @public +export interface DatabaseMigrationPropertiesSqlDb extends DatabaseMigrationProperties { + kind: "SqlDb"; + readonly migrationStatusDetails?: SqlDbMigrationStatusDetails; + readonly offlineConfiguration?: SqlDbOfflineConfiguration; + tableList?: string[]; + targetSqlConnection?: SqlConnectionInformation; } // @public @@ -549,8 +581,6 @@ export interface DatabaseMigrationPropertiesSqlMi extends DatabaseMigrationPrope kind: "SqlMi"; readonly migrationStatusDetails?: MigrationStatusDetails; offlineConfiguration?: OfflineConfiguration; - provisioningError?: string; - targetDatabaseCollation?: string; } // @public @@ -559,12 +589,16 @@ export interface DatabaseMigrationPropertiesSqlVm extends DatabaseMigrationPrope kind: "SqlVm"; readonly migrationStatusDetails?: MigrationStatusDetails; offlineConfiguration?: OfflineConfiguration; - provisioningError?: string; - targetDatabaseCollation?: string; } // @public (undocumented) -export type DatabaseMigrationPropertiesUnion = DatabaseMigrationProperties | DatabaseMigrationPropertiesSqlMi | DatabaseMigrationPropertiesSqlVm; +export type DatabaseMigrationPropertiesUnion = DatabaseMigrationProperties | DatabaseMigrationPropertiesSqlDb | DatabaseMigrationPropertiesSqlMi | DatabaseMigrationPropertiesSqlVm; + +// @public +export interface DatabaseMigrationSqlDb extends ProxyResource { + properties?: DatabaseMigrationPropertiesSqlDb; + readonly systemData?: SystemData; +} // @public export interface DatabaseMigrationSqlMi extends ProxyResource { @@ -578,6 +612,48 @@ export interface DatabaseMigrationSqlVm extends ProxyResource { readonly systemData?: SystemData; } +// @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 +799,8 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + databaseMigrationsSqlDb: DatabaseMigrationsSqlDb; + // (undocumented) databaseMigrationsSqlMi: DatabaseMigrationsSqlMi; // (undocumented) databaseMigrationsSqlVm: DatabaseMigrationsSqlVm; @@ -791,6 +869,7 @@ export interface DataMigrationServiceList { // @public export interface DataMigrationServiceStatusResponse { + agentConfiguration?: Record; agentVersion?: string; status?: string; supportedTaskTypes?: string[]; @@ -1025,6 +1104,7 @@ export interface GetUserTablesSqlSyncTaskProperties extends ProjectTaskPropertie // @public export interface GetUserTablesSqlTaskInput { connectionInfo: SqlConnectionInfo; + encryptedKeyForSecureFields?: string; selectedDatabases: string[]; } @@ -1039,6 +1119,7 @@ export interface GetUserTablesSqlTaskOutput { export interface GetUserTablesSqlTaskProperties extends ProjectTaskProperties { input?: GetUserTablesSqlTaskInput; readonly output?: GetUserTablesSqlTaskOutput[]; + taskId?: string; taskType: "GetUserTables.Sql"; } @@ -1383,6 +1464,7 @@ export enum KnownResourceSkuRestrictionsType { // @public export enum KnownResourceType { + SqlDb = "SqlDb", SqlMi = "SqlMi", SqlVm = "SqlVm" } @@ -1632,6 +1714,7 @@ export interface MigrateMySqlAzureDbForMySqlOfflineDatabaseInput { // @public export interface MigrateMySqlAzureDbForMySqlOfflineTaskInput { + encryptedKeyForSecureFields?: string; makeSourceServerReadOnly?: boolean; optionalAgentSettings?: { [propertyName: string]: string; @@ -1715,7 +1798,9 @@ export type MigrateMySqlAzureDbForMySqlOfflineTaskOutputUnion = MigrateMySqlAzur // @public export interface MigrateMySqlAzureDbForMySqlOfflineTaskProperties extends ProjectTaskProperties { input?: MigrateMySqlAzureDbForMySqlOfflineTaskInput; + isCloneable?: boolean; readonly output?: MigrateMySqlAzureDbForMySqlOfflineTaskOutputUnion[]; + taskId?: string; taskType: "Migrate.MySql.AzureDbForMySql"; } @@ -1929,8 +2014,9 @@ export type MigrateOracleAzureDbPostgreSqlSyncTaskOutputUnion = MigrateOracleAzu // @public export interface MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { + readonly id?: string; migrationSetting?: { - [propertyName: string]: string; + [propertyName: string]: any; }; name?: string; selectedTables?: MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput[]; @@ -1953,6 +2039,7 @@ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { encryptedKeyForSecureFields?: string; selectedDatabases: MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput[]; sourceConnectionInfo: PostgreSqlConnectionInfo; + readonly startedOn?: Date; targetConnectionInfo: PostgreSqlConnectionInfo; } @@ -2036,6 +2123,7 @@ export type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion = MigratePo export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { createdOn?: string; input?: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput; + isCloneable?: boolean; readonly output?: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion[]; taskId?: string; taskType: "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2"; @@ -2103,6 +2191,7 @@ export type MigrateSchemaSqlServerSqlDbTaskOutputUnion = MigrateSchemaSqlServerS export interface MigrateSchemaSqlServerSqlDbTaskProperties extends ProjectTaskProperties { createdOn?: string; input?: MigrateSchemaSqlServerSqlDbTaskInput; + isCloneable?: boolean; readonly output?: MigrateSchemaSqlServerSqlDbTaskOutputUnion[]; taskId?: string; taskType: "MigrateSchemaSqlServerSqlDb"; @@ -2327,6 +2416,7 @@ export interface MigrateSqlServerSqlDbTaskOutputValidationResult extends Migrate // @public export interface MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { + createdOn?: string; input?: MigrateSqlServerSqlDbTaskInput; isCloneable?: boolean; readonly output?: MigrateSqlServerSqlDbTaskOutputUnion[]; @@ -2345,6 +2435,7 @@ export interface MigrateSqlServerSqlMIDatabaseInput { // @public export interface MigrateSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { + numberOfParallelDatabaseMigrations?: number; } // @public @@ -2396,6 +2487,7 @@ export type MigrateSqlServerSqlMISyncTaskOutputUnion = MigrateSqlServerSqlMISync // @public export interface MigrateSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { + createdOn?: string; input?: MigrateSqlServerSqlMISyncTaskInput; readonly output?: MigrateSqlServerSqlMISyncTaskOutputUnion[]; taskType: "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS"; @@ -2407,6 +2499,7 @@ export interface MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { backupBlobShare: BlobShare; backupFileShare?: FileShare; backupMode?: BackupMode; + encryptedKeyForSecureFields?: string; selectedAgentJobs?: string[]; selectedDatabases: MigrateSqlServerSqlMIDatabaseInput[]; selectedLogins?: string[]; @@ -2487,8 +2580,11 @@ export type MigrateSqlServerSqlMITaskOutputUnion = MigrateSqlServerSqlMITaskOutp // @public export interface MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { + createdOn?: string; input?: MigrateSqlServerSqlMITaskInput; + isCloneable?: boolean; readonly output?: MigrateSqlServerSqlMITaskOutputUnion[]; + parentTaskId?: string; taskId?: string; taskType: "Migrate.SqlServer.AzureSqlDbMI"; } @@ -2556,6 +2652,7 @@ export interface MigrateSyncCompleteCommandOutput { // @public export interface MigrateSyncCompleteCommandProperties extends CommandProperties { + commandId?: string; commandType: "Migrate.Sync.Complete.Database"; input?: MigrateSyncCompleteCommandInput; readonly output?: MigrateSyncCompleteCommandOutput; @@ -2703,6 +2800,7 @@ export interface MongoDbCommandInput { // @public export interface MongoDbConnectionInfo extends ConnectionInfo { additionalSettings?: string; + authentication?: AuthenticationType; connectionString: string; dataSource?: string; encryptConnection?: boolean; @@ -2710,6 +2808,9 @@ export interface MongoDbConnectionInfo extends ConnectionInfo { enforceSSL?: boolean; port?: number; serverBrandVersion?: string; + serverName?: string; + serverVersion?: string; + trustServerCertificate?: boolean; type: "MongoDbConnectionInfo"; } @@ -2843,7 +2944,7 @@ export type MongoDbShardKeyOrder = string; // @public export interface MongoDbShardKeySetting { fields: MongoDbShardKeyField[]; - isUnique: boolean; + isUnique?: boolean; } // @public @@ -2855,6 +2956,8 @@ export interface MongoDbThrottlingSettings { // @public export interface MySqlConnectionInfo extends ConnectionInfo { + additionalSettings?: string; + authentication?: AuthenticationType; dataSource?: string; encryptConnection?: boolean; port: number; @@ -2998,7 +3101,11 @@ export type OperationsListResponse = OperationListResult; // @public export interface OracleConnectionInfo extends ConnectionInfo { + authentication?: AuthenticationType; dataSource: string; + port?: number; + serverName?: string; + serverVersion?: string; type: "OracleConnectionInfo"; } @@ -3020,10 +3127,13 @@ export interface OrphanedUserInfo { // @public export interface PostgreSqlConnectionInfo extends ConnectionInfo { + additionalSettings?: string; + authentication?: AuthenticationType; databaseName?: string; dataSource?: string; encryptConnection?: boolean; port: number; + serverBrandVersion?: string; serverName: string; serverVersion?: string; trustServerCertificate?: boolean; @@ -3032,10 +3142,10 @@ export interface PostgreSqlConnectionInfo extends ConnectionInfo { // @public export interface Project extends TrackedResource { - azureAuthenticationInfo?: string; + azureAuthenticationInfo?: AzureActiveDirectoryApp; readonly creationTime?: Date; databasesInfo?: DatabaseInfo[]; - eTag?: string; + etag?: string; readonly provisioningState?: ProjectProvisioningState; sourceConnectionInfo?: ConnectionInfoUnion; sourcePlatform?: ProjectSourcePlatform; @@ -3339,7 +3449,7 @@ export interface SelectedCertificateInput { } // @public -export type ServerLevelPermissionsGroup = "Default" | "MigrationFromSqlServerToAzureDB" | "MigrationFromSqlServerToAzureMI" | "MigrationFromMySQLToAzureDBForMySQL"; +export type ServerLevelPermissionsGroup = "Default" | "MigrationFromSqlServerToAzureDB" | "MigrationFromSqlServerToAzureMI" | "MigrationFromMySQLToAzureDBForMySQL" | "MigrationFromSqlServerToAzureVM"; // @public export interface ServerProperties { @@ -3559,7 +3669,6 @@ export type ServiceTasksGetResponse = ProjectTask; // @public export interface ServiceTasksListNextOptionalParams extends coreClient.OperationOptions { - taskType?: string; } // @public @@ -3587,6 +3696,7 @@ export type Severity = string; export interface SourceLocation { azureBlob?: AzureBlob; fileShare?: SqlFileShare; + readonly fileStorageType?: string; } // @public @@ -3623,9 +3733,11 @@ export interface SqlConnectionInfo extends ConnectionInfo { dataSource: string; encryptConnection?: boolean; platform?: SqlSourcePlatform; - port?: string; + port?: number; resourceId?: string; + serverBrandVersion?: string; serverName?: string; + serverVersion?: string; trustServerCertificate?: boolean; type: "SqlConnectionInfo"; } @@ -3640,6 +3752,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; @@ -3915,7 +4039,6 @@ export type TasksGetResponse = ProjectTask; // @public export interface TasksListNextOptionalParams extends coreClient.OperationOptions { - taskType?: string; } // @public diff --git a/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts b/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts index 043d5e1244f0..87bc81f0076c 100644 --- a/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts +++ b/sdk/datamigration/arm-datamigration/src/dataMigrationManagementClient.ts @@ -15,6 +15,7 @@ import { } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + DatabaseMigrationsSqlDbImpl, DatabaseMigrationsSqlMiImpl, DatabaseMigrationsSqlVmImpl, OperationsImpl, @@ -28,6 +29,7 @@ import { FilesImpl } from "./operations"; import { + DatabaseMigrationsSqlDb, DatabaseMigrationsSqlMi, DatabaseMigrationsSqlVm, Operations, @@ -127,7 +129,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); @@ -170,6 +173,7 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } + 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 40c4f0b51191..167f574dd006 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,191 @@ 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; + /** Database collation to be used for the target database. */ + targetDatabaseCollation?: string; + /** Error message for migration provisioning failure, if any. */ + provisioningError?: string; +} + +/** 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 +524,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 */ @@ -346,7 +537,10 @@ export interface SqlFileShare { path?: string; /** Username to access the file share location for backups. */ username?: string; - /** Password for username to access file share location. */ + /** + * Password for username to access file share location. + * This value contains a credential. Consider obscuring before showing to users + */ password?: string; } @@ -376,92 +570,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. */ @@ -623,15 +731,15 @@ export interface NodeMonitoringData { readonly receivedBytes?: number; } -/** The DMS List SKUs operation response. */ +/** The DMS (classic) List SKUs operation response. */ export interface ResourceSkusResult { /** The list of SKUs available for the subscription. */ value: ResourceSku[]; - /** The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the next page of DMS SKUs. */ + /** The uri to fetch the next page of DMS (classic) SKUs. Call ListNext() with this to fetch the next page of DMS (classic) SKUs. */ nextLink?: string; } -/** Describes an available DMS SKU. */ +/** Describes an available DMS (classic) SKU. */ export interface ResourceSku { /** * The type of resource the SKU applies to. @@ -644,7 +752,7 @@ export interface ResourceSku { */ readonly name?: string; /** - * Specifies the tier of DMS in a scale set. + * Specifies the tier of DMS (classic) in a scale set. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tier?: string; @@ -810,6 +918,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' */ @@ -868,7 +978,7 @@ export interface TaskList { nextLink?: string; } -/** Base class for all types of DMS task properties. If task is not supported by current client, this object is returned. */ +/** Base class for all types of DMS (classic) task properties. If task is not supported by current client, this object is returned. */ export interface ProjectTaskProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ taskType: @@ -929,7 +1039,7 @@ export interface ProjectTaskProperties { clientData?: { [propertyName: string]: string }; } -/** Base class for all types of DMS command properties. If command is not supported by current client, this object is returned. */ +/** Base class for all types of DMS (classic) command properties. If command is not supported by current client, this object is returned. */ export interface CommandProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ commandType: @@ -1003,6 +1113,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 +1263,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 +1333,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 +1462,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 */ @@ -1378,7 +1494,7 @@ export interface ConnectToTargetSqlDbTaskOutput { export interface ConnectToTargetSqlMISyncTaskInput { /** Connection information for Azure SQL Database Managed Instance */ targetConnectionInfo: MiSqlConnectionInfo; - /** Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account */ + /** Azure Active Directory Application the DMS (classic) instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account */ azureApp: AzureActiveDirectoryApp; } @@ -1617,6 +1733,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 +1872,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 */ @@ -2142,7 +2270,7 @@ export interface SqlServerSqlMISyncTaskInput { sourceConnectionInfo: SqlConnectionInfo; /** Connection information for Azure SQL Database Managed Instance */ targetConnectionInfo: MiSqlConnectionInfo; - /** Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account */ + /** Azure Active Directory Application the DMS (classic) instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account */ azureApp: AzureActiveDirectoryApp; } @@ -2174,7 +2302,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. */ @@ -2195,7 +2323,7 @@ export interface MigrateSqlServerSqlMITaskOutput { /** SSIS migration info with SSIS store type, overwrite policy. */ export interface SsisMigrationInfo { - /** The SSIS store type of source, only SSIS catalog is supported now in DMS */ + /** The SSIS store type of source, only SSIS catalog is supported now in DMS (classic) */ ssisStoreType?: SsisStoreType; /** The overwrite option for the SSIS project migration */ projectOverwriteOption?: SsisMigrationOverwriteOption; @@ -2320,7 +2448,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 */ @@ -2619,7 +2747,7 @@ export interface InstallOCIDriverTaskOutput { readonly validationErrors?: ReportableException[]; } -/** Description of an action supported by the Database Migration Service */ +/** Description of an action supported by the Azure Database Migration Service (classic) */ export interface ServiceOperation { /** The fully qualified action name, e.g. Microsoft.DataMigration/services/read */ name?: string; @@ -2724,6 +2852,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 +3316,27 @@ export interface StartMigrationScenarioServerRoleResult { readonly exceptionsAndWarnings?: ReportableException[]; } +/** Database Migration Resource properties for SQL database. */ +export interface DatabaseMigrationPropertiesSqlDb + extends 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 Migration Resource properties for SQL Managed Instance. */ export interface DatabaseMigrationPropertiesSqlMi extends DatabaseMigrationProperties { @@ -3196,10 +3347,6 @@ export interface DatabaseMigrationPropertiesSqlMi * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly migrationStatusDetails?: MigrationStatusDetails; - /** Database collation to be used for the target database. */ - targetDatabaseCollation?: string; - /** Error message for migration provisioning failure, if any. */ - provisioningError?: string; /** Backup configuration info. */ backupConfiguration?: BackupConfiguration; /** Offline configuration. */ @@ -3216,16 +3363,23 @@ export interface DatabaseMigrationPropertiesSqlVm * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly migrationStatusDetails?: MigrationStatusDetails; - /** Database collation to be used for the target database. */ - targetDatabaseCollation?: string; - /** Error message for migration provisioning failure, if any. */ - provisioningError?: string; /** Backup configuration info. */ backupConfiguration?: BackupConfiguration; /** Offline configuration. */ offlineConfiguration?: OfflineConfiguration; } +/** Database Migration Resource for SQL Database. */ +export interface DatabaseMigrationSqlDb extends 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 interface DatabaseMigrationSqlMi extends ProxyResource { /** @@ -3273,7 +3427,7 @@ export interface SqlMigrationService extends TrackedResource { readonly integrationRuntimeState?: string; } -/** A Database Migration Service resource */ +/** An Azure Database Migration Service (classic) resource */ export interface DataMigrationService extends TrackedResource { /** HTTP strong entity tag value. Ignored if submitted */ etag?: string; @@ -3301,11 +3455,11 @@ export interface DataMigrationService extends TrackedResource { /** A project resource */ export interface Project extends 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; /** @@ -3342,6 +3496,8 @@ export interface MigrateSchemaSqlServerSqlDbTaskProperties 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. */ @@ -3408,6 +3564,8 @@ export interface ConnectToSourceSqlServerTaskProperties * 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 */ @@ -3478,6 +3636,8 @@ export interface ConnectToTargetSqlDbTaskProperties * 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 */ @@ -3533,6 +3693,8 @@ export interface GetUserTablesSqlTaskProperties extends 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 */ @@ -3657,6 +3819,12 @@ export interface MigrateSqlServerSqlMITaskProperties 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 */ @@ -3671,6 +3839,8 @@ export interface MigrateSqlServerSqlMISyncTaskProperties * 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 */ @@ -3689,6 +3859,8 @@ export interface MigrateSqlServerSqlDbTaskProperties 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 */ @@ -3731,6 +3903,10 @@ export interface MigrateMySqlAzureDbForMySqlOfflineTaskProperties * 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 */ @@ -3749,6 +3925,8 @@ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties 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 */ @@ -3873,6 +4051,8 @@ export interface MigrateSyncCompleteCommandProperties * 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. */ @@ -3951,11 +4131,19 @@ export interface MongoDbConnectionInfo extends 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 */ @@ -3966,8 +4154,12 @@ export interface SqlConnectionInfo extends 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 */ @@ -3994,6 +4186,10 @@ export interface MySqlConnectionInfo extends 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 */ @@ -4002,6 +4198,14 @@ export interface OracleConnectionInfo extends 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 */ @@ -4022,6 +4226,12 @@ export interface PostgreSqlConnectionInfo extends 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 */ @@ -4234,6 +4444,8 @@ export interface MigrateSqlServerSqlMITaskInput extends 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. */ @@ -5255,7 +5467,10 @@ export interface DatabaseSummaryResult extends DataItemMigrationSummaryResult { /** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ export interface MigrateSqlServerSqlMISyncTaskInput - extends SqlServerSqlMISyncTaskInput {} + extends 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 interface ValidateMigrationInputSqlServerSqlMISyncTaskInput @@ -6231,7 +6446,9 @@ export enum KnownResourceType { /** SqlMi */ SqlMi = "SqlMi", /** SqlVm */ - SqlVm = "SqlVm" + SqlVm = "SqlVm", + /** SqlDb */ + SqlDb = "SqlDb" } /** @@ -6240,7 +6457,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; @@ -7784,14 +8002,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; } @@ -7833,7 +8096,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; } @@ -8185,10 +8448,7 @@ export type TasksCommandResponse = CommandPropertiesUnion; /** Optional parameters. */ export interface TasksListNextOptionalParams - extends coreClient.OperationOptions { - /** Filter tasks by task type */ - taskType?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type TasksListNextResponse = TaskList; @@ -8243,10 +8503,7 @@ export type ServiceTasksCancelResponse = ProjectTask; /** Optional parameters. */ export interface ServiceTasksListNextOptionalParams - extends coreClient.OperationOptions { - /** Filter tasks by task type */ - taskType?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ServiceTasksListNextResponse = TaskList; diff --git a/sdk/datamigration/arm-datamigration/src/models/mappers.ts b/sdk/datamigration/arm-datamigration/src/models/mappers.ts index fdcb6b5f5a0d..fde698f70ab3 100644 --- a/sdk/datamigration/arm-datamigration/src/models/mappers.ts +++ b/sdk/datamigration/arm-datamigration/src/models/mappers.ts @@ -53,6 +53,368 @@ 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" + } + }, + targetDatabaseCollation: { + serializedName: "targetDatabaseCollation", + type: { + name: "String" + } + }, + provisioningError: { + serializedName: "provisioningError", + type: { + name: "String" + } + } + } + } +}; + +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", @@ -337,289 +699,99 @@ export const BackupConfiguration: coreClient.CompositeMapper = { 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", - type: { - name: "Composite", - className: "SqlConnectionInformation" - } - }, - sourceDatabaseName: { - serializedName: "sourceDatabaseName", - type: { - name: "String" - } - }, - migrationService: { - serializedName: "migrationService", - type: { - name: "String" - } - }, - migrationOperationId: { - serializedName: "migrationOperationId", + 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 +800,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 +821,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 +1631,13 @@ export const DataMigrationServiceStatusResponse: coreClient.CompositeMapper = { name: "String" } }, + agentConfiguration: { + serializedName: "agentConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, status: { serializedName: "status", type: { @@ -1872,6 +2048,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 +2441,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 +2590,8 @@ export const ConnectToSourceMySqlTaskInput: coreClient.CompositeMapper = { "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", - "MigrationFromMySQLToAzureDBForMySQL" + "MigrationFromMySQLToAzureDBForMySQL", + "MigrationFromSqlServerToAzureVM" ] } }, @@ -2446,7 +2626,8 @@ export const ConnectToSourceSqlServerTaskInput: coreClient.CompositeMapper = { "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", - "MigrationFromMySQLToAzureDBForMySQL" + "MigrationFromMySQLToAzureDBForMySQL", + "MigrationFromSqlServerToAzureVM" ] } }, @@ -2484,6 +2665,12 @@ export const ConnectToSourceSqlServerTaskInput: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -2763,6 +2950,12 @@ export const ConnectToTargetSqlDbTaskInput: coreClient.CompositeMapper = { name: "Composite", className: "SqlConnectionInfo" } + }, + queryObjectCounts: { + serializedName: "queryObjectCounts", + type: { + name: "Boolean" + } } } } @@ -3385,6 +3578,12 @@ export const GetUserTablesSqlTaskInput: coreClient.CompositeMapper = { } } } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -3719,6 +3918,13 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput: coreClient.Comp type: { name: "String" } + }, + startedOn: { + serializedName: "startedOn", + readOnly: true, + type: { + name: "DateTime" + } } } } @@ -3735,6 +3941,13 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput: coreClient. name: "String" } }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, targetDatabaseName: { serializedName: "targetDatabaseName", type: { @@ -3745,7 +3958,7 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput: coreClient. serializedName: "migrationSetting", type: { name: "Dictionary", - value: { type: { name: "String" } } + value: { type: { name: "any" } } } }, sourceSetting: { @@ -4669,7 +4882,6 @@ export const BlobShare: coreClient.CompositeMapper = { modelProperties: { sasUri: { serializedName: "sasUri", - required: true, type: { name: "String" } @@ -5105,7 +5317,6 @@ export const MongoDbShardKeySetting: coreClient.CompositeMapper = { }, isUnique: { serializedName: "isUnique", - required: true, type: { name: "Boolean" } @@ -6094,6 +6305,12 @@ export const MigrateMySqlAzureDbForMySqlOfflineTaskInput: coreClient.CompositeMa name: "Dictionary", value: { type: { name: "String" } } } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -7056,31 +7273,77 @@ export const DatabaseFileInput: coreClient.CompositeMapper = { export const StartMigrationScenarioServerRoleResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StartMigrationScenarioServerRoleResult", + className: "StartMigrationScenarioServerRoleResult", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + serializedName: "exceptionsAndWarnings", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const DatabaseMigrationPropertiesSqlDb: coreClient.CompositeMapper = { + serializedName: "SqlDb", + type: { + name: "Composite", + className: "DatabaseMigrationPropertiesSqlDb", + uberParent: "DatabaseMigrationProperties", + polymorphicDiscriminator: + DatabaseMigrationProperties.type.polymorphicDiscriminator, modelProperties: { - name: { - serializedName: "name", - readOnly: true, + ...DatabaseMigrationProperties.type.modelProperties, + migrationStatusDetails: { + serializedName: "migrationStatusDetails", type: { - name: "String" + name: "Composite", + className: "SqlDbMigrationStatusDetails" } }, - state: { - serializedName: "state", - readOnly: true, + targetSqlConnection: { + serializedName: "targetSqlConnection", type: { - name: "String" + name: "Composite", + className: "SqlConnectionInformation" } }, - exceptionsAndWarnings: { - serializedName: "exceptionsAndWarnings", - readOnly: true, + offlineConfiguration: { + serializedName: "offlineConfiguration", + type: { + name: "Composite", + className: "SqlDbOfflineConfiguration" + } + }, + tableList: { + serializedName: "tableList", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ReportableException" + name: "String" } } } @@ -7106,18 +7369,6 @@ export const DatabaseMigrationPropertiesSqlMi: coreClient.CompositeMapper = { className: "MigrationStatusDetails" } }, - targetDatabaseCollation: { - serializedName: "targetDatabaseCollation", - type: { - name: "String" - } - }, - provisioningError: { - serializedName: "provisioningError", - type: { - name: "String" - } - }, backupConfiguration: { serializedName: "backupConfiguration", type: { @@ -7153,18 +7404,6 @@ export const DatabaseMigrationPropertiesSqlVm: coreClient.CompositeMapper = { className: "MigrationStatusDetails" } }, - targetDatabaseCollation: { - serializedName: "targetDatabaseCollation", - type: { - name: "String" - } - }, - provisioningError: { - serializedName: "provisioningError", - type: { - name: "String" - } - }, backupConfiguration: { serializedName: "backupConfiguration", type: { @@ -7183,6 +7422,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 +7614,8 @@ export const Project: coreClient.CompositeMapper = { className: "Project", modelProperties: { ...TrackedResource.type.modelProperties, - eTag: { - serializedName: "eTag", + etag: { + serializedName: "etag", type: { name: "String" } @@ -7366,7 +7629,8 @@ export const Project: coreClient.CompositeMapper = { azureAuthenticationInfo: { serializedName: "properties.azureAuthenticationInfo", type: { - name: "String" + name: "Composite", + className: "AzureActiveDirectoryApp" } }, targetPlatform: { @@ -7460,6 +7724,12 @@ export const MigrateSchemaSqlServerSqlDbTaskProperties: coreClient.CompositeMapp type: { name: "String" } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } } } } @@ -7630,6 +7900,12 @@ export const ConnectToSourceSqlServerTaskProperties: coreClient.CompositeMapper } } } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -7800,6 +8076,12 @@ export const ConnectToTargetSqlDbTaskProperties: coreClient.CompositeMapper = { } } } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -7937,6 +8219,12 @@ export const GetUserTablesSqlTaskProperties: coreClient.CompositeMapper = { } } } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -8249,6 +8537,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 +8589,12 @@ export const MigrateSqlServerSqlMISyncTaskProperties: coreClient.CompositeMapper } } } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -8329,6 +8641,12 @@ export const MigrateSqlServerSqlDbTaskProperties: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + createdOn: { + serializedName: "createdOn", + type: { + name: "String" + } } } } @@ -8431,6 +8749,18 @@ export const MigrateMySqlAzureDbForMySqlOfflineTaskProperties: coreClient.Compos } } } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } + }, + taskId: { + serializedName: "taskId", + type: { + name: "String" + } } } } @@ -8477,6 +8807,12 @@ export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: coreClient type: { name: "String" } + }, + isCloneable: { + serializedName: "isCloneable", + type: { + name: "Boolean" + } } } } @@ -8776,6 +9112,12 @@ export const MigrateSyncCompleteCommandProperties: coreClient.CompositeMapper = name: "Composite", className: "MigrateSyncCompleteCommandOutput" } + }, + commandId: { + serializedName: "commandId", + type: { + name: "String" + } } } } @@ -8962,6 +9304,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 +9340,12 @@ export const MongoDbConnectionInfo: coreClient.CompositeMapper = { type: { name: "String" } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } } } } @@ -9008,6 +9375,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 +9468,18 @@ export const MySqlConnectionInfo: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } + }, + additionalSettings: { + serializedName: "additionalSettings", + type: { + name: "String" + } } } } @@ -9109,6 +9500,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 +9583,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 +10047,12 @@ export const MigrateSqlServerSqlMITaskInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + encryptedKeyForSecureFields: { + serializedName: "encryptedKeyForSecureFields", + type: { + name: "String" + } } } } @@ -11283,7 +11722,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 +13365,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..14af2c2197bf --- /dev/null +++ b/sdk/datamigration/arm-datamigration/src/operations/databaseMigrationsSqlDb.ts @@ -0,0 +1,445 @@ +/* + * 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 + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * 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 + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * 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 + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * 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 b627f531b69f..086a155fe424 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 @@ -136,7 +136,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 @@ -162,7 +162,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 @@ -236,7 +236,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 @@ -262,7 +262,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 @@ -336,7 +336,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 @@ -382,9 +382,9 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.resourceGroupName, - Parameters.managedInstanceName, Parameters.targetDbName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer @@ -408,14 +408,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", @@ -431,9 +431,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", @@ -449,9 +449,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 6135da2e5145..4cde28907d1e 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 @@ -136,7 +136,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 @@ -162,7 +162,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 @@ -236,7 +236,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 @@ -262,7 +262,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 @@ -336,7 +336,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 @@ -408,7 +408,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 90537e9a76cf..55dfb364c094 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/files.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/files.ts @@ -372,7 +372,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -421,7 +421,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -494,7 +494,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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/operations.ts b/sdk/datamigration/arm-datamigration/src/operations/operations.ts index d03bed58ab44..cf1ecef14ee9 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/operations.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/operations.ts @@ -139,7 +139,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/datamigration/arm-datamigration/src/operations/projects.ts b/sdk/datamigration/arm-datamigration/src/operations/projects.ts index 726bb34926a6..aac596588409 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/projects.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/projects.ts @@ -274,7 +274,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -344,7 +344,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -368,7 +368,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/resourceSkus.ts b/sdk/datamigration/arm-datamigration/src/operations/resourceSkus.ts index c9ac2ee3f77c..4113e95bbc6d 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/resourceSkus.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/resourceSkus.ts @@ -35,7 +35,7 @@ export class ResourceSkusImpl implements ResourceSkus { } /** - * The skus action returns the list of SKUs that DMS supports. + * The skus action returns the list of SKUs that DMS (classic) supports. * @param options The options parameters. */ public listSkus( @@ -89,7 +89,7 @@ export class ResourceSkusImpl implements ResourceSkus { } /** - * The skus action returns the list of SKUs that DMS supports. + * The skus action returns the list of SKUs that DMS (classic) supports. * @param options The options parameters. */ private _listSkus( @@ -144,7 +144,6 @@ const listSkusNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts b/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts index b5018e2050b0..84ebac300cd6 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/serviceTasks.ts @@ -44,9 +44,10 @@ export class ServiceTasksImpl implements ServiceTasks { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service level tasks owned by a service resource. Some tasks may have a - * status of Unknown, which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks + * may have a status of Unknown, which indicates that an error occurred while querying the status of + * that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -117,9 +118,10 @@ export class ServiceTasksImpl implements ServiceTasks { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service level tasks owned by a service resource. Some tasks may have a - * status of Unknown, which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks + * may have a status of Unknown, which indicates that an error occurred while querying the status of + * that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -137,8 +139,9 @@ export class ServiceTasksImpl implements ServiceTasks { /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The PUT method creates a new service task or updates an existing one, although since - * service tasks have no mutable custom properties, there is little reason to update an existing one. + * (classic) instance. The PUT method creates a new service task or updates an existing one, although + * since service tasks have no mutable custom properties, there is little reason to update an existing + * one. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -160,7 +163,7 @@ export class ServiceTasksImpl implements ServiceTasks { /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The GET method retrieves information about a service task. + * (classic) instance. The GET method retrieves information about a service task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -180,7 +183,7 @@ export class ServiceTasksImpl implements ServiceTasks { /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The DELETE method deletes a service task, canceling it first if it's running. + * (classic) instance. The DELETE method deletes a service task, canceling it first if it's running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -200,8 +203,8 @@ export class ServiceTasksImpl implements ServiceTasks { /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The PATCH method updates an existing service task, but since service tasks have no mutable - * custom properties, there is little reason to do so. + * (classic) instance. The PATCH method updates an existing service task, but since service tasks have + * no mutable custom properties, there is little reason to do so. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -223,7 +226,7 @@ export class ServiceTasksImpl implements ServiceTasks { /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. This method cancels a service task if it's currently queued or running. + * (classic) instance. This method cancels a service task if it's currently queued or running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -300,7 +303,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -370,7 +373,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -417,7 +420,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion, Parameters.taskType], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/services.ts b/sdk/datamigration/arm-datamigration/src/operations/services.ts index 7ca8ed7e9465..4437dc1e0b44 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/services.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/services.ts @@ -62,8 +62,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * skus action returns the list of SKUs that a service resource can be updated to. + * The services resource is the top-level resource that represents the Database Migration Service + * (classic). The skus action returns the list of SKUs that a service resource can be updated to. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -139,8 +139,8 @@ export class ServicesImpl implements Services { } /** - * The Services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a resource group. + * The Services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a resource group. * @param groupName Name of the resource group * @param options The options parameters. */ @@ -205,8 +205,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a subscription. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a subscription. * @param options The options parameters. */ public list( @@ -260,13 +260,13 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PUT method creates a new service or updates an existing one. When a service is updated, existing - * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which - * refers to a VM-based service, although other kinds may be added in the future. This method can - * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the - * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply - * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PUT method creates a new service or updates an existing one. When a service is + * updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single + * kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. + * This method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will + * reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState * property. * @param groupName Name of the resource group * @param serviceName Name of the service @@ -337,13 +337,13 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PUT method creates a new service or updates an existing one. When a service is updated, existing - * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which - * refers to a VM-based service, although other kinds may be added in the future. This method can - * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the - * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply - * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PUT method creates a new service or updates an existing one. When a service is + * updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single + * kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. + * This method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will + * reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState * property. * @param groupName Name of the resource group * @param serviceName Name of the service @@ -366,8 +366,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * GET method retrieves information about a service instance. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The GET method retrieves information about a service instance. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -384,8 +384,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * DELETE method deletes a service. Any running tasks will be canceled. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The DELETE method deletes a service. Any running tasks will be canceled. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -448,8 +448,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * DELETE method deletes a service. Any running tasks will be canceled. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The DELETE method deletes a service. Any running tasks will be canceled. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -464,10 +464,10 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PATCH method updates an existing service. This method can change the kind, SKU, and network of the - * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad - * Request ("ServiceIsBusy"). + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PATCH method updates an existing service. This method can change the kind, SKU, and + * network of the service, but if tasks are currently running (i.e. the service is busy), this will + * fail with 400 Bad Request ("ServiceIsBusy"). * @param groupName Name of the resource group * @param serviceName Name of the service * @param parameters Information about the service @@ -537,10 +537,10 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PATCH method updates an existing service. This method can change the kind, SKU, and network of the - * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad - * Request ("ServiceIsBusy"). + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PATCH method updates an existing service. This method can change the kind, SKU, and + * network of the service, but if tasks are currently running (i.e. the service is busy), this will + * fail with 400 Bad Request ("ServiceIsBusy"). * @param groupName Name of the resource group * @param serviceName Name of the service * @param parameters Information about the service @@ -562,8 +562,9 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action performs a health check and returns the status of the service and virtual machine size. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action performs a health check and returns the status of the service and virtual + * machine size. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -580,8 +581,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action starts the service and the service can be used for data migration. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action starts the service and the service can be used for data migration. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -644,8 +645,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action starts the service and the service can be used for data migration. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action starts the service and the service can be used for data migration. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -660,9 +661,9 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action stops the service and the service cannot be used for data migration. The service owner won't - * be billed when the service is stopped. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action stops the service and the service cannot be used for data migration. The + * service owner won't be billed when the service is stopped. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -725,9 +726,9 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action stops the service and the service cannot be used for data migration. The service owner won't - * be billed when the service is stopped. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action stops the service and the service cannot be used for data migration. The + * service owner won't be billed when the service is stopped. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -742,8 +743,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * skus action returns the list of SKUs that a service resource can be updated to. + * The services resource is the top-level resource that represents the Database Migration Service + * (classic). The skus action returns the list of SKUs that a service resource can be updated to. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -779,8 +780,8 @@ export class ServicesImpl implements Services { } /** - * The Services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a resource group. + * The Services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a resource group. * @param groupName Name of the resource group * @param options The options parameters. */ @@ -795,8 +796,8 @@ export class ServicesImpl implements Services { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a subscription. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a subscription. * @param options The options parameters. */ private _list( @@ -897,7 +898,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -975,7 +976,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1089,7 +1090,7 @@ const checkChildrenNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1151,7 +1152,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1173,7 +1174,6 @@ const listSkusNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1195,7 +1195,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1216,7 +1215,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts b/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts index fa3dd1c2caed..ccb33658768f 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/sqlMigrationServices.ts @@ -273,7 +273,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. @@ -291,7 +291,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. @@ -362,7 +362,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. @@ -385,7 +385,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. @@ -449,7 +449,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. @@ -469,7 +469,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. @@ -540,7 +540,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. @@ -655,7 +655,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. @@ -780,7 +781,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters3, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -825,7 +826,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -886,7 +887,7 @@ const regenerateAuthKeysOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -908,7 +909,7 @@ const deleteNodeOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -984,7 +985,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1003,7 +1003,6 @@ const listMigrationsNextOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1023,7 +1022,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/tasks.ts b/sdk/datamigration/arm-datamigration/src/operations/tasks.ts index 1cd57477bda3..e558c79cbd26 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/tasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/tasks.ts @@ -47,9 +47,9 @@ export class TasksImpl implements Tasks { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown, - * which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of tasks owned by a service resource. Some tasks may have a + * status of Unknown, which indicates that an error occurred while querying the status of that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -137,9 +137,9 @@ export class TasksImpl implements Tasks { } /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown, - * which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of tasks owned by a service resource. Some tasks may have a + * status of Unknown, which indicates that an error occurred while querying the status of that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -158,9 +158,9 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The PUT method creates a new task or updates an existing one, although since tasks have no mutable - * custom properties, there is little reason to update an existing one. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The PUT method creates a new task or updates an existing one, although since tasks have no + * mutable custom properties, there is little reason to update an existing one. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -183,8 +183,8 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The GET method retrieves information about a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The GET method retrieves information about a task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -205,8 +205,8 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The DELETE method deletes a task, canceling it first if it's running. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The DELETE method deletes a task, canceling it first if it's running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -227,9 +227,9 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The PATCH method updates an existing task, but since tasks have no mutable custom properties, there - * is little reason to do so. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The PATCH method updates an existing task, but since tasks have no mutable custom + * properties, there is little reason to do so. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -252,8 +252,8 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * This method cancels a task if it's currently queued or running. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. This method cancels a task if it's currently queued or running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -274,8 +274,8 @@ export class TasksImpl implements Tasks { } /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * This method executes a command on a running task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. This method executes a command on a running task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -359,7 +359,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -432,7 +432,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -482,7 +482,7 @@ const commandOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -507,7 +507,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion, Parameters.taskType], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/datamigration/arm-datamigration/src/operations/usages.ts b/sdk/datamigration/arm-datamigration/src/operations/usages.ts index 4b1d49519298..dcc0a06cdeb7 100644 --- a/sdk/datamigration/arm-datamigration/src/operations/usages.ts +++ b/sdk/datamigration/arm-datamigration/src/operations/usages.ts @@ -35,8 +35,8 @@ export class UsagesImpl implements Usages { } /** - * This method returns region-specific quotas and resource usage information for the Database Migration - * Service. + * This method returns region-specific quotas and resource usage information for the Azure Database + * Migration Service (classic). * @param location The Azure region of the operation * @param options The options parameters. */ @@ -94,8 +94,8 @@ export class UsagesImpl implements Usages { } /** - * This method returns region-specific quotas and resource usage information for the Database Migration - * Service. + * This method returns region-specific quotas and resource usage information for the Azure Database + * Migration Service (classic). * @param location The Azure region of the operation * @param options The options parameters. */ @@ -161,7 +161,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApiError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, 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/resourceSkus.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/resourceSkus.ts index 6599226c4532..1f95ec613ecd 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/resourceSkus.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/resourceSkus.ts @@ -13,7 +13,7 @@ import { ResourceSku, ResourceSkusListSkusOptionalParams } from "../models"; /** Interface representing a ResourceSkus. */ export interface ResourceSkus { /** - * The skus action returns the list of SKUs that DMS supports. + * The skus action returns the list of SKUs that DMS (classic) supports. * @param options The options parameters. */ listSkus( diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/serviceTasks.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/serviceTasks.ts index baaa4487b337..2849d03a4669 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/serviceTasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/serviceTasks.ts @@ -25,9 +25,10 @@ import { /** Interface representing a ServiceTasks. */ export interface ServiceTasks { /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service level tasks owned by a service resource. Some tasks may have a - * status of Unknown, which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks + * may have a status of Unknown, which indicates that an error occurred while querying the status of + * that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -39,8 +40,9 @@ export interface ServiceTasks { ): PagedAsyncIterableIterator; /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The PUT method creates a new service task or updates an existing one, although since - * service tasks have no mutable custom properties, there is little reason to update an existing one. + * (classic) instance. The PUT method creates a new service task or updates an existing one, although + * since service tasks have no mutable custom properties, there is little reason to update an existing + * one. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -56,7 +58,7 @@ export interface ServiceTasks { ): Promise; /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The GET method retrieves information about a service task. + * (classic) instance. The GET method retrieves information about a service task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -70,7 +72,7 @@ export interface ServiceTasks { ): Promise; /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The DELETE method deletes a service task, canceling it first if it's running. + * (classic) instance. The DELETE method deletes a service task, canceling it first if it's running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -84,8 +86,8 @@ export interface ServiceTasks { ): Promise; /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. The PATCH method updates an existing service task, but since service tasks have no mutable - * custom properties, there is little reason to do so. + * (classic) instance. The PATCH method updates an existing service task, but since service tasks have + * no mutable custom properties, there is little reason to do so. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task @@ -101,7 +103,7 @@ export interface ServiceTasks { ): Promise; /** * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS - * instance. This method cancels a service task if it's currently queued or running. + * (classic) instance. This method cancels a service task if it's currently queued or running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param taskName Name of the Task diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/services.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/services.ts index a332fcacebcb..86f84a7766ea 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/services.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/services.ts @@ -36,8 +36,8 @@ import { /** Interface representing a Services. */ export interface Services { /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * skus action returns the list of SKUs that a service resource can be updated to. + * The services resource is the top-level resource that represents the Database Migration Service + * (classic). The skus action returns the list of SKUs that a service resource can be updated to. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -48,8 +48,8 @@ export interface Services { options?: ServicesListSkusOptionalParams ): PagedAsyncIterableIterator; /** - * The Services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a resource group. + * The Services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a resource group. * @param groupName Name of the resource group * @param options The options parameters. */ @@ -58,21 +58,21 @@ export interface Services { options?: ServicesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of service resources in a subscription. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of service resources in a subscription. * @param options The options parameters. */ list( options?: ServicesListOptionalParams ): PagedAsyncIterableIterator; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PUT method creates a new service or updates an existing one. When a service is updated, existing - * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which - * refers to a VM-based service, although other kinds may be added in the future. This method can - * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the - * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply - * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PUT method creates a new service or updates an existing one. When a service is + * updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single + * kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. + * This method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will + * reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState * property. * @param groupName Name of the resource group * @param serviceName Name of the service @@ -91,13 +91,13 @@ export interface Services { > >; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PUT method creates a new service or updates an existing one. When a service is updated, existing - * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which - * refers to a VM-based service, although other kinds may be added in the future. This method can - * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the - * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply - * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PUT method creates a new service or updates an existing one. When a service is + * updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single + * kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. + * This method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will + * reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState * property. * @param groupName Name of the resource group * @param serviceName Name of the service @@ -111,8 +111,8 @@ export interface Services { options?: ServicesCreateOrUpdateOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * GET method retrieves information about a service instance. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The GET method retrieves information about a service instance. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -123,8 +123,8 @@ export interface Services { options?: ServicesGetOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * DELETE method deletes a service. Any running tasks will be canceled. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The DELETE method deletes a service. Any running tasks will be canceled. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -135,8 +135,8 @@ export interface Services { options?: ServicesDeleteOptionalParams ): Promise, void>>; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * DELETE method deletes a service. Any running tasks will be canceled. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The DELETE method deletes a service. Any running tasks will be canceled. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -147,10 +147,10 @@ export interface Services { options?: ServicesDeleteOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PATCH method updates an existing service. This method can change the kind, SKU, and network of the - * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad - * Request ("ServiceIsBusy"). + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PATCH method updates an existing service. This method can change the kind, SKU, and + * network of the service, but if tasks are currently running (i.e. the service is busy), this will + * fail with 400 Bad Request ("ServiceIsBusy"). * @param groupName Name of the resource group * @param serviceName Name of the service * @param parameters Information about the service @@ -168,10 +168,10 @@ export interface Services { > >; /** - * The services resource is the top-level resource that represents the Database Migration Service. The - * PATCH method updates an existing service. This method can change the kind, SKU, and network of the - * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad - * Request ("ServiceIsBusy"). + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). The PATCH method updates an existing service. This method can change the kind, SKU, and + * network of the service, but if tasks are currently running (i.e. the service is busy), this will + * fail with 400 Bad Request ("ServiceIsBusy"). * @param groupName Name of the resource group * @param serviceName Name of the service * @param parameters Information about the service @@ -184,8 +184,9 @@ export interface Services { options?: ServicesUpdateOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action performs a health check and returns the status of the service and virtual machine size. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action performs a health check and returns the status of the service and virtual + * machine size. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -196,8 +197,8 @@ export interface Services { options?: ServicesCheckStatusOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action starts the service and the service can be used for data migration. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action starts the service and the service can be used for data migration. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -208,8 +209,8 @@ export interface Services { options?: ServicesStartOptionalParams ): Promise, void>>; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action starts the service and the service can be used for data migration. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action starts the service and the service can be used for data migration. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -220,9 +221,9 @@ export interface Services { options?: ServicesStartOptionalParams ): Promise; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action stops the service and the service cannot be used for data migration. The service owner won't - * be billed when the service is stopped. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action stops the service and the service cannot be used for data migration. The + * service owner won't be billed when the service is stopped. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. @@ -233,9 +234,9 @@ export interface Services { options?: ServicesStopOptionalParams ): Promise, void>>; /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * action stops the service and the service cannot be used for data migration. The service owner won't - * be billed when the service is stopped. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This action stops the service and the service cannot be used for data migration. The + * service owner won't be billed when the service is stopped. * @param groupName Name of the resource group * @param serviceName Name of the service * @param options The options parameters. 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/src/operationsInterfaces/tasks.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/tasks.ts index da79a5a42006..4356c256a151 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/tasks.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/tasks.ts @@ -28,9 +28,9 @@ import { /** Interface representing a Tasks. */ export interface Tasks { /** - * The services resource is the top-level resource that represents the Database Migration Service. This - * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown, - * which indicates that an error occurred while querying the status of that task. + * The services resource is the top-level resource that represents the Azure Database Migration Service + * (classic). This method returns a list of tasks owned by a service resource. Some tasks may have a + * status of Unknown, which indicates that an error occurred while querying the status of that task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -43,9 +43,9 @@ export interface Tasks { options?: TasksListOptionalParams ): PagedAsyncIterableIterator; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The PUT method creates a new task or updates an existing one, although since tasks have no mutable - * custom properties, there is little reason to update an existing one. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The PUT method creates a new task or updates an existing one, although since tasks have no + * mutable custom properties, there is little reason to update an existing one. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -62,8 +62,8 @@ export interface Tasks { options?: TasksCreateOrUpdateOptionalParams ): Promise; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The GET method retrieves information about a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The GET method retrieves information about a task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -78,8 +78,8 @@ export interface Tasks { options?: TasksGetOptionalParams ): Promise; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The DELETE method deletes a task, canceling it first if it's running. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The DELETE method deletes a task, canceling it first if it's running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -94,9 +94,9 @@ export interface Tasks { options?: TasksDeleteOptionalParams ): Promise; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * The PATCH method updates an existing task, but since tasks have no mutable custom properties, there - * is little reason to do so. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. The PATCH method updates an existing task, but since tasks have no mutable custom + * properties, there is little reason to do so. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -113,8 +113,8 @@ export interface Tasks { options?: TasksUpdateOptionalParams ): Promise; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * This method cancels a task if it's currently queued or running. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. This method cancels a task if it's currently queued or running. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project @@ -129,8 +129,8 @@ export interface Tasks { options?: TasksCancelOptionalParams ): Promise; /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. - * This method executes a command on a running task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) + * instance. This method executes a command on a running task. * @param groupName Name of the resource group * @param serviceName Name of the service * @param projectName Name of the project diff --git a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/usages.ts b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/usages.ts index 05d65ebae47e..e05a472805c5 100644 --- a/sdk/datamigration/arm-datamigration/src/operationsInterfaces/usages.ts +++ b/sdk/datamigration/arm-datamigration/src/operationsInterfaces/usages.ts @@ -13,8 +13,8 @@ import { Quota, UsagesListOptionalParams } from "../models"; /** Interface representing a Usages. */ export interface Usages { /** - * This method returns region-specific quotas and resource usage information for the Database Migration - * Service. + * This method returns region-specific quotas and resource usage information for the Azure Database + * Migration Service (classic). * @param location The Azure region of the operation * @param options The options parameters. */ diff --git a/sdk/datamigration/arm-datamigration/src/pagingHelper.ts b/sdk/datamigration/arm-datamigration/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/datamigration/arm-datamigration/src/pagingHelper.ts +++ b/sdk/datamigration/arm-datamigration/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/datamigration/arm-datamigration/tsconfig.json b/sdk/datamigration/arm-datamigration/tsconfig.json index d771f630bc69..3e6ae96443f3 100644 --- a/sdk/datamigration/arm-datamigration/tsconfig.json +++ b/sdk/datamigration/arm-datamigration/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-datamigration": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"