Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# Release History

## 10.1.0b2 (2025-04-01)

### Features Added

- Client `DataMigrationManagementClient` added operation group `database_migrations_mongo_to_cosmos_db_ru_mongo`
- Client `DataMigrationManagementClient` added operation group `database_migrations_mongo_to_cosmos_dbv_core_mongo`
- Client `DataMigrationManagementClient` added operation group `migration_services`
- Model `AzureBlob` added property `auth_type`
- Model `AzureBlob` added property `identity`
- Model `ProxyResource` added property `system_data`
- Model `Resource` added property `system_data`
- Enum `ResourceType` added member `MONGO_TO_COSMOS_DB_MONGO`
- Added enum `AuthType`
- Added model `DatabaseMigrationBase`
- Added model `DatabaseMigrationBaseListResult`
- Added model `DatabaseMigrationBaseProperties`
- Added model `DatabaseMigrationCosmosDbMongo`
- Added model `DatabaseMigrationCosmosDbMongoListResult`
- Added model `DatabaseMigrationPropertiesCosmosDbMongo`
- Added model `ErrorAdditionalInfo`
- Added model `ErrorDetail`
- Added model `ErrorResponse`
- Added model `ManagedServiceIdentity`
- Added enum `ManagedServiceIdentityType`
- Added model `MigrationService`
- Added model `MigrationServiceListResult`
- Added model `MigrationServiceUpdate`
- Added model `MongoConnectionInformation`
- Added model `MongoMigrationCollection`
- Added model `MongoMigrationProgressDetails`
- Added enum `MongoMigrationStatus`
- Added enum `ProvisioningState`
- Added model `ProxyResourceAutoGenerated`
- Added model `ResourceAutoGenerated`
- Added model `SystemDataAutoGenerated`
- Added model `TrackedResourceAutoGenerated`
- Added model `UserAssignedIdentity`
- Added model `DatabaseMigrationsMongoToCosmosDbRUMongoOperations`
- Added model `DatabaseMigrationsMongoToCosmosDbvCoreMongoOperations`
- Added model `MigrationServicesOperations`
- Method `DatabaseMigrationsSqlDbOperations.begin_cancel` has a new overload `def begin_cancel(self: None, resource_group_name: str, sql_db_instance_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlDbOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, sql_db_instance_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlMiOperations.begin_cancel` has a new overload `def begin_cancel(self: None, resource_group_name: str, managed_instance_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlMiOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, managed_instance_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlMiOperations.begin_cutover` has a new overload `def begin_cutover(self: None, resource_group_name: str, managed_instance_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlVmOperations.begin_cancel` has a new overload `def begin_cancel(self: None, resource_group_name: str, sql_virtual_machine_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlVmOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, sql_virtual_machine_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsSqlVmOperations.begin_cutover` has a new overload `def begin_cutover(self: None, resource_group_name: str, sql_virtual_machine_name: str, target_db_name: str, parameters: IO[bytes], content_type: str)`
- Method `FilesOperations.create_or_update` has a new overload `def create_or_update(self: None, group_name: str, service_name: str, project_name: str, file_name: str, parameters: IO[bytes], content_type: str)`
- Method `FilesOperations.update` has a new overload `def update(self: None, group_name: str, service_name: str, project_name: str, file_name: str, parameters: IO[bytes], content_type: str)`
- Method `ProjectsOperations.create_or_update` has a new overload `def create_or_update(self: None, group_name: str, service_name: str, project_name: str, parameters: IO[bytes], content_type: str)`
- Method `ProjectsOperations.update` has a new overload `def update(self: None, group_name: str, service_name: str, project_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServiceTasksOperations.create_or_update` has a new overload `def create_or_update(self: None, group_name: str, service_name: str, task_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServiceTasksOperations.update` has a new overload `def update(self: None, group_name: str, service_name: str, task_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, group_name: str, service_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServicesOperations.begin_update` has a new overload `def begin_update(self: None, group_name: str, service_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServicesOperations.check_children_name_availability` has a new overload `def check_children_name_availability(self: None, group_name: str, service_name: str, parameters: IO[bytes], content_type: str)`
- Method `ServicesOperations.check_name_availability` has a new overload `def check_name_availability(self: None, location: str, parameters: IO[bytes], content_type: str)`
- Method `SqlMigrationServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, sql_migration_service_name: str, parameters: IO[bytes], content_type: str)`
- Method `SqlMigrationServicesOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, sql_migration_service_name: str, parameters: IO[bytes], content_type: str)`
- Method `SqlMigrationServicesOperations.delete_node` has a new overload `def delete_node(self: None, resource_group_name: str, sql_migration_service_name: str, parameters: IO[bytes], content_type: str)`
- Method `SqlMigrationServicesOperations.regenerate_auth_keys` has a new overload `def regenerate_auth_keys(self: None, resource_group_name: str, sql_migration_service_name: str, parameters: IO[bytes], content_type: str)`
- Method `TasksOperations.command` has a new overload `def command(self: None, group_name: str, service_name: str, project_name: str, task_name: str, parameters: IO[bytes], content_type: str)`
- Method `TasksOperations.create_or_update` has a new overload `def create_or_update(self: None, group_name: str, service_name: str, project_name: str, task_name: str, parameters: IO[bytes], content_type: str)`
- Method `TasksOperations.update` has a new overload `def update(self: None, group_name: str, service_name: str, project_name: str, task_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsMongoToCosmosDbRUMongoOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, target_resource_name: str, migration_name: str, parameters: DatabaseMigrationCosmosDbMongo, content_type: str)`
- Method `DatabaseMigrationsMongoToCosmosDbRUMongoOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, target_resource_name: str, migration_name: str, parameters: IO[bytes], content_type: str)`
- Method `DatabaseMigrationsMongoToCosmosDbvCoreMongoOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, target_resource_name: str, migration_name: str, parameters: DatabaseMigrationCosmosDbMongo, content_type: str)`
- Method `DatabaseMigrationsMongoToCosmosDbvCoreMongoOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, target_resource_name: str, migration_name: str, parameters: IO[bytes], content_type: str)`
- Method `MigrationServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, migration_service_name: str, parameters: MigrationService, content_type: str)`
- Method `MigrationServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, migration_service_name: str, parameters: IO[bytes], content_type: str)`
- Method `MigrationServicesOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, migration_service_name: str, parameters: MigrationServiceUpdate, content_type: str)`
- Method `MigrationServicesOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, migration_service_name: str, parameters: IO[bytes], content_type: str)`

