You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-create-server-customer-managed-key-azure-api.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Create and manage Azure Database for PostgreSQL - Flexible Server with data encrypted by Customer Managed Keys using Azure REST API
2
+
title: Create and manage Azure Database for PostgreSQL - Flexible Server with data encrypted by Customer Managed Keys using Azure REST API
3
3
description: Create and manage Azure Database for PostgreSQL - Flexible Server with data encrypted by Customer Managed Keys using Azure REST API
4
4
author: gennadNY
5
5
ms.author: gennadyk
@@ -21,6 +21,10 @@ Prerequisites:
21
21
- Azure managed identity in region where Postgres Flex Server will be created.
22
22
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
23
23
24
+
25
+
> [!NOTE]
26
+
> API examples below are based on 2022-12-01 API version
27
+
24
28
You can create a PostgreSQL Flexible Server encrypted with Customer Managed Key by using the [create API](https://learn.microsoft.com/rest/api/postgresql/flexibleserver/servers/create?tabs=HTTP):
25
29
```rest
26
30
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}?api-version=2022-12-01
@@ -49,7 +53,7 @@ PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{
49
53
}
50
54
```
51
55
Key Vault Uri can be copied from key properties **Key Identifier** field in Azure Key Vault Portal UI, as shown in image below:
52
-
:::image type="content" source="./media/how-to-create-server-customer-managed-key-azure-api/keyuri-portal.png" alt-text =" Key properties and URI on Azure Key Vault Portal page." :::
56
+
:::image type="content" source="./media/how-to-create-server-customer-managed-key-azure-api/key-uri-portal.png" alt-text =" Screenshot of key properties and URI on Azure Key Vault Portal page." :::
53
57
You can also programmatically fetch Key Vault Uri using [Azure REST API](https://learn.microsoft.com/rest/api/keyvault/keyvault/vaults/get?tabs=HTTP)
0 commit comments