你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Database Accounts - Update

更新现有 Azure Cosmos DB 数据库帐户的属性。

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

URI 参数

名称 必需 类型 说明
accountName
path True

string

minLength: 3
maxLength: 50
pattern: ^[a-z0-9]+(-[a-z0-9]+)*

Cosmos DB 数据库帐户名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

请求正文

名称 类型 说明
identity

ManagedServiceIdentity

Identity for the resource.

___location

string

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

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

分析存储特定属性。

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

表示与帐户上的容量强制实施相关的所有属性的对象。

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

指示帐户上客户管理的密钥功能的状态。 如果出现错误,该属性将提供故障排除指南。

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

选择退出本地身份验证,并确保只能将 MSI 和 AAD 用于身份验证。

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

指示在帐户上启用/禁用突发容量功能的标志

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

用于指示在帐户上启用/禁用分区合并功能的标志

properties.enablePerRegionPerPartitionAutoscale

boolean

用于指示在帐户上启用/禁用 PerRegionPerPartitionAutoscale 功能的标志

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

指示允许的最低 Tls 版本。 默认值为 Tls 1.2。 Cassandra 和 Mongo API 仅适用于 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

标记是描述资源的键值对的列表。 这些标记可用于查看和分组此资源(跨资源组)。 最多可为资源提供 15 个标记。 每个标记必须具有不超过 128 个字符的键,且值不超过 256 个字符。 例如,模板类型的默认体验设置为“defaultExperience”:“Cassandra”。 当前的“defaultExperience”值还包括“Table”、“Graph”、“DocumentDB”和“MongoDB”。

响应

名称 类型 说明
200 OK

DatabaseAccountGetResults

数据库帐户更新操作将异步完成。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟您的用户账户

示例

CosmosDBDatabaseAccountPatch

示例请求

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1?api-version=2025-04-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,
    "enablePerRegionPerPartitionAutoscale": 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"
  }
}

示例响应

{
  "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"
  }
}

定义

名称 说明
AccountKeyMetadata

与给定数据库帐户的访问密钥相关的元数据。

AnalyticalStorageConfiguration

分析存储特定属性。

AnalyticalStorageSchemaType

描述分析存储的架构类型。

ApiProperties
BackupPolicyMigrationState

表示备份策略之间迁移状态的对象。

BackupPolicyMigrationStatus

描述备份策略类型之间的迁移状态。

BackupPolicyType

Describes the mode of backups.

BackupStorageRedundancy

枚举以指示备份存储冗余的类型。

Capability

Cosmos DB 功能对象

Capacity

表示与帐户上的容量强制实施相关的所有属性的对象。

ConnectorOffer

Cassandra 连接器为 Cosmos DB C* 数据库帐户提供类型。

ConsistencyPolicy

Cosmos DB 数据库帐户的一致性策略。

ContinuousModeBackupPolicy

表示连续模式备份策略的对象。

ContinuousModeProperties

Configuration values for periodic mode backup

ContinuousTier

枚举以指示连续备份层的类型。

CorsPolicy

The CORS policy for the Cosmos DB database account.

createdByType

创建资源的标识的类型。

CreateMode

Enum to indicate the mode of account creation.

DatabaseAccountGetResults

Azure Cosmos DB 数据库帐户。

DatabaseAccountKeysMetadata

与给定 Cosmos DB 数据库帐户的每个访问密钥相关的元数据。

DatabaseAccountKind

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

DatabaseAccountOfferType

Cosmos DB 数据库帐户的产品/服务类型。

DatabaseAccountUpdateParameters

用于修补 Azure Cosmos DB 数据库帐户属性的参数。

DatabaseRestoreResource

要还原的特定数据库。

DefaultConsistencyLevel

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

FailoverPolicy

数据库帐户的给定区域的故障转移策略。

GremlinDatabaseRestoreResource

要还原的特定 Gremlin 数据库。

IpAddressOrRange

IpAddressOrRange 对象

Location

在其中部署 Azure Cosmos DB 数据库帐户的区域。

ManagedServiceIdentity

Identity for the resource.

MinimalTlsVersion

指示允许的最低 Tls 版本。 默认值为 Tls 1.2。 Cassandra 和 Mongo API 仅适用于 Tls 1.2。

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

PeriodicModeBackupPolicy

表示定期模式备份策略的对象。

PeriodicModeProperties

Configuration values for periodic mode backup

PrivateEndpointConnection

专用终结点连接

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

描述 MongoDB 帐户的版本。

systemData

与创建和上次修改资源相关的元数据。

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

虚拟网络 ACL 规则对象

