Skip to content

Commit 477b2e6

Browse files
cleanup
1 parent 6335927 commit 477b2e6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

articles/postgresql/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@
443443
- name: ARM template
444444
displayName: Resource Manager
445445
href: flexible-server/quickstart-create-server-arm-template.md
446+
- name: Azure SDK for Python
447+
href: flexible-server/quickstart-create-server-python-sdk.md
446448
- name: Connect and query
447449
items:
448450
- name: Connect to a server in VNET

articles/postgresql/flexible-server/quickstart-create-server-python-sdk.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ An Azure account with an active subscription. [Create one for free](https://azur
2626

2727
## Create the Server
2828

29-
First, install the required packages:
29+
First, install the required packages.
3030

3131
```bash
3232
pip install azure-mgmt-resource
3333
pip install azure-identity
3434
pip install azure-mgmt-rdbms
3535
```
3636

37-
Create a `create_postgres_flexible_server.py` file and include the following code:
37+
Create a `create_postgres_flexible_server.py` file and include the following code.
3838

3939
```python
4040
from azure.identity import DefaultAzureCredential
@@ -109,7 +109,7 @@ You can use the Python SDK, Azure portal, Azure CLI, Azure PowerShell, and vario
109109

110110

111111
# [Python SDK](#tab/PythonSDK)
112-
Add the `check_server_created` function to your existing script to use the servers attribute of the `PostgreSQLManagementClient` instance to check if the PostgreSQL Flexible Server was created:
112+
Add the `check_server_created` function to your existing script to use the servers attribute of the [`PostgreSQLManagementClient`](https://learn.microsoft.com/en-us/python/api/azure-mgmt-rdbms/azure.mgmt.rdbms.postgresql_flexibleservers.postgresqlmanagementclient?view=azure-python) instance to check if the PostgreSQL Flexible Server was created:
113113

114114
```python
115115
def check_server_created(subscription_id, resource_group, server_name):
@@ -160,6 +160,7 @@ Get-AzResource -ResourceGroupName <resource_group>
160160
If you no longer need the PostgreSQL Flexible Server, you can delete it and the associated resource group using the following methods.
161161

162162
# [Python SDK](#tab/PythonSDK)
163+
Add the `delete_resources` function to your existing script to delete your Postgres server and the associated resource group that was created in this quickstart.
163164

164165
```python
165166
def delete_resources(subscription_id, resource_group, server_name):
@@ -182,8 +183,6 @@ def delete_resources(subscription_id, resource_group, server_name):
182183
delete_resources(subscription_id, resource_group, server_name)
183184
```
184185

185-
This function will delete the PostgreSQL Flexible Server and the resource group that was created in this quickstart.
186-
187186

188187
# [CLI](#tab/CLI)
189188

0 commit comments

Comments
 (0)