Bicep 資源定義
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Azure 快速入門範例
下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2024-08-15' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
options: {
autoscaleSettings: {
maxThroughput: int
}
throughput: int
}
resource: {
analyticalStorageTtl: int
createMode: 'string'
id: 'string'
indexes: [
{
key: {
keys: [
'string'
]
}
options: {
expireAfterSeconds: int
unique: bool
}
}
]
restoreParameters: {
restoreSource: 'string'
restoreTimestampInUtc: 'string'
restoreWithTtlDisabled: bool
}
shardKey: {
{customized property}: 'string'
}
}
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections
AutoscaleSettings
| 名字 |
描述 |
價值 |
| maxThroughput (最大輸送量) |
代表最大輸送量,資源可以相應增加至 。 |
整數 (int) |
CreateUpdateOptionsOrMongoDBCollectionGetPropertiesOptions
| 名字 |
描述 |
價值 |
| autoscaleSettings |
指定自動調整設定。 注意:需要輸送量或自動調整設定,但不需要兩者。 |
AutoscaleSettings |
| 輸送量 |
每秒要求單位數。 例如,「輸送量」:10000。 |
整數 (int) |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBCollectionGetProperties
MongoDBCollectionResourceOrMongoDBCollectionGetPropertiesResource
| 名字 |
描述 |
價值 |
| 分析StorageTtl |
分析TTL。 |
整數 (int) |
| createMode |
列舉,表示資源建立模式。 |
預設 “恢復” |
| 識別碼 |
Cosmos DB MongoDB 集合的名稱 |
字串 (必要) |
| 指標 |
索引鍵清單 |
MongoIndex[] |
| restoreParameters (還原參數) |
用來指出還原相關信息的參數 |
資源恢復參數 |
| shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
分片鍵 |
MongoIndex
MongoIndex鍵
| 名字 |
描述 |
價值 |
| 鑰匙 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
字串[] |
MongoIndexOptions
| 名字 |
描述 |
價值 |
| 過期後秒 |
秒後到期 |
整數 (int) |
| 獨特 |
是唯一或不是唯一的 |
布爾 (bool) |
資源恢復參數
| 名字 |
描述 |
價值 |
| restoreSource (還原源) |
必須起始還原的可還原資料庫帳戶標識碼。 例如:/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
字串 |
| restoreTimestampInUtc |
帳戶必須還原的時間(ISO-8601 格式)。 |
字串 |
| restoreWithTtlDisabled |
指定還原的帳戶是否會在成功還原時停用時間To-Live。 |
布爾 (bool) |
分片鍵
ARM 樣本資源定義
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
使用範例
Azure 快速入門範本
下列 Azure 快速入門範本 部署此資源類型。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
"apiVersion": "2024-08-15",
"name": "string",
"location": "string",
"properties": {
"options": {
"autoscaleSettings": {
"maxThroughput": "int"
},
"throughput": "int"
},
"resource": {
"analyticalStorageTtl": "int",
"createMode": "string",
"id": "string",
"indexes": [
{
"key": {
"keys": [ "string" ]
},
"options": {
"expireAfterSeconds": "int",
"unique": "bool"
}
}
],
"restoreParameters": {
"restoreSource": "string",
"restoreTimestampInUtc": "string",
"restoreWithTtlDisabled": "bool"
},
"shardKey": {
"{customized property}": "string"
}
}
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections
AutoscaleSettings
| 名字 |
描述 |
價值 |
| maxThroughput (最大輸送量) |
代表最大輸送量,資源可以相應增加至 。 |
整數 (int) |
CreateUpdateOptionsOrMongoDBCollectionGetPropertiesOptions
| 名字 |
描述 |
價值 |
| autoscaleSettings |
指定自動調整設定。 注意:需要輸送量或自動調整設定,但不需要兩者。 |
AutoscaleSettings |
| 輸送量 |
每秒要求單位數。 例如,「輸送量」:10000。 |
整數 (int) |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBCollectionGetProperties
MongoDBCollectionResourceOrMongoDBCollectionGetPropertiesResource
| 名字 |
描述 |
價值 |
| 分析StorageTtl |
分析TTL。 |
整數 (int) |
| createMode |
列舉,表示資源建立模式。 |
預設 “恢復” |
| 識別碼 |
Cosmos DB MongoDB 集合的名稱 |
字串 (必要) |
| 指標 |
索引鍵清單 |
MongoIndex[] |
| restoreParameters (還原參數) |
用來指出還原相關信息的參數 |
資源恢復參數 |
| shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
分片鍵 |
MongoIndex
MongoIndex鍵
| 名字 |
描述 |
價值 |
| 鑰匙 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
字串[] |
MongoIndexOptions
| 名字 |
描述 |
價值 |
| 過期後秒 |
秒後到期 |
整數 (int) |
| 獨特 |
是唯一或不是唯一的 |
布爾 (bool) |
資源恢復參數
| 名字 |
描述 |
價值 |
| restoreSource (還原源) |
必須起始還原的可還原資料庫帳戶標識碼。 例如:/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
字串 |
| restoreTimestampInUtc |
帳戶必須還原的時間(ISO-8601 格式)。 |
字串 |
| restoreWithTtlDisabled |
指定還原的帳戶是否會在成功還原時停用時間To-Live。 |
布爾 (bool) |
分片鍵
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
-
資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2024-08-15"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
options = {
autoscaleSettings = {
maxThroughput = int
}
throughput = int
}
resource = {
analyticalStorageTtl = int
createMode = "string"
id = "string"
indexes = [
{
key = {
keys = [
"string"
]
}
options = {
expireAfterSeconds = int
unique = bool
}
}
]
restoreParameters = {
restoreSource = "string"
restoreTimestampInUtc = "string"
restoreWithTtlDisabled = bool
}
shardKey = {
{customized property} = "string"
}
}
}
}
}
屬性值
Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections
AutoscaleSettings
| 名字 |
描述 |
價值 |
| maxThroughput (最大輸送量) |
代表最大輸送量,資源可以相應增加至 。 |
整數 (int) |
CreateUpdateOptionsOrMongoDBCollectionGetPropertiesOptions
| 名字 |
描述 |
價值 |
| autoscaleSettings |
指定自動調整設定。 注意:需要輸送量或自動調整設定,但不需要兩者。 |
AutoscaleSettings |
| 輸送量 |
每秒要求單位數。 例如,「輸送量」:10000。 |
整數 (int) |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBCollectionGetProperties
MongoDBCollectionResourceOrMongoDBCollectionGetPropertiesResource
| 名字 |
描述 |
價值 |
| 分析StorageTtl |
分析TTL。 |
整數 (int) |
| createMode |
列舉,表示資源建立模式。 |
預設 “恢復” |
| 識別碼 |
Cosmos DB MongoDB 集合的名稱 |
字串 (必要) |
| 指標 |
索引鍵清單 |
MongoIndex[] |
| restoreParameters (還原參數) |
用來指出還原相關信息的參數 |
資源恢復參數 |
| shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
分片鍵 |
MongoIndex
MongoIndex鍵
| 名字 |
描述 |
價值 |
| 鑰匙 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
字串[] |
MongoIndexOptions
| 名字 |
描述 |
價值 |
| 過期後秒 |
秒後到期 |
整數 (int) |
| 獨特 |
是唯一或不是唯一的 |
布爾 (bool) |
資源恢復參數
| 名字 |
描述 |
價值 |
| restoreSource (還原源) |
必須起始還原的可還原資料庫帳戶標識碼。 例如:/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
字串 |
| restoreTimestampInUtc |
帳戶必須還原的時間(ISO-8601 格式)。 |
字串 |
| restoreWithTtlDisabled |
指定還原的帳戶是否會在成功還原時停用時間To-Live。 |
布爾 (bool) |
分片鍵