AccountKeyMetadata

与给定数据库帐户的访问密钥相关的元数据。

名称 类型 说明
generationTime

string (date-time)

采用 ISO-8601 格式的密钥的 UTC 生成时间。 如果对象中缺少该值,则表示在 2022-06-18 之前触发了最后一个键重新生成。

AnalyticalStorageConfiguration

分析存储特定属性。

名称 类型 说明
schemaType

AnalyticalStorageSchemaType

描述分析存储的架构类型。

AnalyticalStorageSchemaType

描述分析存储的架构类型。

说明
FullFidelity
WellDefined

ApiProperties

名称 类型 说明
serverVersion

ServerVersion

描述 MongoDB 帐户的版本。

BackupPolicyMigrationState

表示备份策略之间迁移状态的对象。

名称 类型 说明
startTime

string (date-time)

备份策略迁移开始的时间(ISO-8601 格式)。

status

BackupPolicyMigrationStatus

描述备份策略类型之间的迁移状态。

targetType

BackupPolicyType

描述备份策略迁移的目标备份策略类型。

BackupPolicyMigrationStatus

描述备份策略类型之间的迁移状态。

说明
Completed
Failed
InProgress
Invalid

BackupPolicyType

Describes the mode of backups.

说明
Continuous
Periodic

BackupStorageRedundancy

枚举以指示备份存储冗余的类型。

说明
Geo
Local
Zone

Capability

Cosmos DB 功能对象

名称 类型 说明
name

string

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

Capacity

表示与帐户上的容量强制实施相关的所有属性的对象。

名称 类型 说明
totalThroughputLimit

integer (int32)

minimum: -1

对帐户施加的总吞吐量限制。 totalThroughputLimit 为 2000,对可以预配到 2000 的帐户的最大吞吐量施加严格限制。 -1 totalThroughputLimit 表示对预配吞吐量没有限制。

ConnectorOffer

Cassandra 连接器为 Cosmos DB C* 数据库帐户提供类型。

说明
Small

ConsistencyPolicy

Cosmos DB 数据库帐户的一致性策略。

名称 类型 说明
defaultConsistencyLevel

DefaultConsistencyLevel

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

maxIntervalInSeconds

integer (int32)

minimum: 5
maximum: 86400

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 (int64)

minimum: 1
maximum: 2147483647

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

表示连续模式备份策略的对象。

名称 类型 说明
continuousModeProperties

ContinuousModeProperties

连续模式备份的配置值

migrationState

BackupPolicyMigrationState

表示备份策略之间迁移状态的对象。

type string:

Continuous

Describes the mode of backups.

ContinuousModeProperties

Configuration values for periodic mode backup

名称 类型 说明
tier

ContinuousTier

枚举以指示连续备份模式的类型

ContinuousTier

枚举以指示连续备份层的类型。

说明
Continuous30Days
Continuous7Days

CorsPolicy

The CORS policy for the Cosmos DB database account.

名称 类型 说明
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 (int64)

minimum: 1
maximum: 2147483647

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

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

CreateMode

Enum to indicate the mode of account creation.

说明
Default
Restore

DatabaseAccountGetResults

Azure Cosmos DB 数据库帐户。

名称 类型 默认值 说明
id

string

ARM 资源的唯一资源标识符。

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

ARM 资源的名称。

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

分析存储特定属性。

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

表示与帐户上的容量强制实施相关的所有属性的对象。

properties.connectorOffer

ConnectorOffer

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

properties.consistencyPolicy

ConsistencyPolicy

Cosmos DB 数据库帐户的一致性策略。

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

指示帐户上客户管理的密钥功能的状态。 如果出现错误,该属性将提供故障排除指南。

properties.databaseAccountOfferType

DatabaseAccountOfferType

Cosmos DB 数据库帐户的产品/服务类型。 默认值:标准。

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

选择退出本地身份验证,并确保只能将 MSI 和 AAD 用于身份验证。

properties.documentEndpoint

string

Cosmos DB 数据库帐户的连接终结点。

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

指示在帐户上启用/禁用突发容量功能的标志

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

用于指示在帐户上启用/禁用分区合并功能的标志

properties.enablePerRegionPerPartitionAutoscale

boolean

用于指示在帐户上启用/禁用 PerRegionPerPartitionAutoscale 功能的标志

properties.failoverPolicies

FailoverPolicy[]

包含按故障转移优先级排序的区域的数组。

properties.instanceId

string

分配给数据库帐户的唯一标识符

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

表示 Cosmos DB 帐户的帐户密钥元数据的对象。

properties.locations

