Database Accounts - Update

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

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}?api-version=2024-08-15

URI Parameters

Name In Required Type Description
accountName
path True

string

Cosmos DB database account name.

Regex pattern: ^[a-z0-9]+(-[a-z0-9]+)*

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
identity

ManagedServiceIdentity

Identity for the resource.

location

string

The location of the resource group to which the resource belongs.

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

Analytical storage specific properties.

properties.apiProperties

ApiProperties

API specific properties. Currently, supported only for MongoDB API.

properties.backupPolicy BackupPolicy:

The object representing the policy for taking backups on an account.

properties.capabilities

Capability[]

List of Cosmos DB capabilities for the account

properties.capacity

Capacity

The object that represents all properties related to capacity enforcement on an account.

properties.connectorOffer

ConnectorOffer

The cassandra connector offer type for the Cosmos DB database C* account.

properties.consistencyPolicy

ConsistencyPolicy

The consistency policy for the Cosmos DB account.

properties.cors

CorsPolicy[]

The CORS policy for the Cosmos DB database account.

properties.customerManagedKeyStatus

string

Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance.

properties.defaultIdentity

string

The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.

properties.disableKeyBasedMetadataWriteAccess

boolean

Disable write operations on metadata resources (databases, containers, throughput) via account keys

properties.disableLocalAuth

boolean

Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.

properties.enableAnalyticalStorage

boolean

Flag to indicate whether to enable storage analytics.

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

properties.enableBurstCapacity

boolean

Flag to indicate enabling/disabling of Burst Capacity feature on the account

properties.enableCassandraConnector

boolean

Enables the cassandra connector on the Cosmos DB C* account

properties.enableFreeTier

boolean

Flag to indicate whether Free Tier is enabled.

properties.enableMultipleWriteLocations

boolean

Enables the account to write in multiple locations

properties.enablePartitionMerge

boolean

Flag to indicate enabling/disabling of Partition Merge feature on the account

properties.ipRules

IpAddressOrRange[]

List of IpRules.

properties.isVirtualNetworkFilterEnabled

boolean

Flag to indicate whether to enable/disable Virtual Network ACL rules.

properties.keyVaultKeyUri

string

The URI of the key vault

properties.locations

Location[]

An array that contains the georeplication locations enabled for the Cosmos DB account.

properties.minimalTlsVersion

MinimalTlsVersion

Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.

properties.networkAclBypass

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

properties.networkAclBypassResourceIds

string[]

An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.

properties.publicNetworkAccess

PublicNetworkAccess

Whether requests from Public Network are allowed

properties.virtualNetworkRules

VirtualNetworkRule[]

List of Virtual Network ACL rules configured for the Cosmos DB account.

tags

object

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

Responses

Name Type Description
200 OK

DatabaseAccountGetResults

The database account update operation will complete asynchronously.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Impersonate your user account

Examples

CosmosDBDatabaseAccountPatch

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1?api-version=2024-08-15

{
  "location": "westus",
  "tags": {
    "dept": "finance"
  },
  "identity": {
    "type": "SystemAssigned,UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
    }
  },
  "properties": {
    "ipRules": [
      {
        "ipAddressOrRange": "23.43.230.120"
      },
      {
        "ipAddressOrRange": "110.12.240.0/12"
      }
    ],
    "isVirtualNetworkFilterEnabled": true,
    "virtualNetworkRules": [
      {
        "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
        "ignoreMissingVNetServiceEndpoint": false
      }
    ],
    "consistencyPolicy": {
      "defaultConsistencyLevel": "BoundedStaleness",
      "maxIntervalInSeconds": 10,
      "maxStalenessPrefix": 200
    },
    "defaultIdentity": "FirstPartyIdentity",
    "enableFreeTier": false,
    "enableAnalyticalStorage": true,
    "enableBurstCapacity": true,
    "analyticalStorageConfiguration": {
      "schemaType": "WellDefined"
    },
    "backupPolicy": {
      "type": "Periodic",
      "periodicModeProperties": {
        "backupIntervalInMinutes": 240,
        "backupRetentionIntervalInHours": 720,
        "backupStorageRedundancy": "Local"
      }
    },
    "networkAclBypass": "AzureServices",
    "networkAclBypassResourceIds": [
      "/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName"
    ],
    "capacity": {
      "totalThroughputLimit": 2000
    },
    "enablePartitionMerge": true,
    "minimalTlsVersion": "Tls"
  }
}

