diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/_meta.json b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/_meta.json index 0719181a25cf..28cf475a8834 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/_meta.json +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/_meta.json @@ -1,11 +1,11 @@ { - "commit": "2cec543b4bf04ccd1971ae69a136cf06878439b2", + "commit": "a1a55a565f27c0ba8c671b1bd678d9bf7d3642dd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ "@autorest/python@6.19.0", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/mysql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-flexibleserver-2024-06-01-preview --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/mysql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/mysql/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_get.py deleted file mode 100644 index 82040e4e3bb5..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.get( - resource_group_name="threatprotection-6852", - server_name="threatprotection-2080", - advanced_threat_protection_name="Default", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_list.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_list.py deleted file mode 100644 index 2ebd4ba1fd69..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.list( - resource_group_name="threatprotection-6852", - server_name="threatprotection-2080", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsList.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_disabled.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_disabled.py deleted file mode 100644 index 641a8b383d1a..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_disabled.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_patch_disabled.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.begin_update( - resource_group_name="threatprotection-4799", - server_name="threatprotection-6440", - advanced_threat_protection_name="Default", - parameters={"properties": {"state": "Disabled"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_enabled.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_enabled.py deleted file mode 100644 index 8e91cb688655..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_patch_enabled.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_patch_enabled.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.begin_update( - resource_group_name="threatprotection-4799", - server_name="threatprotection-6440", - advanced_threat_protection_name="Default", - parameters={"properties": {"state": "Enabled"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_disabled.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_disabled.py deleted file mode 100644 index fcf1a6018104..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_disabled.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_put_disabled.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.begin_update_put( - resource_group_name="threatprotection-4799", - server_name="threatprotection-6440", - advanced_threat_protection_name="Default", - parameters={"properties": {"state": "Disabled"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_enabled.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_enabled.py deleted file mode 100644 index 95372dda2925..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/advanced_threat_protection_settings_put_enabled.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python advanced_threat_protection_settings_put_enabled.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="00000000-1111-2222-3333-444444444444", - ) - - response = client.advanced_threat_protection_settings.begin_update_put( - resource_group_name="threatprotection-4799", - server_name="threatprotection-6440", - advanced_threat_protection_name="Default", - parameters={"properties": {"state": "Enabled"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_create.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_create.py deleted file mode 100644 index bb4e336f74a0..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_create.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python azure_ad_administrator_create.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.azure_ad_administrators.begin_create_or_update( - resource_group_name="testrg", - server_name="mysqltestsvc4", - administrator_name="ActiveDirectory", - parameters={ - "properties": { - "administratorType": "ActiveDirectory", - "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - "login": "bob@contoso.com", - "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_delete.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_delete.py deleted file mode 100644 index 47e0110f74f5..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python azure_ad_administrator_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.azure_ad_administrators.begin_delete( - resource_group_name="testrg", - server_name="mysqltestsvc4", - administrator_name="ActiveDirectory", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_get.py deleted file mode 100644 index 4058ac8a3b0e..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrator_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python azure_ad_administrator_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.azure_ad_administrators.get( - resource_group_name="testrg", - server_name="mysqltestsvc4", - administrator_name="ActiveDirectory", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrators_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrators_list_by_server.py deleted file mode 100644 index 8926e91a0040..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/azure_ad_administrators_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python azure_ad_administrators_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.azure_ad_administrators.list_by_server( - resource_group_name="testrg", - server_name="mysqltestsvc4", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorsListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_and_export.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_and_export.py deleted file mode 100644 index dfe745cfab9d..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_and_export.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python backup_and_export.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.backup_and_export.begin_create( - resource_group_name="TestGroup", - server_name="mysqltestserver", - parameters={ - "backupSettings": {"backupName": "customer-backup-name"}, - "targetDetails": {"objectType": "FullBackupStoreDetails", "sasUriList": ["sasuri1", "sasuri2"]}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupAndExport.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_get.py deleted file mode 100644 index dbd51bf3e392..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python backup_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.backups.get( - resource_group_name="TestGroup", - server_name="mysqltestserver", - backup_name="daily_20210615T160516", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_put.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_put.py deleted file mode 100644 index 5c9e00f5668d..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backup_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python backup_put.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.backups.put( - resource_group_name="TestGroup", - server_name="mysqltestserver", - backup_name="mybackup", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupPut.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backups_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backups_list_by_server.py deleted file mode 100644 index 89ca6588ba71..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/backups_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python backups_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.backups.list_by_server( - resource_group_name="TestGroup", - server_name="mysqltestserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupsListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capabilities_by_location_list.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capabilities_by_location_list.py deleted file mode 100644 index 55e77c72c5f8..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capabilities_by_location_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python capabilities_by_location_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.location_based_capabilities.list( - location_name="WestUS", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_by_location.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_by_location.py deleted file mode 100644 index 15d5633448d6..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_by_location.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python capability_set_by_location.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.location_based_capability_set.get( - location_name="WestUS", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_list_by_location.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_list_by_location.py deleted file mode 100644 index 9f1e83f4cebd..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/capability_set_list_by_location.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python capability_set_list_by_location.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.location_based_capability_set.list( - location_name="WestUS", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_name_availability.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_name_availability.py deleted file mode 100644 index c030d36ccc1c..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_name_availability.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python check_name_availability.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.check_name_availability_without_location.execute( - name_availability_request={'name': 'name1', 'type': 'Microsoft.DBforMySQL/flexibleServers'}, - ) - print(response) - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json -if __name__ == "__main__": - main() -__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_virtual_network_subnet_usage.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_virtual_network_subnet_usage.py deleted file mode 100644 index db1f53928c9b..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/check_virtual_network_subnet_usage.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python check_virtual_network_subnet_usage.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.check_virtual_network_subnet_usage.execute( - location_name="WestUS", - parameters={ - "virtualNetworkResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet" - }, - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_create_or_update.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_create_or_update.py deleted file mode 100644 index 5813a8499368..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_create_or_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python configuration_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.configurations.begin_create_or_update( - resource_group_name="TestGroup", - server_name="testserver", - configuration_name="event_scheduler", - parameters={"properties": {"source": "user-override", "value": "off"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationCreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_get.py deleted file mode 100644 index 0bc59b82b75f..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python configuration_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.configurations.get( - resource_group_name="TestGroup", - server_name="testserver", - configuration_name="event_scheduler", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_update.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_update.py deleted file mode 100644 index 57b024f9c435..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configuration_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python configuration_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.configurations.begin_update( - resource_group_name="testrg", - server_name="testserver", - configuration_name="event_scheduler", - parameters={"properties": {"source": "user-override", "value": "on"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_batch_update.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_batch_update.py deleted file mode 100644 index b390cf0218f3..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_batch_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python configurations_batch_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.configurations.begin_batch_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "resetAllToDefault": "False", - "value": [ - {"name": "event_scheduler", "properties": {"value": "OFF"}}, - {"name": "div_precision_increment", "properties": {"value": "8"}}, - ], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsBatchUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_list_by_server.py deleted file mode 100644 index 46e677fb2741..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/configurations_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python configurations_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.configurations.list_by_server( - resource_group_name="testrg", - server_name="mysqltestserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/cutover_migration.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/cutover_migration.py deleted file mode 100644 index 866957efefe4..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/cutover_migration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python cutover_migration.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers_migration.begin_cutover_migration( - resource_group_name="testrg", - server_name="mysqltestserver", - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/CutoverMigration.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_create.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_create.py deleted file mode 100644 index a82267fa6062..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_create.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python database_create.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.databases.begin_create_or_update( - resource_group_name="TestGroup", - server_name="testserver", - database_name="db1", - parameters={"properties": {"charset": "utf8", "collation": "utf8_general_ci"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_delete.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_delete.py deleted file mode 100644 index 68c49e567bc2..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python database_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.databases.begin_delete( - resource_group_name="TestGroup", - server_name="testserver", - database_name="db1", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_get.py deleted file mode 100644 index 150abf7e7845..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/database_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python database_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.databases.get( - resource_group_name="TestGroup", - server_name="testserver", - database_name="db1", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/databases_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/databases_list_by_server.py deleted file mode 100644 index cbf6db20008f..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/databases_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python databases_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.databases.list_by_server( - resource_group_name="TestGroup", - server_name="testserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabasesListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_create.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_create.py deleted file mode 100644 index 6e91741b4df0..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_create.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python firewall_rule_create.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.firewall_rules.begin_create_or_update( - resource_group_name="TestGroup", - server_name="testserver", - firewall_rule_name="rule1", - parameters={"properties": {"endIpAddress": "255.255.255.255", "startIpAddress": "0.0.0.0"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_delete.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_delete.py deleted file mode 100644 index 54676702f130..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python firewall_rule_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.firewall_rules.begin_delete( - resource_group_name="TestGroup", - server_name="testserver", - firewall_rule_name="rule1", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_get.py deleted file mode 100644 index ca46b65b5b29..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rule_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python firewall_rule_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.firewall_rules.get( - resource_group_name="TestGroup", - server_name="testserver", - firewall_rule_name="rule1", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rules_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rules_list_by_server.py deleted file mode 100644 index fa785d71c6da..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/firewall_rules_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python firewall_rules_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.firewall_rules.list_by_server( - resource_group_name="TestGroup", - server_name="testserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRulesListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/get_private_dns_zone_suffix.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/get_private_dns_zone_suffix.py deleted file mode 100644 index 49ddc55e0a06..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/get_private_dns_zone_suffix.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python get_private_dns_zone_suffix.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.get_private_dns_zone_suffix.execute() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/log_files_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/log_files_list_by_server.py deleted file mode 100644 index 7ec6551ae72d..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/log_files_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python log_files_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.log_files.list_by_server( - resource_group_name="testrg", - server_name="mysqltestsvc1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2023-12-30/examples/LogFilesListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup.py deleted file mode 100644 index 4b3c214c5d9e..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python long_running_backup.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.long_running_backup.begin_create( - resource_group_name="TestGroup", - server_name="mysqltestserver", - backup_name="testback", - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackup.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup_get.py deleted file mode 100644 index 919cc6880e02..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backup_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python long_running_backup_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.long_running_backups.get( - resource_group_name="TestGroup", - server_name="mysqltestserver", - backup_name="daily_20210615T160516", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backups_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backups_list_by_server.py deleted file mode 100644 index 43c060eeb5e4..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/long_running_backups_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python long_running_backups_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.long_running_backups.list( - resource_group_name="TestGroup", - server_name="mysqltestserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupsListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_in_virtual_canary.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_in_virtual_canary.py deleted file mode 100644 index f81b35795af5..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_in_virtual_canary.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python maintenance_policy_patch_opt_in_virtual_canary.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={"properties": {"maintenancePolicy": {"patchStrategy": "VirtualCanary"}}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/MaintenancePolicyPatchOptInVirtualCanary.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_out_virtual_canary.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_out_virtual_canary.py deleted file mode 100644 index 629e60cec868..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_policy_patch_opt_out_virtual_canary.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python maintenance_policy_patch_opt_out_virtual_canary.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={"properties": {"maintenancePolicy": {"patchStrategy": "Default"}}}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/MaintenancePolicyPatchOptOutVirtualCanary.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_read.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_read.py deleted file mode 100644 index d735e2706d3d..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_read.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python maintenance_read.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.maintenances.read( - resource_group_name="TestGroup", - server_name="testserver", - maintenance_name="_T9Q-TS8", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_update.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_update.py deleted file mode 100644 index 7ccb09567eb1..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenance_update.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python maintenance_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.maintenances.begin_update( - resource_group_name="TestGroup", - server_name="testserver", - maintenance_name="_T9Q-TS8", - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenances_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenances_list_by_server.py deleted file mode 100644 index 66a957bea5cb..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/maintenances_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python maintenances_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.maintenances.list( - resource_group_name="TestGroup", - server_name="testserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenancesListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_backup_and_export.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_backup_and_export.py deleted file mode 100644 index a41a6dd39619..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_backup_and_export.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python operation_progress_get_backup_and_export.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.operation_progress.get( - location_name="westus", - operation_id="00000000-0000-0000-0000-000000000000", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_BackupAndExport.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_import_from_storage.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_import_from_storage.py deleted file mode 100644 index f426dfc3f6a2..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_progress_get_import_from_storage.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python operation_progress_get_import_from_storage.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.operation_progress.get( - location_name="westus", - operation_id="00000000-0000-0000-0000-000000000000", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_ImportFromStorage.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_results_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_results_get.py deleted file mode 100644 index 0197a716d0e1..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operation_results_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python operation_results_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.operation_results.get( - location_name="westus", - operation_id="00000000-0000-0000-0000-000000000000", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operations_list.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operations_list.py deleted file mode 100644 index 949edf07c241..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/operations_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# 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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationsList.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/replicas_list_by_server.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/replicas_list_by_server.py deleted file mode 100644 index 31c4ad7a92e2..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/replicas_list_by_server.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python replicas_list_by_server.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.replicas.list_by_server( - resource_group_name="TestGroup", - server_name="mysqltestserver", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ReplicasListByServer.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create.py deleted file mode 100644 index c5fd4111f28c..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_create.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_create( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "location": "southeastasia", - "properties": { - "administratorLogin": "cloudsa", - "administratorLoginPassword": "your_password", - "availabilityZone": "1", - "backup": {"backupIntervalHours": 24, "backupRetentionDays": 7, "geoRedundantBackup": "Disabled"}, - "createMode": "Default", - "highAvailability": {"mode": "ZoneRedundant", "standbyAvailabilityZone": "3"}, - "storage": { - "autoGrow": "Disabled", - "iops": 600, - "storageRedundancy": "LocalRedundancy", - "storageSizeGB": 100, - }, - "version": "5.7", - }, - "sku": {"name": "Standard_D2ds_v4", "tier": "GeneralPurpose"}, - "tags": {"num": "1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_replica.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_replica.py deleted file mode 100644 index 2b5ed91c45f5..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_replica.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_create_replica.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_create( - resource_group_name="testgr", - server_name="replica-server", - parameters={ - "location": "SoutheastAsia", - "properties": { - "createMode": "Replica", - "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerCreateReplica.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_byok.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_byok.py deleted file mode 100644 index 4f311a7bbf86..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_byok.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_create_with_byok.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_create( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {} - }, - }, - "location": "southeastasia", - "properties": { - "administratorLogin": "cloudsa", - "administratorLoginPassword": "your_password", - "availabilityZone": "1", - "backup": {"backupIntervalHours": 24, "backupRetentionDays": 7, "geoRedundantBackup": "Disabled"}, - "createMode": "Default", - "dataEncryption": { - "geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", - "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity", - "primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", - "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity", - "type": "AzureKeyVault", - }, - "highAvailability": {"mode": "ZoneRedundant", "standbyAvailabilityZone": "3"}, - "storage": { - "autoGrow": "Disabled", - "iops": 600, - "storageRedundancy": "LocalRedundancy", - "storageSizeGB": 100, - }, - "version": "5.7", - }, - "sku": {"name": "Standard_D2ds_v4", "tier": "GeneralPurpose"}, - "tags": {"num": "1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerCreateWithBYOK.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_database_port.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_database_port.py deleted file mode 100644 index 5c7ec9990035..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_database_port.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_create_with_database_port.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_create( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "location": "southeastasia", - "properties": { - "administratorLogin": "cloudsa", - "administratorLoginPassword": "your_password", - "availabilityZone": "1", - "backup": {"backupIntervalHours": 24, "backupRetentionDays": 7, "geoRedundantBackup": "Disabled"}, - "createMode": "Default", - "databasePort": 8888, - "highAvailability": {"mode": "ZoneRedundant", "standbyAvailabilityZone": "3"}, - "storage": { - "autoGrow": "Disabled", - "iops": 600, - "storageRedundancy": "LocalRedundancy", - "storageSizeGB": 100, - }, - "version": "5.7", - }, - "sku": {"name": "Standard_D2ds_v4", "tier": "GeneralPurpose"}, - "tags": {"num": "1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerCreateWithDatabasePort.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_point_in_time_restore.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_point_in_time_restore.py deleted file mode 100644 index c7b9bd89542c..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_create_with_point_in_time_restore.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_create_with_point_in_time_restore.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_create( - resource_group_name="TargetResourceGroup", - server_name="targetserver", - parameters={ - "location": "SoutheastAsia", - "properties": { - "createMode": "PointInTimeRestore", - "restorePointInTime": "2021-06-24T00:00:37.467Z", - "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver", - }, - "sku": {"name": "Standard_D14_v2", "tier": "GeneralPurpose"}, - "tags": {"num": "1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerCreateWithPointInTimeRestore.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_delete.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_delete.py deleted file mode 100644 index 6b71933589aa..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_delete( - resource_group_name="TestGroup", - server_name="testserver", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_detach_vnet.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_detach_vnet.py deleted file mode 100644 index a9aa5bb97316..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_detach_vnet.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_detach_vnet.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_detach_v_net( - resource_group_name="TestGroup", - server_name="testserver", - parameters={"publicNetworkAccess": "Enabled"}, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerDetachVNet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_failover.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_failover.py deleted file mode 100644 index ad9ce5614797..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_failover.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_failover.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_failover( - resource_group_name="TestGroup", - server_name="testserver", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerFailover.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get.py deleted file mode 100644 index c5eaf94a1614..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.get( - resource_group_name="testrg", - server_name="mysqltestserver", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerGet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get_with_vnet.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get_with_vnet.py deleted file mode 100644 index c71dfec71353..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_get_with_vnet.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_get_with_vnet.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.get( - resource_group_name="testrg", - server_name="mysqltestserver", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerGetWithVnet.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_reset_gtid.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_reset_gtid.py deleted file mode 100644 index 58232ccac6ee..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_reset_gtid.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_reset_gtid.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_reset_gtid( - resource_group_name="TestGroup", - server_name="testserver", - parameters={"gtidSet": "4aff5b51-97ba-11ed-a955-002248036acc:1-16"}, - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerResetGtid.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_restart.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_restart.py deleted file mode 100644 index cde7f8f55a9c..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_restart.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_restart.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_restart( - resource_group_name="TestGroup", - server_name="testserver", - parameters={"maxFailoverSeconds": 60, "restartWithFailover": "Enabled"}, - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerRestart.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_start.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_start.py deleted file mode 100644 index 227b45f4f02f..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_start.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_start.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_start( - resource_group_name="TestGroup", - server_name="testserver", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerStart.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_stop.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_stop.py deleted file mode 100644 index fc4945d12e46..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_stop.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_stop.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - client.servers.begin_stop( - resource_group_name="TestGroup", - server_name="testserver", - ).result() - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerStop.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update.py deleted file mode 100644 index 3a8e3aebbe90..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "properties": { - "network": {"publicNetworkAccess": "Disabled"}, - "storage": {"autoGrow": "Disabled", "autoIoScaling": "Disabled", "iops": 200, "storageSizeGB": 30}, - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_byok.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_byok.py deleted file mode 100644 index 82f4b19b650c..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_byok.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_update_with_byok.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {} - }, - }, - "properties": { - "dataEncryption": { - "geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", - "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity", - "primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", - "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity", - "type": "AzureKeyVault", - } - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerUpdateWithBYOK.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_customer_maintenance_window.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_customer_maintenance_window.py deleted file mode 100644 index c08f73da260b..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_update_with_customer_maintenance_window.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_update_with_customer_maintenance_window.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.begin_update( - resource_group_name="testrg", - server_name="mysqltestserver", - parameters={ - "properties": { - "maintenanceWindow": {"customWindow": "Enabled", "dayOfWeek": 1, "startHour": 8, "startMinute": 0} - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_validate_estimate_high_availability.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_validate_estimate_high_availability.py deleted file mode 100644 index b6560e6fda7f..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/server_validate_estimate_high_availability.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python server_validate_estimate_high_availability.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.validate_estimate_high_availability( - resource_group_name="TestGroup", - server_name="testserver", - parameters={"expectedStandbyAvailabilityZone": "1"}, - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServerValidateEstimateHighAvailability.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list.py deleted file mode 100644 index 0dcb8861a700..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python servers_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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServersList.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list_by_resource_group.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list_by_resource_group.py deleted file mode 100644 index 4aeca085ff06..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/servers_list_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python servers_list_by_resource_group.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.servers.list_by_resource_group( - resource_group_name="TestGroup", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-06-01-preview/examples/ServersListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/validate_backup.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/validate_backup.py deleted file mode 100644 index 18e13a9d5597..000000000000 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/generated_samples/validate_backup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.mysqlflexibleservers import MySQLManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-mysqlflexibleservers -# USAGE - python validate_backup.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 = MySQLManagementClient( - credential=DefaultAzureCredential(), - subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff", - ) - - response = client.backup_and_export.validate_backup( - resource_group_name="TestGroup", - server_name="mysqltestserver", - ) - print(response) - - -# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/ValidateBackup.json -if __name__ == "__main__": - main()