Location[]

一个数组,其中包含为 Cosmos DB 帐户启用的所有位置。

properties.minimalTlsVersion

MinimalTlsVersion

指示允许的最低 Tls 版本。 默认值为 Tls 1.2。 Cassandra 和 Mongo API 仅适用于 Tls 1.2。

properties.networkAclBypass

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

properties.networkAclBypassResourceIds

string[] (arm-id)

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

properties.privateEndpointConnections

PrivateEndpointConnection[]

为 Cosmos DB 帐户配置的专用终结点连接列表。

properties.provisioningState

string

调用操作时 Cosmos DB 帐户的状态。 状态可以是下列状态之一。 “正在创建”- 正在创建 Cosmos DB 帐户。 当帐户处于“创建”状态时,仅返回指定为创建 Cosmos DB 帐户操作输入的属性。 “Succeeded”– Cosmos DB 帐户处于活动状态以供使用。 “正在更新”- 正在更新 Cosmos DB 帐户。 “正在删除”- 正在删除 Cosmos DB 帐户。 “Failed”– Cosmos DB 帐户创建失败。 “DeletionFailed”– Cosmos DB 帐户删除失败。

properties.publicNetworkAccess

PublicNetworkAccess

Whether requests from Public Network are allowed

properties.readLocations

Location[]

一个数组,其中包含为 Cosmos DB 帐户启用的读取位置。

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[]

包含 Cosmos DB 帐户的写入位置的数组。

systemData

systemData

与此资源相关的系统元数据。

tags

object

标记是描述资源的键值对的列表。 这些标记可用于查看和分组此资源(跨资源组)。 最多可为资源提供 15 个标记。 每个标记必须具有不超过 128 个字符的键,且值不超过 256 个字符。 例如,模板类型的默认体验设置为“defaultExperience”:“Cassandra”。 当前的“defaultExperience”值还包括“Table”、“Graph”、“DocumentDB”和“MongoDB”。

type

string

Azure 资源的类型。

DatabaseAccountKeysMetadata

与给定 Cosmos DB 数据库帐户的每个访问密钥相关的元数据。

名称 类型 说明
primaryMasterKey

AccountKeyMetadata

与给定 Cosmos DB 数据库帐户的主 Read-Write 密钥相关的元数据。

primaryReadonlyMasterKey

AccountKeyMetadata

与给定 Cosmos DB 数据库帐户的主 Read-Only 密钥相关的元数据。

secondaryMasterKey

AccountKeyMetadata

与给定 Cosmos DB 数据库帐户的辅助 Read-Write 密钥相关的元数据。

secondaryReadonlyMasterKey

AccountKeyMetadata

与给定 Cosmos DB 数据库帐户的辅助 Read-Only 密钥相关的元数据。

DatabaseAccountKind

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

说明
GlobalDocumentDB
MongoDB
Parse

DatabaseAccountOfferType

Cosmos DB 数据库帐户的产品/服务类型。

说明
Standard

DatabaseAccountUpdateParameters

用于修补 Azure Cosmos DB 数据库帐户属性的参数。

名称 类型 说明
identity

ManagedServiceIdentity

Identity for the resource.

___location

string

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

properties.analyticalStorageConfiguration

AnalyticalStorageConfiguration

分析存储特定属性。

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

表示与帐户上的容量强制实施相关的所有属性的对象。

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

指示帐户上客户管理的密钥功能的状态。 如果出现错误,该属性将提供故障排除指南。

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

选择退出本地身份验证,并确保只能将 MSI 和 AAD 用于身份验证。

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

指示在帐户上启用/禁用突发容量功能的标志

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

用于指示在帐户上启用/禁用分区合并功能的标志

properties.enablePerRegionPerPartitionAutoscale

boolean

用于指示在帐户上启用/禁用 PerRegionPerPartitionAutoscale 功能的标志

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

在更新操作期间忽略此属性,因为元数据是只读的。 该对象表示 Cosmos DB 帐户的帐户密钥的元数据。

properties.locations

Location[]

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

properties.minimalTlsVersion

MinimalTlsVersion

指示允许的最低 Tls 版本。 默认值为 Tls 1.2。 Cassandra 和 Mongo API 仅适用于 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

标记是描述资源的键值对的列表。 这些标记可用于查看和分组此资源(跨资源组)。 最多可为资源提供 15 个标记。 每个标记必须具有不超过 128 个字符的键,且值不超过 256 个字符。 例如,模板类型的默认体验设置为“defaultExperience”:“Cassandra”。 当前的“defaultExperience”值还包括“Table”、“Graph”、“DocumentDB”和“MongoDB”。

