@alicloud/dts20200101 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -1593,6 +1593,17 @@ export default class Client extends OpenApi {
1593
1593
  * @returns PreCheckCreateGadOrderResponse
1594
1594
  */
1595
1595
  preCheckCreateGadOrder(request: $_model.PreCheckCreateGadOrderRequest): Promise<$_model.PreCheckCreateGadOrderResponse>;
1596
+ /**
1597
+ * @param request - PromoteToMasterRequest
1598
+ * @param runtime - runtime options for this request RuntimeOptions
1599
+ * @returns PromoteToMasterResponse
1600
+ */
1601
+ promoteToMasterWithOptions(request: $_model.PromoteToMasterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.PromoteToMasterResponse>;
1602
+ /**
1603
+ * @param request - PromoteToMasterRequest
1604
+ * @returns PromoteToMasterResponse
1605
+ */
1606
+ promoteToMaster(request: $_model.PromoteToMasterRequest): Promise<$_model.PromoteToMasterResponse>;
1596
1607
  /**
1597
1608
  * Renews a Data Transmission Service (DTS) instance. This API operation is available only for subscription instances.
1598
1609
  *
package/dist/client.js CHANGED
@@ -6650,6 +6650,53 @@ class Client extends openapi_core_1.default {
6650
6650
  let runtime = new $dara.RuntimeOptions({});
6651
6651
  return await this.preCheckCreateGadOrderWithOptions(request, runtime);
6652
6652
  }
6653
+ /**
6654
+ * @param request - PromoteToMasterRequest
6655
+ * @param runtime - runtime options for this request RuntimeOptions
6656
+ * @returns PromoteToMasterResponse
6657
+ */
6658
+ async promoteToMasterWithOptions(request, runtime) {
6659
+ request.validate();
6660
+ let query = {};
6661
+ if (!$dara.isNull(request.instanceId)) {
6662
+ query["InstanceId"] = request.instanceId;
6663
+ }
6664
+ if (!$dara.isNull(request.masterDbInstanceId)) {
6665
+ query["MasterDbInstanceId"] = request.masterDbInstanceId;
6666
+ }
6667
+ if (!$dara.isNull(request.regionId)) {
6668
+ query["RegionId"] = request.regionId;
6669
+ }
6670
+ if (!$dara.isNull(request.resourceGroupId)) {
6671
+ query["ResourceGroupId"] = request.resourceGroupId;
6672
+ }
6673
+ if (!$dara.isNull(request.slaveDbInstanceId)) {
6674
+ query["SlaveDbInstanceId"] = request.slaveDbInstanceId;
6675
+ }
6676
+ let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
6677
+ query: openapi_core_2.OpenApiUtil.query(query),
6678
+ });
6679
+ let params = new openapi_core_2.$OpenApiUtil.Params({
6680
+ action: "PromoteToMaster",
6681
+ version: "2020-01-01",
6682
+ protocol: "HTTPS",
6683
+ pathname: "/",
6684
+ method: "POST",
6685
+ authType: "AK",
6686
+ style: "RPC",
6687
+ reqBodyType: "formData",
6688
+ bodyType: "json",
6689
+ });
6690
+ return $dara.cast(await this.callApi(params, req, runtime), new $_model.PromoteToMasterResponse({}));
6691
+ }
6692
+ /**
6693
+ * @param request - PromoteToMasterRequest
6694
+ * @returns PromoteToMasterResponse
6695
+ */
6696
+ async promoteToMaster(request) {
6697
+ let runtime = new $dara.RuntimeOptions({});
6698
+ return await this.promoteToMasterWithOptions(request, runtime);
6699
+ }
6653
6700
  /**
6654
6701
  * Renews a Data Transmission Service (DTS) instance. This API operation is available only for subscription instances.
6655
6702
  *