Sample response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1",
  "name": "ddb1",
  "location": "West US",
  "type": "Microsoft.DocumentDB/databaseAccounts",
  "kind": "GlobalDocumentDB",
  "tags": {
    "dept": "finance"
  },
  "identity": {
    "type": "SystemAssigned,UserAssigned",
    "principalId": "52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656",
    "tenantId": "33e01921-4d64-4f8c-a055-5bdaffd5e33d",
    "userAssignedIdentities": {
      "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
        "clientId": "fbe75b66-01c5-4f87-a220-233af3270436",
        "principalId": "33e01921-4d64-4f8c-a055-5bdaffd5e33d"
      }
    }
  },
  "properties": {
    "provisioningState": "Succeeded",
    "documentEndpoint": "https://ddb1.documents.azure.com:443/",
    "databaseAccountOfferType": "Standard",
    "ipRules": [
      {
        "ipAddressOrRange": "23.43.230.120"
      },
      {
        "ipAddressOrRange": "110.12.240.0/12"
      }
    ],
    "isVirtualNetworkFilterEnabled": true,
    "disableKeyBasedMetadataWriteAccess": false,
    "consistencyPolicy": {
      "defaultConsistencyLevel": "BoundedStaleness",
      "maxIntervalInSeconds": 10,
      "maxStalenessPrefix": 200
    },
    "writeLocations": [
      {
        "id": "ddb1-eastus",
        "locationName": "East US",
        "documentEndpoint": "https://ddb1-eastus.documents.azure.com:443/",
        "provisioningState": "Succeeded",
        "failoverPriority": 0
      }
    ],
    "readLocations": [
      {
        "id": "ddb1-eastus",
        "locationName": "East US",
        "documentEndpoint": "https://ddb1-eastus.documents.azure.com:443/",
        "provisioningState": "Succeeded",
        "failoverPriority": 0
      }
    ],
    "locations": [
      {
        "id": "ddb1-eastus",
        "locationName": "East US",
        "documentEndpoint": "https://ddb1-eastus.documents.azure.com:443/",
        "provisioningState": "Succeeded",
        "failoverPriority": 0
      }
    ],
    "failoverPolicies": [
      {
        "id": "ddb1-eastus",
        "locationName": "East US",
        "failoverPriority": 0
      }
    ],
    "virtualNetworkRules": [
      {
        "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
        "ignoreMissingVNetServiceEndpoint": false
      }
    ],
    "privateEndpointConnections": [
      {
        "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/account1/privateEndpointConnections/pe1",
        "properties": {
          "privateEndpoint": {
            "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe1"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "actionsRequired": "None"
          }
        }
      }
    ],
    "cors": [],
    "defaultIdentity": "FirstPartyIdentity",
    "enableFreeTier": false,
    "apiProperties": {},
    "enableAnalyticalStorage": true,
    "enableBurstCapacity": true,
    "analyticalStorageConfiguration": {
      "schemaType": "WellDefined"
    },
    "backupPolicy": {
      "type": "Periodic",
      "periodicModeProperties": {
        "backupIntervalInMinutes": 240,
        "backupRetentionIntervalInHours": 720,
        "backupStorageRedundancy": "Local"
      }
    },
    "networkAclBypass": "AzureServices",
    "networkAclBypassResourceIds": [
      "/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName"
    ],
    "capacity": {
      "totalThroughputLimit": 2000
    },
    "keysMetadata": {
      "primaryMasterKey": {
        "generationTime": "2022-02-25T20:30:11Z"
      },
      "secondaryMasterKey": {
        "generationTime": "2022-02-25T20:30:11Z"
      },
      "primaryReadonlyMasterKey": {
        "generationTime": "2022-02-25T20:30:11Z"
      },
      "secondaryReadonlyMasterKey": {
        "generationTime": "2022-02-25T20:30:11Z"
      }
    },
    "enablePartitionMerge": true,
    "minimalTlsVersion": "Tls"
  }
}

Definitions

Name Description
AccountKeyMetadata

The metadata related to an access key for a given database account.

