建立或複製雲端資料庫 MongoDB 版副本集執行個體。
介面說明
請確保在使用該介面前,已充分了解雲端資料庫 MongoDB 產品的收費方式和價格。
關於雲端資料庫 MongoDB 執行個體的規格,請參見執行個體規格表。
如需建立分片叢集執行個體,您可以透過呼叫 CreateShardingDBInstance 介面進行建立。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dds:CreateDBInstance |
create |
*Instance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地域 ID,您可以透過呼叫 DescribeRegions 介面查詢地域 ID。 說明
呼叫本介面複製執行個體或者資源回收筒復原執行個體時,該參數值需和來源執行個體保持一致。 |
cn-hangzhou |
| ClientToken |
string |
否 |
用於保證請求的冪等性,防止重複提交請求。由用戶端產生該參數值,要保證在不同請求間唯一,最大值不超過 64 個 ASCII 字元,且該參數值中不能包含非 ASCII 字元。 |
ETnLKlblzczshOTUbOCz**** |
| ZoneId |
string |
否 |
可用區 ID,您可以透過呼叫 DescribeRegions 介面查詢可用區 ID。 |
cn-hangzhou-g |
| EngineVersion |
string |
是 |
資料庫版本號碼,取值:
說明
呼叫本介面複製執行個體或者資源回收筒復原執行個體時,該參數值需和來源執行個體保持一致。 警告 3.4 及以下版本已停售。 |
4.4 |
| DBInstanceClass |
string |
是 |
執行個體規格,您可以透過呼叫 DescribeAvailableResource 介面查詢執行個體規格。 |
dds.mongo.standard |
| DBInstanceStorage |
integer |
是 |
執行個體儲存空間,單位:GB。 具體取值受執行個體規格約束,詳情請參見副本集執行個體規格表。 |
10 |
| DBInstanceDescription |
string |
否 |
執行個體名稱,取值說明:
|
test |
| SecurityIPList |
string |
否 |
執行個體的 IP 白名單,多個 IP 地址請用英文逗號(,)分隔,不可重複。支援如下三種格式:
說明
|
192.168.xx.xx,192.168.xx.xx |
| AccountPassword |
string |
否 |
root 帳號的密碼,取值說明:
說明
關於特殊字元導致資料庫連線失敗的問題請參見如何解決連線字串中帳號密碼包含特殊字元導致連線失敗的問題?。 |
123456Aa |
| Period |
integer |
否 |
執行個體的購買時長,單位為月。 取值範圍:1~9(整數)、12、24、36、60。 說明
當 ChargeType 參數值為 PrePaid 時,該參數可用且為必填參數。 |
1 |
| ChargeType |
string |
否 |
執行個體的付費類型,取值說明:
說明
當該參數的值為 PrePaid 時,您還需要設定 Period 參數。 |
PrePaid |
| NetworkType |
string |
否 |
執行個體的網路類型,取值說明: VPC:專有網路。 |
VPC |
| VpcId |
string |
否 |
專有網路(VPC)ID。 |
vpc-bp175iuvg8nxqraf2**** |
| VSwitchId |
string |
否 |
虛擬交換器 ID。 |
vsw-bp1gzt31twhlo0sa5**** |
| SrcDBInstanceId |
string |
否 |
來源執行個體 ID。 說明
呼叫本介面複製執行個體時,您需要設定該參數,同時還需要設定 BackupId 或 RestoreTime 參數。呼叫本介面進行資源回收筒復原時,只需要傳入該參數,無需設定 BackupId 或 RestoreTime。 |
dds-bp1ee12ad351**** |
| BackupId |
string |
否 |
備份點 ID,您可以透過呼叫 DescribeBackups 介面查詢備份點 ID。 說明
只有呼叫本介面按備份點複製執行個體時,您需要設定該參數,同時還需要設定 SrcDBInstanceId 參數。 |
32994**** |
| RestoreTime |
string |
否 |
選擇要復原的時間點,您可以設定 7 天內的任意時間點。格式為 yyyy-MM-ddTHH:mm:ssZ(UTC 時間)。 說明
只有呼叫本介面按時間點複製執行個體時,您需要設定該參數,同時還需要設定 SrcDBInstanceId 參數。 |
2022-03-13T12:11:14Z |
| BusinessInfo |
string |
否 |
附加參數,業務資訊。 |
{“ActivityId":"000000000"} |
| AutoRenew |
string |
否 |
執行個體是否自動續費,取值說明:
說明
當 ChargeType 參數值為 PrePaid 時,該參數可用且為可選參數。 |
true |
| DatabaseNames |
string |
否 |
資料庫名稱。 說明
呼叫本介面複製執行個體時,您可以透過設定該參數指定需要複製的資料庫,如果不設定該參數,則複製執行個體的所有資料庫。 |
mongodbtest |
| CouponNo |
string |
否 |
是否使用優惠券,取值說明:
|
default |
| StorageEngine |
string |
否 |
執行個體的儲存引擎,取值固定為 WiredTiger。 說明
|
WiredTiger |
| ReplicationFactor |
string |
否 |
副本集執行個體的主備節點數,取值:
重要 單節點執行個體可不傳該參數 |
3 |
| ReadonlyReplicas |
string |
否 |
副本集執行個體的唯讀節點數,取值範圍:0~5(整數),預設值為 0。 |
0 |
| Engine |
string |
否 |
資源群組 ID。 |
rg-acfmyiu4ekp**** |
| StorageType |
string |
否 |
專屬叢集 ID。 |
dhg-2x78**** |
| SecondaryZoneId |
string |
否 |
資料庫引擎,固定取值:MongoDB。 |
MongoDB |
| HiddenZoneId |
string |
否 |
儲存類型,取值說明:
說明
|
cloud_essd1 |
| Tag |
array<object> |
否 |
設定從節點(Secondary 節點)所在的可用區,實現多可用區部署。取值說明:
說明
|
cn-hangzhou-h |
|
object |
否 |
|||
| Key |
string |
否 |
標籤的鍵。 說明
|
testdatabase |
| Value |
string |
否 |
標籤的值。 說明
N 表示傳入第幾個標籤的值。例如:Tag.1.Value表示傳入第一個標籤的值;Tag.2.Value表示傳入第二個標籤的值。 |
apitest |
| GlobalSecurityGroupIds |
string |
否 |
設定隱藏節點(Hidden 節點)所在的可用區,實現多可用區部署。取值說明:
說明
|
cn-hangzhou-i |
| Encrypted |
boolean |
否 |
使用者自訂標籤。 |
true |
| EncryptionKey |
string |
否 |
執行個體的全域 IP 白名單範本,多個 IP 白名單範本請用英文逗號(,)分隔,不可重複。(功能灰度中) |
g-qxieqf40xjst1ngpr3jz |
| ProvisionedIops |
integer |
否 |
是否開啟雲端硬碟加密。 |
true |
| RestoreType |
string |
否 |
自訂金鑰 ID。 |
2axxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| SrcRegion |
string |
否 |
預配置效能(IOPS)。取值範圍為 0~50000。 |
1960 |
|
否 |
備份復原執行個體。
|
0 |
||
|
否 |
來源執行個體所在區域。 說明
|
2 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
D8F1D721-6439-4257-A89C-F1E8E9C9**** |
| DBInstanceId |
string |
執行個體 ID。 |
dds-bp144a7f2db8**** |
| OrderId |
string |
訂單 ID。 |
21077576248**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "D8F1D721-6439-4257-A89C-F1E8E9C9****",
"DBInstanceId": "dds-bp144a7f2db8****",
"OrderId": "21077576248****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | SecurityRisk.AuthVerification | we have detected a risk with your default payment method. An email and notification has been sent to you. Please re-submit your order before after verificaiton. | |
| 400 | MissingParameter | Period is mandatory for this action. | |
| 400 | ORDER.ACCOUNT_INFORMATION_INCOMPLETE | Your information is incomplete. Complete your information before ordering. | |
| 400 | InvalidClientToken.Malformed | Specified parameter ClientToken is not valid. | |
| 400 | InvalidDBInstanceDescription.Malformed | Specified parameter DBInstanceDescription is not valid. | |
| 400 | InvalidSecurityIPListLength.Malformed | The quota of security ip exceeds. | |
| 400 | InsufficientBalance | Your account does not have enough balance. | |
| 400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | |
| 400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | |
| 400 | ResourceNotAvailable | Resource you requested is not available for finance user. | |
| 400 | IdempotentParameterMismatch | Request uses a client token in a previous request but is not identical to that request. | |
| 400 | InvalidSecurityIPList.Malformed | The specified parameter "SecurityIPList" is not valid. | |
| 400 | InvalidSecurityIPList.Duplicate | The Security IP address is not in the available range or occupied. | |
| 400 | InvalidDBInstanceStorage.ValueNotSupported | The specified parameter DBInstanceStorage is not valid. | |
| 400 | InvalidAccountPassword.Malformed | Specified parameter AccountPassword is not valid. | |
| 400 | TokenServiceError | Duplicate ClientToken request. | |
| 400 | Zone.Closed | The specified zone is closed. | |
| 400 | PRICE.ORIGIN_PRICE_ERROR | The origin price error. | |
| 400 | NO_AVAILABLE_PAYMENT_METHOD | No payment method is specified for your account. We recommend that you add a payment method. | |
| 400 | InvalidEcsImage.NotFound | Specified ecs image does not exist. | |
| 400 | SaleValidateNoSpecificCodeFailed | Specified Storage or Version or InstanceClass is invalid. | |
| 400 | Trade_Not_Support_Async_Pay | Trade not support async pay. | |
| 400 | InvalidZoneld | The specified primary zone, secondary zone and hidden zone cannot be the same. | |
| 400 | SameZoneId | The specified primary zone, secondary zone require two different zones. | |
| 403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | |
| 403 | RegionUnauthorized | There is no authority to create instance in the specified region. | |
| 403 | OperationDenied | The resource is out of usage. | |
| 403 | InvalidEngineVersionInRegion.NotAvailable | The EngineVersion in the Region is not available. | |
| 403 | InvalidBackupLogStatus | Current backup log enable status does not support this operation. | |
| 403 | IncorrectBackupSetState | Current backup set state does not support operations. | |
| 404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。