Skip to content

Commit 3fa5342

Browse files
committed
update private link docs
1 parent 6ed242a commit 3fa5342

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

articles/cosmos-db/how-to-configure-private-endpoints.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ $ResourceGroupName = "myResourceGroup"
115115
# Name of the Azure Cosmos account
116116
$CosmosDbAccountName = "mycosmosaccount"
117117
118-
# API type of the Azure Cosmos account: Sql, MongoDB, Cassandra, Gremlin, or Table
119-
$CosmosDbApiType = "Sql"
118+
# Resource for the Azure Cosmos account: Sql, SqlDedicated, MongoDB, Cassandra, Gremlin, or Table
119+
$CosmosDbSubResourceType = "Sql"
120120
# Name of the existing virtual network
121121
$VNetName = "myVnet"
122122
# Name of the target subnet in the virtual network
@@ -128,7 +128,7 @@ $Location = "westcentralus"
128128
129129
$cosmosDbResourceId = "/subscriptions/$($SubscriptionId)/resourceGroups/$($ResourceGroupName)/providers/Microsoft.DocumentDB/databaseAccounts/$($CosmosDbAccountName)"
130130
131-
$privateEndpointConnection = New-AzPrivateLinkServiceConnection -Name "myConnectionPS" -PrivateLinkServiceId $cosmosDbResourceId -GroupId $CosmosDbApiType
131+
$privateEndpointConnection = New-AzPrivateLinkServiceConnection -Name "myConnectionPS" -PrivateLinkServiceId $cosmosDbResourceId -GroupId $CosmosDbSubResource
132132
133133
$virtualNetwork = Get-AzVirtualNetwork -ResourceGroupName $ResourceGroupName -Name $VNetName
134134
@@ -201,8 +201,8 @@ SubscriptionId="<your Azure subscription ID>"
201201
# Name of the existing Azure Cosmos account
202202
CosmosDbAccountName="mycosmosaccount"
203203
204-
# API type of your Azure Cosmos account: Sql, MongoDB, Cassandra, Gremlin, or Table
205-
CosmosDbApiType="Sql"
204+
# API type of your Azure Cosmos account: Sql, SqlDedicated, MongoDB, Cassandra, Gremlin, or Table
205+
CosmosDbSubResourceType="Sql"
206206
207207
# Name of the virtual network to create
208208
VNetName="myVnet"
@@ -233,7 +233,7 @@ az network private-endpoint create \
233233
--vnet-name $VNetName \
234234
--subnet $SubnetName \
235235
--private-connection-resource-id "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/$CosmosDbAccountName" \
236-
--group-ids $CosmosDbApiType \
236+
--group-ids $CosmosDbSubResourceType \
237237
--connection-name $PrivateConnectionName
238238
```
239239

@@ -364,8 +364,8 @@ $SubscriptionId = "<your Azure subscription ID>"
364364
$ResourceGroupName = "myResourceGroup"
365365
# Name of the Azure Cosmos account
366366
$CosmosDbAccountName = "mycosmosaccount"
367-
# API type of the Azure Cosmos account. It can be one of the following: "Sql", "MongoDB", "Cassandra", "Gremlin", "Table"
368-
$CosmosDbApiType = "Sql"
367+
# API type of the Azure Cosmos account. It can be one of the following: "Sql", "SqlDedicated", "MongoDB", "Cassandra", "Gremlin", "Table"
368+
$CosmosDbSubResourceType = "Sql"
369369
# Name of the existing virtual network
370370
$VNetName = "myVnet"
371371
# Name of the target subnet in the virtual network
@@ -396,18 +396,19 @@ $deploymentOutput = New-AzResourceGroupDeployment -Name "PrivateCosmosDbEndpoint
396396
-TemplateParameterFile $PrivateEndpointParametersFilePath `
397397
-SubnetId $SubnetResourceId `
398398
-ResourceId $CosmosDbResourceId `
399-
-GroupId $CosmosDbApiType `
399+
-GroupId $CosmosDbSubResourceType `
400400
-PrivateEndpointName $PrivateEndpointName
401401
402402
$deploymentOutput
403403
```
404404

405-
In the PowerShell script, the `GroupId` variable can contain only one value. That value is the API type of the account. Allowed values are: `Sql`, `MongoDB`, `Cassandra`, `Gremlin`, and `Table`. Some Azure Cosmos account types are accessible through multiple APIs. For example:
405+
In the PowerShell script, the `GroupId` variable can contain only one value. That value is the API type of the account. Allowed values are: `Sql`, `SqlDedicated`, `MongoDB`, `Cassandra`, `Gremlin`, and `Table`. Some Azure Cosmos account types are accessible through multiple APIs. For example:
406406

407+
* A SQL API account has an added option for accounts configured to use the [Dedicated Gateway](./dedicated-gateway.md).
407408
* A Gremlin API account can be accessed from both Gremlin and SQL API accounts.
408409
* A Table API account can be accessed from both Table and SQL API accounts.
409410

410-
For those accounts, you must create one private endpoint for each API type. The corresponding API type is specified in the `GroupId` array.
411+
For those accounts, you must create one private endpoint for each API type. If you are creating a private endpoint for `SqlDedicated`, you only need to add a second endpoint for `Sql` if you want to also connect to your account using the standard gateway. The corresponding API type is specified in the `GroupId` array.
411412

412413
After the template is deployed successfully, you can see an output similar to what the following image shows. The `provisioningState` value is `Succeeded` if the private endpoints are set up correctly.
413414

@@ -558,8 +559,8 @@ $SubscriptionId = "<your Azure subscription ID>"
558559
$ResourceGroupName = "myResourceGroup"
559560
# Name of the Azure Cosmos account
560561
$CosmosDbAccountName = "mycosmosaccount"
561-
# API type of the Azure Cosmos account. It can be one of the following: "Sql", "MongoDB", "Cassandra", "Gremlin", "Table"
562-
$CosmosDbApiType = "Sql"
562+
# API type of the Azure Cosmos account. It can be one of the following: "Sql", "SqlDedicated", "MongoDB", "Cassandra", "Gremlin", "Table"
563+
$CosmosDbSubResourceType = "Sql"
563564
# Name of the existing virtual network
564565
$VNetName = "myVnet"
565566
# Name of the target subnet in the virtual network
@@ -607,7 +608,7 @@ $deploymentOutput = New-AzResourceGroupDeployment -Name "PrivateCosmosDbEndpoint
607608
-TemplateParameterFile $PrivateEndpointParametersFilePath `
608609
-SubnetId $SubnetResourceId `
609610
-ResourceId $CosmosDbResourceId `
610-
-GroupId $CosmosDbApiType `
611+
-GroupId $CosmosDbSubResourceType `
611612
-PrivateEndpointName $PrivateEndpointName
612613
$deploymentOutput
613614

0 commit comments

Comments
 (0)