az cosmosdb service

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Commands to perform operations on Service.

Commands

Name Description Type Status
az cosmosdb service create

Create a cosmosdb service resource.

Core GA
az cosmosdb service create (cosmosdb-preview extension)

Create a cosmosdb service resource.

Extension Preview
az cosmosdb service delete

Delete the given cosmosdb service resource.

Core GA
az cosmosdb service delete (cosmosdb-preview extension)

Delete the given cosmosdb service resource.

Extension Preview
az cosmosdb service list

List all cosmosdb service resource under an account.

Core GA
az cosmosdb service list (cosmosdb-preview extension)

List all cosmosdb service resource under an account.

Extension Preview
az cosmosdb service show

Get cosmosdb service resource under an account.

Core GA
az cosmosdb service show (cosmosdb-preview extension)

Get cosmosdb service resource under an account.

Extension Preview
az cosmosdb service update

Update a cosmosdb service resource.

Core GA
az cosmosdb service update (cosmosdb-preview extension)

Update a cosmosdb service resource.

Extension Preview

az cosmosdb service create

Create a cosmosdb service resource.

az cosmosdb service create --account-name
                           --name
                           --resource-group-name
                           [--count]
                           [--gateway-type {DistributedQuery, IntegratedCache}]
                           [--no-wait]
                           [--size]

Examples

Create a cosmosdb service resource.

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --count 3 --size "Cosmos.D4s"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--count -c

Instance Count.

Default value: 1
--gateway-type

Dedicated Gateway Type. Valid only for SqlDedicatedGateway service kind.

Accepted values: DistributedQuery, IntegratedCache
Default value: IntegratedCache
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--size

Instance Size. Possible values are: Cosmos.D4s, Cosmos.D8s, Cosmos.D16s etc.

Default value: Cosmos.D4s
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service create (cosmosdb-preview extension)

Preview

Command group 'cosmosdb service' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a cosmosdb service resource.

az cosmosdb service create --account-name
                           --kind
                           --name
                           --resource-group-name
                           [--count]
                           [--gateway-type {DistributedQuery, IntegratedCache}]
                           [--no-wait]
                           [--size]

Examples

Create a cosmosdb service resource.

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --kind "SqlDedicatedGateway" --count 3 --size "Cosmos.D4s"

Create a cosmosdb materialized views builder service resource.

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder" --kind "MaterializedViewsBuilder" --count 3 --size "Cosmos.D4s"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--kind -k

Service kind.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--count -c

Instance Count.

Default value: 1
--gateway-type

Dedicated Gateway Type. Valid only for SqlDedicatedGateway service kind.

Accepted values: DistributedQuery, IntegratedCache
Default value: IntegratedCache
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--size

Instance Size. Possible values are: Cosmos.D4s, Cosmos.D8s, Cosmos.D16s etc.

Default value: Cosmos.D4s
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service delete

Delete the given cosmosdb service resource.

az cosmosdb service delete --account-name
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--yes]

Examples

Delete the given cosmosdb service resource.

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service delete (cosmosdb-preview extension)

Preview

Command group 'cosmosdb service' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete the given cosmosdb service resource.

az cosmosdb service delete --account-name
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--yes]

Examples

Delete the given cosmosdb service resource.

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

Delete the cosmosdb materialized views builder service resource.

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service list

List all cosmosdb service resource under an account.

az cosmosdb service list --account-name
                         --resource-group-name

Examples

List all cosmosdb service resource under an account.

az cosmosdb service list --resource-group MyResourceGroup --account-name MyAccount

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--resource-group-name -g

Name of the resource group of the database account.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service list (cosmosdb-preview extension)

Preview

Command group 'cosmosdb service' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all cosmosdb service resource under an account.

az cosmosdb service list --account-name
                         --resource-group-name

Examples

List all cosmosdb service resource under an account.

az cosmosdb service list --resource-group MyResourceGroup --account-name MyAccount

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--resource-group-name -g

Name of the resource group of the database account.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service show

Get cosmosdb service resource under an account.

az cosmosdb service show --account-name
                         --name
                         --resource-group-name

Examples

Get cosmosdb service resource under an account.

az cosmosdb service show --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service show (cosmosdb-preview extension)

Preview

Command group 'cosmosdb service' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get cosmosdb service resource under an account.

az cosmosdb service show --account-name
                         --name
                         --resource-group-name

Examples

Get cosmosdb service resource under an account.

az cosmosdb service show --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service update

Update a cosmosdb service resource.

az cosmosdb service update --account-name
                           --count
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--size]

Examples

Update a cosmosdb service resource.

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --count 3

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--count -c

Instance Count.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--size

Instance Size. Possible values are: Cosmos.D4s, Cosmos.D8s, Cosmos.D16s etc.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az cosmosdb service update (cosmosdb-preview extension)

Preview

Command group 'cosmosdb service' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a cosmosdb service resource.

az cosmosdb service update --account-name
                           --count
                           --kind
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--size]

Examples

Update a cosmosdb service resource.

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --kind "SqlDedicatedGateway" --count 3

Update a cosmosdb materialized views builder service resource.

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder" --kind "MaterializedViewsBuilder" --count 3

Required Parameters

--account-name -a

Name of the Cosmos DB database account.

--count -c

Instance Count.

--kind -k

Service kind.

--name -n

Service Name.

--resource-group-name -g

Name of the resource group of the database account.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--size

Instance Size. Possible values are: Cosmos.D4s, Cosmos.D8s, Cosmos.D16s etc.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.