Microsoft Azure Data Migration Client Library for Python providing comprehensive database migration management capabilities
Discovery of available resource provider actions and operations supported by the Azure Data Migration Service. This functionality provides access to all available operations that can be performed through the Data Migration Service API.
List all available actions exposed by the Database Migration Service resource provider.
def list(**kwargs) -> ItemPaged[ServiceOperationList]:
"""
Get available resource provider actions (operations).
Lists all available actions exposed by the Database Migration Service resource provider.
Returns:
ItemPaged[ServiceOperationList] - A paged list of available operations
"""from azure.mgmt.datamigration import DataMigrationManagementClient
from azure.identity import DefaultAzureCredential
# Create client
credential = DefaultAzureCredential()
client = DataMigrationManagementClient(
credential=credential,
subscription_id="your-subscription-id"
)
# List all available operations
operations = client.operations.list()
for operation in operations:
print(f"Operation: {operation.name}")
print(f" Display Name: {operation.display.operation}")
print(f" Provider: {operation.display.provider}")
print(f" Resource: {operation.display.resource}")
print(f" Description: {operation.display.description}")
print()
client.close()# Get operations and check for specific capabilities
operations = list(client.operations.list())
# Check if specific operation is available
migration_operations = [
op for op in operations
if 'migration' in op.name.lower()
]
service_operations = [
op for op in operations
if 'services' in op.name.lower()
]
print(f"Found {len(migration_operations)} migration-related operations")
print(f"Found {len(service_operations)} service-related operations")class ServiceOperationList:
"""List of available operations."""
value: List[ServiceOperation]
next_link: str
class ServiceOperation:
"""A REST API operation."""
name: str
display: ServiceOperationDisplay
origin: str
class ServiceOperationDisplay:
"""Operation display information."""
provider: str
resource: str
operation: str
description: strtessl i tessl/pypi-azure-mgmt-datamigration@9.0.0