Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update-format
  • Loading branch information
ChenxiJiang333 committed Nov 18, 2024
commit 4e65050ffbc0be92490931a291e377a786963f55
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.mysqlflexibleservers import MySQLManagementClient

"""
# PREREQUISITES
pip install azure-identity
Expand All @@ -21,19 +22,20 @@
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'},
name_availability_request={"name": "name1", "type": "Microsoft.DBforMySQL/flexibleServers"},
)
print(response)


# x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2024-10-01-preview/examples/CheckNameAvailability.json
if __name__ == "__main__":
main()
__main__":
main()