DatabaseRestoreResource

要还原的特定数据库。

名称 类型 说明
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.

说明
BoundedStaleness
ConsistentPrefix
Eventual
Session
Strong

FailoverPolicy

数据库帐户的给定区域的故障转移策略。

名称 类型 说明
failoverPriority

integer (int32)

minimum: 0

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

数据库帐户复制到的区域的唯一标识符。 示例:<accountName>-<locationName>。

locationName

string

数据库帐户所在的区域的名称。

GremlinDatabaseRestoreResource

要还原的特定 Gremlin 数据库。

名称 类型 说明
databaseName

string

可用于还原的 gremlin 数据库的名称。

graphNames

string[]

可用于还原的图形的名称。

IpAddressOrRange

IpAddressOrRange 对象

名称 类型 说明
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

在其中部署 Azure Cosmos DB 数据库帐户的区域。

名称 类型 说明
documentEndpoint

string

特定区域的连接终结点。 示例:https://<accountName>-<locationName>.documents.azure.com:443/

failoverPriority

integer (int32)

minimum: 0

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

数据库帐户中区域的唯一标识符。 示例:<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

调用操作时 Cosmos DB 帐户的状态。 状态可以是下列状态之一。 “正在创建”- 正在创建 Cosmos DB 帐户。 当帐户处于“创建”状态时,仅返回指定为创建 Cosmos DB 帐户操作输入的属性。 “Succeeded”– Cosmos DB 帐户处于活动状态以供使用。 “正在更新”- 正在更新 Cosmos DB 帐户。 “正在删除”- 正在删除 Cosmos DB 帐户。 “Failed”– Cosmos DB 帐户创建失败。 “DeletionFailed”– Cosmos DB 帐户删除失败。

ManagedServiceIdentity

Identity for the resource.

名称 类型 说明
principalId

string

系统分配标识的主体 ID。 此属性仅针对系统分配的标识提供。

tenantId

string

系统分配标识的租户 ID。 此属性仅针对系统分配的标识提供。

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

指示允许的最低 Tls 版本。 默认值为 Tls 1.2。 Cassandra 和 Mongo API 仅适用于 Tls 1.2。

说明
Tls
Tls11
Tls12

NetworkAclBypass

Indicates what services are allowed to bypass firewall checks.

说明
AzureServices
None

PeriodicModeBackupPolicy

表示定期模式备份策略的对象。

名称 类型 说明
migrationState

BackupPolicyMigrationState

表示备份策略之间迁移状态的对象。

periodicModeProperties

PeriodicModeProperties

Configuration values for periodic mode backup

type string:

Periodic

Describes the mode of backups.

PeriodicModeProperties

Configuration values for periodic mode backup

名称 类型 说明
backupIntervalInMinutes

integer (int32)

minimum: 0

An integer representing the interval in minutes between two backups

backupRetentionIntervalInHours

integer (int32)

minimum: 0

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

backupStorageRedundancy

BackupStorageRedundancy

Enum to indicate type of backup residency

PrivateEndpointConnection

专用终结点连接

名称 类型 说明
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

专用终结点的组 ID。

properties.privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

properties.provisioningState

string

专用终结点的预配状态。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

PrivateEndpointProperty

Private endpoint which the connection belongs to.

名称 类型 说明
id

string

Resource id of the private endpoint.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

名称 类型 说明
actionsRequired

string

除基本工作流之外所需的任何操作(批准/拒绝/断开连接)

description

string

The private link service connection description.

status

string

The private link service connection status.

PublicNetworkAccess

Whether requests from Public Network are allowed

说明
Disabled
Enabled
SecuredByPerimeter

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.

说明
None
SystemAssigned
SystemAssigned,UserAssigned
UserAssigned

RestoreMode

Describes the mode of the restore.

说明
PointInTime

RestoreParameters

Parameters to indicate the information about the restore.

名称 类型 说明
databasesToRestore

DatabaseRestoreResource[]

List of specific databases available for restore.

gremlinDatabasesToRestore

GremlinDatabaseRestoreResource[]

可用于还原的特定 gremlin 数据库的列表。

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 (date-time)

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

restoreWithTtlDisabled

boolean

指定还原的帐户是否在成功还原时禁用时间To-Live。

tablesToRestore

string[]

可用于还原的特定表的列表。

ServerVersion

描述 MongoDB 帐户的版本。

说明
3.2
3.6
4.0
4.2
5.0
6.0
7.0

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

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

虚拟网络 ACL 规则对象

名称 类型 说明
id

string (arm-id)

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.