Share via


az cosmosdb network-rule

Manage Azure Cosmos DB network rules.

Commands

Name Description Type Status
az cosmosdb network-rule add

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

Core GA
az cosmosdb network-rule list

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

Core GA
az cosmosdb network-rule remove

Remove a virtual network rule from an existing Cosmos DB database account.

Core GA

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-endpoint --ignore-missing-vnet-service-endpoint {false, true}]
                             [--name]
                             [--resource-group]
                             [--subscription]
                             [--virtual-network --vnet-name]

Required Parameters

--subnet

Name or ID of the subnet.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--ignore-missing-endpoint --ignore-missing-vnet-service-endpoint

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

Property Value
Default value: False
Accepted values: false, true
--name -n

Name of the Cosmos DB database account.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--virtual-network --vnet-name

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cosmosdb network-rule list

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

az cosmosdb network-rule list --name
                              --resource-group

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cosmosdb network-rule remove

Remove a virtual network rule from an existing Cosmos DB database account.

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

Required Parameters

--subnet

Name or ID of the subnet.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the Cosmos DB database account.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--virtual-network --vnet-name

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False