@huaweicloud/huaweicloud-sdk-cbh 3.1.59
Sign up to get free protection for your applications and to get access to all the features.
- package/huaweicloud-sdk-cbh.d.ts +3 -0
- package/huaweicloud-sdk-cbh.d.ts.map +1 -0
- package/huaweicloud-sdk-cbh.js +32 -0
- package/huaweicloud-sdk-cbh.js.map +1 -0
- package/package.json +23 -0
- package/v1/CbhClient.d.ts +477 -0
- package/v1/CbhClient.d.ts.map +1 -0
- package/v1/CbhClient.js +877 -0
- package/v1/CbhClient.js.map +1 -0
- package/v1/CbhRegion.d.ts +12 -0
- package/v1/CbhRegion.d.ts.map +1 -0
- package/v1/CbhRegion.js +32 -0
- package/v1/CbhRegion.js.map +1 -0
- package/v1/model/AvailabilityZones.d.ts +18 -0
- package/v1/model/AvailabilityZones.d.ts.map +1 -0
- package/v1/model/AvailabilityZones.js +45 -0
- package/v1/model/AvailabilityZones.js.map +1 -0
- package/v1/model/CBHInstances.d.ts +57 -0
- package/v1/model/CBHInstances.d.ts.map +1 -0
- package/v1/model/CBHInstances.js +141 -0
- package/v1/model/CBHInstances.js.map +1 -0
- package/v1/model/ChangeInstanceNetwork.d.ts +18 -0
- package/v1/model/ChangeInstanceNetwork.d.ts.map +1 -0
- package/v1/model/ChangeInstanceNetwork.js +40 -0
- package/v1/model/ChangeInstanceNetwork.js.map +1 -0
- package/v1/model/ChangeInstanceNetworkRequest.d.ts +11 -0
- package/v1/model/ChangeInstanceNetworkRequest.d.ts.map +1 -0
- package/v1/model/ChangeInstanceNetworkRequest.js +24 -0
- package/v1/model/ChangeInstanceNetworkRequest.js.map +1 -0
- package/v1/model/ChangeInstanceNetworkResponse.d.ts +25 -0
- package/v1/model/ChangeInstanceNetworkResponse.d.ts.map +1 -0
- package/v1/model/ChangeInstanceNetworkResponse.js +59 -0
- package/v1/model/ChangeInstanceNetworkResponse.js.map +1 -0
- package/v1/model/ChangeInstanceOrderRequest.d.ts +12 -0
- package/v1/model/ChangeInstanceOrderRequest.d.ts.map +1 -0
- package/v1/model/ChangeInstanceOrderRequest.js +31 -0
- package/v1/model/ChangeInstanceOrderRequest.js.map +1 -0
- package/v1/model/ChangeInstanceOrderResponse.d.ts +7 -0
- package/v1/model/ChangeInstanceOrderResponse.d.ts.map +1 -0
- package/v1/model/ChangeInstanceOrderResponse.js +15 -0
- package/v1/model/ChangeInstanceOrderResponse.js.map +1 -0
- package/v1/model/CreateInstanceBody.d.ts +7 -0
- package/v1/model/CreateInstanceBody.d.ts.map +1 -0
- package/v1/model/CreateInstanceBody.js +14 -0
- package/v1/model/CreateInstanceBody.js.map +1 -0
- package/v1/model/CreateInstanceOrder.d.ts +41 -0
- package/v1/model/CreateInstanceOrder.d.ts.map +1 -0
- package/v1/model/CreateInstanceOrder.js +107 -0
- package/v1/model/CreateInstanceOrder.js.map +1 -0
- package/v1/model/CreateInstanceOrderRequest.d.ts +7 -0
- package/v1/model/CreateInstanceOrderRequest.d.ts.map +1 -0
- package/v1/model/CreateInstanceOrderRequest.js +13 -0
- package/v1/model/CreateInstanceOrderRequest.js.map +1 -0
- package/v1/model/CreateInstanceOrderResponse.d.ts +9 -0
- package/v1/model/CreateInstanceOrderResponse.d.ts.map +1 -0
- package/v1/model/CreateInstanceOrderResponse.js +21 -0
- package/v1/model/CreateInstanceOrderResponse.js.map +1 -0
- package/v1/model/CreateInstanceRequest.d.ts +7 -0
- package/v1/model/CreateInstanceRequest.d.ts.map +1 -0
- package/v1/model/CreateInstanceRequest.js +13 -0
- package/v1/model/CreateInstanceRequest.js.map +1 -0
- package/v1/model/CreateInstanceResponse.d.ts +21 -0
- package/v1/model/CreateInstanceResponse.d.ts.map +1 -0
- package/v1/model/CreateInstanceResponse.js +51 -0
- package/v1/model/CreateInstanceResponse.js.map +1 -0
- package/v1/model/InstallInstanceEipRequest.d.ts +11 -0
- package/v1/model/InstallInstanceEipRequest.d.ts.map +1 -0
- package/v1/model/InstallInstanceEipRequest.js +24 -0
- package/v1/model/InstallInstanceEipRequest.js.map +1 -0
- package/v1/model/InstallInstanceEipResponse.d.ts +5 -0
- package/v1/model/InstallInstanceEipResponse.d.ts.map +1 -0
- package/v1/model/InstallInstanceEipResponse.js +11 -0
- package/v1/model/InstallInstanceEipResponse.js.map +1 -0
- package/v1/model/InstanceDetail.d.ts +86 -0
- package/v1/model/InstanceDetail.d.ts.map +1 -0
- package/v1/model/InstanceDetail.js +209 -0
- package/v1/model/InstanceDetail.js.map +1 -0
- package/v1/model/ListCbhInstanceRequest.d.ts +4 -0
- package/v1/model/ListCbhInstanceRequest.d.ts.map +1 -0
- package/v1/model/ListCbhInstanceRequest.js +9 -0
- package/v1/model/ListCbhInstanceRequest.js.map +1 -0
- package/v1/model/ListCbhInstanceResponse.d.ts +13 -0
- package/v1/model/ListCbhInstanceResponse.d.ts.map +1 -0
- package/v1/model/ListCbhInstanceResponse.js +23 -0
- package/v1/model/ListCbhInstanceResponse.js.map +1 -0
- package/v1/model/ListQuotaStatusRequest.d.ts +12 -0
- package/v1/model/ListQuotaStatusRequest.d.ts.map +1 -0
- package/v1/model/ListQuotaStatusRequest.js +31 -0
- package/v1/model/ListQuotaStatusRequest.js.map +1 -0
- package/v1/model/ListQuotaStatusResponse.d.ts +17 -0
- package/v1/model/ListQuotaStatusResponse.d.ts.map +1 -0
- package/v1/model/ListQuotaStatusResponse.js +39 -0
- package/v1/model/ListQuotaStatusResponse.js.map +1 -0
- package/v1/model/NetworkRequestBody.d.ts +18 -0
- package/v1/model/NetworkRequestBody.d.ts.map +1 -0
- package/v1/model/NetworkRequestBody.js +40 -0
- package/v1/model/NetworkRequestBody.js.map +1 -0
- package/v1/model/Nics.d.ts +12 -0
- package/v1/model/Nics.d.ts.map +1 -0
- package/v1/model/Nics.js +30 -0
- package/v1/model/Nics.js.map +1 -0
- package/v1/model/OperateEipRequestBody.d.ts +12 -0
- package/v1/model/OperateEipRequestBody.d.ts.map +1 -0
- package/v1/model/OperateEipRequestBody.js +31 -0
- package/v1/model/OperateEipRequestBody.js.map +1 -0
- package/v1/model/ProductInfos.d.ts +20 -0
- package/v1/model/ProductInfos.d.ts.map +1 -0
- package/v1/model/ProductInfos.js +53 -0
- package/v1/model/ProductInfos.js.map +1 -0
- package/v1/model/PublicIp.d.ts +10 -0
- package/v1/model/PublicIp.d.ts.map +1 -0
- package/v1/model/PublicIp.js +23 -0
- package/v1/model/PublicIp.js.map +1 -0
- package/v1/model/QuotaDetail.d.ts +14 -0
- package/v1/model/QuotaDetail.d.ts.map +1 -0
- package/v1/model/QuotaDetail.js +36 -0
- package/v1/model/QuotaDetail.js.map +1 -0
- package/v1/model/RebootCbhRequestBody.d.ts +11 -0
- package/v1/model/RebootCbhRequestBody.d.ts.map +1 -0
- package/v1/model/RebootCbhRequestBody.js +25 -0
- package/v1/model/RebootCbhRequestBody.js.map +1 -0
- package/v1/model/RebootType.d.ts +6 -0
- package/v1/model/RebootType.d.ts.map +1 -0
- package/v1/model/RebootType.js +14 -0
- package/v1/model/RebootType.js.map +1 -0
- package/v1/model/ResetLoginMethodRequest.d.ts +8 -0
- package/v1/model/ResetLoginMethodRequest.d.ts.map +1 -0
- package/v1/model/ResetLoginMethodRequest.js +20 -0
- package/v1/model/ResetLoginMethodRequest.js.map +1 -0
- package/v1/model/ResetLoginMethodResponse.d.ts +9 -0
- package/v1/model/ResetLoginMethodResponse.d.ts.map +1 -0
- package/v1/model/ResetLoginMethodResponse.js +21 -0
- package/v1/model/ResetLoginMethodResponse.js.map +1 -0
- package/v1/model/ResetPassword.d.ts +12 -0
- package/v1/model/ResetPassword.d.ts.map +1 -0
- package/v1/model/ResetPassword.js +31 -0
- package/v1/model/ResetPassword.js.map +1 -0
- package/v1/model/ResetPasswordRequest.d.ts +7 -0
- package/v1/model/ResetPasswordRequest.d.ts.map +1 -0
- package/v1/model/ResetPasswordRequest.js +13 -0
- package/v1/model/ResetPasswordRequest.js.map +1 -0
- package/v1/model/ResetPasswordResponse.d.ts +9 -0
- package/v1/model/ResetPasswordResponse.d.ts.map +1 -0
- package/v1/model/ResetPasswordResponse.js +21 -0
- package/v1/model/ResetPasswordResponse.js.map +1 -0
- package/v1/model/RestartCbhInstanceRequest.d.ts +7 -0
- package/v1/model/RestartCbhInstanceRequest.d.ts.map +1 -0
- package/v1/model/RestartCbhInstanceRequest.js +13 -0
- package/v1/model/RestartCbhInstanceRequest.js.map +1 -0
- package/v1/model/RestartCbhInstanceResponse.d.ts +5 -0
- package/v1/model/RestartCbhInstanceResponse.d.ts.map +1 -0
- package/v1/model/RestartCbhInstanceResponse.js +11 -0
- package/v1/model/RestartCbhInstanceResponse.js.map +1 -0
- package/v1/model/SearchQuotaRequest.d.ts +4 -0
- package/v1/model/SearchQuotaRequest.d.ts.map +1 -0
- package/v1/model/SearchQuotaRequest.js +9 -0
- package/v1/model/SearchQuotaRequest.js.map +1 -0
- package/v1/model/SearchQuotaResponse.d.ts +17 -0
- package/v1/model/SearchQuotaResponse.d.ts.map +1 -0
- package/v1/model/SearchQuotaResponse.js +39 -0
- package/v1/model/SearchQuotaResponse.js.map +1 -0
- package/v1/model/SecurityGroup.d.ts +6 -0
- package/v1/model/SecurityGroup.d.ts.map +1 -0
- package/v1/model/SecurityGroup.js +14 -0
- package/v1/model/SecurityGroup.js.map +1 -0
- package/v1/model/ShowAvailableZoneInfoRequest.d.ts +4 -0
- package/v1/model/ShowAvailableZoneInfoRequest.d.ts.map +1 -0
- package/v1/model/ShowAvailableZoneInfoRequest.js +9 -0
- package/v1/model/ShowAvailableZoneInfoRequest.js.map +1 -0
- package/v1/model/ShowAvailableZoneInfoResponse.d.ts +10 -0
- package/v1/model/ShowAvailableZoneInfoResponse.d.ts.map +1 -0
- package/v1/model/ShowAvailableZoneInfoResponse.js +21 -0
- package/v1/model/ShowAvailableZoneInfoResponse.js.map +1 -0
- package/v1/model/ShowNetworkConfigurationRequest.d.ts +7 -0
- package/v1/model/ShowNetworkConfigurationRequest.d.ts.map +1 -0
- package/v1/model/ShowNetworkConfigurationRequest.js +13 -0
- package/v1/model/ShowNetworkConfigurationRequest.js.map +1 -0
- package/v1/model/ShowNetworkConfigurationResponse.d.ts +19 -0
- package/v1/model/ShowNetworkConfigurationResponse.d.ts.map +1 -0
- package/v1/model/ShowNetworkConfigurationResponse.js +45 -0
- package/v1/model/ShowNetworkConfigurationResponse.js.map +1 -0
- package/v1/model/StartCbhInstanceRequest.d.ts +7 -0
- package/v1/model/StartCbhInstanceRequest.d.ts.map +1 -0
- package/v1/model/StartCbhInstanceRequest.js +13 -0
- package/v1/model/StartCbhInstanceRequest.js.map +1 -0
- package/v1/model/StartCbhInstanceResponse.d.ts +5 -0
- package/v1/model/StartCbhInstanceResponse.d.ts.map +1 -0
- package/v1/model/StartCbhInstanceResponse.js +11 -0
- package/v1/model/StartCbhInstanceResponse.js.map +1 -0
- package/v1/model/StartCbhRequestBody.d.ts +8 -0
- package/v1/model/StartCbhRequestBody.d.ts.map +1 -0
- package/v1/model/StartCbhRequestBody.js +20 -0
- package/v1/model/StartCbhRequestBody.js.map +1 -0
- package/v1/model/StopCbhInstanceRequest.d.ts +7 -0
- package/v1/model/StopCbhInstanceRequest.d.ts.map +1 -0
- package/v1/model/StopCbhInstanceRequest.js +13 -0
- package/v1/model/StopCbhInstanceRequest.js.map +1 -0
- package/v1/model/StopCbhInstanceResponse.d.ts +5 -0
- package/v1/model/StopCbhInstanceResponse.d.ts.map +1 -0
- package/v1/model/StopCbhInstanceResponse.js +11 -0
- package/v1/model/StopCbhInstanceResponse.js.map +1 -0
- package/v1/model/StopCbhRequestBody.d.ts +8 -0
- package/v1/model/StopCbhRequestBody.d.ts.map +1 -0
- package/v1/model/StopCbhRequestBody.js +20 -0
- package/v1/model/StopCbhRequestBody.js.map +1 -0
- package/v1/model/UninstallInstanceEipRequest.d.ts +11 -0
- package/v1/model/UninstallInstanceEipRequest.d.ts.map +1 -0
- package/v1/model/UninstallInstanceEipRequest.js +24 -0
- package/v1/model/UninstallInstanceEipRequest.js.map +1 -0
- package/v1/model/UninstallInstanceEipResponse.d.ts +5 -0
- package/v1/model/UninstallInstanceEipResponse.d.ts.map +1 -0
- package/v1/model/UninstallInstanceEipResponse.js +11 -0
- package/v1/model/UninstallInstanceEipResponse.js.map +1 -0
- package/v1/model/UpgradeCbhInstanceRequest.d.ts +7 -0
- package/v1/model/UpgradeCbhInstanceRequest.d.ts.map +1 -0
- package/v1/model/UpgradeCbhInstanceRequest.js +13 -0
- package/v1/model/UpgradeCbhInstanceRequest.js.map +1 -0
- package/v1/model/UpgradeCbhInstanceResponse.d.ts +17 -0
- package/v1/model/UpgradeCbhInstanceResponse.d.ts.map +1 -0
- package/v1/model/UpgradeCbhInstanceResponse.js +39 -0
- package/v1/model/UpgradeCbhInstanceResponse.js.map +1 -0
- package/v1/model/UpgradeCbhRequestBody.d.ts +8 -0
- package/v1/model/UpgradeCbhRequestBody.d.ts.map +1 -0
- package/v1/model/UpgradeCbhRequestBody.js +20 -0
- package/v1/model/UpgradeCbhRequestBody.js.map +1 -0
- package/v1/public-api.d.ts +56 -0
- package/v1/public-api.d.ts.map +1 -0
- package/v1/public-api.js +72 -0
- package/v1/public-api.js.map +1 -0
package/v1/CbhClient.js
ADDED
@@ -0,0 +1,877 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RequiredError = exports.ParamCreater = exports.CbhClient = void 0;
|
4
|
+
const ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
|
5
|
+
const ChangeInstanceNetworkRequest_1 = require("./model/ChangeInstanceNetworkRequest");
|
6
|
+
const ChangeInstanceOrderRequest_1 = require("./model/ChangeInstanceOrderRequest");
|
7
|
+
const CreateInstanceOrderRequest_1 = require("./model/CreateInstanceOrderRequest");
|
8
|
+
const CreateInstanceRequest_1 = require("./model/CreateInstanceRequest");
|
9
|
+
const InstallInstanceEipRequest_1 = require("./model/InstallInstanceEipRequest");
|
10
|
+
const ListQuotaStatusRequest_1 = require("./model/ListQuotaStatusRequest");
|
11
|
+
const ResetLoginMethodRequest_1 = require("./model/ResetLoginMethodRequest");
|
12
|
+
const ResetPasswordRequest_1 = require("./model/ResetPasswordRequest");
|
13
|
+
const RestartCbhInstanceRequest_1 = require("./model/RestartCbhInstanceRequest");
|
14
|
+
const ShowNetworkConfigurationRequest_1 = require("./model/ShowNetworkConfigurationRequest");
|
15
|
+
const StartCbhInstanceRequest_1 = require("./model/StartCbhInstanceRequest");
|
16
|
+
const StopCbhInstanceRequest_1 = require("./model/StopCbhInstanceRequest");
|
17
|
+
const UninstallInstanceEipRequest_1 = require("./model/UninstallInstanceEipRequest");
|
18
|
+
const UpgradeCbhInstanceRequest_1 = require("./model/UpgradeCbhInstanceRequest");
|
19
|
+
class CbhClient {
|
20
|
+
static newBuilder() {
|
21
|
+
return new ClientBuilder_1.ClientBuilder(newClient);
|
22
|
+
}
|
23
|
+
constructor(client) {
|
24
|
+
this.hcClient = client;
|
25
|
+
}
|
26
|
+
getPath() {
|
27
|
+
return __dirname;
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* 修改云堡垒机实例网络。
|
31
|
+
*
|
32
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
33
|
+
*
|
34
|
+
* @summary 修改实例网络
|
35
|
+
* @param {string} serverId 云堡垒机实例ID,使用UUID格式。
|
36
|
+
* @param {ChangeInstanceNetwork} changeInstanceNetworkRequestBody ChangeInstanceNetworkRequestBody
|
37
|
+
* @param {*} [options] Override http request option.
|
38
|
+
* @throws {RequiredError}
|
39
|
+
*/
|
40
|
+
changeInstanceNetwork(changeInstanceNetworkRequest) {
|
41
|
+
const options = (0, exports.ParamCreater)().changeInstanceNetwork(changeInstanceNetworkRequest);
|
42
|
+
// @ts-ignore
|
43
|
+
options['responseHeaders'] = [''];
|
44
|
+
return this.hcClient.sendRequest(options);
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* 创建变更云堡垒机实例订单。(调用此接口前先调用创建变更云堡垒机实例任务接口,当前接口未开放)
|
48
|
+
*
|
49
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
50
|
+
*
|
51
|
+
* @summary 创建变更云堡垒机实例订单
|
52
|
+
* @param {string} serverId 云堡垒机实例ID。
|
53
|
+
* @param {string} instanceKey 云堡垒机实例Key。
|
54
|
+
* @param {*} [options] Override http request option.
|
55
|
+
* @throws {RequiredError}
|
56
|
+
*/
|
57
|
+
changeInstanceOrder(changeInstanceOrderRequest) {
|
58
|
+
const options = (0, exports.ParamCreater)().changeInstanceOrder(changeInstanceOrderRequest);
|
59
|
+
// @ts-ignore
|
60
|
+
options['responseHeaders'] = [''];
|
61
|
+
return this.hcClient.sendRequest(options);
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* 创建云堡垒机实例。(创建云堡垒机实例订单前,先调用此接口)
|
65
|
+
*
|
66
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
67
|
+
*
|
68
|
+
* @summary 创建云堡垒机实例
|
69
|
+
* @param {CreateInstanceBody} createInstanceRequestBody CreateInstanceBody
|
70
|
+
* @param {*} [options] Override http request option.
|
71
|
+
* @throws {RequiredError}
|
72
|
+
*/
|
73
|
+
createInstance(createInstanceRequest) {
|
74
|
+
const options = (0, exports.ParamCreater)().createInstance(createInstanceRequest);
|
75
|
+
// @ts-ignore
|
76
|
+
options['responseHeaders'] = [''];
|
77
|
+
return this.hcClient.sendRequest(options);
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* 创建云堡垒机实例订单。(调用此接口前先调用创建云堡垒机实例接口)
|
81
|
+
*
|
82
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
83
|
+
*
|
84
|
+
* @summary 创建云堡垒机实例订单
|
85
|
+
* @param {CreateInstanceOrder} createInstanceOrderRequestBody CreateInstanceOrderRequestBody
|
86
|
+
* @param {*} [options] Override http request option.
|
87
|
+
* @throws {RequiredError}
|
88
|
+
*/
|
89
|
+
createInstanceOrder(createInstanceOrderRequest) {
|
90
|
+
const options = (0, exports.ParamCreater)().createInstanceOrder(createInstanceOrderRequest);
|
91
|
+
// @ts-ignore
|
92
|
+
options['responseHeaders'] = [''];
|
93
|
+
return this.hcClient.sendRequest(options);
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* 云堡垒机实例绑定弹性公网IP
|
97
|
+
*
|
98
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
99
|
+
*
|
100
|
+
* @summary 绑定弹性公网IP
|
101
|
+
* @param {string} serverId 云堡垒机实例ID,使用UUID格式表示。
|
102
|
+
* @param {OperateEipRequestBody} installInstanceEipRequestBody InstallInstanceEipRequestBody
|
103
|
+
* @param {*} [options] Override http request option.
|
104
|
+
* @throws {RequiredError}
|
105
|
+
*/
|
106
|
+
installInstanceEip(installInstanceEipRequest) {
|
107
|
+
const options = (0, exports.ParamCreater)().installInstanceEip(installInstanceEipRequest);
|
108
|
+
// @ts-ignore
|
109
|
+
options['responseHeaders'] = [''];
|
110
|
+
return this.hcClient.sendRequest(options);
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* 获取当前租户下的云堡垒机实例列表。
|
114
|
+
*
|
115
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
116
|
+
*
|
117
|
+
* @summary 获取CBH实例列表
|
118
|
+
* @param {*} [options] Override http request option.
|
119
|
+
* @throws {RequiredError}
|
120
|
+
*/
|
121
|
+
listCbhInstance(listCbhInstanceRequest) {
|
122
|
+
const options = (0, exports.ParamCreater)().listCbhInstance();
|
123
|
+
// @ts-ignore
|
124
|
+
options['responseHeaders'] = [''];
|
125
|
+
return this.hcClient.sendRequest(options);
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* 获取当前租户所选择的可用分区、性能规格所对应的弹性云服务器是否可用。
|
129
|
+
*
|
130
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
131
|
+
*
|
132
|
+
* @summary 获取弹性云服务器配额
|
133
|
+
* @param {string} availabilityZone 创建云堡垒机所在的可用区,需要指定可用分区名称。 可参考[地区和终端节点](https://developer.huaweicloud.com/endpoint)获取
|
134
|
+
* @param {string} resourceSpecCode 待创建云堡垒机规格ID,例如: - cbh.basic.10 10资产标准版 - cbh.enhance.10 10资产专业版 已上线的规格详情请参见《云堡垒机常见问题》的购买,[云堡垒机实例有哪些规格](https://support.huaweicloud.com/cbh_faq/cbh_03_0025.html)章节。
|
135
|
+
* @param {*} [options] Override http request option.
|
136
|
+
* @throws {RequiredError}
|
137
|
+
*/
|
138
|
+
listQuotaStatus(listQuotaStatusRequest) {
|
139
|
+
const options = (0, exports.ParamCreater)().listQuotaStatus(listQuotaStatusRequest);
|
140
|
+
// @ts-ignore
|
141
|
+
options['responseHeaders'] = [''];
|
142
|
+
return this.hcClient.sendRequest(options);
|
143
|
+
}
|
144
|
+
/**
|
145
|
+
* 重置admin用户多因子认证方式。
|
146
|
+
*
|
147
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
148
|
+
*
|
149
|
+
* @summary 重置admin用户多因子认证方式
|
150
|
+
* @param {string} serverId 堡垒机实例ID,使用UUID格式。
|
151
|
+
* @param {*} [options] Override http request option.
|
152
|
+
* @throws {RequiredError}
|
153
|
+
*/
|
154
|
+
resetLoginMethod(resetLoginMethodRequest) {
|
155
|
+
const options = (0, exports.ParamCreater)().resetLoginMethod(resetLoginMethodRequest);
|
156
|
+
// @ts-ignore
|
157
|
+
options['responseHeaders'] = [''];
|
158
|
+
return this.hcClient.sendRequest(options);
|
159
|
+
}
|
160
|
+
/**
|
161
|
+
* 修改云堡垒机实例web登录admin用户密码。
|
162
|
+
*
|
163
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
164
|
+
*
|
165
|
+
* @summary 修改admin用户密码
|
166
|
+
* @param {ResetPassword} resetPasswordRequestBody ResetPasswordRequestBody
|
167
|
+
* @param {*} [options] Override http request option.
|
168
|
+
* @throws {RequiredError}
|
169
|
+
*/
|
170
|
+
resetPassword(resetPasswordRequest) {
|
171
|
+
const options = (0, exports.ParamCreater)().resetPassword(resetPasswordRequest);
|
172
|
+
// @ts-ignore
|
173
|
+
options['responseHeaders'] = [''];
|
174
|
+
return this.hcClient.sendRequest(options);
|
175
|
+
}
|
176
|
+
/**
|
177
|
+
* 重启云堡垒机实例。
|
178
|
+
*
|
179
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
180
|
+
*
|
181
|
+
* @summary 重启云堡垒机实例
|
182
|
+
* @param {RebootCbhRequestBody} restartCbhInstanceRequestBody RestartCbhInstanceRequestBody
|
183
|
+
* @param {*} [options] Override http request option.
|
184
|
+
* @throws {RequiredError}
|
185
|
+
*/
|
186
|
+
restartCbhInstance(restartCbhInstanceRequest) {
|
187
|
+
const options = (0, exports.ParamCreater)().restartCbhInstance(restartCbhInstanceRequest);
|
188
|
+
// @ts-ignore
|
189
|
+
options['responseHeaders'] = [''];
|
190
|
+
return this.hcClient.sendRequest(options);
|
191
|
+
}
|
192
|
+
/**
|
193
|
+
* 查询云堡垒机配额信息。
|
194
|
+
*
|
195
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
196
|
+
*
|
197
|
+
* @summary 查询堡垒机配额
|
198
|
+
* @param {*} [options] Override http request option.
|
199
|
+
* @throws {RequiredError}
|
200
|
+
*/
|
201
|
+
searchQuota(searchQuotaRequest) {
|
202
|
+
const options = (0, exports.ParamCreater)().searchQuota();
|
203
|
+
// @ts-ignore
|
204
|
+
options['responseHeaders'] = [''];
|
205
|
+
return this.hcClient.sendRequest(options);
|
206
|
+
}
|
207
|
+
/**
|
208
|
+
* 获取云堡垒机服务可用分区信息。
|
209
|
+
*
|
210
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
211
|
+
*
|
212
|
+
* @summary 获取可用用分区信息
|
213
|
+
* @param {*} [options] Override http request option.
|
214
|
+
* @throws {RequiredError}
|
215
|
+
*/
|
216
|
+
showAvailableZoneInfo(showAvailableZoneInfoRequest) {
|
217
|
+
const options = (0, exports.ParamCreater)().showAvailableZoneInfo();
|
218
|
+
// @ts-ignore
|
219
|
+
options['responseHeaders'] = [''];
|
220
|
+
return this.hcClient.sendRequest(options);
|
221
|
+
}
|
222
|
+
/**
|
223
|
+
* 检查云堡垒机实例网络信息。
|
224
|
+
*
|
225
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
226
|
+
*
|
227
|
+
* @summary 检查云堡垒机网络
|
228
|
+
* @param {NetworkRequestBody} showNetworkConfigurationRequestBody NetworkRequestBody
|
229
|
+
* @param {*} [options] Override http request option.
|
230
|
+
* @throws {RequiredError}
|
231
|
+
*/
|
232
|
+
showNetworkConfiguration(showNetworkConfigurationRequest) {
|
233
|
+
const options = (0, exports.ParamCreater)().showNetworkConfiguration(showNetworkConfigurationRequest);
|
234
|
+
// @ts-ignore
|
235
|
+
options['responseHeaders'] = [''];
|
236
|
+
return this.hcClient.sendRequest(options);
|
237
|
+
}
|
238
|
+
/**
|
239
|
+
* 启动云堡垒机实例。
|
240
|
+
*
|
241
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
242
|
+
*
|
243
|
+
* @summary 启动云堡垒机实例
|
244
|
+
* @param {StartCbhRequestBody} startCbhInstanceRequestBody StartCbhInstanceRequestBody
|
245
|
+
* @param {*} [options] Override http request option.
|
246
|
+
* @throws {RequiredError}
|
247
|
+
*/
|
248
|
+
startCbhInstance(startCbhInstanceRequest) {
|
249
|
+
const options = (0, exports.ParamCreater)().startCbhInstance(startCbhInstanceRequest);
|
250
|
+
// @ts-ignore
|
251
|
+
options['responseHeaders'] = [''];
|
252
|
+
return this.hcClient.sendRequest(options);
|
253
|
+
}
|
254
|
+
/**
|
255
|
+
* 关闭云堡垒机实例。
|
256
|
+
*
|
257
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
258
|
+
*
|
259
|
+
* @summary 关闭云堡垒机实例
|
260
|
+
* @param {StopCbhRequestBody} stopCbhInstanceRequestBody StopCbhInstanceRequestBody
|
261
|
+
* @param {*} [options] Override http request option.
|
262
|
+
* @throws {RequiredError}
|
263
|
+
*/
|
264
|
+
stopCbhInstance(stopCbhInstanceRequest) {
|
265
|
+
const options = (0, exports.ParamCreater)().stopCbhInstance(stopCbhInstanceRequest);
|
266
|
+
// @ts-ignore
|
267
|
+
options['responseHeaders'] = [''];
|
268
|
+
return this.hcClient.sendRequest(options);
|
269
|
+
}
|
270
|
+
/**
|
271
|
+
* 云堡垒机实例解绑弹性公网IP。
|
272
|
+
*
|
273
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
274
|
+
*
|
275
|
+
* @summary 解绑弹性公网IP
|
276
|
+
* @param {string} serverId 云堡垒机实例ID,使用UUID格式。
|
277
|
+
* @param {OperateEipRequestBody} uninstallInstanceEipRequestBody UninstallInstanceEipRequestBody
|
278
|
+
* @param {*} [options] Override http request option.
|
279
|
+
* @throws {RequiredError}
|
280
|
+
*/
|
281
|
+
uninstallInstanceEip(uninstallInstanceEipRequest) {
|
282
|
+
const options = (0, exports.ParamCreater)().uninstallInstanceEip(uninstallInstanceEipRequest);
|
283
|
+
// @ts-ignore
|
284
|
+
options['responseHeaders'] = [''];
|
285
|
+
return this.hcClient.sendRequest(options);
|
286
|
+
}
|
287
|
+
/**
|
288
|
+
* 升级云堡垒机实例
|
289
|
+
*
|
290
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
291
|
+
*
|
292
|
+
* @summary 升级云堡垒机实例
|
293
|
+
* @param {UpgradeCbhRequestBody} upgradeCbhInstanceRequestBody UpgradeCbhInstanceRequestBody
|
294
|
+
* @param {*} [options] Override http request option.
|
295
|
+
* @throws {RequiredError}
|
296
|
+
*/
|
297
|
+
upgradeCbhInstance(upgradeCbhInstanceRequest) {
|
298
|
+
const options = (0, exports.ParamCreater)().upgradeCbhInstance(upgradeCbhInstanceRequest);
|
299
|
+
// @ts-ignore
|
300
|
+
options['responseHeaders'] = [''];
|
301
|
+
return this.hcClient.sendRequest(options);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
exports.CbhClient = CbhClient;
|
305
|
+
const ParamCreater = function () {
|
306
|
+
return {
|
307
|
+
/**
|
308
|
+
* 修改云堡垒机实例网络。
|
309
|
+
*
|
310
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
311
|
+
*/
|
312
|
+
changeInstanceNetwork(changeInstanceNetworkRequest) {
|
313
|
+
const options = {
|
314
|
+
method: "POST",
|
315
|
+
url: "/v1/{project_id}/cbs/{server_id}/network/change",
|
316
|
+
contentType: "application/json",
|
317
|
+
queryParams: {},
|
318
|
+
pathParams: {},
|
319
|
+
headers: {},
|
320
|
+
data: {}
|
321
|
+
};
|
322
|
+
const localVarHeaderParameter = {};
|
323
|
+
let body;
|
324
|
+
let serverId;
|
325
|
+
if (changeInstanceNetworkRequest !== null && changeInstanceNetworkRequest !== undefined) {
|
326
|
+
if (changeInstanceNetworkRequest instanceof ChangeInstanceNetworkRequest_1.ChangeInstanceNetworkRequest) {
|
327
|
+
serverId = changeInstanceNetworkRequest.serverId;
|
328
|
+
body = changeInstanceNetworkRequest.body;
|
329
|
+
}
|
330
|
+
else {
|
331
|
+
serverId = changeInstanceNetworkRequest['server_id'];
|
332
|
+
body = changeInstanceNetworkRequest['body'];
|
333
|
+
}
|
334
|
+
}
|
335
|
+
if (serverId === null || serverId === undefined) {
|
336
|
+
throw new RequiredError('serverId', 'Required parameter serverId was null or undefined when calling changeInstanceNetwork.');
|
337
|
+
}
|
338
|
+
if (body === null || body === undefined) {
|
339
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
340
|
+
}
|
341
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
342
|
+
options.data = body !== undefined ? body : {};
|
343
|
+
options.pathParams = { 'server_id': serverId, };
|
344
|
+
options.headers = localVarHeaderParameter;
|
345
|
+
return options;
|
346
|
+
},
|
347
|
+
/**
|
348
|
+
* 创建变更云堡垒机实例订单。(调用此接口前先调用创建变更云堡垒机实例任务接口,当前接口未开放)
|
349
|
+
*
|
350
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
351
|
+
*/
|
352
|
+
changeInstanceOrder(changeInstanceOrderRequest) {
|
353
|
+
const options = {
|
354
|
+
method: "GET",
|
355
|
+
url: "/v1/{project_id}/cbs/{server_id}/alter/{instance_key}",
|
356
|
+
contentType: "application/json",
|
357
|
+
queryParams: {},
|
358
|
+
pathParams: {},
|
359
|
+
headers: {}
|
360
|
+
};
|
361
|
+
const localVarHeaderParameter = {};
|
362
|
+
let serverId;
|
363
|
+
let instanceKey;
|
364
|
+
if (changeInstanceOrderRequest !== null && changeInstanceOrderRequest !== undefined) {
|
365
|
+
if (changeInstanceOrderRequest instanceof ChangeInstanceOrderRequest_1.ChangeInstanceOrderRequest) {
|
366
|
+
serverId = changeInstanceOrderRequest.serverId;
|
367
|
+
instanceKey = changeInstanceOrderRequest.instanceKey;
|
368
|
+
}
|
369
|
+
else {
|
370
|
+
serverId = changeInstanceOrderRequest['server_id'];
|
371
|
+
instanceKey = changeInstanceOrderRequest['instance_key'];
|
372
|
+
}
|
373
|
+
}
|
374
|
+
if (serverId === null || serverId === undefined) {
|
375
|
+
throw new RequiredError('serverId', 'Required parameter serverId was null or undefined when calling changeInstanceOrder.');
|
376
|
+
}
|
377
|
+
if (instanceKey === null || instanceKey === undefined) {
|
378
|
+
throw new RequiredError('instanceKey', 'Required parameter instanceKey was null or undefined when calling changeInstanceOrder.');
|
379
|
+
}
|
380
|
+
options.pathParams = { 'server_id': serverId, 'instance_key': instanceKey, };
|
381
|
+
options.headers = localVarHeaderParameter;
|
382
|
+
return options;
|
383
|
+
},
|
384
|
+
/**
|
385
|
+
* 创建云堡垒机实例。(创建云堡垒机实例订单前,先调用此接口)
|
386
|
+
*
|
387
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
388
|
+
*/
|
389
|
+
createInstance(createInstanceRequest) {
|
390
|
+
const options = {
|
391
|
+
method: "POST",
|
392
|
+
url: "/v1/{project_id}/cbs/instance/create",
|
393
|
+
contentType: "application/json",
|
394
|
+
queryParams: {},
|
395
|
+
pathParams: {},
|
396
|
+
headers: {},
|
397
|
+
data: {}
|
398
|
+
};
|
399
|
+
const localVarHeaderParameter = {};
|
400
|
+
let body;
|
401
|
+
if (createInstanceRequest !== null && createInstanceRequest !== undefined) {
|
402
|
+
if (createInstanceRequest instanceof CreateInstanceRequest_1.CreateInstanceRequest) {
|
403
|
+
body = createInstanceRequest.body;
|
404
|
+
}
|
405
|
+
else {
|
406
|
+
body = createInstanceRequest['body'];
|
407
|
+
}
|
408
|
+
}
|
409
|
+
if (body === null || body === undefined) {
|
410
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
411
|
+
}
|
412
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
413
|
+
options.data = body !== undefined ? body : {};
|
414
|
+
options.headers = localVarHeaderParameter;
|
415
|
+
return options;
|
416
|
+
},
|
417
|
+
/**
|
418
|
+
* 创建云堡垒机实例订单。(调用此接口前先调用创建云堡垒机实例接口)
|
419
|
+
*
|
420
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
421
|
+
*/
|
422
|
+
createInstanceOrder(createInstanceOrderRequest) {
|
423
|
+
const options = {
|
424
|
+
method: "POST",
|
425
|
+
url: "/v1/{project_id}/cbs/period/order",
|
426
|
+
contentType: "application/json",
|
427
|
+
queryParams: {},
|
428
|
+
pathParams: {},
|
429
|
+
headers: {},
|
430
|
+
data: {}
|
431
|
+
};
|
432
|
+
const localVarHeaderParameter = {};
|
433
|
+
let body;
|
434
|
+
if (createInstanceOrderRequest !== null && createInstanceOrderRequest !== undefined) {
|
435
|
+
if (createInstanceOrderRequest instanceof CreateInstanceOrderRequest_1.CreateInstanceOrderRequest) {
|
436
|
+
body = createInstanceOrderRequest.body;
|
437
|
+
}
|
438
|
+
else {
|
439
|
+
body = createInstanceOrderRequest['body'];
|
440
|
+
}
|
441
|
+
}
|
442
|
+
if (body === null || body === undefined) {
|
443
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
444
|
+
}
|
445
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
446
|
+
options.data = body !== undefined ? body : {};
|
447
|
+
options.headers = localVarHeaderParameter;
|
448
|
+
return options;
|
449
|
+
},
|
450
|
+
/**
|
451
|
+
* 云堡垒机实例绑定弹性公网IP
|
452
|
+
*
|
453
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
454
|
+
*/
|
455
|
+
installInstanceEip(installInstanceEipRequest) {
|
456
|
+
const options = {
|
457
|
+
method: "POST",
|
458
|
+
url: "/v1/{project_id}/cbs/instance/{server_id}/eip/bind",
|
459
|
+
contentType: "application/json",
|
460
|
+
queryParams: {},
|
461
|
+
pathParams: {},
|
462
|
+
headers: {},
|
463
|
+
data: {}
|
464
|
+
};
|
465
|
+
const localVarHeaderParameter = {};
|
466
|
+
let body;
|
467
|
+
let serverId;
|
468
|
+
if (installInstanceEipRequest !== null && installInstanceEipRequest !== undefined) {
|
469
|
+
if (installInstanceEipRequest instanceof InstallInstanceEipRequest_1.InstallInstanceEipRequest) {
|
470
|
+
serverId = installInstanceEipRequest.serverId;
|
471
|
+
body = installInstanceEipRequest.body;
|
472
|
+
}
|
473
|
+
else {
|
474
|
+
serverId = installInstanceEipRequest['server_id'];
|
475
|
+
body = installInstanceEipRequest['body'];
|
476
|
+
}
|
477
|
+
}
|
478
|
+
if (serverId === null || serverId === undefined) {
|
479
|
+
throw new RequiredError('serverId', 'Required parameter serverId was null or undefined when calling installInstanceEip.');
|
480
|
+
}
|
481
|
+
if (body === null || body === undefined) {
|
482
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
483
|
+
}
|
484
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
485
|
+
options.data = body !== undefined ? body : {};
|
486
|
+
options.pathParams = { 'server_id': serverId, };
|
487
|
+
options.headers = localVarHeaderParameter;
|
488
|
+
return options;
|
489
|
+
},
|
490
|
+
/**
|
491
|
+
* 获取当前租户下的云堡垒机实例列表。
|
492
|
+
*
|
493
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
494
|
+
*/
|
495
|
+
listCbhInstance() {
|
496
|
+
const options = {
|
497
|
+
method: "GET",
|
498
|
+
url: "/v1/{project_id}/cbs/instance/list",
|
499
|
+
contentType: "application/json",
|
500
|
+
queryParams: {},
|
501
|
+
pathParams: {},
|
502
|
+
headers: {}
|
503
|
+
};
|
504
|
+
const localVarHeaderParameter = {};
|
505
|
+
options.headers = localVarHeaderParameter;
|
506
|
+
return options;
|
507
|
+
},
|
508
|
+
/**
|
509
|
+
* 获取当前租户所选择的可用分区、性能规格所对应的弹性云服务器是否可用。
|
510
|
+
*
|
511
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
512
|
+
*/
|
513
|
+
listQuotaStatus(listQuotaStatusRequest) {
|
514
|
+
const options = {
|
515
|
+
method: "GET",
|
516
|
+
url: "/v1/{project_id}/cbs/instance/ecs-quota",
|
517
|
+
contentType: "application/json",
|
518
|
+
queryParams: {},
|
519
|
+
pathParams: {},
|
520
|
+
headers: {}
|
521
|
+
};
|
522
|
+
const localVarHeaderParameter = {};
|
523
|
+
const localVarQueryParameter = {};
|
524
|
+
let availabilityZone;
|
525
|
+
let resourceSpecCode;
|
526
|
+
if (listQuotaStatusRequest !== null && listQuotaStatusRequest !== undefined) {
|
527
|
+
if (listQuotaStatusRequest instanceof ListQuotaStatusRequest_1.ListQuotaStatusRequest) {
|
528
|
+
availabilityZone = listQuotaStatusRequest.availabilityZone;
|
529
|
+
resourceSpecCode = listQuotaStatusRequest.resourceSpecCode;
|
530
|
+
}
|
531
|
+
else {
|
532
|
+
availabilityZone = listQuotaStatusRequest['availability_zone'];
|
533
|
+
resourceSpecCode = listQuotaStatusRequest['resource_spec_code'];
|
534
|
+
}
|
535
|
+
}
|
536
|
+
if (availabilityZone === null || availabilityZone === undefined) {
|
537
|
+
throw new RequiredError('availabilityZone', 'Required parameter availabilityZone was null or undefined when calling listQuotaStatus.');
|
538
|
+
}
|
539
|
+
if (availabilityZone !== null && availabilityZone !== undefined) {
|
540
|
+
localVarQueryParameter['availability_zone'] = availabilityZone;
|
541
|
+
}
|
542
|
+
if (resourceSpecCode === null || resourceSpecCode === undefined) {
|
543
|
+
throw new RequiredError('resourceSpecCode', 'Required parameter resourceSpecCode was null or undefined when calling listQuotaStatus.');
|
544
|
+
}
|
545
|
+
if (resourceSpecCode !== null && resourceSpecCode !== undefined) {
|
546
|
+
localVarQueryParameter['resource_spec_code'] = resourceSpecCode;
|
547
|
+
}
|
548
|
+
options.queryParams = localVarQueryParameter;
|
549
|
+
options.headers = localVarHeaderParameter;
|
550
|
+
return options;
|
551
|
+
},
|
552
|
+
/**
|
553
|
+
* 重置admin用户多因子认证方式。
|
554
|
+
*
|
555
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
556
|
+
*/
|
557
|
+
resetLoginMethod(resetLoginMethodRequest) {
|
558
|
+
const options = {
|
559
|
+
method: "PUT",
|
560
|
+
url: "/v1/{project_id}/cbs/instance/{server_id}/login-method",
|
561
|
+
contentType: "application/json",
|
562
|
+
queryParams: {},
|
563
|
+
pathParams: {},
|
564
|
+
headers: {}
|
565
|
+
};
|
566
|
+
const localVarHeaderParameter = {};
|
567
|
+
let serverId;
|
568
|
+
if (resetLoginMethodRequest !== null && resetLoginMethodRequest !== undefined) {
|
569
|
+
if (resetLoginMethodRequest instanceof ResetLoginMethodRequest_1.ResetLoginMethodRequest) {
|
570
|
+
serverId = resetLoginMethodRequest.serverId;
|
571
|
+
}
|
572
|
+
else {
|
573
|
+
serverId = resetLoginMethodRequest['server_id'];
|
574
|
+
}
|
575
|
+
}
|
576
|
+
if (serverId === null || serverId === undefined) {
|
577
|
+
throw new RequiredError('serverId', 'Required parameter serverId was null or undefined when calling resetLoginMethod.');
|
578
|
+
}
|
579
|
+
options.pathParams = { 'server_id': serverId, };
|
580
|
+
options.headers = localVarHeaderParameter;
|
581
|
+
return options;
|
582
|
+
},
|
583
|
+
/**
|
584
|
+
* 修改云堡垒机实例web登录admin用户密码。
|
585
|
+
*
|
586
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
587
|
+
*/
|
588
|
+
resetPassword(resetPasswordRequest) {
|
589
|
+
const options = {
|
590
|
+
method: "PUT",
|
591
|
+
url: "/v1/{project_id}/cbs/instance/password",
|
592
|
+
contentType: "application/json",
|
593
|
+
queryParams: {},
|
594
|
+
pathParams: {},
|
595
|
+
headers: {},
|
596
|
+
data: {}
|
597
|
+
};
|
598
|
+
const localVarHeaderParameter = {};
|
599
|
+
let body;
|
600
|
+
if (resetPasswordRequest !== null && resetPasswordRequest !== undefined) {
|
601
|
+
if (resetPasswordRequest instanceof ResetPasswordRequest_1.ResetPasswordRequest) {
|
602
|
+
body = resetPasswordRequest.body;
|
603
|
+
}
|
604
|
+
else {
|
605
|
+
body = resetPasswordRequest['body'];
|
606
|
+
}
|
607
|
+
}
|
608
|
+
if (body === null || body === undefined) {
|
609
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
610
|
+
}
|
611
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
612
|
+
options.data = body !== undefined ? body : {};
|
613
|
+
options.headers = localVarHeaderParameter;
|
614
|
+
return options;
|
615
|
+
},
|
616
|
+
/**
|
617
|
+
* 重启云堡垒机实例。
|
618
|
+
*
|
619
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
620
|
+
*/
|
621
|
+
restartCbhInstance(restartCbhInstanceRequest) {
|
622
|
+
const options = {
|
623
|
+
method: "POST",
|
624
|
+
url: "/v1/{project_id}/cbs/instance/reboot",
|
625
|
+
contentType: "application/json",
|
626
|
+
queryParams: {},
|
627
|
+
pathParams: {},
|
628
|
+
headers: {},
|
629
|
+
data: {}
|
630
|
+
};
|
631
|
+
const localVarHeaderParameter = {};
|
632
|
+
let body;
|
633
|
+
if (restartCbhInstanceRequest !== null && restartCbhInstanceRequest !== undefined) {
|
634
|
+
if (restartCbhInstanceRequest instanceof RestartCbhInstanceRequest_1.RestartCbhInstanceRequest) {
|
635
|
+
body = restartCbhInstanceRequest.body;
|
636
|
+
}
|
637
|
+
else {
|
638
|
+
body = restartCbhInstanceRequest['body'];
|
639
|
+
}
|
640
|
+
}
|
641
|
+
if (body === null || body === undefined) {
|
642
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
643
|
+
}
|
644
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
645
|
+
options.data = body !== undefined ? body : {};
|
646
|
+
options.headers = localVarHeaderParameter;
|
647
|
+
return options;
|
648
|
+
},
|
649
|
+
/**
|
650
|
+
* 查询云堡垒机配额信息。
|
651
|
+
*
|
652
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
653
|
+
*/
|
654
|
+
searchQuota() {
|
655
|
+
const options = {
|
656
|
+
method: "GET",
|
657
|
+
url: "/v1/{project_id}/cbs/instance/quota",
|
658
|
+
contentType: "application/json",
|
659
|
+
queryParams: {},
|
660
|
+
pathParams: {},
|
661
|
+
headers: {}
|
662
|
+
};
|
663
|
+
const localVarHeaderParameter = {};
|
664
|
+
options.headers = localVarHeaderParameter;
|
665
|
+
return options;
|
666
|
+
},
|
667
|
+
/**
|
668
|
+
* 获取云堡垒机服务可用分区信息。
|
669
|
+
*
|
670
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
671
|
+
*/
|
672
|
+
showAvailableZoneInfo() {
|
673
|
+
const options = {
|
674
|
+
method: "GET",
|
675
|
+
url: "/v1/{project_id}/cbs/available-zone",
|
676
|
+
contentType: "application/json",
|
677
|
+
queryParams: {},
|
678
|
+
pathParams: {},
|
679
|
+
headers: {}
|
680
|
+
};
|
681
|
+
const localVarHeaderParameter = {};
|
682
|
+
options.headers = localVarHeaderParameter;
|
683
|
+
return options;
|
684
|
+
},
|
685
|
+
/**
|
686
|
+
* 检查云堡垒机实例网络信息。
|
687
|
+
*
|
688
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
689
|
+
*/
|
690
|
+
showNetworkConfiguration(showNetworkConfigurationRequest) {
|
691
|
+
const options = {
|
692
|
+
method: "POST",
|
693
|
+
url: "/v1/{project_id}/cbs/network/configuration",
|
694
|
+
contentType: "application/json",
|
695
|
+
queryParams: {},
|
696
|
+
pathParams: {},
|
697
|
+
headers: {},
|
698
|
+
data: {}
|
699
|
+
};
|
700
|
+
const localVarHeaderParameter = {};
|
701
|
+
let body;
|
702
|
+
if (showNetworkConfigurationRequest !== null && showNetworkConfigurationRequest !== undefined) {
|
703
|
+
if (showNetworkConfigurationRequest instanceof ShowNetworkConfigurationRequest_1.ShowNetworkConfigurationRequest) {
|
704
|
+
body = showNetworkConfigurationRequest.body;
|
705
|
+
}
|
706
|
+
else {
|
707
|
+
body = showNetworkConfigurationRequest['body'];
|
708
|
+
}
|
709
|
+
}
|
710
|
+
if (body === null || body === undefined) {
|
711
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
712
|
+
}
|
713
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
714
|
+
options.data = body !== undefined ? body : {};
|
715
|
+
options.headers = localVarHeaderParameter;
|
716
|
+
return options;
|
717
|
+
},
|
718
|
+
/**
|
719
|
+
* 启动云堡垒机实例。
|
720
|
+
*
|
721
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
722
|
+
*/
|
723
|
+
startCbhInstance(startCbhInstanceRequest) {
|
724
|
+
const options = {
|
725
|
+
method: "POST",
|
726
|
+
url: "/v1/{project_id}/cbs/instance/start",
|
727
|
+
contentType: "application/json",
|
728
|
+
queryParams: {},
|
729
|
+
pathParams: {},
|
730
|
+
headers: {},
|
731
|
+
data: {}
|
732
|
+
};
|
733
|
+
const localVarHeaderParameter = {};
|
734
|
+
let body;
|
735
|
+
if (startCbhInstanceRequest !== null && startCbhInstanceRequest !== undefined) {
|
736
|
+
if (startCbhInstanceRequest instanceof StartCbhInstanceRequest_1.StartCbhInstanceRequest) {
|
737
|
+
body = startCbhInstanceRequest.body;
|
738
|
+
}
|
739
|
+
else {
|
740
|
+
body = startCbhInstanceRequest['body'];
|
741
|
+
}
|
742
|
+
}
|
743
|
+
if (body === null || body === undefined) {
|
744
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
745
|
+
}
|
746
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
747
|
+
options.data = body !== undefined ? body : {};
|
748
|
+
options.headers = localVarHeaderParameter;
|
749
|
+
return options;
|
750
|
+
},
|
751
|
+
/**
|
752
|
+
* 关闭云堡垒机实例。
|
753
|
+
*
|
754
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
755
|
+
*/
|
756
|
+
stopCbhInstance(stopCbhInstanceRequest) {
|
757
|
+
const options = {
|
758
|
+
method: "POST",
|
759
|
+
url: "/v1/{project_id}/cbs/instance/stop",
|
760
|
+
contentType: "application/json",
|
761
|
+
queryParams: {},
|
762
|
+
pathParams: {},
|
763
|
+
headers: {},
|
764
|
+
data: {}
|
765
|
+
};
|
766
|
+
const localVarHeaderParameter = {};
|
767
|
+
let body;
|
768
|
+
if (stopCbhInstanceRequest !== null && stopCbhInstanceRequest !== undefined) {
|
769
|
+
if (stopCbhInstanceRequest instanceof StopCbhInstanceRequest_1.StopCbhInstanceRequest) {
|
770
|
+
body = stopCbhInstanceRequest.body;
|
771
|
+
}
|
772
|
+
else {
|
773
|
+
body = stopCbhInstanceRequest['body'];
|
774
|
+
}
|
775
|
+
}
|
776
|
+
if (body === null || body === undefined) {
|
777
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
778
|
+
}
|
779
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
780
|
+
options.data = body !== undefined ? body : {};
|
781
|
+
options.headers = localVarHeaderParameter;
|
782
|
+
return options;
|
783
|
+
},
|
784
|
+
/**
|
785
|
+
* 云堡垒机实例解绑弹性公网IP。
|
786
|
+
*
|
787
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
788
|
+
*/
|
789
|
+
uninstallInstanceEip(uninstallInstanceEipRequest) {
|
790
|
+
const options = {
|
791
|
+
method: "POST",
|
792
|
+
url: "/v1/{project_id}/cbs/instance/{server_id}/eip/unbind",
|
793
|
+
contentType: "application/json",
|
794
|
+
queryParams: {},
|
795
|
+
pathParams: {},
|
796
|
+
headers: {},
|
797
|
+
data: {}
|
798
|
+
};
|
799
|
+
const localVarHeaderParameter = {};
|
800
|
+
let body;
|
801
|
+
let serverId;
|
802
|
+
if (uninstallInstanceEipRequest !== null && uninstallInstanceEipRequest !== undefined) {
|
803
|
+
if (uninstallInstanceEipRequest instanceof UninstallInstanceEipRequest_1.UninstallInstanceEipRequest) {
|
804
|
+
serverId = uninstallInstanceEipRequest.serverId;
|
805
|
+
body = uninstallInstanceEipRequest.body;
|
806
|
+
}
|
807
|
+
else {
|
808
|
+
serverId = uninstallInstanceEipRequest['server_id'];
|
809
|
+
body = uninstallInstanceEipRequest['body'];
|
810
|
+
}
|
811
|
+
}
|
812
|
+
if (serverId === null || serverId === undefined) {
|
813
|
+
throw new RequiredError('serverId', 'Required parameter serverId was null or undefined when calling uninstallInstanceEip.');
|
814
|
+
}
|
815
|
+
if (body === null || body === undefined) {
|
816
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
817
|
+
}
|
818
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
819
|
+
options.data = body !== undefined ? body : {};
|
820
|
+
options.pathParams = { 'server_id': serverId, };
|
821
|
+
options.headers = localVarHeaderParameter;
|
822
|
+
return options;
|
823
|
+
},
|
824
|
+
/**
|
825
|
+
* 升级云堡垒机实例
|
826
|
+
*
|
827
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
828
|
+
*/
|
829
|
+
upgradeCbhInstance(upgradeCbhInstanceRequest) {
|
830
|
+
const options = {
|
831
|
+
method: "POST",
|
832
|
+
url: "/v1/{project_id}/cbs/instance/upgrade",
|
833
|
+
contentType: "application/json",
|
834
|
+
queryParams: {},
|
835
|
+
pathParams: {},
|
836
|
+
headers: {},
|
837
|
+
data: {}
|
838
|
+
};
|
839
|
+
const localVarHeaderParameter = {};
|
840
|
+
let body;
|
841
|
+
if (upgradeCbhInstanceRequest !== null && upgradeCbhInstanceRequest !== undefined) {
|
842
|
+
if (upgradeCbhInstanceRequest instanceof UpgradeCbhInstanceRequest_1.UpgradeCbhInstanceRequest) {
|
843
|
+
body = upgradeCbhInstanceRequest.body;
|
844
|
+
}
|
845
|
+
else {
|
846
|
+
body = upgradeCbhInstanceRequest['body'];
|
847
|
+
}
|
848
|
+
}
|
849
|
+
if (body === null || body === undefined) {
|
850
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
851
|
+
}
|
852
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
853
|
+
options.data = body !== undefined ? body : {};
|
854
|
+
options.headers = localVarHeaderParameter;
|
855
|
+
return options;
|
856
|
+
},
|
857
|
+
};
|
858
|
+
};
|
859
|
+
exports.ParamCreater = ParamCreater;
|
860
|
+
function newClient(client) {
|
861
|
+
return new CbhClient(client);
|
862
|
+
}
|
863
|
+
/**
|
864
|
+
*
|
865
|
+
* @export
|
866
|
+
* @class RequiredError
|
867
|
+
* @extends {Error}
|
868
|
+
*/
|
869
|
+
class RequiredError extends Error {
|
870
|
+
constructor(field, msg) {
|
871
|
+
super(msg);
|
872
|
+
this.field = field;
|
873
|
+
this.name = "RequiredError";
|
874
|
+
}
|
875
|
+
}
|
876
|
+
exports.RequiredError = RequiredError;
|
877
|
+
//# sourceMappingURL=CbhClient.js.map
|