---
title: "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"
---

# PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}

`PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}`

Updates the properties of an existing Azure Cosmos DB database account.

## Path parameters

- `resourceGroupName` string, required
- `accountName` string, required

## Query parameters

- `api-version` string, required

## Parameters

- `../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref

## Request body

- DatabaseAccountUpdateParameters — Parameters for patching Azure Cosmos DB database account properties.
  - `tags` Tags — Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
  - `location` string — The location of the resource group to which the resource belongs.
  - `properties` DatabaseAccountUpdateProperties — Properties to update Azure Cosmos DB database accounts.
    - `consistencyPolicy` ConsistencyPolicy — The consistency policy for the Cosmos DB database account.
      - `defaultConsistencyLevel` 'Eventual' | 'Session' | 'BoundedStaleness' | 'Strong' | 'ConsistentPrefix', required — The default consistency level and configuration settings of the Cosmos DB account.
      - `maxStalenessPrefix` integer — When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
      - `maxIntervalInSeconds` integer — When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
    - `locations` Location[] — An array that contains the georeplication locations enabled for the Cosmos DB account.
      - `id` string — The unique identifier of the region within the database account. Example: &lt;accountName&gt;-&lt;locationName&gt;.
      - `locationName` string — The name of the region.
      - `documentEndpoint` string — The connection endpoint for the specific region. Example: https://&lt;accountName&gt;-&lt;locationName&gt;.documents.azure.com:443/
      - `provisioningState` string — The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'Offline' - the Cosmos DB account is not active. 'DeletionFailed' – the Cosmos DB account deletion failed.
      - `failoverPriority` integer — The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
      - `isZoneRedundant` boolean — Flag to indicate whether or not this region is an AvailabilityZone region
    - `ipRangeFilter` string — Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
    - `isVirtualNetworkFilterEnabled` boolean — Flag to indicate whether to enable/disable Virtual Network ACL rules.
    - `enableAutomaticFailover` boolean — Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
    - `capabilities` Capability[] — List of Cosmos DB capabilities for the account
      - `name` string — Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".
    - `virtualNetworkRules` VirtualNetworkRule[] — List of Virtual Network ACL rules configured for the Cosmos DB account.
      - `id` string — Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
      - `ignoreMissingVNetServiceEndpoint` boolean — Create firewall rule before the virtual network has vnet service endpoint enabled.
    - `enableMultipleWriteLocations` boolean — Enables the account to write in multiple locations
    - `enableCassandraConnector` boolean — Enables the cassandra connector on the Cosmos DB C* account
    - `connectorOffer` 'Small' — The cassandra connector offer type for the Cosmos DB C* database account.
    - `disableKeyBasedMetadataWriteAccess` boolean — Disable write operations on metadata resources (databases, containers, throughput) via account keys

## Response `200`

The database account update operation will complete asynchronously.

- DatabaseAccountGetResults — The core properties of ARM resources.
  - `id` string — The unique resource identifier of the ARM resource.
  - `name` string — The name of the ARM resource.
  - `type` string — The type of Azure resource.
  - `location` string — The location of the resource group to which the resource belongs.
  - `tags` Tags — Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

## Changes

- **2020-11-05** (2019-08-01) `33b0524b6a01` — 1 warning
  - deleted the `path` request parameter `subscriptionId`
- **2019-10-30** (2019-08-01) `1661781a9337` — 1 info
  - api operation id `DatabaseAccounts_Patch` removed and replaced with `DatabaseAccounts_Update`

[Change history](https://skmtc.dev/azure/apis/cosmos-db/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/:accountName/patch.md)

---

[API](https://skmtc.dev/azure/apis/cosmos-db.md) · [All operations](https://skmtc.dev/azure/apis/cosmos-db/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/cosmos-db/revisions/33b0524b6a01/schema)