AnalyticalStorageConfiguration

Analytical storage specific properties.

AnalyticalStorageSchemaType

Describes the types of schema for analytical storage.

ApiProperties
BackupPolicyMigrationState

The object representing the state of the migration between the backup policies.

BackupPolicyMigrationStatus

Describes the status of migration between backup policy types.

BackupPolicyType

Describes the mode of backups.

BackupStorageRedundancy

Enum to indicate type of backup storage redundancy.

Capability

Cosmos DB capability object

Capacity

The object that represents all properties related to capacity enforcement on an account.

ConnectorOffer

The cassandra connector offer type for the Cosmos DB C* database account.

ConsistencyPolicy

The consistency policy for the Cosmos DB database account.

ContinuousModeBackupPolicy

The object representing continuous mode backup policy.

ContinuousModeProperties

Configuration values for periodic mode backup

ContinuousTier

Enum to indicate type of Continuous backup tier.

CorsPolicy

The CORS policy for the Cosmos DB database account.

createdByType

The type of identity that created the resource.

CreateMode

Enum to indicate the mode of account creation.

DatabaseAccountGetResults

An Azure Cosmos DB database account.

DatabaseAccountKeysMetadata

The metadata related to each access key for the given Cosmos DB database account.

DatabaseAccountKind

Indicates the type of database account. This can only be set at database account creation.

DatabaseAccountOfferType

The offer type for the Cosmos DB database account.

DatabaseAccountUpdateParameters

Parameters for patching Azure Cosmos DB database account properties.

DatabaseRestoreResource

Specific Databases to restore.

DefaultConsistencyLevel

The default consistency level and configuration settings of the Cosmos DB account.

FailoverPolicy

The failover policy for a given region of a database account.

GremlinDatabaseRestoreResource

Specific Gremlin Databases to restore.

IpAddressOrRange

IpAddressOrRange object

Location

A region in which the Azure Cosmos DB database account is deployed.

ManagedServiceIdentity

Identity for the resource.

MinimalTlsVersion

Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

PeriodicModeBackupPolicy

The object representing periodic mode backup policy.

PeriodicModeProperties

Configuration values for periodic mode backup

PrivateEndpointConnection

A private endpoint connection

PrivateEndpointProperty

Private endpoint which the connection belongs to.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

PublicNetworkAccess

Whether requests from Public Network are allowed

ResourceIdentityType

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

RestoreMode

Describes the mode of the restore.

RestoreParameters

Parameters to indicate the information about the restore.

ServerVersion

Describes the version of the MongoDB account.

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

VirtualNetworkRule

Virtual Network ACL Rule object

AccountKeyMetadata

The metadata related to an access key for a given database account.

Name Type Description
generationTime

string

Generation time in UTC of the key in ISO-8601 format. If the value is missing from the object, it means that the last key regeneration was triggered before 2022-06-18.

AnalyticalStorageConfiguration

Analytical storage specific properties.

Name Type Description
schemaType

AnalyticalStorageSchemaType

Describes the types of schema for analytical storage.

AnalyticalStorageSchemaType

Describes the types of schema for analytical storage.

Name Type Description
FullFidelity

string

WellDefined

string

ApiProperties

Name Type Description
serverVersion

ServerVersion

Describes the version of the MongoDB account.

BackupPolicyMigrationState

The object representing the state of the migration between the backup policies.

Name Type Description
startTime

string

Time at which the backup policy migration started (ISO-8601 format).

status

BackupPolicyMigrationStatus

Describes the status of migration between backup policy types.

targetType

BackupPolicyType

Describes the target backup policy type of the backup policy migration.

BackupPolicyMigrationStatus

Describes the status of migration between backup policy types.

Name Type Description
Completed

string

Failed

string

InProgress

string

Invalid

string

BackupPolicyType

Describes the mode of backups.

Name Type Description
Continuous

string

Periodic

string

BackupStorageRedundancy

Enum to indicate type of backup storage redundancy.

Name Type Description
Geo

string

Local

string

Zone

string

Capability

Cosmos DB capability object

Name Type Description
name

string

Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".

Capacity

The object that represents all properties related to capacity enforcement on an account.

Name Type Description
totalThroughputLimit

integer

The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput.

ConnectorOffer

The cassandra connector offer type for the Cosmos DB C* database account.

