共用方式為


Microsoft.DocumentDB mongoClusters

Bicep 資源定義

mongoClusters 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DocumentDB/mongoClusters 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.DocumentDB/mongoClusters@2024-02-15-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    administratorLogin: 'string'
    administratorLoginPassword: 'string'
    createMode: 'string'
    nodeGroupSpecs: [
      {
        diskSizeGB: int
        enableHa: bool
        kind: 'Shard'
        nodeCount: int
        sku: 'string'
      }
    ]
    restoreParameters: {
      pointInTimeUTC: 'string'
      sourceResourceId: 'string'
    }
    serverVersion: 'string'
  }
}

屬性值

mongoClusters

名稱 描述
NAME 資源名稱 需要字串 ()
location 資源所在的地理位置 需要字串 ()
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties Mongo 叢集的屬性。 MongoClusterProperties

MongoClusterProperties

名稱 描述
administratorLogin mongo 叢集的系統管理員登入。 字串
administratorLoginPassword 系統管理員登入的密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
createMode 建立 Mongo 叢集的模式。 'Default'
'PointInTimeRestore'
'Restore'
nodeGroupSpecs 叢集中的節點群組規格清單。 NodeGroupSpec[]

約束:
最小長度 = 1
restoreParameters 用於還原作業的參數 MongoClusterRestoreParameters
serverVersion Mongo DB 伺服器版本。 如果未指定,則預設為最新的可用版本。 字串

NodeGroupSpec

名稱 描述
diskSizeGB 節點群組的磁碟記憶體大小,以 GB 為單位。 範例值:128、256、512、1024。 int
enableHa 節點群組上是否啟用高可用性。 bool
kind 部署在節點群組中的節點類型。 'Shard'
nodeCount 節點群組中的節點數目。 int
sku 節點群組的資源 SKU。 這會定義為每個節點布建的CPU和記憶體大小。 範例值:『M30』、『M40』。 字串

MongoClusterRestoreParameters

名稱 描述
pointInTimeUTC 還原 Mongo 叢集的 UTC 時間點 字串
sourceResourceId 要還原的來源叢集的資源標識符 字串

ARM 範本資源定義

mongoClusters 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DocumentDB/mongoClusters 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.DocumentDB/mongoClusters",
  "apiVersion": "2024-02-15-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "administratorLogin": "string",
    "administratorLoginPassword": "string",
    "createMode": "string",
    "nodeGroupSpecs": [
      {
        "diskSizeGB": "int",
        "enableHa": "bool",
        "kind": "Shard",
        "nodeCount": "int",
        "sku": "string"
      }
    ],
    "restoreParameters": {
      "pointInTimeUTC": "string",
      "sourceResourceId": "string"
    },
    "serverVersion": "string"
  }
}

屬性值

mongoClusters

名稱 描述
類型 資源類型 'Microsoft.DocumentDB/mongoClusters'
apiVersion 資源 API 版本 '2024-02-15-preview'
NAME 資源名稱 需要字串 ()
location 資源所在的地理位置 需要字串 ()
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties Mongo 叢集的屬性。 MongoClusterProperties

MongoClusterProperties

名稱 描述
administratorLogin mongo 叢集的系統管理員登入。 字串
administratorLoginPassword 系統管理員登入的密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
createMode 建立 Mongo 叢集的模式。 'Default'
'PointInTimeRestore'
'Restore'
nodeGroupSpecs 叢集中的節點群組規格清單。 NodeGroupSpec[]

約束:
最小長度 = 1
restoreParameters 用於還原作業的參數 MongoClusterRestoreParameters
serverVersion Mongo DB 伺服器版本。 如果未指定,則預設為最新的可用版本。 字串

NodeGroupSpec

名稱 描述
diskSizeGB 節點群組的磁碟記憶體大小,以 GB 為單位。 範例值:128、256、512、1024。 int
enableHa 節點群組上是否啟用高可用性。 bool
kind 部署在節點群組中的節點類型。 'Shard'
nodeCount 節點群組中的節點數目。 int
sku 節點群組的資源 SKU。 這會定義為每個節點布建的CPU和記憶體大小。 範例值:『M30』、『M40』。 字串

MongoClusterRestoreParameters

名稱 描述
pointInTimeUTC 還原 Mongo 叢集的 UTC 時間點 字串
sourceResourceId 要還原的來源叢集的資源標識符 字串

Terraform (AzAPI 提供者) 資源定義

mongoClusters 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DocumentDB/mongoClusters 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DocumentDB/mongoClusters@2024-02-15-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      administratorLogin = "string"
      administratorLoginPassword = "string"
      createMode = "string"
      nodeGroupSpecs = [
        {
          diskSizeGB = int
          enableHa = bool
          kind = "Shard"
          nodeCount = int
          sku = "string"
        }
      ]
      restoreParameters = {
        pointInTimeUTC = "string"
        sourceResourceId = "string"
      }
      serverVersion = "string"
    }
  })
}

屬性值

mongoClusters

名稱 描述
類型 資源類型 “Microsoft.DocumentDB/mongoClusters@2024-02-15-preview”
NAME 資源名稱 字串 (必要)
location 資源所在的地理位置 字串 (必要)
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。
properties mongo 叢集的屬性。 MongoClusterProperties

MongoClusterProperties

名稱 描述
administratorLogin Mongo 叢集的系統管理員登入。 字串
administratorLoginPassword 系統管理員登入的密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
createMode 建立 Mongo 叢集的模式。 “Default”
“PointInTimeRestore”
“Restore”
nodeGroupSpecs 叢集中的節點群組規格清單。 NodeGroupSpec[]

約束:
最小長度 = 1
restoreParameters 用於還原作業的參數 MongoClusterRestoreParameters
serverVersion Mongo DB 伺服器版本。 如果未指定,則預設為最新的可用版本。 字串

NodeGroupSpec

名稱 描述
diskSizeGB 以 GB 為單位之節點群組的磁碟記憶體大小。 範例值:128、256、512、1024。 int
enableHa 節點群組上是否啟用高可用性。 bool
kind 部署在節點群組中的節點類型。 “分區”
nodeCount 節點群組中的節點數目。 int
sku 節點群組的資源 SKU。 這會定義為每個節點布建的CPU和記憶體大小。 範例值:『M30』、『M40』。 字串

MongoClusterRestoreParameters

名稱 描述
pointInTimeUTC 還原 Mongo 叢集的 UTC 時間點 字串
sourceResourceId 要還原的來源叢集的資源標識符 字串