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
foreach ($IPConfiguration in $networkInterface.IpConfigurations)
@@ -181,6 +180,83 @@ foreach ($IPConfiguration in $networkInterface.IpConfigurations)
181
180
}
182
181
```
183
182
183
+
## Create a private endpoint by using Azure CLI
184
+
185
+
Run the following Azure CLI script to create a private endpoint named "myPrivateEndpoint" for an existing Azure Cosmos account. Replace the variable values with the details for your environment.
186
+
187
+
```azurecli-interactive
188
+
# Resource group where the Azure Cosmos account and virtual network resources are located
189
+
ResourceGroupName="myResourceGroup"
190
+
191
+
# Subscription ID where the Azure Cosmos account and virtual network resources are located
192
+
SubscriptionId="<your Azure subscription ID>"
193
+
194
+
# Name of the existing Azure Cosmos account
195
+
CosmosDbAccountName="mycosmosaccount"
196
+
197
+
# API type of your Azure Cosmos account: Sql, MongoDB, Cassandra, Gremlin, or Table
198
+
CosmosDbApiType="Sql"
199
+
200
+
# Name of the virtual network to create
201
+
VNetName="myVnet"
202
+
203
+
# Name of the subnet to create
204
+
SubnetName="mySubnet"
205
+
206
+
# Name of the private endpoint to create
207
+
PrivateEndpointName="myPrivateEndpoint"
208
+
209
+
# Name of the private endpoint connection to create
# Copy the content for privateIPAddress and FQDN matching the Azure Cosmos account
253
+
az resource show --ids $networkInterfaceId --api-version 2019-04-01 -o json
254
+
255
+
#Create DNS records
256
+
az network private-dns record-set a create --name recordSet1 --zone-name privatelink.documents.azure.com --resource-group $ResourceGroupName
257
+
az network private-dns record-set a add-record --record-set-name recordSet2 --zone-name privatelink.documents.azure.com --resource-group $ResourceGroupName -a <Private IP Address>
258
+
```
259
+
184
260
## Create a private endpoint by using a Resource Manager template
185
261
186
262
You can set up Private Link by creating a private endpoint in a virtual network subnet. You achieve this by using an Azure Resource Manager template.
Copy file name to clipboardExpand all lines: articles/cosmos-db/local-emulator-export-ssl-certificates.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Export the Azure Cosmos DB Emulator certificates
3
3
description: When developing in languages and runtimes that do not use the Windows Certificate Store you will need to export and manage the SSL certificates. This post gives step by step instructions.
0 commit comments