Name Type Description
Small

string

ConsistencyPolicy

The consistency policy for the Cosmos DB database account.

Name Type Description
defaultConsistencyLevel

DefaultConsistencyLevel

The default consistency level and configuration settings of the Cosmos DB account.

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

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

ContinuousModeBackupPolicy

The object representing continuous mode backup policy.

Name Type Description
continuousModeProperties

ContinuousModeProperties

Configuration values for continuous mode backup

migrationState

BackupPolicyMigrationState

The object representing the state of the migration between the backup policies.

type string:

Continuous

Describes the mode of backups.

ContinuousModeProperties

Configuration values for periodic mode backup

Name Type Description
tier

ContinuousTier

Enum to indicate type of Continuous backup mode

ContinuousTier

Enum to indicate type of Continuous backup tier.

Name Type Description
Continuous30Days

string

Continuous7Days

string

CorsPolicy

The CORS policy for the Cosmos DB database account.

Name Type Description
allowedHeaders

string

The request headers that the origin domain may specify on the CORS request.

allowedMethods

string

The methods (HTTP request verbs) that the origin domain may use for a CORS request.

allowedOrigins

string

The origin domains that are permitted to make a request against the service via CORS.

exposedHeaders

string

The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.

maxAgeInSeconds

integer

The maximum amount time that a browser should cache the preflight OPTIONS request.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

CreateMode

Enum to indicate the mode of account creation.

Name Type Description
Default

string

Restore

string

DatabaseAccountGetResults

An Azure Cosmos DB database account.

Name Type Default value Description
id

string

The unique resource identifier of the ARM resource.

identity

ManagedServiceIdentity

Identity for the resource.

kind

DatabaseAccountKind

GlobalDocumentDB

Indicates the type of database account. This can only be set at database account creation.

location

string

The location of the resource group to which the resource belongs.

name

string

The name of the ARM resource.

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

Analytical storage specific properties.

properties.apiProperties

ApiProperties

API specific properties.

properties.backupPolicy BackupPolicy:

The object representing the policy for taking backups on an account.

properties.capabilities

Capability[]

List of Cosmos DB capabilities for the account

properties.capacity

Capacity

The object that represents all properties related to capacity enforcement on an account.

properties.connectorOffer

ConnectorOffer

The cassandra connector offer type for the Cosmos DB database C* account.

properties.consistencyPolicy

ConsistencyPolicy

The consistency policy for the Cosmos DB database account.

properties.cors

CorsPolicy[]

The CORS policy for the Cosmos DB database account.

properties.createMode

CreateMode

Default

Enum to indicate the mode of account creation.

properties.customerManagedKeyStatus

string

Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance.

properties.databaseAccountOfferType

DatabaseAccountOfferType

The offer type for the Cosmos DB database account. Default value: Standard.

properties.defaultIdentity

string

The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.

properties.disableKeyBasedMetadataWriteAccess

boolean

Disable write operations on metadata resources (databases, containers, throughput) via account keys

properties.disableLocalAuth

boolean

Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.

properties.documentEndpoint

string

The connection endpoint for the Cosmos DB database account.

properties.enableAnalyticalStorage

boolean

Flag to indicate whether to enable storage analytics.

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

properties.enableBurstCapacity

boolean

Flag to indicate enabling/disabling of Burst Capacity feature on the account

properties.enableCassandraConnector

boolean

Enables the cassandra connector on the Cosmos DB C* account

properties.enableFreeTier

boolean

Flag to indicate whether Free Tier is enabled.

properties.enableMultipleWriteLocations

boolean

Enables the account to write in multiple locations

properties.enablePartitionMerge

boolean

Flag to indicate enabling/disabling of Partition Merge feature on the account

properties.failoverPolicies

FailoverPolicy[]

An array that contains the regions ordered by their failover priorities.

properties.instanceId

string

A unique identifier assigned to the database account

properties.ipRules

IpAddressOrRange[]

List of IpRules.

properties.isVirtualNetworkFilterEnabled

boolean

Flag to indicate whether to enable/disable Virtual Network ACL rules.

properties.keyVaultKeyUri

string

The URI of the key vault

properties.keysMetadata

DatabaseAccountKeysMetadata

