Microsoft.DocumentDB 資料庫Accounts/mongodbDatabases/collections 2019-08-01
Bicep 資源定義
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2019-08-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
parent: resourceSymbolicName
properties: {
options: {
{customized property}: 'string'
}
resource: {
id: 'string'
indexes: [
{
key: {
keys: [
'string'
]
}
options: {
expireAfterSeconds: int
unique: bool
}
}
]
shardKey: {
{customized property}: 'string'
}
}
}
}
屬性值
databaseAccounts/mongodbDatabases/collections
名稱 |
描述 |
值 |
NAME |
資源名稱
瞭解如何在 Bicep 中設定子資源的名稱和類型。 |
需要字串 () |
location |
資源所屬之資源群組的位置。 |
字串 |
tags |
標記是描述資源的索引鍵/值組清單。 這些標記可用來在資源群組間檢視資源,以及對資源分組。 資源最多可提供15個標記。 每個標記的金鑰都不得多於 128 個字元,值則不得多於 256 個字元。 例如,範本類型的默認體驗會設定為 「defaultExperience」:“Cassandra” 目前的 「defaultExperience」 值也包括 「Table」、“Graph”、“DocumentDB” 和 “MongoDB”。 |
標記名稱和值的字典。 請參閱 範本中的標籤 |
父系 (parent) |
在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增此屬性。
如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱: mongodbDatabases |
properties |
用來建立和更新 Azure Cosmos DB MongoDB 集合的屬性。 |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl... 必要 () |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl...
CreateUpdateOptions
MongoDBCollectionResourceOrMongoDBCollectionGetPrope...
名稱 |
描述 |
值 |
id |
Cosmos DB MongoDB 集合的名稱 |
需要字串 () |
索引 |
索引鍵清單 |
MongoIndex[] |
shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
ShardKeys |
MongoIndex
MongoIndexKeys
名稱 |
描述 |
值 |
金鑰 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
string[] |
MongoIndexOptions
名稱 |
描述 |
值 |
expireAfterSeconds |
在秒後到期 |
int |
unique |
是唯一或不是唯一的 |
bool |
ShardKeys
快速入門範本
下列快速入門範本會部署此資源類型。
ARM 範本資源定義
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
"apiVersion": "2019-08-01",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"options": {
"{customized property}": "string"
},
"resource": {
"id": "string",
"indexes": [
{
"key": {
"keys": [ "string" ]
},
"options": {
"expireAfterSeconds": "int",
"unique": "bool"
}
}
],
"shardKey": {
"{customized property}": "string"
}
}
}
}
屬性值
databaseAccounts/mongodbDatabases/collections
名稱 |
描述 |
值 |
類型 |
資源類型 |
'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections' |
apiVersion |
資源 API 版本 |
'2019-08-01' |
NAME |
資源名稱
瞭解如何在 JSON ARM 範本中設定子資源的名稱和類型。 |
需要字串 () |
location |
資源所屬之資源群組的位置。 |
字串 |
tags |
標記是描述資源的索引鍵/值組清單。 這些標記可用來在資源群組間檢視資源,以及對資源分組。 資源最多可提供15個標記。 每個標記的金鑰都不得多於 128 個字元,值則不得多於 256 個字元。 例如,範本類型的默認體驗會設定為 「defaultExperience」:“Cassandra” 目前的 「defaultExperience」 值也包括 「Table」、“Graph”、“DocumentDB” 和 “MongoDB”。 |
標記名稱和值的字典。 請參閱 範本中的標籤 |
properties |
用來建立和更新 Azure Cosmos DB MongoDB 集合的屬性。 |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl... 必要 () |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl...
CreateUpdateOptions
MongoDBCollectionResourceOrMongoDBCollectionGetPrope...
名稱 |
描述 |
值 |
id |
Cosmos DB MongoDB 集合的名稱 |
字串 (必要) |
索引 |
索引鍵清單 |
MongoIndex[] |
shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
ShardKeys |
MongoIndex
MongoIndexKeys
名稱 |
描述 |
值 |
金鑰 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
string[] |
MongoIndexOptions
名稱 |
描述 |
值 |
expireAfterSeconds |
在秒後到期 |
int |
unique |
是唯一或不是唯一的 |
bool |
ShardKeys
快速入門範本
下列快速入門範本會部署此資源類型。
databaseAccounts/mongodbDatabases/collections 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
若要建立 Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2019-08-01"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
options = {
{customized property} = "string"
}
resource = {
id = "string"
indexes = [
{
key = {
keys = [
"string"
]
}
options = {
expireAfterSeconds = int
unique = bool
}
}
]
shardKey = {
{customized property} = "string"
}
}
}
})
}
屬性值
databaseAccounts/mongodbDatabases/collections
名稱 |
描述 |
值 |
類型 |
資源類型 |
“Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2019-08-01” |
NAME |
資源名稱 |
字串 (必要) |
location |
資源所屬資源群組的位置。 |
字串 |
parent_id |
此資源之父系的資源標識碼。 |
類型的資源標識碼: mongodbDatabases |
tags |
標籤是描述資源的索引鍵/值組清單。 這些標記可用來在資源群組間檢視資源,以及對資源分組。 資源最多可提供15個標籤。 每個標記的金鑰都不得多於 128 個字元,值則不得多於 256 個字元。 例如,範本類型的默認體驗設定為 「defaultExperience」:“Cassandra” 目前的 「defaultExperience」 值也包括 「Table」、“Graph”、“DocumentDB” 和 “MongoDB”。 |
標記名稱和值的字典。 |
properties |
用來建立及更新 Azure Cosmos DB MongoDB 集合的屬性。 |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl... 必要 () |
MongoDBCollectionCreateUpdatePropertiesOrMongoDBColl...
CreateUpdateOptions
MongoDBCollectionResourceOrMongoDBCollectionGetPrope...
名稱 |
描述 |
值 |
id |
Cosmos DB MongoDB 集合的名稱 |
字串 (必要) |
索引 |
索引鍵清單 |
MongoIndex[] |
shardKey |
要套用要求之分區索引鍵的索引鍵/值組。 |
ShardKeys |
MongoIndex
MongoIndexKeys
名稱 |
描述 |
值 |
金鑰 |
Azure Cosmos DB 服務中每個 MongoDB 集合的密鑰清單 |
string[] |
MongoIndexOptions
名稱 |
描述 |
值 |
expireAfterSeconds |
在秒後到期 |
int |
unique |
是唯一或不是唯一的 |
bool |
ShardKeys