建立或複製ApsaraDB for MongoDB複本集執行個體。
介面說明
請確保在使用該介面前,已充分瞭解ApsaraDB for MongoDB 產品的收費方式和價格。
關於ApsaraDB for 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 |
否 |
Virtual Private CloudID。 |
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 |
| ResourceGroupId |
string |
否 |
資源群組 ID。 |
rg-acfmyiu4ekp**** |
| ClusterId |
string |
否 |
專屬叢集 ID。 |
dhg-2x78**** |
| Engine |
string |
否 |
資料庫引擎,固定取值:MongoDB。 |
MongoDB |
| StorageType |
string |
否 |
儲存類型,取值說明:
說明
|
cloud_essd1 |
| SecondaryZoneId |
string |
否 |
配置從節點(Secondary 節點)所在的可用性區域,實現多可用性區域部署。取值說明:
說明
|
cn-hangzhou-h |
| HiddenZoneId |
string |
否 |
配置隱藏節點(Hidden 節點)所在的可用性區域,實現多可用性區域部署。取值說明:
說明
|
cn-hangzhou-i |
| Tag |
array<object> |
否 |
使用者自訂標籤。 |
|
|
object |
否 |
|||
| Key |
string |
否 |
標籤的鍵。 說明
|
testdatabase |
| Value |
string |
否 |
標籤的值。 說明
N 表示傳入第幾個標籤的值。例如:Tag.1.Value表示傳入第一個標籤的值;Tag.2.Value表示傳入第二個標籤的值。 |
apitest |
| GlobalSecurityGroupIds |
string |
否 |
執行個體的全域 IP 白名單模板,多個 IP 白名單模板請用英文逗號(,)分隔,不可重複。(功能灰階中) |
g-qxieqf40xjst1ngpr3jz |
| Encrypted |
boolean |
否 |
是否開啟雲端硬碟加密 |
true |
| EncryptionKey |
string |
否 |
自訂金鑰識別碼。 |
2axxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| ProvisionedIops |
integer |
否 |
預配置效能(IOPS)。取值範圍為 0~50000。 |
1960 |
| RestoreType |
string |
否 |
備份恢複執行個體。
|
0 |
| SrcRegion |
string |
否 |
源執行個體所在地區。 說明
|
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. | Storage 或 Version 或 InstanceClass 為空白。 |
| 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. | 選擇的主可用性區域、備可用性區域1和備可用性區域2參數不能完全相同。 |
| 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. | 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。