### Breaking Changes

- Method `TrackedResource.__init__` removed default value `None` from its parameter `location`

## 10.1.0b1 (2022-11-18)

### Features Added
Expand Down
55 changes: 44 additions & 11 deletions sdk/datamigration/azure-mgmt-datamigration/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,61 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Data Migration Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_

_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_

# Usage
## Getting started

### Prerequisites

To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)

For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
Code samples for this package can be found at [Data Migration](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package

# Provide Feedback
```bash
pip install azure-mgmt-datamigration
pip install azure-identity
```

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
### Authentication

By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` for Azure client secret.

In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.

With above configuration, client can be authenticated by following code:

```python
from azure.identity import DefaultAzureCredential
from azure.mgmt.datamigration import DataMigrationManagementClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = DataMigrationManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
```

## Examples

Code samples for this package can be found at:
- [Search Data Migration](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


## Troubleshooting

## Next steps

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
10 changes: 5 additions & 5 deletions sdk/datamigration/azure-mgmt-datamigration/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "3ce1e043e2d0e57016437a3870f40e33da8a6397",
"commit": "d0d3608bda4c7df16c63056331971a0e89f22144",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.27.4",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/datamigration/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/datamigration/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/datamigration/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._data_migration_management_client import DataMigrationManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._data_migration_management_client import DataMigrationManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"DataMigrationManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,18 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class DataMigrationManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class DataMigrationManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
"""Configuration for DataMigrationManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -35,14 +27,13 @@ class DataMigrationManagementClientConfiguration(Configuration): # pylint: disa
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-03-30-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2025-03-15-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DataMigrationManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-03-30-preview"] = kwargs.pop("api_version", "2022-03-30-preview")
api_version: str = kwargs.pop("api_version", "2025-03-15-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -54,6 +45,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-datamigration/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -62,9 +54,9 @@ def _configure(self, **kwargs: Any) -> None:
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
Expand Down
Loading