Restorable Sql Containers - List
显示在特定数据库下的所有 Azure Cosmos DB SQL 容器上完成的所有突变的事件源。 这有助于在意外删除容器的情况下。 此 API 需要“Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read”权限
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers?api-version=2025-04-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers?api-version=2025-04-15&restorableSqlDatabaseRid={restorableSqlDatabaseRid}&startTime={startTime}&endTime={endTime}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
instance
|
path | True |
string |
可还原数据库帐户的 instanceId GUID。 |
|
location
|
path | True |
string |
Cosmos DB 区域,单词和每个单词的大小写之间的空格。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
|
end
|
query |
string |
可还原的 Sql 容器事件馈送结束时间。 |
|
|
restorable
|
query |
string |
SQL 数据库的资源 ID。 |
|
|
start
|
query |
string |
可还原的 Sql 容器事件源开始时间。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
作已成功完成。 |
|
| Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟您的用户账户 |
示例
CosmosDBRestorableSqlContainerList
示例请求
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers?api-version=2025-04-15&restorableSqlDatabaseRid=3fu-hg==
示例响应
{
"value": [
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers",
"name": "79609a98-3394-41f8-911f-cfab0c075c86",
"properties": {
"resource": {
"_rid": "zAyAPQAAAA==",
"eventTimestamp": "2020-10-13T04:56:42Z",
"ownerId": "Container1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Create",
"canUndelete": "invalid",
"container": {
"id": "Container1",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
},
{
"path": "/\"_ts\"/?"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"_rid": "V18LoLrv-qA=",
"_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/",
"_etag": "\"00003e00-0000-0700-0000-5f85338a0000\""
}
}
}
},
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers",
"name": "e85298a1-c631-4726-825e-a7ca092e9098",
"properties": {
"resource": {
"_rid": "PrArcgAAAA==",
"eventTimestamp": "2020-10-13T05:03:27Z",
"ownerId": "Container1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Replace",
"canUndelete": "invalid",
"container": {
"id": "Container1",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
},
{
"path": "/\"_ts\"/?"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"defaultTtl": 12345,
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"_rid": "V18LoLrv-qA=",
"_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/",
"_etag": "\"00004400-0000-0700-0000-5f85351f0000\""
}
}
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Client |
. |
|
Client |
Cosmos DB 客户端加密策略。 |
|
Cloud |
服务的错误响应。 |
|
Composite |
|
|
Composite |
复合路径的排序顺序。 |
|
Computed |
计算属性的定义 |
|
Conflict |
指示冲突解决模式。 |
|
Conflict |
容器的冲突解决策略。 |
| Container |
Cosmos DB SQL 容器资源对象 |
|
Container |
要用于将数据分区到多个分区的分区键的配置 |
|
Create |
枚举以指示帐户创建模式。 |
|
Data |
为其应用索引行为的数据类型。 |
|
Distance |
用于矢量之间的距离计算的距离函数。 |
|
Error |
错误响应。 |
|
Excluded |
|
|
Full |
表示全文路径规范。 |
|
Full |
Cosmos DB FullText 策略 |
|
Included |
索引中包含的路径 |
| Indexes |
路径的索引。 |
|
Indexing |
指示索引模式。 |
|
Indexing |
Cosmos DB 索引策略 |
|
Index |
指示索引的类型。 |
|
Operation |
枚举以指示事件的操作类型。 |
|
Partition |
指示用于分区的算法类型。 对于 MultiHash,容器创建支持多个分区键(最多三个最大值) |
| Resource |
Azure Cosmos DB SQL 容器事件的资源 |
|
Resource |
用于指示还原信息的参数。 |
|
Restorable |
Azure Cosmos DB SQL 容器事件 |
|
Restorable |
包含 SQL 容器事件及其属性的列表操作响应。 |
|
Spatial |
|
|
Spatial |
指示索引的空间类型。 |
|
Unique |
该键对 Azure Cosmos DB 服务集合中的文档强制实施唯一性约束。 |
|
Unique |
用于在 Azure Cosmos DB 服务中的集合中指定文档的唯一性约束的唯一键策略配置。 |
|
Vector |
指示矢量的数据类型。 |
|
Vector |
表示矢量嵌入。 矢量嵌入用于定义文档中的向量字段。 |
|
Vector |
Cosmos DB 矢量嵌入策略 |
|
Vector |
|
|
Vector |
矢量的索引类型。 目前支持平面、diskANN 和 quantizedFlat。 |
ClientEncryptionIncludedPath
.
| 名称 | 类型 | 说明 |
|---|---|---|
| clientEncryptionKeyId |
string |
用于加密路径的客户端加密密钥的标识符。 |
| encryptionAlgorithm |
string |
将使用的加密算法。 例如 - AEAD_AES_256_CBC_HMAC_SHA256。 |
| encryptionType |
string |
要执行的加密类型。 例如 - 确定性、随机化。 |
| path |
string |
需要加密的路径。 |
ClientEncryptionPolicy
Cosmos DB 客户端加密策略。
| 名称 | 类型 | 说明 |
|---|---|---|
| includedPaths |
需要加密的项的路径以及特定于路径的设置。 |
|
| policyFormatVersion |
integer (int32) minimum: 1maximum: 2 |
客户端加密策略定义的版本。 支持的版本为 1 和 2。 版本 2 支持 ID 和分区密钥路径加密。 |
CloudError
服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误响应。 |
CompositePath
| 名称 | 类型 | 说明 |
|---|---|---|
| order |
复合路径的排序顺序。 |
|
| path |
string |
索引行为应用于的路径。 索引路径通常以根开头,以通配符结尾(/path/*) |
CompositePathSortOrder
复合路径的排序顺序。
| 值 | 说明 |
|---|---|
| ascending | |
| descending |
ComputedProperty
计算属性的定义
| 名称 | 类型 | 说明 |
|---|---|---|
| name |
string |
计算属性的名称,例如 -“cp_lowerName” |
| query |
string |
计算计算属性的值的查询,例如 - “SELECT VALUE LOWER(c.name) FROM c” |
ConflictResolutionMode
指示冲突解决模式。
| 值 | 说明 |
|---|---|
| LastWriterWins | |
| Custom |
ConflictResolutionPolicy
容器的冲突解决策略。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| conflictResolutionPath |
string |
LastWriterWins 模式下的冲突解决路径。 |
|
| conflictResolutionProcedure |
string |
解决自定义模式冲突的过程。 |
|
| mode | LastWriterWins |
指示冲突解决模式。 |
Container
Cosmos DB SQL 容器资源对象
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| _etag |
string |
表示乐观并发控制所需的资源 etag 的系统生成属性。 |
|
| _rid |
string |
系统生成的属性。 唯一标识符。 |
|
| _self |
string |
一个系统生成的属性,指定容器资源的可寻址路径。 |
|
| _ts |
number |
一个系统生成的属性,该属性表示资源的上次更新时间戳。 |
|
| analyticalStorageTtl |
integer (int64) |
分析 TTL。 |
|
| clientEncryptionPolicy |
容器的客户端加密策略。 |
||
| computedProperties |
计算属性列表 |
||
| conflictResolutionPolicy |
容器的冲突解决策略。 |
||
| createMode | Default |
用于指示资源创建模式的枚举。 |
|
| defaultTtl |
integer |
默认生存时间 |
|
| fullTextPolicy |
容器的 FullText 策略。 |
||
| id |
string |
Cosmos DB SQL 容器的名称 |
|
| indexingPolicy |
索引策略的配置。 默认情况下,容器中所有文档路径的索引都是自动的 |
||
| partitionKey |
要用于将数据分区到多个分区的分区键的配置 |
||
| restoreParameters |
指示有关还原的信息的参数 |
||
| uniqueKeyPolicy |
用于在 Azure Cosmos DB 服务中的集合中指定文档的唯一性约束的唯一键策略配置。 |
||
| vectorEmbeddingPolicy |
容器的向量嵌入策略。 |
ContainerPartitionKey
要用于将数据分区到多个分区的分区键的配置
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| kind | Hash |
指示用于分区的算法类型。 对于 MultiHash,容器创建支持多个分区键(最多三个最大值) |
|
| paths |
string[] |
使用容器中的数据可以分区的路径列表 |
|
| systemKey |
boolean |
指示容器是否使用系统生成的分区键 |
|
| version |
integer (int32) minimum: 1maximum: 2 |
指示分区键定义的版本 |
CreateMode
枚举以指示帐户创建模式。
| 值 | 说明 |
|---|---|
| Default | |
| Restore |
DataType
为其应用索引行为的数据类型。
| 值 | 说明 |
|---|---|
| String | |
| Number | |
| Point | |
| Polygon | |
| LineString | |
| MultiPolygon |
DistanceFunction
用于矢量之间的距离计算的距离函数。
| 值 | 说明 |
|---|---|
| euclidean | |
| cosine | |
| dotproduct |
ErrorResponse
错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| message |
string |
指示操作失败的原因的错误消息。 |
ExcludedPath
| 名称 | 类型 | 说明 |
|---|---|---|
| path |
string |
索引行为应用于的路径。 索引路径通常以根开头,以通配符结尾(/path/*) |
FullTextPath
表示全文路径规范。
| 名称 | 类型 | 说明 |
|---|---|---|
| language |
string |
文档中全文字段的语言。 |
| path |
string |
文档中全文字段的路径。 |
FullTextPolicy
Cosmos DB FullText 策略
| 名称 | 类型 | 说明 |
|---|---|---|
| defaultLanguage |
string |
全文路径的默认语言。 |
| fullTextPaths |
FullText 路径列表 |
IncludedPath
索引中包含的路径
| 名称 | 类型 | 说明 |
|---|---|---|
| indexes |
Indexes[] |
此路径的索引列表 |
| path |
string |
索引行为应用于的路径。 索引路径通常以根开头,以通配符结尾(/path/*) |
Indexes
路径的索引。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| dataType | String |
为其应用索引行为的数据类型。 |
|
| kind | Hash |
指示索引的类型。 |
|
| precision |
integer |
索引的精度。 -1 是最大精度。 |
IndexingMode
指示索引模式。
| 值 | 说明 |
|---|---|
| consistent | |
| lazy | |
| none |
IndexingPolicy
Cosmos DB 索引策略
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| automatic |
boolean |
指示索引策略是否自动 |
|
| compositeIndexes |
复合路径列表列表 |
||
| excludedPaths |
要从索引中排除的路径列表 |
||
| includedPaths |
要包含在索引中的路径列表 |
||
| indexingMode | consistent |
指示索引模式。 |
|
| spatialIndexes |
空间细节列表 |
||
| vectorIndexes |
要包含在矢量索引中的路径列表 |
IndexKind
指示索引的类型。
| 值 | 说明 |
|---|---|
| Hash | |
| Range | |
| Spatial |
OperationType
枚举以指示事件的操作类型。
| 值 | 说明 |
|---|---|
| Create | |
| Replace | |
| Delete | |
| Recreate | |
| SystemOperation |
PartitionKind
指示用于分区的算法类型。 对于 MultiHash,容器创建支持多个分区键(最多三个最大值)
| 值 | 说明 |
|---|---|
| Hash | |
| Range | |
| MultiHash |
Resource
Azure Cosmos DB SQL 容器事件的资源
| 名称 | 类型 | 说明 |
|---|---|---|
| _rid |
string |
系统生成的属性。 唯一标识符。 |
| canUndelete |
string |
此容器的状态,用于标识此容器是否在同一帐户中可还原。 |
| canUndeleteReason |
string |
无法在同一帐户中还原此容器的原因。 |
| container |
Cosmos DB SQL 容器资源对象 |
|
| eventTimestamp |
string |
发生此容器事件时。 |
| operationType |
此容器事件的操作类型。 |
|
| ownerId |
string |
此 SQL 容器的名称。 |
| ownerResourceId |
string |
此 SQL 容器的资源 ID。 |
ResourceRestoreParameters
用于指示还原信息的参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| restoreSource |
string |
必须从中启动还原的可还原数据库帐户的 ID。 例如:/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
| restoreTimestampInUtc |
string (date-time) |
帐户必须还原到的时间(ISO-8601 格式)。 |
| restoreWithTtlDisabled |
boolean |
指定还原的帐户是否在成功还原时禁用时间To-Live。 |
RestorableSqlContainerGetResult
Azure Cosmos DB SQL 容器事件
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
ARM 资源的唯一资源标识符。 |
| name |
string |
ARM 资源的名称。 |
| properties.resource |
Azure Cosmos DB SQL 容器事件的资源 |
|
| type |
string |
Azure 资源的类型。 |
RestorableSqlContainersListResult
包含 SQL 容器事件及其属性的列表操作响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| value |
SQL 容器事件及其属性的列表。 |
SpatialSpec
| 名称 | 类型 | 说明 |
|---|---|---|
| path |
string |
索引行为应用于的路径。 索引路径通常以根开头,以通配符结尾(/path/*) |
| types |
路径的空间类型列表 |
SpatialType
指示索引的空间类型。
| 值 | 说明 |
|---|---|
| Point | |
| LineString | |
| Polygon | |
| MultiPolygon |
UniqueKey
该键对 Azure Cosmos DB 服务集合中的文档强制实施唯一性约束。
| 名称 | 类型 | 说明 |
|---|---|---|
| paths |
string[] |
路径列表对于 Azure Cosmos DB 服务中的每个文档必须是唯一的 |
UniqueKeyPolicy
用于在 Azure Cosmos DB 服务中的集合中指定文档的唯一性约束的唯一键策略配置。
| 名称 | 类型 | 说明 |
|---|---|---|
| uniqueKeys |
在 Azure Cosmos DB 服务中对集合中的文档强制实施唯一性约束的唯一键列表。 |
VectorDataType
指示矢量的数据类型。
| 值 | 说明 |
|---|---|
| float32 | |
| uint8 | |
| int8 |
VectorEmbedding
表示矢量嵌入。 矢量嵌入用于定义文档中的向量字段。
| 名称 | 类型 | 说明 |
|---|---|---|
| dataType |
指示矢量的数据类型。 |
|
| dimensions |
integer (int32) |
矢量中的维度数。 |
| distanceFunction |
用于矢量之间的距离计算的距离函数。 |
|
| path |
string |
文档中矢量字段的路径。 |
VectorEmbeddingPolicy
Cosmos DB 矢量嵌入策略
| 名称 | 类型 | 说明 |
|---|---|---|
| vectorEmbeddings |
矢量嵌入列表 |
VectorIndex
| 名称 | 类型 | 说明 |
|---|---|---|
| path |
string |
文档中矢量字段的路径。 |
| type |
矢量的索引类型。 目前支持平面、diskANN 和 quantizedFlat。 |
VectorIndexType
矢量的索引类型。 目前支持平面、diskANN 和 quantizedFlat。
| 值 | 说明 |
|---|---|
| flat | |
| diskANN | |
| quantizedFlat |