The object that represents the metadata for the Account Keys of the Cosmos DB account.

properties.locations

Location[]

An array that contains all of the locations enabled for the Cosmos DB account.

properties.minimalTlsVersion

MinimalTlsVersion

Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.

properties.networkAclBypass

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

properties.networkAclBypassResourceIds

string[]

An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.

properties.privateEndpointConnections

PrivateEndpointConnection[]

List of Private Endpoint Connections configured for the Cosmos DB account.

properties.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. 'DeletionFailed' – the Cosmos DB account deletion failed.

properties.publicNetworkAccess

PublicNetworkAccess

Whether requests from Public Network are allowed

properties.readLocations

Location[]

An array that contains of the read locations enabled for the Cosmos DB account.

properties.restoreParameters

RestoreParameters

Parameters to indicate the information about the restore.

properties.virtualNetworkRules

VirtualNetworkRule[]

List of Virtual Network ACL rules configured for the Cosmos DB account.

properties.writeLocations

Location[]

An array that contains the write location for the Cosmos DB account.

systemData

systemData

The system meta data relating to this resource.

tags

object

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

type

string

The type of Azure resource.

DatabaseAccountKeysMetadata

The metadata related to each access key for the given Cosmos DB database account.

Name Type Description
primaryMasterKey

AccountKeyMetadata

The metadata related to the Primary Read-Write Key for the given Cosmos DB database account.

primaryReadonlyMasterKey

AccountKeyMetadata

The metadata related to the Primary Read-Only Key for the given Cosmos DB database account.

secondaryMasterKey

AccountKeyMetadata

The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account.

secondaryReadonlyMasterKey

AccountKeyMetadata

The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account.

DatabaseAccountKind

Indicates the type of database account. This can only be set at database account creation.

Name Type Description
GlobalDocumentDB

string

MongoDB

string

Parse

string

DatabaseAccountOfferType

The offer type for the Cosmos DB database account.

Name Type Description
Standard

string

DatabaseAccountUpdateParameters

Parameters for patching Azure Cosmos DB database account properties.

Name Type Description
identity

ManagedServiceIdentity

Identity for the resource.

location

string

The location of the resource group to which the resource belongs.

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

Analytical storage specific properties.

properties.apiProperties

ApiProperties

API specific properties. Currently, supported only for MongoDB API.

properties.backupPolicy BackupPolicy:

The object representing the policy for taking backups on an account.

properties.capabilities

Capability[]

List of Cosmos DB capabilities for the account

properties.capacity

Capacity

The object that represents all properties related to capacity enforcement on an account.

properties.connectorOffer

ConnectorOffer

The cassandra connector offer type for the Cosmos DB database C* account.

properties.consistencyPolicy

ConsistencyPolicy

The consistency policy for the Cosmos DB account.

properties.cors

CorsPolicy[]

The CORS policy for the Cosmos DB database account.

properties.customerManagedKeyStatus

string

Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance.

properties.defaultIdentity

string

The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.

properties.disableKeyBasedMetadataWriteAccess

boolean

Disable write operations on metadata resources (databases, containers, throughput) via account keys

properties.disableLocalAuth

boolean

Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.

properties.enableAnalyticalStorage

boolean

Flag to indicate whether to enable storage analytics.

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

properties.enableBurstCapacity

boolean

Flag to indicate enabling/disabling of Burst Capacity feature on the account

properties.enableCassandraConnector

boolean

Enables the cassandra connector on the Cosmos DB C* account

properties.enableFreeTier

boolean

Flag to indicate whether Free Tier is enabled.

properties.enableMultipleWriteLocations

boolean

Enables the account to write in multiple locations

properties.enablePartitionMerge

boolean

Flag to indicate enabling/disabling of Partition Merge feature on the account

properties.ipRules

IpAddressOrRange[]

List of IpRules.

properties.isVirtualNetworkFilterEnabled

boolean

Flag to indicate whether to enable/disable Virtual Network ACL rules.

properties.keyVaultKeyUri

string

The URI of the key vault

properties.keysMetadata

DatabaseAccountKeysMetadata

This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account.

properties.locations

Location[]

An array that contains the georeplication locations enabled for the Cosmos DB account.

properties.minimalTlsVersion

MinimalTlsVersion

Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.

properties.networkAclBypass

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

