diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.py new file mode 100644 index 00000000000..39ca3207f09 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MaximumSet.py @@ -0,0 +1,52 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_create_or_update_maximum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + agent={ + "properties": { + "arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName", + "arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9", + "description": "Example Agent Description", + "uploadLimitSchedule": { + "weeklyRecurrences": [ + { + "days": ["Monday"], + "endTime": {"hour": 18, "minute": 30}, + "limitInMbps": 2000, + "startTime": {"hour": 9, "minute": 0}, + } + ] + }, + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_MaximumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.py new file mode 100644 index 00000000000..7456db5ecc8 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_MinimumSet.py @@ -0,0 +1,41 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_create_or_update_minimum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + agent={ + "properties": { + "arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName", + "arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_MinimumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.py new file mode 100644 index 00000000000..9a6db0f8c3a --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.py @@ -0,0 +1,57 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_create_or_update_upload_limit_schedule_overnight.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + agent={ + "properties": { + "arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName", + "arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9", + "uploadLimitSchedule": { + "weeklyRecurrences": [ + { + "days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + "endTime": {"hour": 24, "minute": 0}, + "limitInMbps": 2000, + "startTime": {"hour": 18, "minute": 0}, + }, + { + "days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + "endTime": {"hour": 9, "minute": 0}, + "limitInMbps": 2000, + "startTime": {"hour": 0, "minute": 0}, + }, + ] + }, + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.py new file mode 100644 index 00000000000..62a833d724f --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Delete.py @@ -0,0 +1,34 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.agents.begin_delete( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + ).result() + + +# x-ms-original-file: 2025-07-01/Agents_Delete.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.py new file mode 100644 index 00000000000..c7fe1434e26 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MaximumSet.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_get_maximum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_Get_MaximumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.py new file mode 100644 index 00000000000..92ee1c6127b --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Get_MinimumSet.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_get_minimum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_Get_MinimumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.py new file mode 100644 index 00000000000..2324dcd96bb --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MaximumSet.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_list_maximum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/Agents_List_MaximumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.py new file mode 100644 index 00000000000..7a4c43f1de2 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_List_MinimumSet.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_list_minimum_set.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/Agents_List_MinimumSet.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.py new file mode 100644 index 00000000000..4248e9a33af --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Agents_Update.py @@ -0,0 +1,50 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python agents_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agents.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + agent_name="examples-agentName", + agent={ + "properties": { + "description": "Example Agent Description", + "uploadLimitSchedule": { + "weeklyRecurrences": [ + { + "days": ["Monday"], + "endTime": {"hour": 18, "minute": 30}, + "limitInMbps": 2000, + "startTime": {"hour": 9, "minute": 0}, + } + ] + }, + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Agents_Update.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.py new file mode 100644 index 00000000000..f66afee800f --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.py @@ -0,0 +1,43 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_azure_multi_cloud_connector.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "awsS3BucketId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.AwsConnector/s3Buckets/testBucket", + "description": "Example multi cloud connector resource id", + "endpointType": "AzureMultiCloudConnector", + "multiCloudConnectorId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.py new file mode 100644 index 00000000000..b8c01080856 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.py @@ -0,0 +1,43 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_azure_storage_blob_container.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "blobContainerName": "examples-blobcontainer", + "description": "Example Storage Blob Container Endpoint Description", + "endpointType": "AzureStorageBlobContainer", + "storageAccountResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.py new file mode 100644 index 00000000000..f70d7930117 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.py @@ -0,0 +1,43 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_azure_storage_nfs_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "description": "Example Storage File Share Endpoint Description", + "endpointType": "AzureStorageNfsFileShare", + "fileShareName": "examples-fileshare", + "storageAccountResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.py new file mode 100644 index 00000000000..e11c279c311 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.py @@ -0,0 +1,43 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_azure_storage_smb_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "description": "Example Storage File Share Endpoint Description", + "endpointType": "AzureStorageSmbFileShare", + "fileShareName": "examples-fileshare", + "storageAccountResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.py new file mode 100644 index 00000000000..8e8196ec537 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_NfsMount.py @@ -0,0 +1,43 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_nfs_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "description": "Example NFS Mount Endpoint Description", + "endpointType": "NfsMount", + "export": "examples-exportName", + "host": "0.0.0.0", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_NfsMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.py new file mode 100644 index 00000000000..137eb0cce48 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_CreateOrUpdate_SmbMount.py @@ -0,0 +1,48 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_create_or_update_smb_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "credentials": { + "passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-password", + "type": "AzureKeyVaultSmb", + "usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-username", + }, + "description": "Example SMB Mount Endpoint Description", + "endpointType": "SmbMount", + "host": "0.0.0.0", + "shareName": "examples-shareName", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_CreateOrUpdate_SmbMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.py new file mode 100644 index 00000000000..cedf822583e --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Delete.py @@ -0,0 +1,34 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.endpoints.begin_delete( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ).result() + + +# x-ms-original-file: 2025-07-01/Endpoints_Delete.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.py new file mode 100644 index 00000000000..5a2d4fd675e --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureMultiCloudConnector.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_azure_multi_cloud_connector.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_AzureMultiCloudConnector.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.py new file mode 100644 index 00000000000..1e0123d1df9 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageBlobContainer.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_azure_storage_blob_container.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_AzureStorageBlobContainer.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.py new file mode 100644 index 00000000000..0729314a95e --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageNfsFileShare.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_azure_storage_nfs_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_AzureStorageNfsFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.py new file mode 100644 index 00000000000..4165f39a7a5 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_AzureStorageSmbFileShare.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_azure_storage_smb_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_AzureStorageSmbFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.py new file mode 100644 index 00000000000..2a510ef1ea2 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_NfsMount.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_nfs_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_NfsMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.py new file mode 100644 index 00000000000..a0c1fab09f2 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Get_SmbMount.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_get_smb_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Get_SmbMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.py new file mode 100644 index 00000000000..2a176c92d07 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_List.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/Endpoints_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.py new file mode 100644 index 00000000000..1ad134299a7 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureMultiCloudConnector.py @@ -0,0 +1,38 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_azure_multi_cloud_connector.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": {"description": "Updated Endpoint Description", "endpointType": "AzureMultiCloudConnector"} + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_AzureMultiCloudConnector.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.py new file mode 100644 index 00000000000..c337605a2e1 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageBlobContainer.py @@ -0,0 +1,38 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_azure_storage_blob_container.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": {"description": "Updated Endpoint Description", "endpointType": "AzureStorageBlobContainer"} + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_AzureStorageBlobContainer.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.py new file mode 100644 index 00000000000..9979621902d --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageNfsFileShare.py @@ -0,0 +1,38 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_azure_storage_nfs_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": {"description": "Updated Endpoint Description", "endpointType": "AzureStorageNfsFileShare"} + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_AzureStorageNfsFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.py new file mode 100644 index 00000000000..12b2862956a --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_AzureStorageSmbFileShare.py @@ -0,0 +1,38 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_azure_storage_smb_file_share.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": {"description": "Updated Endpoint Description", "endpointType": "AzureStorageSmbFileShare"} + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_AzureStorageSmbFileShare.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.py new file mode 100644 index 00000000000..553a3b9e222 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_NfsMount.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_nfs_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={"properties": {"description": "Updated Endpoint Description", "endpointType": "NfsMount"}}, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_NfsMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.py new file mode 100644 index 00000000000..3010b521590 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Endpoints_Update_SmbMount.py @@ -0,0 +1,46 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python endpoints_update_smb_mount.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.endpoints.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + endpoint_name="examples-endpointName", + endpoint={ + "properties": { + "credentials": { + "passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-password", + "type": "AzureKeyVaultSmb", + "usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-username", + }, + "description": "Updated Endpoint Description", + "endpointType": "SmbMount", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Endpoints_Update_SmbMount.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.py new file mode 100644 index 00000000000..47c22d76e2c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate.py @@ -0,0 +1,48 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + job_definition={ + "properties": { + "agentName": "migration-agent", + "copyMode": "Additive", + "description": "Example Job Definition Description", + "jobType": "OnPremToCloud", + "sourceName": "examples-sourceEndpointName", + "sourceSubpath": "/", + "targetName": "examples-targetEndpointName", + "targetSubpath": "/", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.py new file mode 100644 index 00000000000..dbbd6422fe6 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_CreateOrUpdate_CloudToCloud.py @@ -0,0 +1,48 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_create_or_update_cloud_to_cloud.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + job_definition={ + "properties": { + "agentName": "dummy-agent", + "copyMode": "Additive", + "description": "Example Job Definition Description", + "jobType": "CloudToCloud", + "sourceName": "examples-sourceEndpointName", + "sourceSubpath": "/", + "targetName": "examples-targetEndpointName", + "targetSubpath": "/", + } + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_CreateOrUpdate_CloudToCloud.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.py new file mode 100644 index 00000000000..458f152ac29 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Delete.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.job_definitions.begin_delete( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + ).result() + + +# x-ms-original-file: 2025-07-01/JobDefinitions_Delete.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.py new file mode 100644 index 00000000000..b898887879d --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Get.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_Get.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.py new file mode 100644 index 00000000000..e94fe5c14fe --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_List.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.py new file mode 100644 index 00000000000..39ae7b3b317 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StartJob.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_start_job.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.start_job( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_StartJob.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.py new file mode 100644 index 00000000000..3be4bcb66d5 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_StopJob.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_stop_job.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.stop_job( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_StopJob.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.py new file mode 100644 index 00000000000..65e3306b6e9 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobDefinitions_Update.py @@ -0,0 +1,39 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_definitions_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_definitions.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + job_definition={ + "properties": {"agentName": "updatedAgentName", "description": "Updated Job Definition Description"} + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobDefinitions_Update.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.py new file mode 100644 index 00000000000..ccaaab126c5 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_Get.py @@ -0,0 +1,37 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_runs_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_runs.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + job_run_name="examples-jobRunName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/JobRuns_Get.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.py new file mode 100644 index 00000000000..3a9fd5a09b4 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/JobRuns_List.py @@ -0,0 +1,37 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python job_runs_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.job_runs.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + job_definition_name="examples-jobDefinitionName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/JobRuns_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.py new file mode 100644 index 00000000000..306c782af32 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Operations_List.py @@ -0,0 +1,32 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python operations_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operations.list() + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/Operations_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.py new file mode 100644 index 00000000000..09088780c33 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_CreateOrUpdate.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python projects_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.projects.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + project={"properties": {"description": "Example Project Description"}}, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Projects_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.py new file mode 100644 index 00000000000..464b79e78c9 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Delete.py @@ -0,0 +1,34 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python projects_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.projects.begin_delete( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + ).result() + + +# x-ms-original-file: 2025-07-01/Projects_Delete.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.py new file mode 100644 index 00000000000..e85679561bc --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Get.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python projects_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.projects.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Projects_Get.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.py new file mode 100644 index 00000000000..41d51e73e9f --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_List.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python projects_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.projects.list( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/Projects_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.py new file mode 100644 index 00000000000..021e3eb92df --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/Projects_Update.py @@ -0,0 +1,36 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python projects_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.projects.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + project_name="examples-projectName", + project={"properties": {"description": "Example Project Description"}}, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/Projects_Update.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.py new file mode 100644 index 00000000000..58a43706f5c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_CreateOrUpdate.py @@ -0,0 +1,39 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.storage_movers.create_or_update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + storage_mover={ + "location": "eastus2", + "properties": {"description": "Example Storage Mover Description"}, + "tags": {"key1": "value1", "key2": "value2"}, + }, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/StorageMovers_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.py new file mode 100644 index 00000000000..d600ed67dba --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Delete.py @@ -0,0 +1,33 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.storage_movers.begin_delete( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ).result() + + +# x-ms-original-file: 2025-07-01/StorageMovers_Delete.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.py new file mode 100644 index 00000000000..47ffcaa6924 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Get.py @@ -0,0 +1,34 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.storage_movers.get( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + ) + print(response) + + +# x-ms-original-file: 2025-07-01/StorageMovers_Get.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.py new file mode 100644 index 00000000000..e9543d4bf17 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_List.py @@ -0,0 +1,34 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.storage_movers.list( + resource_group_name="examples-rg", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/StorageMovers_List.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.py new file mode 100644 index 00000000000..a24d67152be --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_ListBySubscription.py @@ -0,0 +1,32 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_list_by_subscription.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.storage_movers.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01/StorageMovers_ListBySubscription.json +if __name__ == "__main__": + main() diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.json b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.json new file mode 100644 index 00000000000..1e24b92b60c --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"} \ No newline at end of file diff --git a/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.py b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.py new file mode 100644 index 00000000000..b901ce84ec9 --- /dev/null +++ b/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2025-07-01/examples-python/StorageMovers_Update.py @@ -0,0 +1,35 @@ +from azure.identity import DefaultAzureCredential + +from azure.mgmt.storagemover import StorageMoverMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-storagemover +# USAGE + python storage_movers_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = StorageMoverMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.storage_movers.update( + resource_group_name="examples-rg", + storage_mover_name="examples-storageMoverName", + storage_mover={"properties": {"description": "Updated Storage Mover Description"}}, + ) + print(response) + + +# x-ms-original-file: 2025-07-01/StorageMovers_Update.json +if __name__ == "__main__": + main()