az cosmosdb network-rule

Manage Azure Comsos DB network rules.

Commands

az cosmosdb network-rule add Adds a virtual network rule to an existing Cosmos DB database account.
az cosmosdb network-rule list Lists the virtual network accounts associated with a Cosmos DB account.
az cosmosdb network-rule remove Adds a virtual network rule to an existing Cosmos DB database account.

az cosmosdb network-rule add

Adds a virtual network rule to an existing Cosmos DB database account.

az cosmosdb network-rule add --subnet
[--ids]
[--ignore-missing-vnet-service-endpoint {false, true}]
[--name]
[--resource-group]
[--subscription]
[--virtual-network]

Required Parameters

--subnet

Name or ID of the subnet.

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--ignore-missing-vnet-service-endpoint

Create firewall rule before the virtual network has vnet service endpoint enabled.

accepted values: false, true
--name -n

Name of the Cosmos DB database account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--virtual-network

The name of the VNET, which must be provided in conjunction with the name of the subnet.

az cosmosdb network-rule list

Lists the virtual network accounts associated with a Cosmos DB account.

az cosmosdb network-rule list --name
--resource-group
[--subscription]

Required Parameters

--name -n

Name of the Cosmos DB database account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az cosmosdb network-rule remove

Adds a virtual network rule to an existing Cosmos DB database account.

az cosmosdb network-rule remove --subnet
[--ids]
[--name]
[--resource-group]
[--subscription]
[--virtual-network]

Required Parameters

--subnet

Name or ID of the subnet.

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

Name of the Cosmos DB database account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--virtual-network

The name of the VNET, which must be provided in conjunction with the name of the subnet.