Skip to content

Commit 0358b84

Browse files
author
SDKAuto
committed
CodeGen from PR 33314 in Azure/azure-rest-api-specs
Merge 1c73adc91e1bd80b6970805115d5f3dc9e7c5870 into 3db6867b8e524ea6d1bc7a3bbb989fe50dd2f184
1 parent 0b0345a commit 0358b84

File tree

165 files changed

+15490
-6493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+15490
-6493
lines changed

sdk/datamigration/azure-mgmt-datamigration/CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
11
# Release History
22

3+
## 10.1.0b2 (2025-04-01)
4+
5+
### Features Added
6+
7+
- Client `DataMigrationManagementClient` added operation group `database_migrations_mongo_to_cosmos_db_ru_mongo`
8+
- Client `DataMigrationManagementClient` added operation group `database_migrations_mongo_to_cosmos_dbv_core_mongo`
9+
- Client `DataMigrationManagementClient` added operation group `migration_services`
10+
- Model `AzureBlob` added property `auth_type`
11+
- Model `AzureBlob` added property `identity`
12+
- Model `ProxyResource` added property `system_data`
13+
- Model `Resource` added property `system_data`
14+
- Enum `ResourceType` added member `MONGO_TO_COSMOS_DB_MONGO`
15+
- Added enum `AuthType`
16+
- Added model `DatabaseMigrationBase`
17+
- Added model `DatabaseMigrationBaseListResult`
18+
- Added model `DatabaseMigrationBaseProperties`
19+
- Added model `DatabaseMigrationCosmosDbMongo`
20+
- Added model `DatabaseMigrationCosmosDbMongoListResult`
21+
- Added model `DatabaseMigrationPropertiesCosmosDbMongo`
22+
- Added model `ErrorAdditionalInfo`
23+
- Added model `ErrorDetail`
24+
- Added model `ErrorResponse`
25+
- Added model `ManagedServiceIdentity`
26+
- Added enum `ManagedServiceIdentityType`
27+
- Added model `MigrationService`
28+
- Added model `MigrationServiceListResult`
29+
- Added model `MigrationServiceUpdate`
30+
- Added model `MongoConnectionInformation`
31+
- Added model `MongoMigrationCollection`
32+
- Added model `MongoMigrationProgressDetails`
33+
- Added enum `MongoMigrationStatus`
34+
- Added enum `ProvisioningState`
35+
- Added model `ProxyResourceAutoGenerated`
36+
- Added model `ResourceAutoGenerated`
37+
- Added model `SystemDataAutoGenerated`
38+
- Added model `TrackedResourceAutoGenerated`
39+
- Added model `UserAssignedIdentity`
40+
- Added model `DatabaseMigrationsMongoToCosmosDbRUMongoOperations`
41+
- Added model `DatabaseMigrationsMongoToCosmosDbvCoreMongoOperations`
42+
- Added model `MigrationServicesOperations`
43+
- 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)`
44+
- 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)`
45+
- 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)`
46+
- 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)`
47+
- 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)`
48+
- 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)`
49+
- 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)`
50+
- 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)`
51+
- 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)`
52+
- 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)`
53+
- 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)`
54+
- 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)`
55+
- 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)`
56+
- 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)`
57+
- 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)`
58+
- 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)`
59+
- 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)`
60+
- Method `ServicesOperations.check_name_availability` has a new overload `def check_name_availability(self: None, location: str, parameters: IO[bytes], content_type: str)`
61+
- 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)`
62+
- 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)`
63+
- 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)`
64+
- 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)`
65+
- 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)`
66+
- 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)`
67+
- 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)`
68+
- 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)`
69+
- 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)`
70+
- 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)`
71+
- 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)`
72+
- 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)`
73+
- 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)`
74+
- 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)`
75+
- 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)`
76+
77+
### Breaking Changes
78+
79+
- Method `TrackedResource.__init__` removed default value `None` from its parameter `location`
80+
381
## 10.1.0b1 (2022-11-18)
482

583
### Features Added
Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
11
# Microsoft Azure SDK for Python
22

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

77
## _Disclaimer_
88

99
_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_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
17-
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.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
15+
- Python 3.8+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-datamigration
22+
pip install azure-identity
23+
```
2224

23-
If you encounter any bugs or have suggestions, please file an issue in the
24-
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
25-
section of the project.
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.datamigration import DataMigrationManagementClient
40+
import os
2641

42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = DataMigrationManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
2745

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [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
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
51+
52+
53+
## Troubleshooting
54+
55+
## Next steps
56+
57+
## Provide Feedback
58+
59+
If you encounter any bugs or have suggestions, please file an issue in the
60+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
61+
section of the project.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "3ce1e043e2d0e57016437a3870f40e33da8a6397",
2+
"commit": "beb79c4de8dcb7bf4f896d07f0325a0a422f464f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.2.7",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.27.4",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"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",
9+
"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",
1010
"readme": "specification/datamigration/resource-manager/readme.md"
1111
}

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._data_migration_management_client import DataMigrationManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._data_migration_management_client import DataMigrationManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"DataMigrationManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_configuration.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,18 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2316
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
2517
from azure.core.credentials import TokenCredential
2618

2719

28-
class DataMigrationManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
20+
class DataMigrationManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2921
"""Configuration for DataMigrationManagementClient.
3022
3123
Note that all parameters used to create this instance are saved as instance
@@ -35,14 +27,13 @@ class DataMigrationManagementClientConfiguration(Configuration): # pylint: disa
3527
:type credential: ~azure.core.credentials.TokenCredential
3628
:param subscription_id: Subscription ID that identifies an Azure subscription. Required.
3729
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-03-30-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2025-03-15-preview". Note that overriding
3931
this default value may result in unsupported behavior.
4032
:paramtype api_version: str
4133
"""
4234

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

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

5951
def _configure(self, **kwargs: Any) -> None:
@@ -62,9 +54,9 @@ def _configure(self, **kwargs: Any) -> None:
6254
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
6355
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6456
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
65-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6657
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6758
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
59+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6860
self.authentication_policy = kwargs.get("authentication_policy")
6961
if self.credential and not self.authentication_policy:
7062
self.authentication_policy = ARMChallengeAuthenticationPolicy(

0 commit comments

Comments
 (0)