properties.networkAclBypassResourceIds

string[]

An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.

properties.publicNetworkAccess

PublicNetworkAccess

Whether requests from Public Network are allowed

properties.virtualNetworkRules

VirtualNetworkRule[]

List of Virtual Network ACL rules configured for the Cosmos DB account.

tags

object

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

DatabaseRestoreResource

Specific Databases to restore.

Name Type Description
collectionNames

string[]

The names of the collections available for restore.

databaseName

string

The name of the database available for restore.

DefaultConsistencyLevel

The default consistency level and configuration settings of the Cosmos DB account.

Name Type Description
BoundedStaleness

string

ConsistentPrefix

string

Eventual

string

Session

string

Strong

string

FailoverPolicy

The failover policy for a given region of a database account.

Name Type Description
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.

id

string

The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.

locationName

string

The name of the region in which the database account exists.

GremlinDatabaseRestoreResource

Specific Gremlin Databases to restore.

Name Type Description
databaseName

string

The name of the gremlin database available for restore.

graphNames

string[]

The names of the graphs available for restore.

IpAddressOrRange

IpAddressOrRange object

Name Type Description
ipAddressOrRange

string

A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”.

Location

A region in which the Azure Cosmos DB database account is deployed.

Name Type Description
documentEndpoint

string

The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/

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.

id

string

The unique identifier of the region within the database account. Example: <accountName>-<locationName>.

isZoneRedundant

boolean

Flag to indicate whether or not this region is an AvailabilityZone region

locationName

string

The name of the region.

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. 'DeletionFailed' – the Cosmos DB account deletion failed.

ManagedServiceIdentity

Identity for the resource.

Name Type Description
principalId

string

The principal id of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string

The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.

type

ResourceIdentityType

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

userAssignedIdentities

UserAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

MinimalTlsVersion

Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.

Name Type Description
Tls

string

Tls11

string

Tls12

string

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

Name Type Description
AzureServices

string

None

string

PeriodicModeBackupPolicy

The object representing periodic mode backup policy.

Name Type Description
migrationState

BackupPolicyMigrationState

The object representing the state of the migration between the backup policies.

periodicModeProperties

PeriodicModeProperties

Configuration values for periodic mode backup

type string:

Periodic

Describes the mode of backups.

PeriodicModeProperties

Configuration values for periodic mode backup

Name Type Description
backupIntervalInMinutes

integer

An integer representing the interval in minutes between two backups

backupRetentionIntervalInHours

integer

An integer representing the time (in hours) that each backup is retained

backupStorageRedundancy

BackupStorageRedundancy

Enum to indicate type of backup residency

PrivateEndpointConnection

A private endpoint connection

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.groupId

string

Group id of the private endpoint.

properties.privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

properties.provisioningState

string

Provisioning state of the private endpoint.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

PrivateEndpointProperty

Private endpoint which the connection belongs to.

Name Type Description
id

string

Resource id of the private endpoint.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

Name Type Description
actionsRequired

string

Any action that is required beyond basic workflow (approve/ reject/ disconnect)

description

string

The private link service connection description.

status

string

The private link service connection status.

PublicNetworkAccess

Whether requests from Public Network are allowed

Name Type Description
Disabled

string

Enabled

string

SecuredByPerimeter

string

ResourceIdentityType

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

RestoreMode

Describes the mode of the restore.

Name Type Description
PointInTime

string

RestoreParameters

Parameters to indicate the information about the restore.

Name Type Description
databasesToRestore

DatabaseRestoreResource[]

List of specific databases available for restore.

gremlinDatabasesToRestore

GremlinDatabaseRestoreResource[]

List of specific gremlin databases available for restore.

restoreMode

RestoreMode

Describes the mode of the restore.

restoreSource

string

The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}

restoreTimestampInUtc

string

Time to which the account has to be restored (ISO-8601 format).

restoreWithTtlDisabled

boolean

Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.

tablesToRestore

string[]

List of specific tables available for restore.

ServerVersion

Describes the version of the MongoDB account.

Name Type Description
3.2

string

3.6

string

4.0

string

4.2

string

5.0

string

6.0

string

7.0

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Name Type Description

VirtualNetworkRule

Virtual Network ACL Rule object

Name Type Description
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.