From 2aa9cf27d3388d839306b29a50fc198f7d4efd25 Mon Sep 17 00:00:00 2001 From: "judy.liu" Date: Fri, 26 Sep 2025 11:09:11 +0800 Subject: [PATCH] [Release] sdk/resourcemanager/datamigration/armdatamigration/2.0.0 generation from spec commit: 33a2135c8115465b292b71a521ea50c1cc336c8c --- .../armdatamigration/CHANGELOG.md | 221 ++++++++++++++++++ .../armdatamigration/autorest.md | 8 +- .../armdatamigration/constants.go | 5 - ...migrationsmongotocosmosdbrumongo_client.go | 20 +- ...gotocosmosdbrumongo_client_example_test.go | 14 +- ...rationsmongotocosmosdbvcoremongo_client.go | 20 +- ...ocosmosdbvcoremongo_client_example_test.go | 14 +- .../databasemigrationssqldb_client.go | 107 ++++++++- ...basemigrationssqldb_client_example_test.go | 35 ++- .../databasemigrationssqlmi_client.go | 107 ++++++++- ...basemigrationssqlmi_client_example_test.go | 60 ++++- .../databasemigrationssqlvm_client.go | 107 ++++++++- ...basemigrationssqlvm_client_example_test.go | 58 ++++- ...migrationsmongotocosmosdbrumongo_server.go | 8 +- ...rationsmongotocosmosdbvcoremongo_server.go | 8 +- .../fake/databasemigrationssqldb_server.go | 68 +++++- .../fake/databasemigrationssqlmi_server.go | 80 ++++++- .../fake/databasemigrationssqlvm_server.go | 80 ++++++- .../armdatamigration/fake/files_server.go | 14 +- .../fake/migrationservices_server.go | 14 +- .../armdatamigration/fake/projects_server.go | 10 +- .../fake/resourceskus_server.go | 2 +- .../armdatamigration/fake/services_server.go | 24 +- .../fake/servicetasks_server.go | 12 +- .../fake/sqlmigrationservices_server.go | 22 +- .../armdatamigration/fake/tasks_server.go | 14 +- .../armdatamigration/fake/usages_server.go | 2 +- .../armdatamigration/files_client.go | 28 +-- .../files_client_example_test.go | 14 +- .../datamigration/armdatamigration/go.mod | 16 +- .../datamigration/armdatamigration/go.sum | 28 +-- .../migrationservices_client.go | 34 +-- .../migrationservices_client_example_test.go | 16 +- .../datamigration/armdatamigration/models.go | 131 ++++------- .../armdatamigration/models_serde.go | 133 ----------- .../armdatamigration/operations_client.go | 4 +- .../operations_client_example_test.go | 2 +- .../datamigration/armdatamigration/options.go | 27 +++ .../armdatamigration/projects_client.go | 20 +- .../projects_client_example_test.go | 10 +- .../armdatamigration/resourceskus_client.go | 4 +- .../resourceskus_client_example_test.go | 2 +- .../armdatamigration/responses.go | 18 ++ .../armdatamigration/services_client.go | 58 ++--- .../services_client_example_test.go | 24 +- .../armdatamigration/servicetasks_client.go | 24 +- .../servicetasks_client_example_test.go | 12 +- .../sqlmigrationservices_client.go | 50 ++-- ...qlmigrationservices_client_example_test.go | 24 +- .../armdatamigration/tasks_client.go | 28 +-- .../tasks_client_example_test.go | 14 +- .../armdatamigration/usages_client.go | 4 +- .../usages_client_example_test.go | 2 +- .../datamigration/armdatamigration/version.go | 10 + 54 files changed, 1272 insertions(+), 599 deletions(-) create mode 100644 sdk/resourcemanager/datamigration/armdatamigration/version.go diff --git a/sdk/resourcemanager/datamigration/armdatamigration/CHANGELOG.md b/sdk/resourcemanager/datamigration/armdatamigration/CHANGELOG.md index fbbb259342cb..acbdc54b6016 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/CHANGELOG.md +++ b/sdk/resourcemanager/datamigration/armdatamigration/CHANGELOG.md @@ -1,5 +1,226 @@ # Release History +## 2.0.0 (2025-09-26) +### Breaking Changes + +- Type of `CheckOCIDriverTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `CommandProperties.CommandType` has been changed from `*string` to `*CommandType` +- Type of `ConnectToMongoDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToSourceMySQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToSourceOracleSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToSourcePostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToSourceSQLServerSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToSourceSQLServerTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetAzureDbForMySQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetOracleAzureDbForPostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetSQLDbSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetSQLDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetSQLMISyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ConnectToTargetSQLMITaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetTdeCertificatesSQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetUserTablesMySQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetUserTablesOracleTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetUserTablesPostgreSQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetUserTablesSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `GetUserTablesSQLTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `InstallOCIDriverTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateMISyncCompleteCommandProperties.CommandType` has been changed from `*string` to `*CommandType` +- Type of `MigrateMongoDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateMySQLAzureDbForMySQLOfflineTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateMySQLAzureDbForMySQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateOracleAzureDbForPostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput.MigrationSetting` has been changed from `map[string]*string` to `map[string]any` +- Type of `MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSQLServerSQLDbSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSQLServerSQLDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSQLServerSQLMISyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSQLServerSQLMITaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSchemaSQLServerSQLDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSsisTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `MigrateSyncCompleteCommandProperties.CommandType` has been changed from `*string` to `*CommandType` +- Type of `MongoDbCancelCommand.CommandType` has been changed from `*string` to `*CommandType` +- Type of `MongoDbFinishCommand.CommandType` has been changed from `*string` to `*CommandType` +- Type of `MongoDbRestartCommand.CommandType` has been changed from `*string` to `*CommandType` +- Type of `ProjectTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `UploadOCIDriverTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ValidateMigrationInputSQLServerSQLDbSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ValidateMigrationInputSQLServerSQLMISyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ValidateMigrationInputSQLServerSQLMITaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ValidateMongoDbTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Type of `ValidateOracleAzureDbForPostgreSQLSyncTaskProperties.TaskType` has been changed from `*string` to `*TaskType` +- Field `ServiceOperationList` of struct `OperationsClientListResponse` has been removed + +### Features Added + +- New value `ServerLevelPermissionsGroupMigrationFromSQLServerToAzureVM` added to enum type `ServerLevelPermissionsGroup` +- New enum type `AuthType` with values `AuthTypeAccountKey`, `AuthTypeManagedIdentity` +- New enum type `CommandType` with values `CommandTypeCancel`, `CommandTypeFinish`, `CommandTypeMigrateSQLServerAzureDbSQLMiComplete`, `CommandTypeMigrateSyncCompleteDatabase`, `CommandTypeRestart` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New enum type `MongoMigrationStatus` with values `MongoMigrationStatusCanceled`, `MongoMigrationStatusCompleted`, `MongoMigrationStatusFailed`, `MongoMigrationStatusInProgress`, `MongoMigrationStatusNotStarted` +- New enum type `OperationOrigin` with values `OperationOriginSystem`, `OperationOriginUser` +- New enum type `ProvisioningState` with values `ProvisioningStateCanceled`, `ProvisioningStateFailed`, `ProvisioningStateProvisioning`, `ProvisioningStateSucceeded`, `ProvisioningStateUpdating` +- New enum type `ResourceType` with values `ResourceTypeMongoToCosmosDbMongo`, `ResourceTypeSQLDb`, `ResourceTypeSQLMi`, `ResourceTypeSQLVM` +- New enum type `TaskType` with values `TaskTypeConnectMongoDb`, `TaskTypeConnectToSourceMySQL`, `TaskTypeConnectToSourceOracleSync`, `TaskTypeConnectToSourcePostgreSQLSync`, `TaskTypeConnectToSourceSQLServer`, `TaskTypeConnectToSourceSQLServerSync`, `TaskTypeConnectToTargetAzureDbForMySQL`, `TaskTypeConnectToTargetAzureDbForPostgreSQLSync`, `TaskTypeConnectToTargetAzureSQLDbMI`, `TaskTypeConnectToTargetAzureSQLDbMISyncLRS`, `TaskTypeConnectToTargetOracleAzureDbForPostgreSQLSync`, `TaskTypeConnectToTargetSQLDb`, `TaskTypeConnectToTargetSQLDbSync`, `TaskTypeGetTDECertificatesSQL`, `TaskTypeGetUserTablesAzureSQLDbSync`, `TaskTypeGetUserTablesMySQL`, `TaskTypeGetUserTablesOracle`, `TaskTypeGetUserTablesPostgreSQL`, `TaskTypeGetUserTablesSQL`, `TaskTypeMigrateMongoDb`, `TaskTypeMigrateMySQLAzureDbForMySQL`, `TaskTypeMigrateMySQLAzureDbForMySQLSync`, `TaskTypeMigrateOracleAzureDbForPostgreSQLSync`, `TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSyncV2`, `TaskTypeMigrateSQLServerAzureSQLDbMI`, `TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS`, `TaskTypeMigrateSQLServerAzureSQLDbSync`, `TaskTypeMigrateSQLServerSQLDb`, `TaskTypeMigrateSchemaSQLServerSQLDb`, `TaskTypeMigrateSsis`, `TaskTypeServiceCheckOCI`, `TaskTypeServiceInstallOCI`, `TaskTypeServiceUploadOCI`, `TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI`, `TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS`, `TaskTypeValidateMigrationInputSQLServerSQLDbSync`, `TaskTypeValidateMongoDb`, `TaskTypeValidateOracleAzureDbPostgreSQLSync` +- New function `*ClientFactory.NewDatabaseMigrationsMongoToCosmosDbRUMongoClient() *DatabaseMigrationsMongoToCosmosDbRUMongoClient` +- New function `*ClientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient() *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient` +- New function `*ClientFactory.NewDatabaseMigrationsSQLDbClient() *DatabaseMigrationsSQLDbClient` +- New function `*ClientFactory.NewDatabaseMigrationsSQLMiClient() *DatabaseMigrationsSQLMiClient` +- New function `*ClientFactory.NewDatabaseMigrationsSQLVMClient() *DatabaseMigrationsSQLVMClient` +- New function `*ClientFactory.NewMigrationServicesClient() *MigrationServicesClient` +- New function `*ClientFactory.NewSQLMigrationServicesClient() *SQLMigrationServicesClient` +- New function `*DatabaseMigrationBaseProperties.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationProperties.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationProperties.GetDatabaseMigrationProperties() *DatabaseMigrationProperties` +- New function `*DatabaseMigrationPropertiesCosmosDbMongo.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationPropertiesSQLDb.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationPropertiesSQLDb.GetDatabaseMigrationProperties() *DatabaseMigrationProperties` +- New function `*DatabaseMigrationPropertiesSQLMi.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationPropertiesSQLMi.GetDatabaseMigrationProperties() *DatabaseMigrationProperties` +- New function `*DatabaseMigrationPropertiesSQLVM.GetDatabaseMigrationBaseProperties() *DatabaseMigrationBaseProperties` +- New function `*DatabaseMigrationPropertiesSQLVM.GetDatabaseMigrationProperties() *DatabaseMigrationProperties` +- New function `NewDatabaseMigrationsMongoToCosmosDbRUMongoClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseMigrationsMongoToCosmosDbRUMongoClient, error)` +- New function `*DatabaseMigrationsMongoToCosmosDbRUMongoClient.BeginCreate(context.Context, string, string, string, DatabaseMigrationCosmosDbMongo, *DatabaseMigrationsMongoToCosmosDbRUMongoClientBeginCreateOptions) (*runtime.Poller[DatabaseMigrationsMongoToCosmosDbRUMongoClientCreateResponse], error)` +- New function `*DatabaseMigrationsMongoToCosmosDbRUMongoClient.BeginDelete(context.Context, string, string, string, *DatabaseMigrationsMongoToCosmosDbRUMongoClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsMongoToCosmosDbRUMongoClientDeleteResponse], error)` +- New function `*DatabaseMigrationsMongoToCosmosDbRUMongoClient.Get(context.Context, string, string, string, *DatabaseMigrationsMongoToCosmosDbRUMongoClientGetOptions) (DatabaseMigrationsMongoToCosmosDbRUMongoClientGetResponse, error)` +- New function `*DatabaseMigrationsMongoToCosmosDbRUMongoClient.NewGetForScopePager(string, string, *DatabaseMigrationsMongoToCosmosDbRUMongoClientGetForScopeOptions) *runtime.Pager[DatabaseMigrationsMongoToCosmosDbRUMongoClientGetForScopeResponse]` +- New function `NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseMigrationsMongoToCosmosDbvCoreMongoClient, error)` +- New function `*DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.BeginCreate(context.Context, string, string, string, DatabaseMigrationCosmosDbMongo, *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientBeginCreateOptions) (*runtime.Poller[DatabaseMigrationsMongoToCosmosDbvCoreMongoClientCreateResponse], error)` +- New function `*DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.BeginDelete(context.Context, string, string, string, *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsMongoToCosmosDbvCoreMongoClientDeleteResponse], error)` +- New function `*DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.Get(context.Context, string, string, string, *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetOptions) (DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetResponse, error)` +- New function `*DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.NewGetForScopePager(string, string, *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetForScopeOptions) *runtime.Pager[DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetForScopeResponse]` +- New function `NewDatabaseMigrationsSQLDbClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseMigrationsSQLDbClient, error)` +- New function `*DatabaseMigrationsSQLDbClient.BeginCancel(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLDbClientBeginCancelOptions) (*runtime.Poller[DatabaseMigrationsSQLDbClientCancelResponse], error)` +- New function `*DatabaseMigrationsSQLDbClient.BeginCreateOrUpdate(context.Context, string, string, string, DatabaseMigrationSQLDb, *DatabaseMigrationsSQLDbClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseMigrationsSQLDbClientCreateOrUpdateResponse], error)` +- New function `*DatabaseMigrationsSQLDbClient.BeginDelete(context.Context, string, string, string, *DatabaseMigrationsSQLDbClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsSQLDbClientDeleteResponse], error)` +- New function `*DatabaseMigrationsSQLDbClient.Get(context.Context, string, string, string, *DatabaseMigrationsSQLDbClientGetOptions) (DatabaseMigrationsSQLDbClientGetResponse, error)` +- New function `*DatabaseMigrationsSQLDbClient.BeginRetry(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLDbClientBeginRetryOptions) (*runtime.Poller[DatabaseMigrationsSQLDbClientRetryResponse], error)` +- New function `NewDatabaseMigrationsSQLMiClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseMigrationsSQLMiClient, error)` +- New function `*DatabaseMigrationsSQLMiClient.BeginCancel(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLMiClientBeginCancelOptions) (*runtime.Poller[DatabaseMigrationsSQLMiClientCancelResponse], error)` +- New function `*DatabaseMigrationsSQLMiClient.BeginCreateOrUpdate(context.Context, string, string, string, DatabaseMigrationSQLMi, *DatabaseMigrationsSQLMiClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseMigrationsSQLMiClientCreateOrUpdateResponse], error)` +- New function `*DatabaseMigrationsSQLMiClient.BeginCutover(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLMiClientBeginCutoverOptions) (*runtime.Poller[DatabaseMigrationsSQLMiClientCutoverResponse], error)` +- New function `*DatabaseMigrationsSQLMiClient.BeginDelete(context.Context, string, string, string, *DatabaseMigrationsSQLMiClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsSQLMiClientDeleteResponse], error)` +- New function `*DatabaseMigrationsSQLMiClient.Get(context.Context, string, string, string, *DatabaseMigrationsSQLMiClientGetOptions) (DatabaseMigrationsSQLMiClientGetResponse, error)` +- New function `NewDatabaseMigrationsSQLVMClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseMigrationsSQLVMClient, error)` +- New function `*DatabaseMigrationsSQLVMClient.BeginCancel(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLVMClientBeginCancelOptions) (*runtime.Poller[DatabaseMigrationsSQLVMClientCancelResponse], error)` +- New function `*DatabaseMigrationsSQLVMClient.BeginCreateOrUpdate(context.Context, string, string, string, DatabaseMigrationSQLVM, *DatabaseMigrationsSQLVMClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseMigrationsSQLVMClientCreateOrUpdateResponse], error)` +- New function `*DatabaseMigrationsSQLVMClient.BeginCutover(context.Context, string, string, string, MigrationOperationInput, *DatabaseMigrationsSQLVMClientBeginCutoverOptions) (*runtime.Poller[DatabaseMigrationsSQLVMClientCutoverResponse], error)` +- New function `*DatabaseMigrationsSQLVMClient.BeginDelete(context.Context, string, string, string, *DatabaseMigrationsSQLVMClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsSQLVMClientDeleteResponse], error)` +- New function `*DatabaseMigrationsSQLVMClient.Get(context.Context, string, string, string, *DatabaseMigrationsSQLVMClientGetOptions) (DatabaseMigrationsSQLVMClientGetResponse, error)` +- New function `NewMigrationServicesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*MigrationServicesClient, error)` +- New function `*MigrationServicesClient.BeginCreateOrUpdate(context.Context, string, string, MigrationService, *MigrationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[MigrationServicesClientCreateOrUpdateResponse], error)` +- New function `*MigrationServicesClient.BeginDelete(context.Context, string, string, *MigrationServicesClientBeginDeleteOptions) (*runtime.Poller[MigrationServicesClientDeleteResponse], error)` +- New function `*MigrationServicesClient.Get(context.Context, string, string, *MigrationServicesClientGetOptions) (MigrationServicesClientGetResponse, error)` +- New function `*MigrationServicesClient.NewListByResourceGroupPager(string, *MigrationServicesClientListByResourceGroupOptions) *runtime.Pager[MigrationServicesClientListByResourceGroupResponse]` +- New function `*MigrationServicesClient.NewListBySubscriptionPager(*MigrationServicesClientListBySubscriptionOptions) *runtime.Pager[MigrationServicesClientListBySubscriptionResponse]` +- New function `*MigrationServicesClient.NewListMigrationsPager(string, string, *MigrationServicesClientListMigrationsOptions) *runtime.Pager[MigrationServicesClientListMigrationsResponse]` +- New function `*MigrationServicesClient.BeginUpdate(context.Context, string, string, MigrationServiceUpdate, *MigrationServicesClientBeginUpdateOptions) (*runtime.Poller[MigrationServicesClientUpdateResponse], error)` +- New function `NewSQLMigrationServicesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SQLMigrationServicesClient, error)` +- New function `*SQLMigrationServicesClient.BeginCreateOrUpdate(context.Context, string, string, SQLMigrationService, *SQLMigrationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SQLMigrationServicesClientCreateOrUpdateResponse], error)` +- New function `*SQLMigrationServicesClient.BeginDelete(context.Context, string, string, *SQLMigrationServicesClientBeginDeleteOptions) (*runtime.Poller[SQLMigrationServicesClientDeleteResponse], error)` +- New function `*SQLMigrationServicesClient.DeleteNode(context.Context, string, string, DeleteNode, *SQLMigrationServicesClientDeleteNodeOptions) (SQLMigrationServicesClientDeleteNodeResponse, error)` +- New function `*SQLMigrationServicesClient.Get(context.Context, string, string, *SQLMigrationServicesClientGetOptions) (SQLMigrationServicesClientGetResponse, error)` +- New function `*SQLMigrationServicesClient.ListAuthKeys(context.Context, string, string, *SQLMigrationServicesClientListAuthKeysOptions) (SQLMigrationServicesClientListAuthKeysResponse, error)` +- New function `*SQLMigrationServicesClient.NewListByResourceGroupPager(string, *SQLMigrationServicesClientListByResourceGroupOptions) *runtime.Pager[SQLMigrationServicesClientListByResourceGroupResponse]` +- New function `*SQLMigrationServicesClient.NewListBySubscriptionPager(*SQLMigrationServicesClientListBySubscriptionOptions) *runtime.Pager[SQLMigrationServicesClientListBySubscriptionResponse]` +- New function `*SQLMigrationServicesClient.NewListMigrationsPager(string, string, *SQLMigrationServicesClientListMigrationsOptions) *runtime.Pager[SQLMigrationServicesClientListMigrationsResponse]` +- New function `*SQLMigrationServicesClient.ListMonitoringData(context.Context, string, string, *SQLMigrationServicesClientListMonitoringDataOptions) (SQLMigrationServicesClientListMonitoringDataResponse, error)` +- New function `*SQLMigrationServicesClient.RegenerateAuthKeys(context.Context, string, string, RegenAuthKeys, *SQLMigrationServicesClientRegenerateAuthKeysOptions) (SQLMigrationServicesClientRegenerateAuthKeysResponse, error)` +- New function `*SQLMigrationServicesClient.BeginUpdate(context.Context, string, string, SQLMigrationServiceUpdate, *SQLMigrationServicesClientBeginUpdateOptions) (*runtime.Poller[SQLMigrationServicesClientUpdateResponse], error)` +- New struct `AuthenticationKeys` +- New struct `AzureBlob` +- New struct `BackupConfiguration` +- New struct `CopyProgressDetails` +- New struct `DatabaseMigration` +- New struct `DatabaseMigrationBase` +- New struct `DatabaseMigrationBaseListResult` +- New struct `DatabaseMigrationCosmosDbMongo` +- New struct `DatabaseMigrationCosmosDbMongoListResult` +- New struct `DatabaseMigrationListResult` +- New struct `DatabaseMigrationPropertiesCosmosDbMongo` +- New struct `DatabaseMigrationPropertiesSQLDb` +- New struct `DatabaseMigrationPropertiesSQLMi` +- New struct `DatabaseMigrationPropertiesSQLVM` +- New struct `DatabaseMigrationSQLDb` +- New struct `DatabaseMigrationSQLMi` +- New struct `DatabaseMigrationSQLVM` +- New struct `DeleteNode` +- New struct `ErrorAdditionalInfo` +- New struct `ErrorDetail` +- New struct `ErrorInfo` +- New struct `ErrorResponse` +- New struct `IntegrationRuntimeMonitoringData` +- New struct `ManagedServiceIdentity` +- New struct `MigrationOperationInput` +- New struct `MigrationService` +- New struct `MigrationServiceListResult` +- New struct `MigrationServiceProperties` +- New struct `MigrationServiceUpdate` +- New struct `MigrationStatusDetails` +- New struct `MongoConnectionInformation` +- New struct `MongoMigrationCollection` +- New struct `MongoMigrationProgressDetails` +- New struct `NodeMonitoringData` +- New struct `OfflineConfiguration` +- New struct `OperationListResult` +- New struct `OperationsDefinition` +- New struct `OperationsDisplayDefinition` +- New struct `ProxyResource` +- New struct `RegenAuthKeys` +- New struct `ResourceAutoGenerated` +- New struct `SQLBackupFileInfo` +- New struct `SQLBackupSetInfo` +- New struct `SQLConnectionInformation` +- New struct `SQLDbMigrationStatusDetails` +- New struct `SQLDbOfflineConfiguration` +- New struct `SQLFileShare` +- New struct `SQLMigrationListResult` +- New struct `SQLMigrationService` +- New struct `SQLMigrationServiceProperties` +- New struct `SQLMigrationServiceUpdate` +- New struct `SourceLocation` +- New struct `TargetLocation` +- New struct `UserAssignedIdentity` +- New field `IgnoreAzurePermissions` in struct `AzureActiveDirectoryApp` +- New field `EncryptedKeyForSecureFields` in struct `ConnectToSourceSQLServerTaskInput` +- New field `TaskID` in struct `ConnectToSourceSQLServerTaskProperties` +- New field `QueryObjectCounts` in struct `ConnectToTargetSQLDbTaskInput` +- New field `CreatedOn` in struct `ConnectToTargetSQLDbTaskProperties` +- New field `EncryptedKeyForSecureFields` in struct `GetUserTablesSQLTaskInput` +- New field `TaskID` in struct `GetUserTablesSQLTaskProperties` +- New field `EncryptedKeyForSecureFields` in struct `MigrateMySQLAzureDbForMySQLOfflineTaskInput` +- New field `IsCloneable`, `TaskID` in struct `MigrateMySQLAzureDbForMySQLOfflineTaskProperties` +- New field `ID` in struct `MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput` +- New field `EncryptedKeyForSecureFields`, `StartedOn` in struct `MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput` +- New field `Events` in struct `MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError` +- New field `DatabaseCount` in struct `MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel` +- New field `CreatedOn`, `IsCloneable`, `TaskID` in struct `MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties` +- New field `ID`, `SchemaSetting` in struct `MigrateSQLServerSQLDbDatabaseInput` +- New field `EncryptedKeyForSecureFields`, `StartedOn` in struct `MigrateSQLServerSQLDbTaskInput` +- New field `CreatedOn`, `IsCloneable`, `TaskID` in struct `MigrateSQLServerSQLDbTaskProperties` +- New field `ID` in struct `MigrateSQLServerSQLMIDatabaseInput` +- New field `NumberOfParallelDatabaseMigrations` in struct `MigrateSQLServerSQLMISyncTaskInput` +- New field `CreatedOn` in struct `MigrateSQLServerSQLMISyncTaskProperties` +- New field `EncryptedKeyForSecureFields`, `StartedOn` in struct `MigrateSQLServerSQLMITaskInput` +- New field `CreatedOn`, `IsCloneable`, `ParentTaskID`, `TaskID` in struct `MigrateSQLServerSQLMITaskProperties` +- New field `ID` in struct `MigrateSchemaSQLServerSQLDbDatabaseInput` +- New field `EncryptedKeyForSecureFields`, `StartedOn` in struct `MigrateSchemaSQLServerSQLDbTaskInput` +- New field `CreatedOn`, `IsCloneable`, `TaskID` in struct `MigrateSchemaSQLServerSQLDbTaskProperties` +- New field `CommandID` in struct `MigrateSyncCompleteCommandProperties` +- New field `AdditionalSettings`, `Authentication`, `DataSource`, `EncryptConnection`, `EnforceSSL`, `Port`, `ServerBrandVersion`, `ServerName`, `ServerVersion`, `TrustServerCertificate` in struct `MongoDbConnectionInfo` +- New field `AdditionalSettings`, `Authentication`, `DataSource` in struct `MySQLConnectionInfo` +- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` +- New field `Authentication`, `Port`, `ServerName`, `ServerVersion` in struct `OracleConnectionInfo` +- New field `AdditionalSettings`, `Authentication`, `DataSource`, `ServerBrandVersion`, `ServerVersion` in struct `PostgreSQLConnectionInfo` +- New field `Etag` in struct `Project` +- New field `AzureAuthenticationInfo` in struct `ProjectProperties` +- New field `SystemData` in struct `Resource` +- New field `Port`, `ResourceID`, `ServerBrandVersion`, `ServerName`, `ServerVersion` in struct `SQLConnectionInfo` +- New field `FileName` in struct `SchemaMigrationSetting` +- New field `AutoStopDelay`, `DeleteResourcesOnStop` in struct `ServiceProperties` +- New field `AgentConfiguration` in struct `ServiceStatusResponse` + + ## 2.0.0-beta.1 (2025-07-24) ### Breaking Changes diff --git a/sdk/resourcemanager/datamigration/armdatamigration/autorest.md b/sdk/resourcemanager/datamigration/armdatamigration/autorest.md index be913068adad..8536bd5ff59a 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/autorest.md +++ b/sdk/resourcemanager/datamigration/armdatamigration/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.1 -tag: package-preview-2025-03 +module-version: 2.0.0 +tag: package-2025-06 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/datamigration/armdatamigration/constants.go b/sdk/resourcemanager/datamigration/armdatamigration/constants.go index 7895696acbfe..65b9ad8720d4 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/constants.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/constants.go @@ -5,11 +5,6 @@ package armdatamigration -const ( - moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration" - moduleVersion = "v2.0.0-beta.1" -) - // AuthType - Authentication type used for accessing Azure Blob Storage. type AuthType string diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client.go index 4a9f0c84f7e6..7ce9c2b850d1 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client.go @@ -44,7 +44,7 @@ func NewDatabaseMigrationsMongoToCosmosDbRUMongoClient(subscriptionID string, cr // BeginCreate - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -72,7 +72,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) BeginCreate(ctx co // Create - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) create(ctx context.Context, resourceGroupName string, targetResourceName string, migrationName string, parameters DatabaseMigrationCosmosDbMongo, options *DatabaseMigrationsMongoToCosmosDbRUMongoClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsMongoToCosmosDbRUMongoClient.BeginCreate" @@ -118,7 +118,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) createCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -130,7 +130,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) createCreateReques // BeginDelete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -157,7 +157,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) BeginDelete(ctx co // Delete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) deleteOperation(ctx context.Context, resourceGroupName string, targetResourceName string, migrationName string, options *DatabaseMigrationsMongoToCosmosDbRUMongoClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsMongoToCosmosDbRUMongoClient.BeginDelete" @@ -203,7 +203,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) deleteCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.Force != nil { reqQP.Set("force", strconv.FormatBool(*options.Force)) } @@ -215,7 +215,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) deleteCreateReques // Get - Get Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -268,7 +268,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) getCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -285,7 +285,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) getHandleResponse( // NewGetForScopePager - Get Database Migration resources for the scope. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -334,7 +334,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbRUMongoClient) getForScopeCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client_example_test.go index 7350f42862c1..916fe5da1702 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbrumongo_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoGetDatabaseMigrationExpanded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoGetDatabaseMigrationExpanded.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_Get_getMongoToCosmosDbMongoRuDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -86,7 +86,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_Get_getMongoToCosmosD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoGetDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoGetDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_Get_getMongoToCosmosDbMongoRuDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_Get_getMongoToCosmosD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginCreate_createMongoToCosmosDbMongoRuDatabaseMigrationResourceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +228,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginCreate_createMon // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginCreate_createMongoToCosmosDbMongoRuDatabaseMigrationResourceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -311,7 +311,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginCreate_createMon // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoDeleteDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoDeleteDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -332,7 +332,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoListByScopeDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoListByScopeDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoRuDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -409,7 +409,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_NewGetForScopePager_g } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoListByScopeDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoListByScopeDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbRUMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoRuDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client.go index 6aaefbbe491a..cb12d4fd41ab 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client.go @@ -45,7 +45,7 @@ func NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient(subscriptionID string, // BeginCreate - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -73,7 +73,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) BeginCreate(ctx // Create - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) create(ctx context.Context, resourceGroupName string, targetResourceName string, migrationName string, parameters DatabaseMigrationCosmosDbMongo, options *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.BeginCreate" @@ -119,7 +119,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) createCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -131,7 +131,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) createCreateReq // BeginDelete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -158,7 +158,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) BeginDelete(ctx // Delete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) deleteOperation(ctx context.Context, resourceGroupName string, targetResourceName string, migrationName string, options *DatabaseMigrationsMongoToCosmosDbvCoreMongoClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsMongoToCosmosDbvCoreMongoClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) deleteCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.Force != nil { reqQP.Set("force", strconv.FormatBool(*options.Force)) } @@ -216,7 +216,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) deleteCreateReq // Get - Get Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -269,7 +269,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) getCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -286,7 +286,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) getHandleRespon // NewGetForScopePager - Get Database Migration resources for the scope. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetResourceName - The name of the target resource/account. @@ -335,7 +335,7 @@ func (client *DatabaseMigrationsMongoToCosmosDbvCoreMongoClient) getForScopeCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client_example_test.go index e3ad6810c328..09a88c0ba4c4 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationsmongotocosmosdbvcoremongo_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoGetDatabaseMigrationExpanded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoGetDatabaseMigrationExpanded.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -86,7 +86,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosm // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoGetDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoGetDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosm // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_createMongoToCosmosDbMongoVCoreDatabaseMigrationResourceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +228,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_create // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_createMongoToCosmosDbMongoVCoreDatabaseMigrationResourceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -311,7 +311,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_create // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoDeleteDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoDeleteDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -332,7 +332,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoListByScopeDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoListByScopeDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -409,7 +409,7 @@ func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_NewGetForScopePage } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CosmosDbMongoListByScopeDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CosmosDbMongoListByScopeDatabaseMigration.json func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client.go index ef1da5dfc594..85a428552462 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client.go @@ -44,7 +44,7 @@ func NewDatabaseMigrationsSQLDbClient(subscriptionID string, credential azcore.T // BeginCancel - Stop on going migration for the database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -71,7 +71,7 @@ func (client *DatabaseMigrationsSQLDbClient) BeginCancel(ctx context.Context, re // Cancel - Stop on going migration for the database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLDbClient) cancel(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, parameters MigrationOperationInput, options *DatabaseMigrationsSQLDbClientBeginCancelOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLDbClient.BeginCancel" @@ -117,7 +117,7 @@ func (client *DatabaseMigrationsSQLDbClient) cancelCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err @@ -128,7 +128,7 @@ func (client *DatabaseMigrationsSQLDbClient) cancelCreateRequest(ctx context.Con // BeginCreateOrUpdate - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -155,7 +155,7 @@ func (client *DatabaseMigrationsSQLDbClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create or Update Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLDbClient) createOrUpdate(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, parameters DatabaseMigrationSQLDb, options *DatabaseMigrationsSQLDbClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLDbClient.BeginCreateOrUpdate" @@ -201,7 +201,7 @@ func (client *DatabaseMigrationsSQLDbClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -213,7 +213,7 @@ func (client *DatabaseMigrationsSQLDbClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -239,7 +239,7 @@ func (client *DatabaseMigrationsSQLDbClient) BeginDelete(ctx context.Context, re // Delete - Delete Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLDbClient) deleteOperation(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, options *DatabaseMigrationsSQLDbClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLDbClient.BeginDelete" @@ -285,7 +285,7 @@ func (client *DatabaseMigrationsSQLDbClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.Force != nil { reqQP.Set("force", strconv.FormatBool(*options.Force)) } @@ -296,7 +296,7 @@ func (client *DatabaseMigrationsSQLDbClient) deleteCreateRequest(ctx context.Con // Get - Retrieve the Database Migration resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -351,7 +351,7 @@ func (client *DatabaseMigrationsSQLDbClient) getCreateRequest(ctx context.Contex if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.MigrationOperationID != nil { reqQP.Set("migrationOperationId", *options.MigrationOperationID) } @@ -368,3 +368,88 @@ func (client *DatabaseMigrationsSQLDbClient) getHandleResponse(resp *http.Respon } return result, nil } + +// BeginRetry - Retry on going migration for the database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +// - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource +// Manager API or the portal. +// - targetDbName - The name of the target database. +// - migrationOperationInput - Required migration operation ID for which retry will be initiated. +// - options - DatabaseMigrationsSQLDbClientBeginRetryOptions contains the optional parameters for the DatabaseMigrationsSQLDbClient.BeginRetry +// method. +func (client *DatabaseMigrationsSQLDbClient) BeginRetry(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, migrationOperationInput MigrationOperationInput, options *DatabaseMigrationsSQLDbClientBeginRetryOptions) (*runtime.Poller[DatabaseMigrationsSQLDbClientRetryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.retry(ctx, resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabaseMigrationsSQLDbClientRetryResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabaseMigrationsSQLDbClientRetryResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Retry - Retry on going migration for the database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +func (client *DatabaseMigrationsSQLDbClient) retry(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, migrationOperationInput MigrationOperationInput, options *DatabaseMigrationsSQLDbClientBeginRetryOptions) (*http.Response, error) { + var err error + const operationName = "DatabaseMigrationsSQLDbClient.BeginRetry" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.retryCreateRequest(ctx, resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// retryCreateRequest creates the Retry request. +func (client *DatabaseMigrationsSQLDbClient) retryCreateRequest(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, migrationOperationInput MigrationOperationInput, _ *DatabaseMigrationsSQLDbClientBeginRetryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/retry" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sqlDbInstanceName == "" { + return nil, errors.New("parameter sqlDbInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sqlDbInstanceName}", url.PathEscape(sqlDbInstanceName)) + if targetDbName == "" { + return nil, errors.New("parameter targetDbName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetDbName}", url.PathEscape(targetDbName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-06-30") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, migrationOperationInput); err != nil { + return nil, err + } + return req, nil +} diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client_example_test.go index d108abe1228d..8bb254320f7c 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqldb_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbGetDatabaseMigrationExpanded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbGetDatabaseMigrationExpanded.json func ExampleDatabaseMigrationsSQLDbClient_Get_getSqlDbDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleDatabaseMigrationsSQLDbClient_Get_getSqlDbDatabaseMigrationWithTheEx // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbGetDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbGetDatabaseMigration.json func ExampleDatabaseMigrationsSQLDbClient_Get_getSqlDbDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +134,7 @@ func ExampleDatabaseMigrationsSQLDbClient_Get_getSqlDbDatabaseMigrationWithoutTh // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbCreateOrUpdateDatabaseMigrationMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbCreateOrUpdateDatabaseMigrationMAX.json func ExampleDatabaseMigrationsSQLDbClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -207,7 +207,7 @@ func ExampleDatabaseMigrationsSQLDbClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbCreateOrUpdateDatabaseMigrationMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbCreateOrUpdateDatabaseMigrationMIN.json func ExampleDatabaseMigrationsSQLDbClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -274,7 +274,7 @@ func ExampleDatabaseMigrationsSQLDbClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbDeleteDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbDeleteDatabaseMigration.json func ExampleDatabaseMigrationsSQLDbClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -295,7 +295,7 @@ func ExampleDatabaseMigrationsSQLDbClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlDbCancelDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbCancelDatabaseMigration.json func ExampleDatabaseMigrationsSQLDbClient_BeginCancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -317,3 +317,26 @@ func ExampleDatabaseMigrationsSQLDbClient_BeginCancel() { log.Fatalf("failed to pull the result: %v", err) } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlDbRetryDatabaseMigration.json +func ExampleDatabaseMigrationsSQLDbClient_BeginRetry() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdatamigration.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDatabaseMigrationsSQLDbClient().BeginRetry(ctx, "testrg", "sqldbinstance", "db1", armdatamigration.MigrationOperationInput{ + MigrationOperationID: to.Ptr("9a90bb84-e70f-46f7-b0ae-1aef5b3b9f07"), + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client.go index 34bbd4cf8305..ab2e635a94c1 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -43,7 +44,7 @@ func NewDatabaseMigrationsSQLMiClient(subscriptionID string, credential azcore.T // BeginCancel - Stop in-progress database migration to SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -70,7 +71,7 @@ func (client *DatabaseMigrationsSQLMiClient) BeginCancel(ctx context.Context, re // Cancel - Stop in-progress database migration to SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLMiClient) cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, parameters MigrationOperationInput, options *DatabaseMigrationsSQLMiClientBeginCancelOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLMiClient.BeginCancel" @@ -116,7 +117,7 @@ func (client *DatabaseMigrationsSQLMiClient) cancelCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err @@ -127,7 +128,7 @@ func (client *DatabaseMigrationsSQLMiClient) cancelCreateRequest(ctx context.Con // BeginCreateOrUpdate - Create a new database migration to a given SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -154,7 +155,7 @@ func (client *DatabaseMigrationsSQLMiClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create a new database migration to a given SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLMiClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, parameters DatabaseMigrationSQLMi, options *DatabaseMigrationsSQLMiClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLMiClient.BeginCreateOrUpdate" @@ -200,7 +201,7 @@ func (client *DatabaseMigrationsSQLMiClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -212,7 +213,7 @@ func (client *DatabaseMigrationsSQLMiClient) createOrUpdateCreateRequest(ctx con // BeginCutover - Initiate cutover for in-progress online database migration to SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -239,7 +240,7 @@ func (client *DatabaseMigrationsSQLMiClient) BeginCutover(ctx context.Context, r // Cutover - Initiate cutover for in-progress online database migration to SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLMiClient) cutover(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, parameters MigrationOperationInput, options *DatabaseMigrationsSQLMiClientBeginCutoverOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLMiClient.BeginCutover" @@ -285,7 +286,7 @@ func (client *DatabaseMigrationsSQLMiClient) cutoverCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err @@ -293,10 +294,94 @@ func (client *DatabaseMigrationsSQLMiClient) cutoverCreateRequest(ctx context.Co return req, nil } +// BeginDelete - Delete Database Migration resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +// - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource +// Manager API or the portal. +// - targetDbName - The name of the target database. +// - options - DatabaseMigrationsSQLMiClientBeginDeleteOptions contains the optional parameters for the DatabaseMigrationsSQLMiClient.BeginDelete +// method. +func (client *DatabaseMigrationsSQLMiClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, options *DatabaseMigrationsSQLMiClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsSQLMiClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, targetDbName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabaseMigrationsSQLMiClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabaseMigrationsSQLMiClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Database Migration resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +func (client *DatabaseMigrationsSQLMiClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, options *DatabaseMigrationsSQLMiClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DatabaseMigrationsSQLMiClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, targetDbName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DatabaseMigrationsSQLMiClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, options *DatabaseMigrationsSQLMiClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if targetDbName == "" { + return nil, errors.New("parameter targetDbName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetDbName}", url.PathEscape(targetDbName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-06-30") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // Get - Retrieve the specified database migration for a given SQL Managed Instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -351,7 +436,7 @@ func (client *DatabaseMigrationsSQLMiClient) getCreateRequest(ctx context.Contex if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.MigrationOperationID != nil { reqQP.Set("migrationOperationId", *options.MigrationOperationID) } diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client_example_test.go index 1608e0006d3e..63c4888701f3 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlmi_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiGetDatabaseMigrationExpanded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiGetDatabaseMigrationExpanded.json func ExampleDatabaseMigrationsSQLMiClient_Get_getSqlMiDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleDatabaseMigrationsSQLMiClient_Get_getSqlMiDatabaseMigrationWithTheEx // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiGetDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiGetDatabaseMigration.json func ExampleDatabaseMigrationsSQLMiClient_Get_getSqlMiDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleDatabaseMigrationsSQLMiClient_Get_getSqlMiDatabaseMigrationWithoutTh // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiCreateOrUpdateDatabaseMigrationBlobManagedIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiCreateOrUpdateDatabaseMigrationBlobManagedIdentity.json func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceFromAzureBlobUsingManagedIdentity() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -188,7 +188,7 @@ func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiCreateOrUpdateDatabaseMigrationMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiCreateOrUpdateDatabaseMigrationMAX.json func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -270,7 +270,7 @@ func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiCreateOrUpdateDatabaseMigrationMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiCreateOrUpdateDatabaseMigrationMIN.json func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -344,7 +344,53 @@ func ExampleDatabaseMigrationsSQLMiClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiCancelDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiDeleteDatabaseMigration.json +func ExampleDatabaseMigrationsSQLMiClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdatamigration.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDatabaseMigrationsSQLMiClient().BeginDelete(ctx, "testrg", "managedInstance1", "db1", &armdatamigration.DatabaseMigrationsSQLMiClientBeginDeleteOptions{Force: nil}) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.DatabaseMigrationSQLMi = armdatamigration.DatabaseMigrationSQLMi{ + // Name: to.Ptr("db1"), + // Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/miname/providers/Microsoft.DataMigration/databaseMigrations/db1"), + // Properties: &armdatamigration.DatabaseMigrationPropertiesSQLMi{ + // EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), + // Kind: to.Ptr(armdatamigration.ResourceTypeSQLMi), + // MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"), + // MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent"), + // MigrationStatus: to.Ptr("InProgress"), + // ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded), + // Scope: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/managedInstance1"), + // StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), + // SourceDatabaseName: to.Ptr("sourcename"), + // SourceServerName: to.Ptr("sourceserver"), + // BackupConfiguration: &armdatamigration.BackupConfiguration{ + // SourceLocation: &armdatamigration.SourceLocation{ + // FileStorageType: to.Ptr("FileShare"), + // }, + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiCancelDatabaseMigration.json func ExampleDatabaseMigrationsSQLMiClient_BeginCancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -367,7 +413,7 @@ func ExampleDatabaseMigrationsSQLMiClient_BeginCancel() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlMiCutoverDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlMiCutoverDatabaseMigration.json func ExampleDatabaseMigrationsSQLMiClient_BeginCutover() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client.go index 0ddb42b9965f..660d0ecf0f69 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -43,7 +44,7 @@ func NewDatabaseMigrationsSQLVMClient(subscriptionID string, credential azcore.T // BeginCancel - Stop in-progress database migration to SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -69,7 +70,7 @@ func (client *DatabaseMigrationsSQLVMClient) BeginCancel(ctx context.Context, re // Cancel - Stop in-progress database migration to SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLVMClient) cancel(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, parameters MigrationOperationInput, options *DatabaseMigrationsSQLVMClientBeginCancelOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLVMClient.BeginCancel" @@ -115,7 +116,7 @@ func (client *DatabaseMigrationsSQLVMClient) cancelCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err @@ -126,7 +127,7 @@ func (client *DatabaseMigrationsSQLVMClient) cancelCreateRequest(ctx context.Con // BeginCreateOrUpdate - Create a new database migration to a given SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -153,7 +154,7 @@ func (client *DatabaseMigrationsSQLVMClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create a new database migration to a given SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLVMClient) createOrUpdate(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, parameters DatabaseMigrationSQLVM, options *DatabaseMigrationsSQLVMClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLVMClient.BeginCreateOrUpdate" @@ -199,7 +200,7 @@ func (client *DatabaseMigrationsSQLVMClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -211,7 +212,7 @@ func (client *DatabaseMigrationsSQLVMClient) createOrUpdateCreateRequest(ctx con // BeginCutover - Initiate cutover for in-progress online database migration to SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -237,7 +238,7 @@ func (client *DatabaseMigrationsSQLVMClient) BeginCutover(ctx context.Context, r // Cutover - Initiate cutover for in-progress online database migration to SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *DatabaseMigrationsSQLVMClient) cutover(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, parameters MigrationOperationInput, options *DatabaseMigrationsSQLVMClientBeginCutoverOptions) (*http.Response, error) { var err error const operationName = "DatabaseMigrationsSQLVMClient.BeginCutover" @@ -283,7 +284,7 @@ func (client *DatabaseMigrationsSQLVMClient) cutoverCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err @@ -291,10 +292,94 @@ func (client *DatabaseMigrationsSQLVMClient) cutoverCreateRequest(ctx context.Co return req, nil } +// BeginDelete - Delete Database Migration resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +// - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource +// Manager API or the portal. +// - targetDbName - The name of the target database. +// - options - DatabaseMigrationsSQLVMClientBeginDeleteOptions contains the optional parameters for the DatabaseMigrationsSQLVMClient.BeginDelete +// method. +func (client *DatabaseMigrationsSQLVMClient) BeginDelete(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, options *DatabaseMigrationsSQLVMClientBeginDeleteOptions) (*runtime.Poller[DatabaseMigrationsSQLVMClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, sqlVirtualMachineName, targetDbName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabaseMigrationsSQLVMClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabaseMigrationsSQLVMClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Database Migration resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-06-30 +func (client *DatabaseMigrationsSQLVMClient) deleteOperation(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, options *DatabaseMigrationsSQLVMClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DatabaseMigrationsSQLVMClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, sqlVirtualMachineName, targetDbName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DatabaseMigrationsSQLVMClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, options *DatabaseMigrationsSQLVMClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sqlVirtualMachineName == "" { + return nil, errors.New("parameter sqlVirtualMachineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sqlVirtualMachineName}", url.PathEscape(sqlVirtualMachineName)) + if targetDbName == "" { + return nil, errors.New("parameter targetDbName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetDbName}", url.PathEscape(targetDbName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-06-30") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // Get - Retrieve the specified database migration for a given SQL VM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - targetDbName - The name of the target database. @@ -349,7 +434,7 @@ func (client *DatabaseMigrationsSQLVMClient) getCreateRequest(ctx context.Contex if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.MigrationOperationID != nil { reqQP.Set("migrationOperationId", *options.MigrationOperationID) } diff --git a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client_example_test.go index 25048bae8b47..f137345e0976 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/databasemigrationssqlvm_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmGetDatabaseMigrationExpanded.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmGetDatabaseMigrationExpanded.json func ExampleDatabaseMigrationsSQLVMClient_Get_getSqlVmDatabaseMigrationWithTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleDatabaseMigrationsSQLVMClient_Get_getSqlVmDatabaseMigrationWithTheEx // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmGetDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmGetDatabaseMigration.json func ExampleDatabaseMigrationsSQLVMClient_Get_getSqlVmDatabaseMigrationWithoutTheExpandParameter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleDatabaseMigrationsSQLVMClient_Get_getSqlVmDatabaseMigrationWithoutTh // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmCreateOrUpdateDatabaseMigrationMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmCreateOrUpdateDatabaseMigrationMAX.json func ExampleDatabaseMigrationsSQLVMClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -194,7 +194,7 @@ func ExampleDatabaseMigrationsSQLVMClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmCreateOrUpdateDatabaseMigrationMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmCreateOrUpdateDatabaseMigrationMIN.json func ExampleDatabaseMigrationsSQLVMClient_BeginCreateOrUpdate_createOrUpdateDatabaseMigrationResourceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -268,7 +268,53 @@ func ExampleDatabaseMigrationsSQLVMClient_BeginCreateOrUpdate_createOrUpdateData // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmCancelDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmDeleteDatabaseMigration.json +func ExampleDatabaseMigrationsSQLVMClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdatamigration.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDatabaseMigrationsSQLVMClient().BeginDelete(ctx, "testrg", "testvm", "db1", &armdatamigration.DatabaseMigrationsSQLVMClientBeginDeleteOptions{Force: nil}) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.DatabaseMigrationSQLVM = armdatamigration.DatabaseMigrationSQLVM{ + // Name: to.Ptr("db1"), + // Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm/providers/Microsoft.DataMigration/databaseMigrations/db1"), + // Properties: &armdatamigration.DatabaseMigrationPropertiesSQLVM{ + // EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), + // Kind: to.Ptr(armdatamigration.ResourceTypeSQLVM), + // MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"), + // MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent"), + // MigrationStatus: to.Ptr("InProgress"), + // ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded), + // Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm"), + // StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), + // SourceDatabaseName: to.Ptr("sourcename"), + // SourceServerName: to.Ptr("sourceserver"), + // BackupConfiguration: &armdatamigration.BackupConfiguration{ + // SourceLocation: &armdatamigration.SourceLocation{ + // FileStorageType: to.Ptr("FileShare"), + // }, + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmCancelDatabaseMigration.json func ExampleDatabaseMigrationsSQLVMClient_BeginCancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -291,7 +337,7 @@ func ExampleDatabaseMigrationsSQLVMClient_BeginCancel() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/SqlVmCutoverDatabaseMigration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/SqlVmCutoverDatabaseMigration.json func ExampleDatabaseMigrationsSQLVMClient_BeginCutover() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbrumongo_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbrumongo_server.go index e09eedf4f1c4..d0e96c13f4dc 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbrumongo_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbrumongo_server.go @@ -119,7 +119,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbRUMongoServerTransport) dispatchBeginC const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DatabaseMigrationCosmosDbMongo](req) @@ -171,7 +171,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbRUMongoServerTransport) dispatchBeginD const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -232,7 +232,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbRUMongoServerTransport) dispatchGet(re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -271,7 +271,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbRUMongoServerTransport) dispatchNewGet const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbvcoremongo_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbvcoremongo_server.go index 42e1c1be8e7e..967f5eba6697 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbvcoremongo_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationsmongotocosmosdbvcoremongo_server.go @@ -119,7 +119,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbvCoreMongoServerTransport) dispatchBeg const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DatabaseMigrationCosmosDbMongo](req) @@ -171,7 +171,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbvCoreMongoServerTransport) dispatchBeg const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -232,7 +232,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbvCoreMongoServerTransport) dispatchGet const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -271,7 +271,7 @@ func (d *DatabaseMigrationsMongoToCosmosDbvCoreMongoServerTransport) dispatchNew const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqldb_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqldb_server.go index 60193a249f3e..1f3953980fa9 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqldb_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqldb_server.go @@ -36,6 +36,10 @@ type DatabaseMigrationsSQLDbServer struct { // Get is the fake for method DatabaseMigrationsSQLDbClient.Get // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, options *armdatamigration.DatabaseMigrationsSQLDbClientGetOptions) (resp azfake.Responder[armdatamigration.DatabaseMigrationsSQLDbClientGetResponse], errResp azfake.ErrorResponder) + + // BeginRetry is the fake for method DatabaseMigrationsSQLDbClient.BeginRetry + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRetry func(ctx context.Context, resourceGroupName string, sqlDbInstanceName string, targetDbName string, migrationOperationInput armdatamigration.MigrationOperationInput, options *armdatamigration.DatabaseMigrationsSQLDbClientBeginRetryOptions) (resp azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientRetryResponse], errResp azfake.ErrorResponder) } // NewDatabaseMigrationsSQLDbServerTransport creates a new instance of DatabaseMigrationsSQLDbServerTransport with the provided implementation. @@ -47,6 +51,7 @@ func NewDatabaseMigrationsSQLDbServerTransport(srv *DatabaseMigrationsSQLDbServe beginCancel: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientCancelResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientCreateOrUpdateResponse]](), beginDelete: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientDeleteResponse]](), + beginRetry: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientRetryResponse]](), } } @@ -57,6 +62,7 @@ type DatabaseMigrationsSQLDbServerTransport struct { beginCancel *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientCancelResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientCreateOrUpdateResponse]] beginDelete *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientDeleteResponse]] + beginRetry *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLDbClientRetryResponse]] } // Do implements the policy.Transporter interface for DatabaseMigrationsSQLDbServerTransport. @@ -90,6 +96,8 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchToMethodFake(req *http. res.resp, res.err = d.dispatchBeginDelete(req) case "DatabaseMigrationsSQLDbClient.Get": res.resp, res.err = d.dispatchGet(req) + case "DatabaseMigrationsSQLDbClient.BeginRetry": + res.resp, res.err = d.dispatchBeginRetry(req) default: res.err = fmt.Errorf("unhandled API %s", method) } @@ -118,7 +126,7 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchBeginCancel(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) @@ -170,7 +178,7 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchBeginCreateOrUpdate(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DatabaseMigrationSQLDb](req) @@ -222,7 +230,7 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchBeginDelete(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -283,7 +291,7 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchGet(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -331,6 +339,58 @@ func (d *DatabaseMigrationsSQLDbServerTransport) dispatchGet(req *http.Request) return resp, nil } +func (d *DatabaseMigrationsSQLDbServerTransport) dispatchBeginRetry(req *http.Request) (*http.Response, error) { + if d.srv.BeginRetry == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRetry not implemented")} + } + beginRetry := d.beginRetry.get(req) + if beginRetry == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/retry` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + sqlDbInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("sqlDbInstanceName")]) + if err != nil { + return nil, err + } + targetDbNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("targetDbName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.BeginRetry(req.Context(), resourceGroupNameParam, sqlDbInstanceNameParam, targetDbNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRetry = &respr + d.beginRetry.add(req, beginRetry) + } + + resp, err := server.PollerResponderNext(beginRetry, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginRetry.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRetry) { + d.beginRetry.remove(req) + } + + return resp, nil +} + // set this to conditionally intercept incoming requests to DatabaseMigrationsSQLDbServerTransport var databaseMigrationsSqlDbServerTransportInterceptor interface { // Do returns true if the server transport should use the returned response/error diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlmi_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlmi_server.go index fff6b1babdf4..841c7c5a956a 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlmi_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlmi_server.go @@ -16,6 +16,7 @@ import ( "net/http" "net/url" "regexp" + "strconv" ) // DatabaseMigrationsSQLMiServer is a fake server for instances of the armdatamigration.DatabaseMigrationsSQLMiClient type. @@ -32,6 +33,10 @@ type DatabaseMigrationsSQLMiServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginCutover func(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, parameters armdatamigration.MigrationOperationInput, options *armdatamigration.DatabaseMigrationsSQLMiClientBeginCutoverOptions) (resp azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCutoverResponse], errResp azfake.ErrorResponder) + // BeginDelete is the fake for method DatabaseMigrationsSQLMiClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, options *armdatamigration.DatabaseMigrationsSQLMiClientBeginDeleteOptions) (resp azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientDeleteResponse], errResp azfake.ErrorResponder) + // Get is the fake for method DatabaseMigrationsSQLMiClient.Get // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, managedInstanceName string, targetDbName string, options *armdatamigration.DatabaseMigrationsSQLMiClientGetOptions) (resp azfake.Responder[armdatamigration.DatabaseMigrationsSQLMiClientGetResponse], errResp azfake.ErrorResponder) @@ -46,6 +51,7 @@ func NewDatabaseMigrationsSQLMiServerTransport(srv *DatabaseMigrationsSQLMiServe beginCancel: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCancelResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCreateOrUpdateResponse]](), beginCutover: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCutoverResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientDeleteResponse]](), } } @@ -56,6 +62,7 @@ type DatabaseMigrationsSQLMiServerTransport struct { beginCancel *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCancelResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCreateOrUpdateResponse]] beginCutover *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientCutoverResponse]] + beginDelete *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLMiClientDeleteResponse]] } // Do implements the policy.Transporter interface for DatabaseMigrationsSQLMiServerTransport. @@ -87,6 +94,8 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchToMethodFake(req *http. res.resp, res.err = d.dispatchBeginCreateOrUpdate(req) case "DatabaseMigrationsSQLMiClient.BeginCutover": res.resp, res.err = d.dispatchBeginCutover(req) + case "DatabaseMigrationsSQLMiClient.BeginDelete": + res.resp, res.err = d.dispatchBeginDelete(req) case "DatabaseMigrationsSQLMiClient.Get": res.resp, res.err = d.dispatchGet(req) default: @@ -117,7 +126,7 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchBeginCancel(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/managedInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) @@ -169,7 +178,7 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchBeginCreateOrUpdate(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/managedInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DatabaseMigrationSQLMi](req) @@ -221,7 +230,7 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchBeginCutover(req *http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/managedInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cutover` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) @@ -264,6 +273,69 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchBeginCutover(req *http. return resp, nil } +func (d *DatabaseMigrationsSQLMiServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if d.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/managedInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + managedInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("managedInstanceName")]) + if err != nil { + return nil, err + } + targetDbNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("targetDbName")]) + if err != nil { + return nil, err + } + forceUnescaped, err := url.QueryUnescape(qp.Get("force")) + if err != nil { + return nil, err + } + forceParam, err := parseOptional(forceUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armdatamigration.DatabaseMigrationsSQLMiClientBeginDeleteOptions + if forceParam != nil { + options = &armdatamigration.DatabaseMigrationsSQLMiClientBeginDeleteOptions{ + Force: forceParam, + } + } + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, managedInstanceNameParam, targetDbNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + d.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) + } + + return resp, nil +} + func (d *DatabaseMigrationsSQLMiServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} @@ -271,7 +343,7 @@ func (d *DatabaseMigrationsSQLMiServerTransport) dispatchGet(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/managedInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlvm_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlvm_server.go index 256c77bd856f..e78e674b180b 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlvm_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/databasemigrationssqlvm_server.go @@ -16,6 +16,7 @@ import ( "net/http" "net/url" "regexp" + "strconv" ) // DatabaseMigrationsSQLVMServer is a fake server for instances of the armdatamigration.DatabaseMigrationsSQLVMClient type. @@ -32,6 +33,10 @@ type DatabaseMigrationsSQLVMServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginCutover func(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, parameters armdatamigration.MigrationOperationInput, options *armdatamigration.DatabaseMigrationsSQLVMClientBeginCutoverOptions) (resp azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCutoverResponse], errResp azfake.ErrorResponder) + // BeginDelete is the fake for method DatabaseMigrationsSQLVMClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, options *armdatamigration.DatabaseMigrationsSQLVMClientBeginDeleteOptions) (resp azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientDeleteResponse], errResp azfake.ErrorResponder) + // Get is the fake for method DatabaseMigrationsSQLVMClient.Get // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, sqlVirtualMachineName string, targetDbName string, options *armdatamigration.DatabaseMigrationsSQLVMClientGetOptions) (resp azfake.Responder[armdatamigration.DatabaseMigrationsSQLVMClientGetResponse], errResp azfake.ErrorResponder) @@ -46,6 +51,7 @@ func NewDatabaseMigrationsSQLVMServerTransport(srv *DatabaseMigrationsSQLVMServe beginCancel: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCancelResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCreateOrUpdateResponse]](), beginCutover: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCutoverResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientDeleteResponse]](), } } @@ -56,6 +62,7 @@ type DatabaseMigrationsSQLVMServerTransport struct { beginCancel *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCancelResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCreateOrUpdateResponse]] beginCutover *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientCutoverResponse]] + beginDelete *tracker[azfake.PollerResponder[armdatamigration.DatabaseMigrationsSQLVMClientDeleteResponse]] } // Do implements the policy.Transporter interface for DatabaseMigrationsSQLVMServerTransport. @@ -87,6 +94,8 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchToMethodFake(req *http. res.resp, res.err = d.dispatchBeginCreateOrUpdate(req) case "DatabaseMigrationsSQLVMClient.BeginCutover": res.resp, res.err = d.dispatchBeginCutover(req) + case "DatabaseMigrationsSQLVMClient.BeginDelete": + res.resp, res.err = d.dispatchBeginDelete(req) case "DatabaseMigrationsSQLVMClient.Get": res.resp, res.err = d.dispatchGet(req) default: @@ -117,7 +126,7 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchBeginCancel(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.SqlVirtualMachine/sqlVirtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) @@ -169,7 +178,7 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchBeginCreateOrUpdate(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.SqlVirtualMachine/sqlVirtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DatabaseMigrationSQLVM](req) @@ -221,7 +230,7 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchBeginCutover(req *http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.SqlVirtualMachine/sqlVirtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cutover` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationOperationInput](req) @@ -264,6 +273,69 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchBeginCutover(req *http. return resp, nil } +func (d *DatabaseMigrationsSQLVMServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if d.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.SqlVirtualMachine/sqlVirtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + sqlVirtualMachineNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("sqlVirtualMachineName")]) + if err != nil { + return nil, err + } + targetDbNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("targetDbName")]) + if err != nil { + return nil, err + } + forceUnescaped, err := url.QueryUnescape(qp.Get("force")) + if err != nil { + return nil, err + } + forceParam, err := parseOptional(forceUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armdatamigration.DatabaseMigrationsSQLVMClientBeginDeleteOptions + if forceParam != nil { + options = &armdatamigration.DatabaseMigrationsSQLVMClientBeginDeleteOptions{ + Force: forceParam, + } + } + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, sqlVirtualMachineNameParam, targetDbNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + d.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) + } + + return resp, nil +} + func (d *DatabaseMigrationsSQLVMServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} @@ -271,7 +343,7 @@ func (d *DatabaseMigrationsSQLVMServerTransport) dispatchGet(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.SqlVirtualMachine/sqlVirtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/databaseMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/files_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/files_server.go index b391b6994671..738af8e5d89c 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/files_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/files_server.go @@ -130,7 +130,7 @@ func (f *FilesServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectFile](req) @@ -175,7 +175,7 @@ func (f *FilesServerTransport) dispatchDelete(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -216,7 +216,7 @@ func (f *FilesServerTransport) dispatchGet(req *http.Request) (*http.Response, e const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -259,7 +259,7 @@ func (f *FilesServerTransport) dispatchNewListPager(req *http.Request) (*http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -302,7 +302,7 @@ func (f *FilesServerTransport) dispatchRead(req *http.Request) (*http.Response, const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/read` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -343,7 +343,7 @@ func (f *FilesServerTransport) dispatchReadWrite(req *http.Request) (*http.Respo const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/readwrite` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -384,7 +384,7 @@ func (f *FilesServerTransport) dispatchUpdate(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/files/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectFile](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/migrationservices_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/migrationservices_server.go index 1788849eda57..a2ff9a8fb3c9 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/migrationservices_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/migrationservices_server.go @@ -142,7 +142,7 @@ func (m *MigrationServicesServerTransport) dispatchBeginCreateOrUpdate(req *http const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationService](req) @@ -190,7 +190,7 @@ func (m *MigrationServicesServerTransport) dispatchBeginDelete(req *http.Request const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -232,7 +232,7 @@ func (m *MigrationServicesServerTransport) dispatchGet(req *http.Request) (*http const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -267,7 +267,7 @@ func (m *MigrationServicesServerTransport) dispatchNewListByResourceGroupPager(r const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -304,7 +304,7 @@ func (m *MigrationServicesServerTransport) dispatchNewListBySubscriptionPager(re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := m.srv.NewListBySubscriptionPager(nil) @@ -337,7 +337,7 @@ func (m *MigrationServicesServerTransport) dispatchNewListMigrationsPager(req *h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listMigrations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -378,7 +378,7 @@ func (m *MigrationServicesServerTransport) dispatchBeginUpdate(req *http.Request const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/migrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.MigrationServiceUpdate](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/projects_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/projects_server.go index e15f7ab99fa1..ad4863b3f5bd 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/projects_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/projects_server.go @@ -119,7 +119,7 @@ func (p *ProjectsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.Project](req) @@ -160,7 +160,7 @@ func (p *ProjectsServerTransport) dispatchDelete(req *http.Request) (*http.Respo const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -212,7 +212,7 @@ func (p *ProjectsServerTransport) dispatchGet(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -251,7 +251,7 @@ func (p *ProjectsServerTransport) dispatchNewListPager(req *http.Request) (*http const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -290,7 +290,7 @@ func (p *ProjectsServerTransport) dispatchUpdate(req *http.Request) (*http.Respo const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.Project](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/resourceskus_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/resourceskus_server.go index a35e66a5b01e..e96e4a7d19e7 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/resourceskus_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/resourceskus_server.go @@ -94,7 +94,7 @@ func (r *ResourceSKUsServerTransport) dispatchNewListSKUsPager(req *http.Request const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/skus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := r.srv.NewListSKUsPager(nil) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/services_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/services_server.go index f9cba88befa3..c439d987f7db 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/services_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/services_server.go @@ -175,7 +175,7 @@ func (s *ServicesServerTransport) dispatchCheckChildrenNameAvailability(req *htt const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkNameAvailability` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.NameAvailabilityRequest](req) @@ -212,7 +212,7 @@ func (s *ServicesServerTransport) dispatchCheckNameAvailability(req *http.Reques const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkNameAvailability` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.NameAvailabilityRequest](req) @@ -245,7 +245,7 @@ func (s *ServicesServerTransport) dispatchCheckStatus(req *http.Request) (*http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -280,7 +280,7 @@ func (s *ServicesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.Service](req) @@ -328,7 +328,7 @@ func (s *ServicesServerTransport) dispatchBeginDelete(req *http.Request) (*http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -385,7 +385,7 @@ func (s *ServicesServerTransport) dispatchGet(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -420,7 +420,7 @@ func (s *ServicesServerTransport) dispatchNewListPager(req *http.Request) (*http const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListPager(nil) @@ -453,7 +453,7 @@ func (s *ServicesServerTransport) dispatchNewListByResourceGroupPager(req *http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -490,7 +490,7 @@ func (s *ServicesServerTransport) dispatchNewListSKUsPager(req *http.Request) (* const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/skus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -531,7 +531,7 @@ func (s *ServicesServerTransport) dispatchBeginStart(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -575,7 +575,7 @@ func (s *ServicesServerTransport) dispatchBeginStop(req *http.Request) (*http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -619,7 +619,7 @@ func (s *ServicesServerTransport) dispatchBeginUpdate(req *http.Request) (*http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.Service](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/servicetasks_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/servicetasks_server.go index ae6535215abd..f426a20b1cf6 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/servicetasks_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/servicetasks_server.go @@ -125,7 +125,7 @@ func (s *ServiceTasksServerTransport) dispatchCancel(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -162,7 +162,7 @@ func (s *ServiceTasksServerTransport) dispatchCreateOrUpdate(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectTask](req) @@ -203,7 +203,7 @@ func (s *ServiceTasksServerTransport) dispatchDelete(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -255,7 +255,7 @@ func (s *ServiceTasksServerTransport) dispatchGet(req *http.Request) (*http.Resp const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -306,7 +306,7 @@ func (s *ServiceTasksServerTransport) dispatchNewListPager(req *http.Request) (* const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -357,7 +357,7 @@ func (s *ServiceTasksServerTransport) dispatchUpdate(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectTask](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/sqlmigrationservices_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/sqlmigrationservices_server.go index 770f73388e58..2814a7e72a29 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/sqlmigrationservices_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/sqlmigrationservices_server.go @@ -166,7 +166,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchBeginCreateOrUpdate(req *h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.SQLMigrationService](req) @@ -214,7 +214,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchBeginDelete(req *http.Requ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -256,7 +256,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchDeleteNode(req *http.Reque const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deleteNode` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.DeleteNode](req) @@ -293,7 +293,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchGet(req *http.Request) (*h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -326,7 +326,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchListAuthKeys(req *http.Req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listAuthKeys` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -361,7 +361,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchNewListByResourceGroupPage const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -398,7 +398,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchNewListBySubscriptionPager const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListBySubscriptionPager(nil) @@ -431,7 +431,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchNewListMigrationsPager(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listMigrations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -470,7 +470,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchListMonitoringData(req *ht const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listMonitoringData` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -503,7 +503,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchRegenerateAuthKeys(req *ht const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/regenerateAuthKeys` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.RegenAuthKeys](req) @@ -542,7 +542,7 @@ func (s *SQLMigrationServicesServerTransport) dispatchBeginUpdate(req *http.Requ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/sqlMigrationServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.SQLMigrationServiceUpdate](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/tasks_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/tasks_server.go index 8e134e27cefa..dd6858e36d7c 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/tasks_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/tasks_server.go @@ -131,7 +131,7 @@ func (t *TasksServerTransport) dispatchCancel(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) @@ -172,7 +172,7 @@ func (t *TasksServerTransport) dispatchCommand(req *http.Request) (*http.Respons const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/command` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } raw, err := readRequestBody(req) @@ -221,7 +221,7 @@ func (t *TasksServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http. const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectTask](req) @@ -266,7 +266,7 @@ func (t *TasksServerTransport) dispatchDelete(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -322,7 +322,7 @@ func (t *TasksServerTransport) dispatchGet(req *http.Request) (*http.Response, e const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -377,7 +377,7 @@ func (t *TasksServerTransport) dispatchNewListPager(req *http.Request) (*http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() @@ -432,7 +432,7 @@ func (t *TasksServerTransport) dispatchUpdate(req *http.Request) (*http.Response const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/services/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/projects/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tasks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 5 { + if len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armdatamigration.ProjectTask](req) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/fake/usages_server.go b/sdk/resourcemanager/datamigration/armdatamigration/fake/usages_server.go index 9c1ee4484a9c..ddc1b93c29b6 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/fake/usages_server.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/fake/usages_server.go @@ -95,7 +95,7 @@ func (u *UsagesServerTransport) dispatchNewListPager(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DataMigration/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/files_client.go b/sdk/resourcemanager/datamigration/armdatamigration/files_client.go index 70467894ebfb..45e6f7f0ba7d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/files_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/files_client.go @@ -43,7 +43,7 @@ func NewFilesClient(subscriptionID string, credential azcore.TokenCredential, op // CreateOrUpdate - The PUT method creates a new file or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -100,7 +100,7 @@ func (client *FilesClient) createOrUpdateCreateRequest(ctx context.Context, grou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -121,7 +121,7 @@ func (client *FilesClient) createOrUpdateHandleResponse(resp *http.Response) (Fi // Delete - This method deletes a file. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -176,7 +176,7 @@ func (client *FilesClient) deleteCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +186,7 @@ func (client *FilesClient) deleteCreateRequest(ctx context.Context, groupName st // retrieves information about a file. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -242,7 +242,7 @@ func (client *FilesClient) getCreateRequest(ctx context.Context, groupName strin return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *FilesClient) getHandleResponse(resp *http.Response) (FilesClientGe // NewListPager - The project resource is a nested resource representing a stored migration project. This method returns a // list of files owned by a project resource. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -312,7 +312,7 @@ func (client *FilesClient) listCreateRequest(ctx context.Context, groupName stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +330,7 @@ func (client *FilesClient) listHandleResponse(resp *http.Response) (FilesClientL // Read - This method is used for requesting storage information using which contents of the file can be downloaded. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -386,7 +386,7 @@ func (client *FilesClient) readCreateRequest(ctx context.Context, groupName stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -404,7 +404,7 @@ func (client *FilesClient) readHandleResponse(resp *http.Response) (FilesClientR // ReadWrite - This method is used for requesting information for reading and writing the file content. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -460,7 +460,7 @@ func (client *FilesClient) readWriteCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -478,7 +478,7 @@ func (client *FilesClient) readWriteHandleResponse(resp *http.Response) (FilesCl // Update - This method updates an existing file. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -535,7 +535,7 @@ func (client *FilesClient) updateCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/files_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/files_client_example_test.go index 8a1f09d117fb..5a303de1b701 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/files_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/files_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_List.json func ExampleFilesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -70,7 +70,7 @@ func ExampleFilesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_Get.json func ExampleFilesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,7 +102,7 @@ func ExampleFilesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_CreateOrUpdate.json func ExampleFilesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleFilesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_Delete.json func ExampleFilesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,7 +153,7 @@ func ExampleFilesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_Update.json func ExampleFilesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -187,7 +187,7 @@ func ExampleFilesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_Read.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_Read.json func ExampleFilesClient_Read() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -213,7 +213,7 @@ func ExampleFilesClient_Read() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Files_ReadWrite.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Files_ReadWrite.json func ExampleFilesClient_ReadWrite() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/go.mod b/sdk/resourcemanager/datamigration/armdatamigration/go.mod index 88f5b799c483..879b66a7412a 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/go.mod +++ b/sdk/resourcemanager/datamigration/armdatamigration/go.mod @@ -1,21 +1,23 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2 -go 1.23.0 +go 1.24.0 + +toolchain go1.24.7 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect + golang.org/x/crypto v0.42.0 // indirect + golang.org/x/net v0.44.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/text v0.29.0 // indirect ) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/go.sum b/sdk/resourcemanager/datamigration/armdatamigration/go.sum index 49e874cd7954..7ea74e74b83a 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/go.sum +++ b/sdk/resourcemanager/datamigration/armdatamigration/go.sum @@ -1,11 +1,11 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 h1:Wc1ml6QlJs2BHQ/9Bqu1jiyggbsSjramq2oUmp5WeIo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 h1:5YTBM8QDVIBN3sxBil89WfdAAqDZbyJTgh688DSxX5w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= @@ -30,16 +30,16 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= +golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client.go b/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client.go index 9c47fea5d0b6..f238c718c295 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client.go @@ -43,7 +43,7 @@ func NewMigrationServicesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create or Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - migrationServiceName - Name of the Migration Service. @@ -70,7 +70,7 @@ func (client *MigrationServicesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *MigrationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, migrationServiceName string, parameters MigrationService, options *MigrationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "MigrationServicesClient.BeginCreateOrUpdate" @@ -112,7 +112,7 @@ func (client *MigrationServicesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -124,7 +124,7 @@ func (client *MigrationServicesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Delete Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - migrationServiceName - Name of the Migration Service. @@ -150,7 +150,7 @@ func (client *MigrationServicesClient) BeginDelete(ctx context.Context, resource // Delete - Delete Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *MigrationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, migrationServiceName string, options *MigrationServicesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "MigrationServicesClient.BeginDelete" @@ -192,7 +192,7 @@ func (client *MigrationServicesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ func (client *MigrationServicesClient) deleteCreateRequest(ctx context.Context, // Get - Retrieve the Database Migration Service // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - migrationServiceName - Name of the Migration Service. @@ -248,7 +248,7 @@ func (client *MigrationServicesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -265,7 +265,7 @@ func (client *MigrationServicesClient) getHandleResponse(resp *http.Response) (M // NewListByResourceGroupPager - Retrieve all migration services in the resource group. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - options - MigrationServicesClientListByResourceGroupOptions contains the optional parameters for the MigrationServicesClient.NewListByResourceGroupPager @@ -309,7 +309,7 @@ func (client *MigrationServicesClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,7 +326,7 @@ func (client *MigrationServicesClient) listByResourceGroupHandleResponse(resp *h // NewListBySubscriptionPager - Retrieve all migration services in the subscriptions. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - options - MigrationServicesClientListBySubscriptionOptions contains the optional parameters for the MigrationServicesClient.NewListBySubscriptionPager // method. func (client *MigrationServicesClient) NewListBySubscriptionPager(options *MigrationServicesClientListBySubscriptionOptions) *runtime.Pager[MigrationServicesClientListBySubscriptionResponse] { @@ -364,7 +364,7 @@ func (client *MigrationServicesClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -381,7 +381,7 @@ func (client *MigrationServicesClient) listBySubscriptionHandleResponse(resp *ht // NewListMigrationsPager - Retrieve the List of database migrations attached to the service. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - migrationServiceName - Name of the Migration Service. @@ -430,7 +430,7 @@ func (client *MigrationServicesClient) listMigrationsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -448,7 +448,7 @@ func (client *MigrationServicesClient) listMigrationsHandleResponse(resp *http.R // BeginUpdate - Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - migrationServiceName - Name of the Migration Service. @@ -475,7 +475,7 @@ func (client *MigrationServicesClient) BeginUpdate(ctx context.Context, resource // Update - Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *MigrationServicesClient) update(ctx context.Context, resourceGroupName string, migrationServiceName string, parameters MigrationServiceUpdate, options *MigrationServicesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "MigrationServicesClient.BeginUpdate" @@ -517,7 +517,7 @@ func (client *MigrationServicesClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client_example_test.go index 36636f1d67a0..9a37c9e57b01 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/migrationservices_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/GetMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/GetMigrationService.json func ExampleMigrationServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -50,7 +50,7 @@ func ExampleMigrationServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CreateOrUpdateMigrationServiceMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CreateOrUpdateMigrationServiceMAX.json func ExampleMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateMigrationServiceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -88,7 +88,7 @@ func ExampleMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateMigrationS // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CreateOrUpdateMigrationServiceMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CreateOrUpdateMigrationServiceMIN.json func ExampleMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateMigrationServiceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateMigrationS // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/DeleteMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/DeleteMigrationService.json func ExampleMigrationServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +147,7 @@ func ExampleMigrationServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/UpdateMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/UpdateMigrationService.json func ExampleMigrationServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -186,7 +186,7 @@ func ExampleMigrationServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListByResourceGroupMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListByResourceGroupMigrationService.json func ExampleMigrationServicesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -238,7 +238,7 @@ func ExampleMigrationServicesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListBySubscriptionMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListBySubscriptionMigrationService.json func ExampleMigrationServicesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -302,7 +302,7 @@ func ExampleMigrationServicesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListMigrationsByMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListMigrationsByMigrationService.json func ExampleMigrationServicesClient_NewListMigrationsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/models.go b/sdk/resourcemanager/datamigration/armdatamigration/models.go index f6ba237de59b..d1214c663b5d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/models.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/models.go @@ -13,7 +13,7 @@ type APIError struct { Error *ODataError // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + SystemData *SystemData } // AuthenticationKeys - An authentication key. @@ -1897,16 +1897,16 @@ type DatabaseMigrationSQLDb struct { // Database Migration Resource properties for SQL database. Properties *DatabaseMigrationPropertiesSQLDb - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -1915,16 +1915,16 @@ type DatabaseMigrationSQLMi struct { // Database Migration Resource properties for SQL Managed Instance. Properties *DatabaseMigrationPropertiesSQLMi - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -1933,16 +1933,16 @@ type DatabaseMigrationSQLVM struct { // Database Migration Resource properties for SQL Virtual Machine. Properties *DatabaseMigrationPropertiesSQLVM - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -6649,26 +6649,28 @@ func (p *PostgreSQLConnectionInfo) GetConnectionInfo() *ConnectionInfo { // Project - A project resource type Project struct { - // HTTP strong entity tag value. This is ignored if submitted. - Etag *string + // REQUIRED; The geo-location where the resource lives Location *string + // HTTP strong entity tag value. This is ignored if submitted. + Etag *string + // Project properties Properties *ProjectProperties - // Dictionary of + // Resource tags. Tags map[string]*string - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -6687,7 +6689,7 @@ type ProjectFile struct { Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + SystemData *SystemData // READ-ONLY; Resource type. Type *string @@ -6789,7 +6791,7 @@ type ProjectTask struct { Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated + SystemData *SystemData // READ-ONLY; Resource type. Type *string @@ -6833,20 +6835,6 @@ type ProxyResource struct { Type *string } -type ProxyResourceAutoGenerated struct { - // READ-ONLY - ID *string - - // READ-ONLY - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemDataAutoGenerated - - // READ-ONLY - Type *string -} - // QueryAnalysisValidationResult - Results for query analysis comparison between the source and target type QueryAnalysisValidationResult struct { // List of queries executed and it's execution results in source and target @@ -7244,24 +7232,25 @@ type SQLMigrationListResult struct { // SQLMigrationService - A SQL Migration Service. type SQLMigrationService struct { + // REQUIRED; The geo-location where the resource lives Location *string // The SQL Migration Service properties. Properties *SQLMigrationServiceProperties - // Dictionary of + // Resource tags. Tags map[string]*string - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -7383,12 +7372,14 @@ type ServerProperties struct { // Service - An Azure Database Migration Service (classic) resource type Service struct { + // REQUIRED; The geo-location where the resource lives + Location *string + // HTTP strong entity tag value. Ignored if submitted Etag *string // The resource kind. Only 'vm' (the default) is supported. - Kind *string - Location *string + Kind *string // Custom service properties Properties *ServiceProperties @@ -7396,19 +7387,19 @@ type Service struct { // Service SKU SKU *ServiceSKU - // Dictionary of + // Resource tags. Tags map[string]*string - // READ-ONLY + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY + // READ-ONLY; The name of the resource Name *string - // READ-ONLY - SystemData *SystemDataAutoGenerated + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // READ-ONLY + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } @@ -7592,19 +7583,6 @@ type SystemData struct { LastModifiedByType *CreatedByType } -type SystemDataAutoGenerated struct { - CreatedAt *time.Time - CreatedBy *string - - // The type of identity that created the resource. - CreatedByType *CreatedByType - LastModifiedAt *time.Time - LastModifiedBy *string - - // The type of identity that created the resource. - LastModifiedByType *CreatedByType -} - // TargetLocation - Target Location details for optional copy of backups type TargetLocation struct { // Storage Account Key. @@ -7645,25 +7623,6 @@ type TrackedResource struct { Type *string } -type TrackedResourceAutoGenerated struct { - Location *string - - // Dictionary of - Tags map[string]*string - - // READ-ONLY - ID *string - - // READ-ONLY - Name *string - - // READ-ONLY - SystemData *SystemDataAutoGenerated - - // READ-ONLY - Type *string -} - // UploadOCIDriverTaskInput - Input for the service task to upload an OCI driver. type UploadOCIDriverTaskInput struct { // File share information for the OCI driver archive. diff --git a/sdk/resourcemanager/datamigration/armdatamigration/models_serde.go b/sdk/resourcemanager/datamigration/armdatamigration/models_serde.go index eeb68057a93a..a4e7adf57ac9 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/models_serde.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/models_serde.go @@ -12661,45 +12661,6 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResourceAutoGenerated. -func (p ProxyResourceAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceAutoGenerated. -func (p *ProxyResourceAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type QueryAnalysisValidationResult. func (q QueryAnalysisValidationResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14569,53 +14530,6 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SystemDataAutoGenerated. -func (s SystemDataAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemDataAutoGenerated. -func (s *SystemDataAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type TargetLocation. func (t TargetLocation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14725,53 +14639,6 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TrackedResourceAutoGenerated. -func (t TrackedResourceAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "systemData", t.SystemData) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResourceAutoGenerated. -func (t *TrackedResourceAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type UploadOCIDriverTaskInput. func (u UploadOCIDriverTaskInput) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/datamigration/armdatamigration/operations_client.go b/sdk/resourcemanager/datamigration/armdatamigration/operations_client.go index 66dea83ec8a8..b20b707ff3b4 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/operations_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/operations_client.go @@ -36,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available SQL Migration REST API operations. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -69,7 +69,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/datamigration/armdatamigration/operations_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/operations_client_example_test.go index 52112042d1b0..5b6182da676d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/operations_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListOperation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListOperation.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/options.go b/sdk/resourcemanager/datamigration/armdatamigration/options.go index 948f8c11557d..a5d2c7df8c7a 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/options.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/options.go @@ -87,6 +87,13 @@ type DatabaseMigrationsSQLDbClientBeginDeleteOptions struct { ResumeToken string } +// DatabaseMigrationsSQLDbClientBeginRetryOptions contains the optional parameters for the DatabaseMigrationsSQLDbClient.BeginRetry +// method. +type DatabaseMigrationsSQLDbClientBeginRetryOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + // DatabaseMigrationsSQLDbClientGetOptions contains the optional parameters for the DatabaseMigrationsSQLDbClient.Get method. type DatabaseMigrationsSQLDbClientGetOptions struct { // Complete migration details be included in the response. @@ -119,6 +126,16 @@ type DatabaseMigrationsSQLMiClientBeginCutoverOptions struct { ResumeToken string } +// DatabaseMigrationsSQLMiClientBeginDeleteOptions contains the optional parameters for the DatabaseMigrationsSQLMiClient.BeginDelete +// method. +type DatabaseMigrationsSQLMiClientBeginDeleteOptions struct { + // Optional force delete boolean. If this is provided as true, migration will be deleted even if active. + Force *bool + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + // DatabaseMigrationsSQLMiClientGetOptions contains the optional parameters for the DatabaseMigrationsSQLMiClient.Get method. type DatabaseMigrationsSQLMiClientGetOptions struct { // Complete migration details be included in the response. @@ -151,6 +168,16 @@ type DatabaseMigrationsSQLVMClientBeginCutoverOptions struct { ResumeToken string } +// DatabaseMigrationsSQLVMClientBeginDeleteOptions contains the optional parameters for the DatabaseMigrationsSQLVMClient.BeginDelete +// method. +type DatabaseMigrationsSQLVMClientBeginDeleteOptions struct { + // Optional force delete boolean. If this is provided as true, migration will be deleted even if active. + Force *bool + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + // DatabaseMigrationsSQLVMClientGetOptions contains the optional parameters for the DatabaseMigrationsSQLVMClient.Get method. type DatabaseMigrationsSQLVMClientGetOptions struct { // Complete migration details be included in the response. diff --git a/sdk/resourcemanager/datamigration/armdatamigration/projects_client.go b/sdk/resourcemanager/datamigration/armdatamigration/projects_client.go index 87bd02b348ef..04d2d38c3943 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/projects_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/projects_client.go @@ -45,7 +45,7 @@ func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, // a new project or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -97,7 +97,7 @@ func (client *ProjectsClient) createOrUpdateCreateRequest(ctx context.Context, g return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -119,7 +119,7 @@ func (client *ProjectsClient) createOrUpdateHandleResponse(resp *http.Response) // project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -169,7 +169,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.DeleteRunningTasks != nil { reqQP.Set("deleteRunningTasks", strconv.FormatBool(*options.DeleteRunningTasks)) } @@ -182,7 +182,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, groupName // about a project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -233,7 +233,7 @@ func (client *ProjectsClient) getCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +251,7 @@ func (client *ProjectsClient) getHandleResponse(resp *http.Response) (ProjectsCl // NewListPager - The project resource is a nested resource representing a stored migration project. This method returns a // list of projects owned by a service resource. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method. @@ -298,7 +298,7 @@ func (client *ProjectsClient) listCreateRequest(ctx context.Context, groupName s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *ProjectsClient) listHandleResponse(resp *http.Response) (ProjectsC // existing project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -369,7 +369,7 @@ func (client *ProjectsClient) updateCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/projects_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/projects_client_example_test.go index 71eaca85e8c1..6d7d4d9acdb3 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/projects_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/projects_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Projects_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Projects_List.json func ExampleProjectsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -70,7 +70,7 @@ func ExampleProjectsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Projects_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Projects_CreateOrUpdate.json func ExampleProjectsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleProjectsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Projects_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Projects_Get.json func ExampleProjectsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -140,7 +140,7 @@ func ExampleProjectsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Projects_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Projects_Delete.json func ExampleProjectsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -157,7 +157,7 @@ func ExampleProjectsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Projects_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Projects_Update.json func ExampleProjectsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client.go b/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client.go index 5d5a66905077..afe2617c812d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client.go @@ -42,7 +42,7 @@ func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredent // NewListSKUsPager - The skus action returns the list of SKUs that DMS (classic) supports. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - options - ResourceSKUsClientListSKUsOptions contains the optional parameters for the ResourceSKUsClient.NewListSKUsPager // method. func (client *ResourceSKUsClient) NewListSKUsPager(options *ResourceSKUsClientListSKUsOptions) *runtime.Pager[ResourceSKUsClientListSKUsResponse] { @@ -80,7 +80,7 @@ func (client *ResourceSKUsClient) listSKUsCreateRequest(ctx context.Context, _ * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client_example_test.go index f87617898235..760bebc3713b 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/resourceskus_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ResourceSkus_ListSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ResourceSkus_ListSkus.json func ExampleResourceSKUsClient_NewListSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/responses.go b/sdk/resourcemanager/datamigration/armdatamigration/responses.go index 643236411974..3f436ba0fd7d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/responses.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/responses.go @@ -73,6 +73,12 @@ type DatabaseMigrationsSQLDbClientGetResponse struct { DatabaseMigrationSQLDb } +// DatabaseMigrationsSQLDbClientRetryResponse contains the response from method DatabaseMigrationsSQLDbClient.BeginRetry. +type DatabaseMigrationsSQLDbClientRetryResponse struct { + // Database Migration Resource for SQL Database. + DatabaseMigrationSQLDb +} + // DatabaseMigrationsSQLMiClientCancelResponse contains the response from method DatabaseMigrationsSQLMiClient.BeginCancel. type DatabaseMigrationsSQLMiClientCancelResponse struct { // placeholder for future response values @@ -89,6 +95,12 @@ type DatabaseMigrationsSQLMiClientCutoverResponse struct { // placeholder for future response values } +// DatabaseMigrationsSQLMiClientDeleteResponse contains the response from method DatabaseMigrationsSQLMiClient.BeginDelete. +type DatabaseMigrationsSQLMiClientDeleteResponse struct { + // Database Migration Resource for SQL Managed Instance. + DatabaseMigrationSQLMi +} + // DatabaseMigrationsSQLMiClientGetResponse contains the response from method DatabaseMigrationsSQLMiClient.Get. type DatabaseMigrationsSQLMiClientGetResponse struct { // Database Migration Resource for SQL Managed Instance. @@ -111,6 +123,12 @@ type DatabaseMigrationsSQLVMClientCutoverResponse struct { // placeholder for future response values } +// DatabaseMigrationsSQLVMClientDeleteResponse contains the response from method DatabaseMigrationsSQLVMClient.BeginDelete. +type DatabaseMigrationsSQLVMClientDeleteResponse struct { + // Database Migration Resource for SQL Virtual Machine. + DatabaseMigrationSQLVM +} + // DatabaseMigrationsSQLVMClientGetResponse contains the response from method DatabaseMigrationsSQLVMClient.Get. type DatabaseMigrationsSQLVMClientGetResponse struct { // Database Migration Resource for SQL Virtual Machine. diff --git a/sdk/resourcemanager/datamigration/armdatamigration/services_client.go b/sdk/resourcemanager/datamigration/armdatamigration/services_client.go index fa7c7bc35768..930540961eba 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/services_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/services_client.go @@ -44,7 +44,7 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // CheckChildrenNameAvailability - This method checks whether a proposed nested resource name is valid and available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - parameters - Requested name to validate @@ -92,7 +92,7 @@ func (client *ServicesClient) checkChildrenNameAvailabilityCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -113,7 +113,7 @@ func (client *ServicesClient) checkChildrenNameAvailabilityHandleResponse(resp * // CheckNameAvailability - This method checks whether a proposed top-level resource name is valid and available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - location - The Azure region of the operation // - parameters - Requested name to validate // - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability @@ -156,7 +156,7 @@ func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -179,7 +179,7 @@ func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Res // machine size. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientCheckStatusOptions contains the optional parameters for the ServicesClient.CheckStatus method. @@ -225,7 +225,7 @@ func (client *ServicesClient) checkStatusCreateRequest(ctx context.Context, grou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *ServicesClient) checkStatusHandleResponse(resp *http.Response) (Se // reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - parameters - Information about the service @@ -281,7 +281,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, groupName // reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *ServicesClient) createOrUpdate(ctx context.Context, groupName string, serviceName string, parameters Service, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ServicesClient.BeginCreateOrUpdate" @@ -323,7 +323,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, g return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -336,7 +336,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, g // The DELETE method deletes a service. Any running tasks will be canceled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. @@ -361,7 +361,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, groupName string, // The DELETE method deletes a service. Any running tasks will be canceled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *ServicesClient) deleteOperation(ctx context.Context, groupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ServicesClient.BeginDelete" @@ -403,7 +403,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.DeleteRunningTasks != nil { reqQP.Set("deleteRunningTasks", strconv.FormatBool(*options.DeleteRunningTasks)) } @@ -416,7 +416,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, groupName // GET method retrieves information about a service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. @@ -462,7 +462,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -480,7 +480,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl // NewListPager - 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. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. func (client *ServicesClient) NewListPager(options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ @@ -517,7 +517,7 @@ func (client *ServicesClient) listCreateRequest(ctx context.Context, _ *Services return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +535,7 @@ func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesC // NewListByResourceGroupPager - 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. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager // method. @@ -578,7 +578,7 @@ func (client *ServicesClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -596,7 +596,7 @@ func (client *ServicesClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListSKUsPager - 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. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientListSKUsOptions contains the optional parameters for the ServicesClient.NewListSKUsPager method. @@ -643,7 +643,7 @@ func (client *ServicesClient) listSKUsCreateRequest(ctx context.Context, groupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -662,7 +662,7 @@ func (client *ServicesClient) listSKUsHandleResponse(resp *http.Response) (Servi // This action starts the service and the service can be used for data migration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. @@ -687,7 +687,7 @@ func (client *ServicesClient) BeginStart(ctx context.Context, groupName string, // This action starts the service and the service can be used for data migration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *ServicesClient) start(ctx context.Context, groupName string, serviceName string, options *ServicesClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ServicesClient.BeginStart" @@ -729,7 +729,7 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -740,7 +740,7 @@ func (client *ServicesClient) startCreateRequest(ctx context.Context, groupName // service owner won't be billed when the service is stopped. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. @@ -766,7 +766,7 @@ func (client *ServicesClient) BeginStop(ctx context.Context, groupName string, s // service owner won't be billed when the service is stopped. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *ServicesClient) stop(ctx context.Context, groupName string, serviceName string, options *ServicesClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ServicesClient.BeginStop" @@ -808,7 +808,7 @@ func (client *ServicesClient) stopCreateRequest(ctx context.Context, groupName s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -820,7 +820,7 @@ func (client *ServicesClient) stopCreateRequest(ctx context.Context, groupName s // ("ServiceIsBusy"). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - parameters - Information about the service @@ -848,7 +848,7 @@ func (client *ServicesClient) BeginUpdate(ctx context.Context, groupName string, // ("ServiceIsBusy"). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *ServicesClient) update(ctx context.Context, groupName string, serviceName string, parameters Service, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ServicesClient.BeginUpdate" @@ -890,7 +890,7 @@ func (client *ServicesClient) updateCreateRequest(ctx context.Context, groupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/services_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/services_client_example_test.go index 35c577492f2b..0a3ad27cc945 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/services_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/services_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_CreateOrUpdate.json func ExampleServicesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleServicesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_Get.json func ExampleServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -103,7 +103,7 @@ func ExampleServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_Delete.json func ExampleServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -124,7 +124,7 @@ func ExampleServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_Update.json func ExampleServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -169,7 +169,7 @@ func ExampleServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_CheckStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_CheckStatus.json func ExampleServicesClient_CheckStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -217,7 +217,7 @@ func ExampleServicesClient_CheckStatus() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_Start.json func ExampleServicesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -238,7 +238,7 @@ func ExampleServicesClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_Stop.json func ExampleServicesClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -259,7 +259,7 @@ func ExampleServicesClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_ListSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_ListSkus.json func ExampleServicesClient_NewListSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -295,7 +295,7 @@ func ExampleServicesClient_NewListSKUsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_CheckChildrenNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_CheckChildrenNameAvailability.json func ExampleServicesClient_CheckChildrenNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -321,7 +321,7 @@ func ExampleServicesClient_CheckChildrenNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_ListByResourceGroup.json func ExampleServicesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -371,7 +371,7 @@ func ExampleServicesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_List.json func ExampleServicesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -421,7 +421,7 @@ func ExampleServicesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Services_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Services_CheckNameAvailability.json func ExampleServicesClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client.go b/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client.go index 6a2954d07420..f1b1b49482f6 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client.go @@ -45,7 +45,7 @@ func NewServiceTasksClient(subscriptionID string, credential azcore.TokenCredent // This method cancels a service task if it's currently queued or running. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - taskName - Name of the Task @@ -96,7 +96,7 @@ func (client *ServiceTasksClient) cancelCreateRequest(ctx context.Context, group return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *ServiceTasksClient) cancelHandleResponse(resp *http.Response) (Ser // since service tasks have no mutable custom properties, there is little reason to update an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - taskName - Name of the Task @@ -169,7 +169,7 @@ func (client *ServiceTasksClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -191,7 +191,7 @@ func (client *ServiceTasksClient) createOrUpdateHandleResponse(resp *http.Respon // The DELETE method deletes a service task, canceling it first if it's running. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - taskName - Name of the Task @@ -241,7 +241,7 @@ func (client *ServiceTasksClient) deleteCreateRequest(ctx context.Context, group return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.DeleteRunningTasks != nil { reqQP.Set("deleteRunningTasks", strconv.FormatBool(*options.DeleteRunningTasks)) } @@ -254,7 +254,7 @@ func (client *ServiceTasksClient) deleteCreateRequest(ctx context.Context, group // The GET method retrieves information about a service task. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - taskName - Name of the Task @@ -308,7 +308,7 @@ func (client *ServiceTasksClient) getCreateRequest(ctx context.Context, groupNam if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *ServiceTasksClient) getHandleResponse(resp *http.Response) (Servic // 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. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - options - ServiceTasksClientListOptions contains the optional parameters for the ServiceTasksClient.NewListPager method. @@ -374,7 +374,7 @@ func (client *ServiceTasksClient) listCreateRequest(ctx context.Context, groupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.TaskType != nil { reqQP.Set("taskType", *options.TaskType) } @@ -397,7 +397,7 @@ func (client *ServiceTasksClient) listHandleResponse(resp *http.Response) (Servi // mutable custom properties, there is little reason to do so. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - taskName - Name of the Task @@ -449,7 +449,7 @@ func (client *ServiceTasksClient) updateCreateRequest(ctx context.Context, group return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client_example_test.go index 01d141c42519..1f3776f77a8d 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/servicetasks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_List.json func ExampleServiceTasksClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExampleServiceTasksClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_CreateOrUpdate.json func ExampleServiceTasksClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -111,7 +111,7 @@ func ExampleServiceTasksClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_Get.json func ExampleServiceTasksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -148,7 +148,7 @@ func ExampleServiceTasksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_Delete.json func ExampleServiceTasksClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -165,7 +165,7 @@ func ExampleServiceTasksClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_Update.json func ExampleServiceTasksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -213,7 +213,7 @@ func ExampleServiceTasksClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ServiceTasks_Cancel.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ServiceTasks_Cancel.json func ExampleServiceTasksClient_Cancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client.go b/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client.go index 9ad2e5410272..edd8013af801 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client.go @@ -43,7 +43,7 @@ func NewSQLMigrationServicesClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create or Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -70,7 +70,7 @@ func (client *SQLMigrationServicesClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create or Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *SQLMigrationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, sqlMigrationServiceName string, parameters SQLMigrationService, options *SQLMigrationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "SQLMigrationServicesClient.BeginCreateOrUpdate" @@ -112,7 +112,7 @@ func (client *SQLMigrationServicesClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -124,7 +124,7 @@ func (client *SQLMigrationServicesClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Delete Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -150,7 +150,7 @@ func (client *SQLMigrationServicesClient) BeginDelete(ctx context.Context, resou // Delete - Delete Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *SQLMigrationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, sqlMigrationServiceName string, options *SQLMigrationServicesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SQLMigrationServicesClient.BeginDelete" @@ -192,7 +192,7 @@ func (client *SQLMigrationServicesClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -200,7 +200,7 @@ func (client *SQLMigrationServicesClient) deleteCreateRequest(ctx context.Contex // DeleteNode - Delete the integration runtime node. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -249,7 +249,7 @@ func (client *SQLMigrationServicesClient) deleteNodeCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -270,7 +270,7 @@ func (client *SQLMigrationServicesClient) deleteNodeHandleResponse(resp *http.Re // Get - Retrieve the Database Migration Service // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -318,7 +318,7 @@ func (client *SQLMigrationServicesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -336,7 +336,7 @@ func (client *SQLMigrationServicesClient) getHandleResponse(resp *http.Response) // ListAuthKeys - Retrieve the List of Authentication Keys for Self Hosted Integration Runtime. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -384,7 +384,7 @@ func (client *SQLMigrationServicesClient) listAuthKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,7 @@ func (client *SQLMigrationServicesClient) listAuthKeysHandleResponse(resp *http. // NewListByResourceGroupPager - Retrieve all SQL migration services in the resource group. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - options - SQLMigrationServicesClientListByResourceGroupOptions contains the optional parameters for the SQLMigrationServicesClient.NewListByResourceGroupPager @@ -445,7 +445,7 @@ func (client *SQLMigrationServicesClient) listByResourceGroupCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -462,7 +462,7 @@ func (client *SQLMigrationServicesClient) listByResourceGroupHandleResponse(resp // NewListBySubscriptionPager - Retrieve all SQL migration services in the subscriptions. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - options - SQLMigrationServicesClientListBySubscriptionOptions contains the optional parameters for the SQLMigrationServicesClient.NewListBySubscriptionPager // method. func (client *SQLMigrationServicesClient) NewListBySubscriptionPager(options *SQLMigrationServicesClientListBySubscriptionOptions) *runtime.Pager[SQLMigrationServicesClientListBySubscriptionResponse] { @@ -500,7 +500,7 @@ func (client *SQLMigrationServicesClient) listBySubscriptionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -517,7 +517,7 @@ func (client *SQLMigrationServicesClient) listBySubscriptionHandleResponse(resp // NewListMigrationsPager - Retrieve the List of database migrations attached to the service. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -566,7 +566,7 @@ func (client *SQLMigrationServicesClient) listMigrationsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -585,7 +585,7 @@ func (client *SQLMigrationServicesClient) listMigrationsHandleResponse(resp *htt // Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -633,7 +633,7 @@ func (client *SQLMigrationServicesClient) listMonitoringDataCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -651,7 +651,7 @@ func (client *SQLMigrationServicesClient) listMonitoringDataHandleResponse(resp // RegenerateAuthKeys - Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -700,7 +700,7 @@ func (client *SQLMigrationServicesClient) regenerateAuthKeysCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -721,7 +721,7 @@ func (client *SQLMigrationServicesClient) regenerateAuthKeysHandleResponse(resp // BeginUpdate - Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - resourceGroupName - Name of the resource group that contains the resource. You can obtain this value from the Azure Resource // Manager API or the portal. // - sqlMigrationServiceName - Name of the SQL Migration Service. @@ -748,7 +748,7 @@ func (client *SQLMigrationServicesClient) BeginUpdate(ctx context.Context, resou // Update - Update Database Migration Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 func (client *SQLMigrationServicesClient) update(ctx context.Context, resourceGroupName string, sqlMigrationServiceName string, parameters SQLMigrationServiceUpdate, options *SQLMigrationServicesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "SQLMigrationServicesClient.BeginUpdate" @@ -790,7 +790,7 @@ func (client *SQLMigrationServicesClient) updateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client_example_test.go index ac5f4e2652f3..61ad09a3ba72 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/sqlmigrationservices_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/GetSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/GetSqlMigrationService.json func ExampleSQLMigrationServicesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,7 @@ func ExampleSQLMigrationServicesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CreateOrUpdateSqlMigrationServiceMAX.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CreateOrUpdateSqlMigrationServiceMAX.json func ExampleSQLMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateSqlMigrationServiceWithMaximumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,7 +89,7 @@ func ExampleSQLMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateSqlMigr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/CreateOrUpdateSqlMigrationServiceMIN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/CreateOrUpdateSqlMigrationServiceMIN.json func ExampleSQLMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateSqlMigrationServiceWithMinimumParameters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -127,7 +127,7 @@ func ExampleSQLMigrationServicesClient_BeginCreateOrUpdate_createOrUpdateSqlMigr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/DeleteSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/DeleteSqlMigrationService.json func ExampleSQLMigrationServicesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -148,7 +148,7 @@ func ExampleSQLMigrationServicesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/UpdateSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/UpdateSqlMigrationService.json func ExampleSQLMigrationServicesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -187,7 +187,7 @@ func ExampleSQLMigrationServicesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListByResourceGroupSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListByResourceGroupSqlMigrationService.json func ExampleSQLMigrationServicesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -241,7 +241,7 @@ func ExampleSQLMigrationServicesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListAuthKeysSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListAuthKeysSqlMigrationService.json func ExampleSQLMigrationServicesClient_ListAuthKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -265,7 +265,7 @@ func ExampleSQLMigrationServicesClient_ListAuthKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/RegenAuthKeysSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/RegenAuthKeysSqlMigrationService.json func ExampleSQLMigrationServicesClient_RegenerateAuthKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -290,7 +290,7 @@ func ExampleSQLMigrationServicesClient_RegenerateAuthKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/DeleteIntegrationRuntimeNode.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/DeleteIntegrationRuntimeNode.json func ExampleSQLMigrationServicesClient_DeleteNode() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -317,7 +317,7 @@ func ExampleSQLMigrationServicesClient_DeleteNode() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListMigrationsBySqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListMigrationsBySqlMigrationService.json func ExampleSQLMigrationServicesClient_NewListMigrationsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -385,7 +385,7 @@ func ExampleSQLMigrationServicesClient_NewListMigrationsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/GetMonitorDataSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/GetMonitorDataSqlMigrationService.json func ExampleSQLMigrationServicesClient_ListMonitoringData() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -427,7 +427,7 @@ func ExampleSQLMigrationServicesClient_ListMonitoringData() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/ListBySubscriptionSqlMigrationService.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/ListBySubscriptionSqlMigrationService.json func ExampleSQLMigrationServicesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/tasks_client.go b/sdk/resourcemanager/datamigration/armdatamigration/tasks_client.go index bb0562fa15fd..cd48f8a74e88 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/tasks_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/tasks_client.go @@ -45,7 +45,7 @@ func NewTasksClient(subscriptionID string, credential azcore.TokenCredential, op // method cancels a task if it's currently queued or running. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -101,7 +101,7 @@ func (client *TasksClient) cancelCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +120,7 @@ func (client *TasksClient) cancelHandleResponse(resp *http.Response) (TasksClien // This method executes a command on a running task. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -177,7 +177,7 @@ func (client *TasksClient) commandCreateRequest(ctx context.Context, groupName s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -200,7 +200,7 @@ func (client *TasksClient) commandHandleResponse(resp *http.Response) (TasksClie // mutable custom properties, there is little reason to update an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -257,7 +257,7 @@ func (client *TasksClient) createOrUpdateCreateRequest(ctx context.Context, grou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -279,7 +279,7 @@ func (client *TasksClient) createOrUpdateHandleResponse(resp *http.Response) (Ta // DELETE method deletes a task, canceling it first if it's running. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -334,7 +334,7 @@ func (client *TasksClient) deleteCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.DeleteRunningTasks != nil { reqQP.Set("deleteRunningTasks", strconv.FormatBool(*options.DeleteRunningTasks)) } @@ -347,7 +347,7 @@ func (client *TasksClient) deleteCreateRequest(ctx context.Context, groupName st // GET method retrieves information about a task. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -406,7 +406,7 @@ func (client *TasksClient) getCreateRequest(ctx context.Context, groupName strin if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -425,7 +425,7 @@ func (client *TasksClient) getHandleResponse(resp *http.Response) (TasksClientGe // 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. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -477,7 +477,7 @@ func (client *TasksClient) listCreateRequest(ctx context.Context, groupName stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") if options != nil && options.TaskType != nil { reqQP.Set("taskType", *options.TaskType) } @@ -500,7 +500,7 @@ func (client *TasksClient) listHandleResponse(resp *http.Response) (TasksClientL // properties, there is little reason to do so. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - groupName - Name of the resource group // - serviceName - Name of the service // - projectName - Name of the project @@ -557,7 +557,7 @@ func (client *TasksClient) updateCreateRequest(ctx context.Context, groupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/tasks_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/tasks_client_example_test.go index 3dd07ea45f0b..1c13008f6692 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/tasks_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/tasks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_List.json func ExampleTasksClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleTasksClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_CreateOrUpdate.json func ExampleTasksClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleTasksClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_Get.json func ExampleTasksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -161,7 +161,7 @@ func ExampleTasksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_Delete.json func ExampleTasksClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -178,7 +178,7 @@ func ExampleTasksClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_Update.json func ExampleTasksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -233,7 +233,7 @@ func ExampleTasksClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_Cancel.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_Cancel.json func ExampleTasksClient_Cancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -273,7 +273,7 @@ func ExampleTasksClient_Cancel() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Tasks_Command.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Tasks_Command.json func ExampleTasksClient_Command() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/usages_client.go b/sdk/resourcemanager/datamigration/armdatamigration/usages_client.go index d34598822011..d71343784e75 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/usages_client.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/usages_client.go @@ -43,7 +43,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - This method returns region-specific quotas and resource usage information for the Azure Database Migration // Service (classic). // -// Generated from API version 2025-03-15-preview +// Generated from API version 2025-06-30 // - location - The Azure region of the operation // - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -85,7 +85,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-03-15-preview") + reqQP.Set("api-version", "2025-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/datamigration/armdatamigration/usages_client_example_test.go b/sdk/resourcemanager/datamigration/armdatamigration/usages_client_example_test.go index 5874982f768c..e605dcf54880 100644 --- a/sdk/resourcemanager/datamigration/armdatamigration/usages_client_example_test.go +++ b/sdk/resourcemanager/datamigration/armdatamigration/usages_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/6c548b0bd279f5e233661b1c81fb5b61b19965cd/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2025-03-15-preview/examples/Usages_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/datamigration/resource-manager/Microsoft.DataMigration/stable/2025-06-30/examples/Usages_List.json func ExampleUsagesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/datamigration/armdatamigration/version.go b/sdk/resourcemanager/datamigration/armdatamigration/version.go new file mode 100644 index 000000000000..7cd7a5c6b9b7 --- /dev/null +++ b/sdk/resourcemanager/datamigration/armdatamigration/version.go @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package armdatamigration + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration" + moduleVersion = "v2.0.0" +)