@huaweicloud/huaweicloud-sdk-codeartsdeploy 3.1.44
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/LICENSE +13 -0
- package/README.md +1 -0
- package/huaweicloud-sdk-codeartsdeploy.d.ts +2 -0
- package/huaweicloud-sdk-codeartsdeploy.js +31 -0
- package/package.json +19 -0
- package/v2/CodeArtsDeployClient.d.ts +538 -0
- package/v2/CodeArtsDeployClient.js +1270 -0
- package/v2/CodeArtsDeployRegion.d.ts +12 -0
- package/v2/CodeArtsDeployRegion.js +37 -0
- package/v2/model/AppComponentDao.d.ts +31 -0
- package/v2/model/AppComponentDao.js +101 -0
- package/v2/model/ConfigInfoDO.d.ts +40 -0
- package/v2/model/ConfigInfoDO.js +77 -0
- package/v2/model/CreateDeployTaskByTemplateRequest.d.ts +18 -0
- package/v2/model/CreateDeployTaskByTemplateRequest.js +37 -0
- package/v2/model/CreateDeployTaskByTemplateResponse.d.ts +12 -0
- package/v2/model/CreateDeployTaskByTemplateResponse.js +55 -0
- package/v2/model/CreateDeploymentGroupRequest.d.ts +18 -0
- package/v2/model/CreateDeploymentGroupRequest.js +37 -0
- package/v2/model/CreateDeploymentGroupResponse.d.ts +8 -0
- package/v2/model/CreateDeploymentGroupResponse.js +41 -0
- package/v2/model/CreateDeploymentHostRequest.d.ts +22 -0
- package/v2/model/CreateDeploymentHostRequest.js +52 -0
- package/v2/model/CreateDeploymentHostResponse.d.ts +8 -0
- package/v2/model/CreateDeploymentHostResponse.js +41 -0
- package/v2/model/DeleteDeployTaskRequest.d.ts +19 -0
- package/v2/model/DeleteDeployTaskRequest.js +48 -0
- package/v2/model/DeleteDeployTaskResponse.d.ts +8 -0
- package/v2/model/DeleteDeployTaskResponse.js +41 -0
- package/v2/model/DeleteDeploymentGroupRequest.d.ts +19 -0
- package/v2/model/DeleteDeploymentGroupRequest.js +48 -0
- package/v2/model/DeleteDeploymentGroupResponse.d.ts +8 -0
- package/v2/model/DeleteDeploymentGroupResponse.js +41 -0
- package/v2/model/DeleteDeploymentHostRequest.d.ts +23 -0
- package/v2/model/DeleteDeploymentHostRequest.js +63 -0
- package/v2/model/DeleteDeploymentHostResponse.d.ts +8 -0
- package/v2/model/DeleteDeploymentHostResponse.js +41 -0
- package/v2/model/DeploymentGroup.d.ts +33 -0
- package/v2/model/DeploymentGroup.js +90 -0
- package/v2/model/DeploymentGroupDetail.d.ts +61 -0
- package/v2/model/DeploymentGroupDetail.js +193 -0
- package/v2/model/DeploymentGroupUpdateRequest.d.ts +24 -0
- package/v2/model/DeploymentGroupUpdateRequest.js +56 -0
- package/v2/model/DeploymentHost.d.ts +36 -0
- package/v2/model/DeploymentHost.js +96 -0
- package/v2/model/DeploymentHostAuthorizationBody.d.ts +23 -0
- package/v2/model/DeploymentHostAuthorizationBody.js +56 -0
- package/v2/model/DeploymentHostDetail.d.ts +103 -0
- package/v2/model/DeploymentHostDetail.js +325 -0
- package/v2/model/DeploymentHostInfo.d.ts +40 -0
- package/v2/model/DeploymentHostInfo.js +111 -0
- package/v2/model/DeploymentHostRequest.d.ts +28 -0
- package/v2/model/DeploymentHostRequest.js +86 -0
- package/v2/model/DeploymentUpdateHost.d.ts +26 -0
- package/v2/model/DeploymentUpdateHost.js +82 -0
- package/v2/model/DynamicConfigInfo.d.ts +19 -0
- package/v2/model/DynamicConfigInfo.js +32 -0
- package/v2/model/EnvExecutionBody.d.ts +14 -0
- package/v2/model/EnvExecutionBody.js +41 -0
- package/v2/model/ExecuteRecordV2Body.d.ts +29 -0
- package/v2/model/ExecuteRecordV2Body.js +85 -0
- package/v2/model/KeyValueDO.d.ts +7 -0
- package/v2/model/KeyValueDO.js +17 -0
- package/v2/model/ListDeployTaskHistoryByDateRequest.d.ts +33 -0
- package/v2/model/ListDeployTaskHistoryByDateRequest.js +93 -0
- package/v2/model/ListDeployTaskHistoryByDateResponse.d.ts +11 -0
- package/v2/model/ListDeployTaskHistoryByDateResponse.js +45 -0
- package/v2/model/ListDeployTasksRequest.d.ts +23 -0
- package/v2/model/ListDeployTasksRequest.js +58 -0
- package/v2/model/ListDeployTasksResponse.d.ts +11 -0
- package/v2/model/ListDeployTasksResponse.js +45 -0
- package/v2/model/ListHostGroupsRequest.d.ts +43 -0
- package/v2/model/ListHostGroupsRequest.js +100 -0
- package/v2/model/ListHostGroupsResponse.d.ts +11 -0
- package/v2/model/ListHostGroupsResponse.js +45 -0
- package/v2/model/ListHostsRequest.d.ts +37 -0
- package/v2/model/ListHostsRequest.js +101 -0
- package/v2/model/ListHostsResponse.d.ts +13 -0
- package/v2/model/ListHostsResponse.js +49 -0
- package/v2/model/ListTaskSuccessRateRequest.d.ts +10 -0
- package/v2/model/ListTaskSuccessRateRequest.js +28 -0
- package/v2/model/ListTaskSuccessRateResponse.d.ts +25 -0
- package/v2/model/ListTaskSuccessRateResponse.js +97 -0
- package/v2/model/ParamTypeLimits.d.ts +5 -0
- package/v2/model/ParamTypeLimits.js +13 -0
- package/v2/model/PermissionGroupDetail.d.ts +23 -0
- package/v2/model/PermissionGroupDetail.js +79 -0
- package/v2/model/PermissionHostDetail.d.ts +23 -0
- package/v2/model/PermissionHostDetail.js +79 -0
- package/v2/model/ShowDeployTaskDetailRequest.d.ts +7 -0
- package/v2/model/ShowDeployTaskDetailRequest.js +24 -0
- package/v2/model/ShowDeployTaskDetailResponse.d.ts +140 -0
- package/v2/model/ShowDeployTaskDetailResponse.js +442 -0
- package/v2/model/ShowDeploymentGroupDetailRequest.d.ts +7 -0
- package/v2/model/ShowDeploymentGroupDetailRequest.js +24 -0
- package/v2/model/ShowDeploymentGroupDetailResponse.d.ts +62 -0
- package/v2/model/ShowDeploymentGroupDetailResponse.js +211 -0
- package/v2/model/ShowDeploymentHostDetailRequest.d.ts +11 -0
- package/v2/model/ShowDeploymentHostDetailRequest.js +39 -0
- package/v2/model/ShowDeploymentHostDetailResponse.d.ts +105 -0
- package/v2/model/ShowDeploymentHostDetailResponse.js +344 -0
- package/v2/model/ShowProjectSuccessRateRequest.d.ts +15 -0
- package/v2/model/ShowProjectSuccessRateRequest.js +54 -0
- package/v2/model/ShowProjectSuccessRateResponse.d.ts +36 -0
- package/v2/model/ShowProjectSuccessRateResponse.js +139 -0
- package/v2/model/StartDeployTaskRequest.d.ts +22 -0
- package/v2/model/StartDeployTaskRequest.js +52 -0
- package/v2/model/StartDeployTaskResponse.d.ts +19 -0
- package/v2/model/StartDeployTaskResponse.js +73 -0
- package/v2/model/Step.d.ts +15 -0
- package/v2/model/Step.js +25 -0
- package/v2/model/TaskInfo.d.ts +139 -0
- package/v2/model/TaskInfo.js +424 -0
- package/v2/model/TaskSuccessRate.d.ts +23 -0
- package/v2/model/TaskSuccessRate.js +79 -0
- package/v2/model/TasksSuccessRateQuery.d.ts +15 -0
- package/v2/model/TasksSuccessRateQuery.js +54 -0
- package/v2/model/TemplateTaskRequestBody.d.ts +26 -0
- package/v2/model/TemplateTaskRequestBody.js +87 -0
- package/v2/model/UpdateDeploymentGroupRequest.d.ts +22 -0
- package/v2/model/UpdateDeploymentGroupRequest.js +52 -0
- package/v2/model/UpdateDeploymentGroupResponse.d.ts +8 -0
- package/v2/model/UpdateDeploymentGroupResponse.js +41 -0
- package/v2/model/UpdateDeploymentHostRequest.d.ts +26 -0
- package/v2/model/UpdateDeploymentHostRequest.js +67 -0
- package/v2/model/UpdateDeploymentHostResponse.d.ts +8 -0
- package/v2/model/UpdateDeploymentHostResponse.js +41 -0
- package/v2/model/UserInfo.d.ts +11 -0
- package/v2/model/UserInfo.js +37 -0
- package/v2/public-api.d.ts +62 -0
- package/v2/public-api.js +78 -0
|
@@ -0,0 +1,1270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RequiredError = exports.ParamCreater = exports.CodeArtsDeployClient = void 0;
|
|
19
|
+
var ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
|
|
20
|
+
var CreateDeployTaskByTemplateRequest_1 = require("./model/CreateDeployTaskByTemplateRequest");
|
|
21
|
+
var CreateDeploymentGroupRequest_1 = require("./model/CreateDeploymentGroupRequest");
|
|
22
|
+
var CreateDeploymentHostRequest_1 = require("./model/CreateDeploymentHostRequest");
|
|
23
|
+
var DeleteDeployTaskRequest_1 = require("./model/DeleteDeployTaskRequest");
|
|
24
|
+
var DeleteDeploymentGroupRequest_1 = require("./model/DeleteDeploymentGroupRequest");
|
|
25
|
+
var DeleteDeploymentHostRequest_1 = require("./model/DeleteDeploymentHostRequest");
|
|
26
|
+
var ListDeployTaskHistoryByDateRequest_1 = require("./model/ListDeployTaskHistoryByDateRequest");
|
|
27
|
+
var ListDeployTasksRequest_1 = require("./model/ListDeployTasksRequest");
|
|
28
|
+
var ListHostGroupsRequest_1 = require("./model/ListHostGroupsRequest");
|
|
29
|
+
var ListHostsRequest_1 = require("./model/ListHostsRequest");
|
|
30
|
+
var ListTaskSuccessRateRequest_1 = require("./model/ListTaskSuccessRateRequest");
|
|
31
|
+
var ShowDeployTaskDetailRequest_1 = require("./model/ShowDeployTaskDetailRequest");
|
|
32
|
+
var ShowDeploymentGroupDetailRequest_1 = require("./model/ShowDeploymentGroupDetailRequest");
|
|
33
|
+
var ShowDeploymentHostDetailRequest_1 = require("./model/ShowDeploymentHostDetailRequest");
|
|
34
|
+
var ShowProjectSuccessRateRequest_1 = require("./model/ShowProjectSuccessRateRequest");
|
|
35
|
+
var StartDeployTaskRequest_1 = require("./model/StartDeployTaskRequest");
|
|
36
|
+
var UpdateDeploymentGroupRequest_1 = require("./model/UpdateDeploymentGroupRequest");
|
|
37
|
+
var UpdateDeploymentHostRequest_1 = require("./model/UpdateDeploymentHostRequest");
|
|
38
|
+
var CodeArtsDeployClient = /** @class */ (function () {
|
|
39
|
+
function CodeArtsDeployClient(client) {
|
|
40
|
+
this.hcClient = client;
|
|
41
|
+
}
|
|
42
|
+
CodeArtsDeployClient.newBuilder = function () {
|
|
43
|
+
return new ClientBuilder_1.ClientBuilder(newClient);
|
|
44
|
+
};
|
|
45
|
+
CodeArtsDeployClient.prototype.getPath = function () {
|
|
46
|
+
return __dirname;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 通过模板新建应用。
|
|
50
|
+
*
|
|
51
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
52
|
+
*
|
|
53
|
+
* @summary 通过模板新建应用
|
|
54
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
55
|
+
* @param {TemplateTaskRequestBody} createDeployTaskByTemplateRequestBody Body参数
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
*/
|
|
59
|
+
CodeArtsDeployClient.prototype.createDeployTaskByTemplate = function (createDeployTaskByTemplateRequest) {
|
|
60
|
+
var options = (0, exports.ParamCreater)().createDeployTaskByTemplate(createDeployTaskByTemplateRequest);
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
options['responseHeaders'] = [''];
|
|
63
|
+
return this.hcClient.sendRequest(options);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 根据部署任务id删除应用。
|
|
67
|
+
*
|
|
68
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
69
|
+
*
|
|
70
|
+
* @summary 删除应用
|
|
71
|
+
* @param {string} taskId 部署任务id
|
|
72
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
CodeArtsDeployClient.prototype.deleteDeployTask = function (deleteDeployTaskRequest) {
|
|
77
|
+
var options = (0, exports.ParamCreater)().deleteDeployTask(deleteDeployTaskRequest);
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
options['responseHeaders'] = [''];
|
|
80
|
+
return this.hcClient.sendRequest(options);
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* 根据开始时间和结束时间查询项目下指定应用的历史部署记录列表
|
|
84
|
+
*
|
|
85
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
86
|
+
*
|
|
87
|
+
* @summary 根据开始时间和结束时间查询项目下指定应用的历史部署记录列表
|
|
88
|
+
* @param {string} projectId 项目ID
|
|
89
|
+
* @param {string} id 任务ID
|
|
90
|
+
* @param {number} page 分页页码, 表示从此页开始查询, page大于等于1
|
|
91
|
+
* @param {number} size 每页显示的条目数量,size小于等于100
|
|
92
|
+
* @param {string} startDate 区间开始时间,格式yyyy-MM-dd。 开始时间和结束时间间隔不能超过30天
|
|
93
|
+
* @param {string} endDate 区间结束时间,格式yyyy-MM-dd。 开始时间和结束时间间隔不能超过30天
|
|
94
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
*/
|
|
98
|
+
CodeArtsDeployClient.prototype.listDeployTaskHistoryByDate = function (listDeployTaskHistoryByDateRequest) {
|
|
99
|
+
var options = (0, exports.ParamCreater)().listDeployTaskHistoryByDate(listDeployTaskHistoryByDateRequest);
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
options['responseHeaders'] = [''];
|
|
102
|
+
return this.hcClient.sendRequest(options);
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 查询项目下应用列表
|
|
106
|
+
*
|
|
107
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
108
|
+
*
|
|
109
|
+
* @summary 获取应用列表
|
|
110
|
+
* @param {string} projectId 项目ID
|
|
111
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
112
|
+
* @param {number} page 分页页码, 表示从此页开始查询, page大于等于1
|
|
113
|
+
* @param {number} size 每页显示的条目数量,size小于等于100
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
CodeArtsDeployClient.prototype.listDeployTasks = function (listDeployTasksRequest) {
|
|
118
|
+
var options = (0, exports.ParamCreater)().listDeployTasks(listDeployTasksRequest);
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
options['responseHeaders'] = [''];
|
|
121
|
+
return this.hcClient.sendRequest(options);
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* 根据部署任务id获取应用详情。
|
|
125
|
+
*
|
|
126
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
127
|
+
*
|
|
128
|
+
* @summary 获取应用详情
|
|
129
|
+
* @param {string} taskId 部署任务id
|
|
130
|
+
* @param {*} [options] Override http request option.
|
|
131
|
+
* @throws {RequiredError}
|
|
132
|
+
*/
|
|
133
|
+
CodeArtsDeployClient.prototype.showDeployTaskDetail = function (showDeployTaskDetailRequest) {
|
|
134
|
+
var options = (0, exports.ParamCreater)().showDeployTaskDetail(showDeployTaskDetailRequest);
|
|
135
|
+
// @ts-ignore
|
|
136
|
+
options['responseHeaders'] = [''];
|
|
137
|
+
return this.hcClient.sendRequest(options);
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* 根据部署任务id部署应用。
|
|
141
|
+
*
|
|
142
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
143
|
+
*
|
|
144
|
+
* @summary 部署应用
|
|
145
|
+
* @param {string} taskId 部署任务id
|
|
146
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
147
|
+
* @param {EnvExecutionBody} startDeployTaskRequestBody 启动参数
|
|
148
|
+
* @param {*} [options] Override http request option.
|
|
149
|
+
* @throws {RequiredError}
|
|
150
|
+
*/
|
|
151
|
+
CodeArtsDeployClient.prototype.startDeployTask = function (startDeployTaskRequest) {
|
|
152
|
+
var options = (0, exports.ParamCreater)().startDeployTask(startDeployTaskRequest);
|
|
153
|
+
// @ts-ignore
|
|
154
|
+
options['responseHeaders'] = [''];
|
|
155
|
+
return this.hcClient.sendRequest(options);
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* 在指定主机集群下新建主机。
|
|
159
|
+
*
|
|
160
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
161
|
+
*
|
|
162
|
+
* @summary 新建主机
|
|
163
|
+
* @param {string} groupId 主机集群id
|
|
164
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
165
|
+
* @param {DeploymentHost} createDeploymentHostRequestBody 创建主机请求体
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
CodeArtsDeployClient.prototype.createDeploymentHost = function (createDeploymentHostRequest) {
|
|
170
|
+
var options = (0, exports.ParamCreater)().createDeploymentHost(createDeploymentHostRequest);
|
|
171
|
+
// @ts-ignore
|
|
172
|
+
options['responseHeaders'] = [''];
|
|
173
|
+
return this.hcClient.sendRequest(options);
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* 根据主机id删除主机。
|
|
177
|
+
*
|
|
178
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
179
|
+
*
|
|
180
|
+
* @summary 删除主机
|
|
181
|
+
* @param {string} groupId 主机集群id
|
|
182
|
+
* @param {string} hostId 主机id
|
|
183
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
*/
|
|
187
|
+
CodeArtsDeployClient.prototype.deleteDeploymentHost = function (deleteDeploymentHostRequest) {
|
|
188
|
+
var options = (0, exports.ParamCreater)().deleteDeploymentHost(deleteDeploymentHostRequest);
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
options['responseHeaders'] = [''];
|
|
191
|
+
return this.hcClient.sendRequest(options);
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* 根据主机集群id查询指定主机集群下的主机列表。
|
|
195
|
+
*
|
|
196
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
197
|
+
*
|
|
198
|
+
* @summary 查询主机列表
|
|
199
|
+
* @param {string} groupId 主机集群id
|
|
200
|
+
* @param {boolean} [asProxy] 是否为代理机
|
|
201
|
+
* @param {number} [offset] 偏移量,表示从此偏移量开始查询,offset大于等于0
|
|
202
|
+
* @param {number} [limit] 每页显示的条目数量,默认为1000
|
|
203
|
+
* @param {string} [name] 主机名,可输入中英文,数字和符号(-_.)
|
|
204
|
+
* @param {string} [sortKey] 排序字段,支持:AS_PROXY|HOST_NAME|OS|OWNER_NAME|as_proxy|host_name|os|owner_name|nickName。不填默认为:as_proxy
|
|
205
|
+
* @param {'DESC' | 'ASC'} [sortDir] 排序方式,默认为:DESC。DESC:降序排序。ASC:升序排序
|
|
206
|
+
* @param {boolean} [withAuth] 返回结果是否加密
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
*/
|
|
210
|
+
CodeArtsDeployClient.prototype.listHosts = function (listHostsRequest) {
|
|
211
|
+
var options = (0, exports.ParamCreater)().listHosts(listHostsRequest);
|
|
212
|
+
// @ts-ignore
|
|
213
|
+
options['responseHeaders'] = [''];
|
|
214
|
+
return this.hcClient.sendRequest(options);
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* 根据主机id查询主机详情。
|
|
218
|
+
*
|
|
219
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
220
|
+
*
|
|
221
|
+
* @summary 查询主机详情
|
|
222
|
+
* @param {string} groupId 主机集群id
|
|
223
|
+
* @param {string} hostId 主机id
|
|
224
|
+
* @param {*} [options] Override http request option.
|
|
225
|
+
* @throws {RequiredError}
|
|
226
|
+
*/
|
|
227
|
+
CodeArtsDeployClient.prototype.showDeploymentHostDetail = function (showDeploymentHostDetailRequest) {
|
|
228
|
+
var options = (0, exports.ParamCreater)().showDeploymentHostDetail(showDeploymentHostDetailRequest);
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
options['responseHeaders'] = [''];
|
|
231
|
+
return this.hcClient.sendRequest(options);
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* 根据主机id修改主机信息。
|
|
235
|
+
*
|
|
236
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
237
|
+
*
|
|
238
|
+
* @summary 修改主机
|
|
239
|
+
* @param {string} groupId 主机集群id
|
|
240
|
+
* @param {string} hostId 主机id
|
|
241
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
242
|
+
* @param {DeploymentHostRequest} updateDeploymentHostRequestBody 更新主机请求体
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
246
|
+
CodeArtsDeployClient.prototype.updateDeploymentHost = function (updateDeploymentHostRequest) {
|
|
247
|
+
var options = (0, exports.ParamCreater)().updateDeploymentHost(updateDeploymentHostRequest);
|
|
248
|
+
// @ts-ignore
|
|
249
|
+
options['responseHeaders'] = [''];
|
|
250
|
+
return this.hcClient.sendRequest(options);
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* 在项目下新建主机集群。
|
|
254
|
+
*
|
|
255
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
256
|
+
*
|
|
257
|
+
* @summary 新建主机集群
|
|
258
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
259
|
+
* @param {DeploymentGroup} createDeploymentGroupRequestBody 创建主机集群请求体
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
CodeArtsDeployClient.prototype.createDeploymentGroup = function (createDeploymentGroupRequest) {
|
|
264
|
+
var options = (0, exports.ParamCreater)().createDeploymentGroup(createDeploymentGroupRequest);
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
options['responseHeaders'] = [''];
|
|
267
|
+
return this.hcClient.sendRequest(options);
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* 根据主机集群id删除主机集群。
|
|
271
|
+
*
|
|
272
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
273
|
+
*
|
|
274
|
+
* @summary 删除主机集群
|
|
275
|
+
* @param {string} groupId 主机集群id
|
|
276
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
280
|
+
CodeArtsDeployClient.prototype.deleteDeploymentGroup = function (deleteDeploymentGroupRequest) {
|
|
281
|
+
var options = (0, exports.ParamCreater)().deleteDeploymentGroup(deleteDeploymentGroupRequest);
|
|
282
|
+
// @ts-ignore
|
|
283
|
+
options['responseHeaders'] = [''];
|
|
284
|
+
return this.hcClient.sendRequest(options);
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* 按条件查询主机集群列表。
|
|
288
|
+
*
|
|
289
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
290
|
+
*
|
|
291
|
+
* @summary 查询主机集群列表
|
|
292
|
+
* @param {string} regionName 局点信息
|
|
293
|
+
* @param {string} [projectId] 项目ID
|
|
294
|
+
* @param {'windows' | 'linux'} [os] 操作系统:windows|linux
|
|
295
|
+
* @param {number} [offset] 偏移量,表示从此偏移量开始查询,offset大于等于0
|
|
296
|
+
* @param {number} [limit] 每页显示的条目数量,默认为1000
|
|
297
|
+
* @param {string} [name] 主机集群名
|
|
298
|
+
* @param {string} [sortKey] 排序字段:nickName|NAME|OWNER_NAME|CREATE_TIME|name|owner_name|create_time,不传使用默认排序
|
|
299
|
+
* @param {'DESC' | 'ASC'} [sortDir] 排序方式:DESC、ASC,默认为DESC
|
|
300
|
+
* @param {*} [options] Override http request option.
|
|
301
|
+
* @throws {RequiredError}
|
|
302
|
+
*/
|
|
303
|
+
CodeArtsDeployClient.prototype.listHostGroups = function (listHostGroupsRequest) {
|
|
304
|
+
var options = (0, exports.ParamCreater)().listHostGroups(listHostGroupsRequest);
|
|
305
|
+
// @ts-ignore
|
|
306
|
+
options['responseHeaders'] = [''];
|
|
307
|
+
return this.hcClient.sendRequest(options);
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* 根据主机集群id查询主机集群详情。
|
|
311
|
+
*
|
|
312
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
313
|
+
*
|
|
314
|
+
* @summary 查询主机集群
|
|
315
|
+
* @param {string} groupId 主机集群id
|
|
316
|
+
* @param {*} [options] Override http request option.
|
|
317
|
+
* @throws {RequiredError}
|
|
318
|
+
*/
|
|
319
|
+
CodeArtsDeployClient.prototype.showDeploymentGroupDetail = function (showDeploymentGroupDetailRequest) {
|
|
320
|
+
var options = (0, exports.ParamCreater)().showDeploymentGroupDetail(showDeploymentGroupDetailRequest);
|
|
321
|
+
// @ts-ignore
|
|
322
|
+
options['responseHeaders'] = [''];
|
|
323
|
+
return this.hcClient.sendRequest(options);
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* 根据主机集群id修改主机集群信息。
|
|
327
|
+
*
|
|
328
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
329
|
+
*
|
|
330
|
+
* @summary 修改主机集群
|
|
331
|
+
* @param {string} groupId 主机集群ID
|
|
332
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
333
|
+
* @param {DeploymentGroupUpdateRequest} updateDeploymentGroupRequestBody 主机集群请求体
|
|
334
|
+
* @param {*} [options] Override http request option.
|
|
335
|
+
* @throws {RequiredError}
|
|
336
|
+
*/
|
|
337
|
+
CodeArtsDeployClient.prototype.updateDeploymentGroup = function (updateDeploymentGroupRequest) {
|
|
338
|
+
var options = (0, exports.ParamCreater)().updateDeploymentGroup(updateDeploymentGroupRequest);
|
|
339
|
+
// @ts-ignore
|
|
340
|
+
options['responseHeaders'] = [''];
|
|
341
|
+
return this.hcClient.sendRequest(options);
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* 获取指定应用的应用部署成功率
|
|
345
|
+
*
|
|
346
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
347
|
+
*
|
|
348
|
+
* @summary 获取指定应用的应用部署成功率
|
|
349
|
+
* @param {string} projectId 项目ID
|
|
350
|
+
* @param {TasksSuccessRateQuery} listTaskSuccessRateRequestBody 应用部署成功率接口请求参数
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
CodeArtsDeployClient.prototype.listTaskSuccessRate = function (listTaskSuccessRateRequest) {
|
|
355
|
+
var options = (0, exports.ParamCreater)().listTaskSuccessRate(listTaskSuccessRateRequest);
|
|
356
|
+
// @ts-ignore
|
|
357
|
+
options['responseHeaders'] = [''];
|
|
358
|
+
return this.hcClient.sendRequest(options);
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* 获取指定项目的应用部署成功率
|
|
362
|
+
*
|
|
363
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
364
|
+
*
|
|
365
|
+
* @summary 获取指定项目的应用部署成功率
|
|
366
|
+
* @param {string} projectId 项目ID
|
|
367
|
+
* @param {string} startDate 部署应用开始时间范围的左边界(包含),格式yyyy-MM-dd
|
|
368
|
+
* @param {string} endDate 部署应用开始时间范围的右边界(包含),格式yyyy-MM-dd 。最大时间范围为1年。
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
CodeArtsDeployClient.prototype.showProjectSuccessRate = function (showProjectSuccessRateRequest) {
|
|
373
|
+
var options = (0, exports.ParamCreater)().showProjectSuccessRate(showProjectSuccessRateRequest);
|
|
374
|
+
// @ts-ignore
|
|
375
|
+
options['responseHeaders'] = [''];
|
|
376
|
+
return this.hcClient.sendRequest(options);
|
|
377
|
+
};
|
|
378
|
+
return CodeArtsDeployClient;
|
|
379
|
+
}());
|
|
380
|
+
exports.CodeArtsDeployClient = CodeArtsDeployClient;
|
|
381
|
+
var ParamCreater = function () {
|
|
382
|
+
return {
|
|
383
|
+
/**
|
|
384
|
+
* 通过模板新建应用。
|
|
385
|
+
*
|
|
386
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
387
|
+
*/
|
|
388
|
+
createDeployTaskByTemplate: function (createDeployTaskByTemplateRequest) {
|
|
389
|
+
var options = {
|
|
390
|
+
method: "POST",
|
|
391
|
+
url: "/v2/tasks/template-task",
|
|
392
|
+
contentType: "application/json",
|
|
393
|
+
queryParams: {},
|
|
394
|
+
pathParams: {},
|
|
395
|
+
headers: {},
|
|
396
|
+
data: {}
|
|
397
|
+
};
|
|
398
|
+
var localVarHeaderParameter = {};
|
|
399
|
+
var body;
|
|
400
|
+
var contentType;
|
|
401
|
+
if (createDeployTaskByTemplateRequest !== null && createDeployTaskByTemplateRequest !== undefined) {
|
|
402
|
+
if (createDeployTaskByTemplateRequest instanceof CreateDeployTaskByTemplateRequest_1.CreateDeployTaskByTemplateRequest) {
|
|
403
|
+
contentType = createDeployTaskByTemplateRequest.contentType;
|
|
404
|
+
body = createDeployTaskByTemplateRequest.body;
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
contentType = createDeployTaskByTemplateRequest['Content-Type'];
|
|
408
|
+
body = createDeployTaskByTemplateRequest['body'];
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (body === null || body === undefined) {
|
|
412
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
413
|
+
}
|
|
414
|
+
if (contentType !== undefined && contentType !== null) {
|
|
415
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
416
|
+
}
|
|
417
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
418
|
+
options.data = body !== undefined ? body : {};
|
|
419
|
+
options.headers = localVarHeaderParameter;
|
|
420
|
+
return options;
|
|
421
|
+
},
|
|
422
|
+
/**
|
|
423
|
+
* 根据部署任务id删除应用。
|
|
424
|
+
*
|
|
425
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
426
|
+
*/
|
|
427
|
+
deleteDeployTask: function (deleteDeployTaskRequest) {
|
|
428
|
+
var options = {
|
|
429
|
+
method: "DELETE",
|
|
430
|
+
url: "/v2/tasks/{task_id}",
|
|
431
|
+
contentType: "application/json",
|
|
432
|
+
queryParams: {},
|
|
433
|
+
pathParams: {},
|
|
434
|
+
headers: {}
|
|
435
|
+
};
|
|
436
|
+
var localVarHeaderParameter = {};
|
|
437
|
+
var taskId;
|
|
438
|
+
var contentType;
|
|
439
|
+
if (deleteDeployTaskRequest !== null && deleteDeployTaskRequest !== undefined) {
|
|
440
|
+
if (deleteDeployTaskRequest instanceof DeleteDeployTaskRequest_1.DeleteDeployTaskRequest) {
|
|
441
|
+
taskId = deleteDeployTaskRequest.taskId;
|
|
442
|
+
contentType = deleteDeployTaskRequest.contentType;
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
taskId = deleteDeployTaskRequest['task_id'];
|
|
446
|
+
contentType = deleteDeployTaskRequest['Content-Type'];
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (taskId === null || taskId === undefined) {
|
|
450
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling deleteDeployTask.');
|
|
451
|
+
}
|
|
452
|
+
if (contentType !== undefined && contentType !== null) {
|
|
453
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
454
|
+
}
|
|
455
|
+
options.pathParams = { 'task_id': taskId, };
|
|
456
|
+
options.headers = localVarHeaderParameter;
|
|
457
|
+
return options;
|
|
458
|
+
},
|
|
459
|
+
/**
|
|
460
|
+
* 根据开始时间和结束时间查询项目下指定应用的历史部署记录列表
|
|
461
|
+
*
|
|
462
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
463
|
+
*/
|
|
464
|
+
listDeployTaskHistoryByDate: function (listDeployTaskHistoryByDateRequest) {
|
|
465
|
+
var options = {
|
|
466
|
+
method: "GET",
|
|
467
|
+
url: "/v2/{project_id}/task/{id}/history",
|
|
468
|
+
contentType: "application/json",
|
|
469
|
+
queryParams: {},
|
|
470
|
+
pathParams: {},
|
|
471
|
+
headers: {}
|
|
472
|
+
};
|
|
473
|
+
var localVarHeaderParameter = {};
|
|
474
|
+
var localVarQueryParameter = {};
|
|
475
|
+
var projectId;
|
|
476
|
+
var id;
|
|
477
|
+
var page;
|
|
478
|
+
var size;
|
|
479
|
+
var startDate;
|
|
480
|
+
var endDate;
|
|
481
|
+
var contentType;
|
|
482
|
+
if (listDeployTaskHistoryByDateRequest !== null && listDeployTaskHistoryByDateRequest !== undefined) {
|
|
483
|
+
if (listDeployTaskHistoryByDateRequest instanceof ListDeployTaskHistoryByDateRequest_1.ListDeployTaskHistoryByDateRequest) {
|
|
484
|
+
projectId = listDeployTaskHistoryByDateRequest.projectId;
|
|
485
|
+
id = listDeployTaskHistoryByDateRequest.id;
|
|
486
|
+
page = listDeployTaskHistoryByDateRequest.page;
|
|
487
|
+
size = listDeployTaskHistoryByDateRequest.size;
|
|
488
|
+
startDate = listDeployTaskHistoryByDateRequest.startDate;
|
|
489
|
+
endDate = listDeployTaskHistoryByDateRequest.endDate;
|
|
490
|
+
contentType = listDeployTaskHistoryByDateRequest.contentType;
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
projectId = listDeployTaskHistoryByDateRequest['project_id'];
|
|
494
|
+
id = listDeployTaskHistoryByDateRequest['id'];
|
|
495
|
+
page = listDeployTaskHistoryByDateRequest['page'];
|
|
496
|
+
size = listDeployTaskHistoryByDateRequest['size'];
|
|
497
|
+
startDate = listDeployTaskHistoryByDateRequest['start_date'];
|
|
498
|
+
endDate = listDeployTaskHistoryByDateRequest['end_date'];
|
|
499
|
+
contentType = listDeployTaskHistoryByDateRequest['Content-Type'];
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
if (projectId === null || projectId === undefined) {
|
|
503
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
504
|
+
}
|
|
505
|
+
if (id === null || id === undefined) {
|
|
506
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
507
|
+
}
|
|
508
|
+
if (page === null || page === undefined) {
|
|
509
|
+
throw new RequiredError('page', 'Required parameter page was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
510
|
+
}
|
|
511
|
+
if (page !== null && page !== undefined) {
|
|
512
|
+
localVarQueryParameter['page'] = page;
|
|
513
|
+
}
|
|
514
|
+
if (size === null || size === undefined) {
|
|
515
|
+
throw new RequiredError('size', 'Required parameter size was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
516
|
+
}
|
|
517
|
+
if (size !== null && size !== undefined) {
|
|
518
|
+
localVarQueryParameter['size'] = size;
|
|
519
|
+
}
|
|
520
|
+
if (startDate === null || startDate === undefined) {
|
|
521
|
+
throw new RequiredError('startDate', 'Required parameter startDate was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
522
|
+
}
|
|
523
|
+
if (startDate !== null && startDate !== undefined) {
|
|
524
|
+
localVarQueryParameter['start_date'] = startDate;
|
|
525
|
+
}
|
|
526
|
+
if (endDate === null || endDate === undefined) {
|
|
527
|
+
throw new RequiredError('endDate', 'Required parameter endDate was null or undefined when calling listDeployTaskHistoryByDate.');
|
|
528
|
+
}
|
|
529
|
+
if (endDate !== null && endDate !== undefined) {
|
|
530
|
+
localVarQueryParameter['end_date'] = endDate;
|
|
531
|
+
}
|
|
532
|
+
if (contentType !== undefined && contentType !== null) {
|
|
533
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
534
|
+
}
|
|
535
|
+
options.queryParams = localVarQueryParameter;
|
|
536
|
+
options.pathParams = { 'project_id': projectId, 'id': id, };
|
|
537
|
+
options.headers = localVarHeaderParameter;
|
|
538
|
+
return options;
|
|
539
|
+
},
|
|
540
|
+
/**
|
|
541
|
+
* 查询项目下应用列表
|
|
542
|
+
*
|
|
543
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
544
|
+
*/
|
|
545
|
+
listDeployTasks: function (listDeployTasksRequest) {
|
|
546
|
+
var options = {
|
|
547
|
+
method: "GET",
|
|
548
|
+
url: "/v2/{project_id}/tasks/list",
|
|
549
|
+
contentType: "application/json",
|
|
550
|
+
queryParams: {},
|
|
551
|
+
pathParams: {},
|
|
552
|
+
headers: {}
|
|
553
|
+
};
|
|
554
|
+
var localVarHeaderParameter = {};
|
|
555
|
+
var localVarQueryParameter = {};
|
|
556
|
+
var projectId;
|
|
557
|
+
var contentType;
|
|
558
|
+
var page;
|
|
559
|
+
var size;
|
|
560
|
+
if (listDeployTasksRequest !== null && listDeployTasksRequest !== undefined) {
|
|
561
|
+
if (listDeployTasksRequest instanceof ListDeployTasksRequest_1.ListDeployTasksRequest) {
|
|
562
|
+
projectId = listDeployTasksRequest.projectId;
|
|
563
|
+
contentType = listDeployTasksRequest.contentType;
|
|
564
|
+
page = listDeployTasksRequest.page;
|
|
565
|
+
size = listDeployTasksRequest.size;
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
projectId = listDeployTasksRequest['project_id'];
|
|
569
|
+
contentType = listDeployTasksRequest['Content-Type'];
|
|
570
|
+
page = listDeployTasksRequest['page'];
|
|
571
|
+
size = listDeployTasksRequest['size'];
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
if (projectId === null || projectId === undefined) {
|
|
575
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listDeployTasks.');
|
|
576
|
+
}
|
|
577
|
+
if (page === null || page === undefined) {
|
|
578
|
+
throw new RequiredError('page', 'Required parameter page was null or undefined when calling listDeployTasks.');
|
|
579
|
+
}
|
|
580
|
+
if (page !== null && page !== undefined) {
|
|
581
|
+
localVarQueryParameter['page'] = page;
|
|
582
|
+
}
|
|
583
|
+
if (size === null || size === undefined) {
|
|
584
|
+
throw new RequiredError('size', 'Required parameter size was null or undefined when calling listDeployTasks.');
|
|
585
|
+
}
|
|
586
|
+
if (size !== null && size !== undefined) {
|
|
587
|
+
localVarQueryParameter['size'] = size;
|
|
588
|
+
}
|
|
589
|
+
if (contentType !== undefined && contentType !== null) {
|
|
590
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
591
|
+
}
|
|
592
|
+
options.queryParams = localVarQueryParameter;
|
|
593
|
+
options.pathParams = { 'project_id': projectId, };
|
|
594
|
+
options.headers = localVarHeaderParameter;
|
|
595
|
+
return options;
|
|
596
|
+
},
|
|
597
|
+
/**
|
|
598
|
+
* 根据部署任务id获取应用详情。
|
|
599
|
+
*
|
|
600
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
601
|
+
*/
|
|
602
|
+
showDeployTaskDetail: function (showDeployTaskDetailRequest) {
|
|
603
|
+
var options = {
|
|
604
|
+
method: "GET",
|
|
605
|
+
url: "/v2/tasks/{task_id}",
|
|
606
|
+
contentType: "application/json",
|
|
607
|
+
queryParams: {},
|
|
608
|
+
pathParams: {},
|
|
609
|
+
headers: {}
|
|
610
|
+
};
|
|
611
|
+
var localVarHeaderParameter = {};
|
|
612
|
+
var taskId;
|
|
613
|
+
if (showDeployTaskDetailRequest !== null && showDeployTaskDetailRequest !== undefined) {
|
|
614
|
+
if (showDeployTaskDetailRequest instanceof ShowDeployTaskDetailRequest_1.ShowDeployTaskDetailRequest) {
|
|
615
|
+
taskId = showDeployTaskDetailRequest.taskId;
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
taskId = showDeployTaskDetailRequest['task_id'];
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
if (taskId === null || taskId === undefined) {
|
|
622
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling showDeployTaskDetail.');
|
|
623
|
+
}
|
|
624
|
+
options.pathParams = { 'task_id': taskId, };
|
|
625
|
+
options.headers = localVarHeaderParameter;
|
|
626
|
+
return options;
|
|
627
|
+
},
|
|
628
|
+
/**
|
|
629
|
+
* 根据部署任务id部署应用。
|
|
630
|
+
*
|
|
631
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
632
|
+
*/
|
|
633
|
+
startDeployTask: function (startDeployTaskRequest) {
|
|
634
|
+
var options = {
|
|
635
|
+
method: "POST",
|
|
636
|
+
url: "/v2/tasks/{task_id}/start",
|
|
637
|
+
contentType: "application/json",
|
|
638
|
+
queryParams: {},
|
|
639
|
+
pathParams: {},
|
|
640
|
+
headers: {},
|
|
641
|
+
data: {}
|
|
642
|
+
};
|
|
643
|
+
var localVarHeaderParameter = {};
|
|
644
|
+
var body;
|
|
645
|
+
var taskId;
|
|
646
|
+
var contentType;
|
|
647
|
+
if (startDeployTaskRequest !== null && startDeployTaskRequest !== undefined) {
|
|
648
|
+
if (startDeployTaskRequest instanceof StartDeployTaskRequest_1.StartDeployTaskRequest) {
|
|
649
|
+
taskId = startDeployTaskRequest.taskId;
|
|
650
|
+
contentType = startDeployTaskRequest.contentType;
|
|
651
|
+
body = startDeployTaskRequest.body;
|
|
652
|
+
}
|
|
653
|
+
else {
|
|
654
|
+
taskId = startDeployTaskRequest['task_id'];
|
|
655
|
+
contentType = startDeployTaskRequest['Content-Type'];
|
|
656
|
+
body = startDeployTaskRequest['body'];
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (taskId === null || taskId === undefined) {
|
|
660
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling startDeployTask.');
|
|
661
|
+
}
|
|
662
|
+
if (body === null || body === undefined) {
|
|
663
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
664
|
+
}
|
|
665
|
+
if (contentType !== undefined && contentType !== null) {
|
|
666
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
667
|
+
}
|
|
668
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
669
|
+
options.data = body !== undefined ? body : {};
|
|
670
|
+
options.pathParams = { 'task_id': taskId, };
|
|
671
|
+
options.headers = localVarHeaderParameter;
|
|
672
|
+
return options;
|
|
673
|
+
},
|
|
674
|
+
/**
|
|
675
|
+
* 在指定主机集群下新建主机。
|
|
676
|
+
*
|
|
677
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
678
|
+
*/
|
|
679
|
+
createDeploymentHost: function (createDeploymentHostRequest) {
|
|
680
|
+
var options = {
|
|
681
|
+
method: "POST",
|
|
682
|
+
url: "/v2/host-groups/{group_id}/hosts",
|
|
683
|
+
contentType: "application/json",
|
|
684
|
+
queryParams: {},
|
|
685
|
+
pathParams: {},
|
|
686
|
+
headers: {},
|
|
687
|
+
data: {}
|
|
688
|
+
};
|
|
689
|
+
var localVarHeaderParameter = {};
|
|
690
|
+
var body;
|
|
691
|
+
var groupId;
|
|
692
|
+
var contentType;
|
|
693
|
+
if (createDeploymentHostRequest !== null && createDeploymentHostRequest !== undefined) {
|
|
694
|
+
if (createDeploymentHostRequest instanceof CreateDeploymentHostRequest_1.CreateDeploymentHostRequest) {
|
|
695
|
+
groupId = createDeploymentHostRequest.groupId;
|
|
696
|
+
contentType = createDeploymentHostRequest.contentType;
|
|
697
|
+
body = createDeploymentHostRequest.body;
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
groupId = createDeploymentHostRequest['group_id'];
|
|
701
|
+
contentType = createDeploymentHostRequest['Content-Type'];
|
|
702
|
+
body = createDeploymentHostRequest['body'];
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (groupId === null || groupId === undefined) {
|
|
706
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling createDeploymentHost.');
|
|
707
|
+
}
|
|
708
|
+
if (body === null || body === undefined) {
|
|
709
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
710
|
+
}
|
|
711
|
+
if (contentType !== undefined && contentType !== null) {
|
|
712
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
713
|
+
}
|
|
714
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
715
|
+
options.data = body !== undefined ? body : {};
|
|
716
|
+
options.pathParams = { 'group_id': groupId, };
|
|
717
|
+
options.headers = localVarHeaderParameter;
|
|
718
|
+
return options;
|
|
719
|
+
},
|
|
720
|
+
/**
|
|
721
|
+
* 根据主机id删除主机。
|
|
722
|
+
*
|
|
723
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
724
|
+
*/
|
|
725
|
+
deleteDeploymentHost: function (deleteDeploymentHostRequest) {
|
|
726
|
+
var options = {
|
|
727
|
+
method: "DELETE",
|
|
728
|
+
url: "/v2/host-groups/{group_id}/hosts/{host_id}",
|
|
729
|
+
contentType: "application/json",
|
|
730
|
+
queryParams: {},
|
|
731
|
+
pathParams: {},
|
|
732
|
+
headers: {}
|
|
733
|
+
};
|
|
734
|
+
var localVarHeaderParameter = {};
|
|
735
|
+
var groupId;
|
|
736
|
+
var hostId;
|
|
737
|
+
var contentType;
|
|
738
|
+
if (deleteDeploymentHostRequest !== null && deleteDeploymentHostRequest !== undefined) {
|
|
739
|
+
if (deleteDeploymentHostRequest instanceof DeleteDeploymentHostRequest_1.DeleteDeploymentHostRequest) {
|
|
740
|
+
groupId = deleteDeploymentHostRequest.groupId;
|
|
741
|
+
hostId = deleteDeploymentHostRequest.hostId;
|
|
742
|
+
contentType = deleteDeploymentHostRequest.contentType;
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
groupId = deleteDeploymentHostRequest['group_id'];
|
|
746
|
+
hostId = deleteDeploymentHostRequest['host_id'];
|
|
747
|
+
contentType = deleteDeploymentHostRequest['Content-Type'];
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
if (groupId === null || groupId === undefined) {
|
|
751
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling deleteDeploymentHost.');
|
|
752
|
+
}
|
|
753
|
+
if (hostId === null || hostId === undefined) {
|
|
754
|
+
throw new RequiredError('hostId', 'Required parameter hostId was null or undefined when calling deleteDeploymentHost.');
|
|
755
|
+
}
|
|
756
|
+
if (contentType !== undefined && contentType !== null) {
|
|
757
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
758
|
+
}
|
|
759
|
+
options.pathParams = { 'group_id': groupId, 'host_id': hostId, };
|
|
760
|
+
options.headers = localVarHeaderParameter;
|
|
761
|
+
return options;
|
|
762
|
+
},
|
|
763
|
+
/**
|
|
764
|
+
* 根据主机集群id查询指定主机集群下的主机列表。
|
|
765
|
+
*
|
|
766
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
767
|
+
*/
|
|
768
|
+
listHosts: function (listHostsRequest) {
|
|
769
|
+
var options = {
|
|
770
|
+
method: "GET",
|
|
771
|
+
url: "/v2/host-groups/{group_id}/hosts",
|
|
772
|
+
contentType: "application/json",
|
|
773
|
+
queryParams: {},
|
|
774
|
+
pathParams: {},
|
|
775
|
+
headers: {}
|
|
776
|
+
};
|
|
777
|
+
var localVarHeaderParameter = {};
|
|
778
|
+
var localVarQueryParameter = {};
|
|
779
|
+
var groupId;
|
|
780
|
+
var asProxy;
|
|
781
|
+
var offset;
|
|
782
|
+
var limit;
|
|
783
|
+
var name;
|
|
784
|
+
var sortKey;
|
|
785
|
+
var sortDir;
|
|
786
|
+
var withAuth;
|
|
787
|
+
if (listHostsRequest !== null && listHostsRequest !== undefined) {
|
|
788
|
+
if (listHostsRequest instanceof ListHostsRequest_1.ListHostsRequest) {
|
|
789
|
+
groupId = listHostsRequest.groupId;
|
|
790
|
+
asProxy = listHostsRequest.asProxy;
|
|
791
|
+
offset = listHostsRequest.offset;
|
|
792
|
+
limit = listHostsRequest.limit;
|
|
793
|
+
name = listHostsRequest.name;
|
|
794
|
+
sortKey = listHostsRequest.sortKey;
|
|
795
|
+
sortDir = listHostsRequest.sortDir;
|
|
796
|
+
withAuth = listHostsRequest.withAuth;
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
groupId = listHostsRequest['group_id'];
|
|
800
|
+
asProxy = listHostsRequest['as_proxy'];
|
|
801
|
+
offset = listHostsRequest['offset'];
|
|
802
|
+
limit = listHostsRequest['limit'];
|
|
803
|
+
name = listHostsRequest['name'];
|
|
804
|
+
sortKey = listHostsRequest['sort_key'];
|
|
805
|
+
sortDir = listHostsRequest['sort_dir'];
|
|
806
|
+
withAuth = listHostsRequest['with_auth'];
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
if (groupId === null || groupId === undefined) {
|
|
810
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling listHosts.');
|
|
811
|
+
}
|
|
812
|
+
if (asProxy !== null && asProxy !== undefined) {
|
|
813
|
+
localVarQueryParameter['as_proxy'] = asProxy;
|
|
814
|
+
}
|
|
815
|
+
if (offset !== null && offset !== undefined) {
|
|
816
|
+
localVarQueryParameter['offset'] = offset;
|
|
817
|
+
}
|
|
818
|
+
if (limit !== null && limit !== undefined) {
|
|
819
|
+
localVarQueryParameter['limit'] = limit;
|
|
820
|
+
}
|
|
821
|
+
if (name !== null && name !== undefined) {
|
|
822
|
+
localVarQueryParameter['name'] = name;
|
|
823
|
+
}
|
|
824
|
+
if (sortKey !== null && sortKey !== undefined) {
|
|
825
|
+
localVarQueryParameter['sort_key'] = sortKey;
|
|
826
|
+
}
|
|
827
|
+
if (sortDir !== null && sortDir !== undefined) {
|
|
828
|
+
localVarQueryParameter['sort_dir'] = sortDir;
|
|
829
|
+
}
|
|
830
|
+
if (withAuth !== null && withAuth !== undefined) {
|
|
831
|
+
localVarQueryParameter['with_auth'] = withAuth;
|
|
832
|
+
}
|
|
833
|
+
options.queryParams = localVarQueryParameter;
|
|
834
|
+
options.pathParams = { 'group_id': groupId, };
|
|
835
|
+
options.headers = localVarHeaderParameter;
|
|
836
|
+
return options;
|
|
837
|
+
},
|
|
838
|
+
/**
|
|
839
|
+
* 根据主机id查询主机详情。
|
|
840
|
+
*
|
|
841
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
842
|
+
*/
|
|
843
|
+
showDeploymentHostDetail: function (showDeploymentHostDetailRequest) {
|
|
844
|
+
var options = {
|
|
845
|
+
method: "GET",
|
|
846
|
+
url: "/v2/host-groups/{group_id}/hosts/{host_id}",
|
|
847
|
+
contentType: "application/json",
|
|
848
|
+
queryParams: {},
|
|
849
|
+
pathParams: {},
|
|
850
|
+
headers: {}
|
|
851
|
+
};
|
|
852
|
+
var localVarHeaderParameter = {};
|
|
853
|
+
var groupId;
|
|
854
|
+
var hostId;
|
|
855
|
+
if (showDeploymentHostDetailRequest !== null && showDeploymentHostDetailRequest !== undefined) {
|
|
856
|
+
if (showDeploymentHostDetailRequest instanceof ShowDeploymentHostDetailRequest_1.ShowDeploymentHostDetailRequest) {
|
|
857
|
+
groupId = showDeploymentHostDetailRequest.groupId;
|
|
858
|
+
hostId = showDeploymentHostDetailRequest.hostId;
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
groupId = showDeploymentHostDetailRequest['group_id'];
|
|
862
|
+
hostId = showDeploymentHostDetailRequest['host_id'];
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (groupId === null || groupId === undefined) {
|
|
866
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling showDeploymentHostDetail.');
|
|
867
|
+
}
|
|
868
|
+
if (hostId === null || hostId === undefined) {
|
|
869
|
+
throw new RequiredError('hostId', 'Required parameter hostId was null or undefined when calling showDeploymentHostDetail.');
|
|
870
|
+
}
|
|
871
|
+
options.pathParams = { 'group_id': groupId, 'host_id': hostId, };
|
|
872
|
+
options.headers = localVarHeaderParameter;
|
|
873
|
+
return options;
|
|
874
|
+
},
|
|
875
|
+
/**
|
|
876
|
+
* 根据主机id修改主机信息。
|
|
877
|
+
*
|
|
878
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
879
|
+
*/
|
|
880
|
+
updateDeploymentHost: function (updateDeploymentHostRequest) {
|
|
881
|
+
var options = {
|
|
882
|
+
method: "PUT",
|
|
883
|
+
url: "/v2/host-groups/{group_id}/hosts/{host_id}",
|
|
884
|
+
contentType: "application/json",
|
|
885
|
+
queryParams: {},
|
|
886
|
+
pathParams: {},
|
|
887
|
+
headers: {},
|
|
888
|
+
data: {}
|
|
889
|
+
};
|
|
890
|
+
var localVarHeaderParameter = {};
|
|
891
|
+
var body;
|
|
892
|
+
var groupId;
|
|
893
|
+
var hostId;
|
|
894
|
+
var contentType;
|
|
895
|
+
if (updateDeploymentHostRequest !== null && updateDeploymentHostRequest !== undefined) {
|
|
896
|
+
if (updateDeploymentHostRequest instanceof UpdateDeploymentHostRequest_1.UpdateDeploymentHostRequest) {
|
|
897
|
+
groupId = updateDeploymentHostRequest.groupId;
|
|
898
|
+
hostId = updateDeploymentHostRequest.hostId;
|
|
899
|
+
contentType = updateDeploymentHostRequest.contentType;
|
|
900
|
+
body = updateDeploymentHostRequest.body;
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
groupId = updateDeploymentHostRequest['group_id'];
|
|
904
|
+
hostId = updateDeploymentHostRequest['host_id'];
|
|
905
|
+
contentType = updateDeploymentHostRequest['Content-Type'];
|
|
906
|
+
body = updateDeploymentHostRequest['body'];
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (groupId === null || groupId === undefined) {
|
|
910
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling updateDeploymentHost.');
|
|
911
|
+
}
|
|
912
|
+
if (hostId === null || hostId === undefined) {
|
|
913
|
+
throw new RequiredError('hostId', 'Required parameter hostId was null or undefined when calling updateDeploymentHost.');
|
|
914
|
+
}
|
|
915
|
+
if (body === null || body === undefined) {
|
|
916
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
917
|
+
}
|
|
918
|
+
if (contentType !== undefined && contentType !== null) {
|
|
919
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
920
|
+
}
|
|
921
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
922
|
+
options.data = body !== undefined ? body : {};
|
|
923
|
+
options.pathParams = { 'group_id': groupId, 'host_id': hostId, };
|
|
924
|
+
options.headers = localVarHeaderParameter;
|
|
925
|
+
return options;
|
|
926
|
+
},
|
|
927
|
+
/**
|
|
928
|
+
* 在项目下新建主机集群。
|
|
929
|
+
*
|
|
930
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
931
|
+
*/
|
|
932
|
+
createDeploymentGroup: function (createDeploymentGroupRequest) {
|
|
933
|
+
var options = {
|
|
934
|
+
method: "POST",
|
|
935
|
+
url: "/v2/host-groups",
|
|
936
|
+
contentType: "application/json",
|
|
937
|
+
queryParams: {},
|
|
938
|
+
pathParams: {},
|
|
939
|
+
headers: {},
|
|
940
|
+
data: {}
|
|
941
|
+
};
|
|
942
|
+
var localVarHeaderParameter = {};
|
|
943
|
+
var body;
|
|
944
|
+
var contentType;
|
|
945
|
+
if (createDeploymentGroupRequest !== null && createDeploymentGroupRequest !== undefined) {
|
|
946
|
+
if (createDeploymentGroupRequest instanceof CreateDeploymentGroupRequest_1.CreateDeploymentGroupRequest) {
|
|
947
|
+
contentType = createDeploymentGroupRequest.contentType;
|
|
948
|
+
body = createDeploymentGroupRequest.body;
|
|
949
|
+
}
|
|
950
|
+
else {
|
|
951
|
+
contentType = createDeploymentGroupRequest['Content-Type'];
|
|
952
|
+
body = createDeploymentGroupRequest['body'];
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (body === null || body === undefined) {
|
|
956
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
957
|
+
}
|
|
958
|
+
if (contentType !== undefined && contentType !== null) {
|
|
959
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
960
|
+
}
|
|
961
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
962
|
+
options.data = body !== undefined ? body : {};
|
|
963
|
+
options.headers = localVarHeaderParameter;
|
|
964
|
+
return options;
|
|
965
|
+
},
|
|
966
|
+
/**
|
|
967
|
+
* 根据主机集群id删除主机集群。
|
|
968
|
+
*
|
|
969
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
970
|
+
*/
|
|
971
|
+
deleteDeploymentGroup: function (deleteDeploymentGroupRequest) {
|
|
972
|
+
var options = {
|
|
973
|
+
method: "DELETE",
|
|
974
|
+
url: "/v2/host-groups/{group_id}",
|
|
975
|
+
contentType: "application/json",
|
|
976
|
+
queryParams: {},
|
|
977
|
+
pathParams: {},
|
|
978
|
+
headers: {}
|
|
979
|
+
};
|
|
980
|
+
var localVarHeaderParameter = {};
|
|
981
|
+
var groupId;
|
|
982
|
+
var contentType;
|
|
983
|
+
if (deleteDeploymentGroupRequest !== null && deleteDeploymentGroupRequest !== undefined) {
|
|
984
|
+
if (deleteDeploymentGroupRequest instanceof DeleteDeploymentGroupRequest_1.DeleteDeploymentGroupRequest) {
|
|
985
|
+
groupId = deleteDeploymentGroupRequest.groupId;
|
|
986
|
+
contentType = deleteDeploymentGroupRequest.contentType;
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
groupId = deleteDeploymentGroupRequest['group_id'];
|
|
990
|
+
contentType = deleteDeploymentGroupRequest['Content-Type'];
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if (groupId === null || groupId === undefined) {
|
|
994
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling deleteDeploymentGroup.');
|
|
995
|
+
}
|
|
996
|
+
if (contentType !== undefined && contentType !== null) {
|
|
997
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
998
|
+
}
|
|
999
|
+
options.pathParams = { 'group_id': groupId, };
|
|
1000
|
+
options.headers = localVarHeaderParameter;
|
|
1001
|
+
return options;
|
|
1002
|
+
},
|
|
1003
|
+
/**
|
|
1004
|
+
* 按条件查询主机集群列表。
|
|
1005
|
+
*
|
|
1006
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1007
|
+
*/
|
|
1008
|
+
listHostGroups: function (listHostGroupsRequest) {
|
|
1009
|
+
var options = {
|
|
1010
|
+
method: "GET",
|
|
1011
|
+
url: "/v2/host-groups",
|
|
1012
|
+
contentType: "application/json",
|
|
1013
|
+
queryParams: {},
|
|
1014
|
+
pathParams: {},
|
|
1015
|
+
headers: {}
|
|
1016
|
+
};
|
|
1017
|
+
var localVarHeaderParameter = {};
|
|
1018
|
+
var localVarQueryParameter = {};
|
|
1019
|
+
var regionName;
|
|
1020
|
+
var projectId;
|
|
1021
|
+
var os;
|
|
1022
|
+
var offset;
|
|
1023
|
+
var limit;
|
|
1024
|
+
var name;
|
|
1025
|
+
var sortKey;
|
|
1026
|
+
var sortDir;
|
|
1027
|
+
if (listHostGroupsRequest !== null && listHostGroupsRequest !== undefined) {
|
|
1028
|
+
if (listHostGroupsRequest instanceof ListHostGroupsRequest_1.ListHostGroupsRequest) {
|
|
1029
|
+
regionName = listHostGroupsRequest.regionName;
|
|
1030
|
+
projectId = listHostGroupsRequest.projectId;
|
|
1031
|
+
os = listHostGroupsRequest.os;
|
|
1032
|
+
offset = listHostGroupsRequest.offset;
|
|
1033
|
+
limit = listHostGroupsRequest.limit;
|
|
1034
|
+
name = listHostGroupsRequest.name;
|
|
1035
|
+
sortKey = listHostGroupsRequest.sortKey;
|
|
1036
|
+
sortDir = listHostGroupsRequest.sortDir;
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
regionName = listHostGroupsRequest['region_name'];
|
|
1040
|
+
projectId = listHostGroupsRequest['project_id'];
|
|
1041
|
+
os = listHostGroupsRequest['os'];
|
|
1042
|
+
offset = listHostGroupsRequest['offset'];
|
|
1043
|
+
limit = listHostGroupsRequest['limit'];
|
|
1044
|
+
name = listHostGroupsRequest['name'];
|
|
1045
|
+
sortKey = listHostGroupsRequest['sort_key'];
|
|
1046
|
+
sortDir = listHostGroupsRequest['sort_dir'];
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
if (regionName === null || regionName === undefined) {
|
|
1050
|
+
throw new RequiredError('regionName', 'Required parameter regionName was null or undefined when calling listHostGroups.');
|
|
1051
|
+
}
|
|
1052
|
+
if (regionName !== null && regionName !== undefined) {
|
|
1053
|
+
localVarQueryParameter['region_name'] = regionName;
|
|
1054
|
+
}
|
|
1055
|
+
if (projectId !== null && projectId !== undefined) {
|
|
1056
|
+
localVarQueryParameter['project_id'] = projectId;
|
|
1057
|
+
}
|
|
1058
|
+
if (os !== null && os !== undefined) {
|
|
1059
|
+
localVarQueryParameter['os'] = os;
|
|
1060
|
+
}
|
|
1061
|
+
if (offset !== null && offset !== undefined) {
|
|
1062
|
+
localVarQueryParameter['offset'] = offset;
|
|
1063
|
+
}
|
|
1064
|
+
if (limit !== null && limit !== undefined) {
|
|
1065
|
+
localVarQueryParameter['limit'] = limit;
|
|
1066
|
+
}
|
|
1067
|
+
if (name !== null && name !== undefined) {
|
|
1068
|
+
localVarQueryParameter['name'] = name;
|
|
1069
|
+
}
|
|
1070
|
+
if (sortKey !== null && sortKey !== undefined) {
|
|
1071
|
+
localVarQueryParameter['sort_key'] = sortKey;
|
|
1072
|
+
}
|
|
1073
|
+
if (sortDir !== null && sortDir !== undefined) {
|
|
1074
|
+
localVarQueryParameter['sort_dir'] = sortDir;
|
|
1075
|
+
}
|
|
1076
|
+
options.queryParams = localVarQueryParameter;
|
|
1077
|
+
options.headers = localVarHeaderParameter;
|
|
1078
|
+
return options;
|
|
1079
|
+
},
|
|
1080
|
+
/**
|
|
1081
|
+
* 根据主机集群id查询主机集群详情。
|
|
1082
|
+
*
|
|
1083
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1084
|
+
*/
|
|
1085
|
+
showDeploymentGroupDetail: function (showDeploymentGroupDetailRequest) {
|
|
1086
|
+
var options = {
|
|
1087
|
+
method: "GET",
|
|
1088
|
+
url: "/v2/host-groups/{group_id}",
|
|
1089
|
+
contentType: "application/json",
|
|
1090
|
+
queryParams: {},
|
|
1091
|
+
pathParams: {},
|
|
1092
|
+
headers: {}
|
|
1093
|
+
};
|
|
1094
|
+
var localVarHeaderParameter = {};
|
|
1095
|
+
var groupId;
|
|
1096
|
+
if (showDeploymentGroupDetailRequest !== null && showDeploymentGroupDetailRequest !== undefined) {
|
|
1097
|
+
if (showDeploymentGroupDetailRequest instanceof ShowDeploymentGroupDetailRequest_1.ShowDeploymentGroupDetailRequest) {
|
|
1098
|
+
groupId = showDeploymentGroupDetailRequest.groupId;
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
groupId = showDeploymentGroupDetailRequest['group_id'];
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
if (groupId === null || groupId === undefined) {
|
|
1105
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling showDeploymentGroupDetail.');
|
|
1106
|
+
}
|
|
1107
|
+
options.pathParams = { 'group_id': groupId, };
|
|
1108
|
+
options.headers = localVarHeaderParameter;
|
|
1109
|
+
return options;
|
|
1110
|
+
},
|
|
1111
|
+
/**
|
|
1112
|
+
* 根据主机集群id修改主机集群信息。
|
|
1113
|
+
*
|
|
1114
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1115
|
+
*/
|
|
1116
|
+
updateDeploymentGroup: function (updateDeploymentGroupRequest) {
|
|
1117
|
+
var options = {
|
|
1118
|
+
method: "PUT",
|
|
1119
|
+
url: "/v2/host-groups/{group_id}",
|
|
1120
|
+
contentType: "application/json",
|
|
1121
|
+
queryParams: {},
|
|
1122
|
+
pathParams: {},
|
|
1123
|
+
headers: {},
|
|
1124
|
+
data: {}
|
|
1125
|
+
};
|
|
1126
|
+
var localVarHeaderParameter = {};
|
|
1127
|
+
var body;
|
|
1128
|
+
var groupId;
|
|
1129
|
+
var contentType;
|
|
1130
|
+
if (updateDeploymentGroupRequest !== null && updateDeploymentGroupRequest !== undefined) {
|
|
1131
|
+
if (updateDeploymentGroupRequest instanceof UpdateDeploymentGroupRequest_1.UpdateDeploymentGroupRequest) {
|
|
1132
|
+
groupId = updateDeploymentGroupRequest.groupId;
|
|
1133
|
+
contentType = updateDeploymentGroupRequest.contentType;
|
|
1134
|
+
body = updateDeploymentGroupRequest.body;
|
|
1135
|
+
}
|
|
1136
|
+
else {
|
|
1137
|
+
groupId = updateDeploymentGroupRequest['group_id'];
|
|
1138
|
+
contentType = updateDeploymentGroupRequest['Content-Type'];
|
|
1139
|
+
body = updateDeploymentGroupRequest['body'];
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
if (groupId === null || groupId === undefined) {
|
|
1143
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling updateDeploymentGroup.');
|
|
1144
|
+
}
|
|
1145
|
+
if (body === null || body === undefined) {
|
|
1146
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1147
|
+
}
|
|
1148
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1149
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1150
|
+
}
|
|
1151
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1152
|
+
options.data = body !== undefined ? body : {};
|
|
1153
|
+
options.pathParams = { 'group_id': groupId, };
|
|
1154
|
+
options.headers = localVarHeaderParameter;
|
|
1155
|
+
return options;
|
|
1156
|
+
},
|
|
1157
|
+
/**
|
|
1158
|
+
* 获取指定应用的应用部署成功率
|
|
1159
|
+
*
|
|
1160
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1161
|
+
*/
|
|
1162
|
+
listTaskSuccessRate: function (listTaskSuccessRateRequest) {
|
|
1163
|
+
var options = {
|
|
1164
|
+
method: "POST",
|
|
1165
|
+
url: "/v2/{project_id}/tasks/metrics/success-rate",
|
|
1166
|
+
contentType: "application/json",
|
|
1167
|
+
queryParams: {},
|
|
1168
|
+
pathParams: {},
|
|
1169
|
+
headers: {},
|
|
1170
|
+
data: {}
|
|
1171
|
+
};
|
|
1172
|
+
var localVarHeaderParameter = {};
|
|
1173
|
+
var body;
|
|
1174
|
+
var projectId;
|
|
1175
|
+
if (listTaskSuccessRateRequest !== null && listTaskSuccessRateRequest !== undefined) {
|
|
1176
|
+
if (listTaskSuccessRateRequest instanceof ListTaskSuccessRateRequest_1.ListTaskSuccessRateRequest) {
|
|
1177
|
+
projectId = listTaskSuccessRateRequest.projectId;
|
|
1178
|
+
body = listTaskSuccessRateRequest.body;
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
projectId = listTaskSuccessRateRequest['project_id'];
|
|
1182
|
+
body = listTaskSuccessRateRequest['body'];
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (projectId === null || projectId === undefined) {
|
|
1186
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listTaskSuccessRate.');
|
|
1187
|
+
}
|
|
1188
|
+
if (body === null || body === undefined) {
|
|
1189
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1190
|
+
}
|
|
1191
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1192
|
+
options.data = body !== undefined ? body : {};
|
|
1193
|
+
options.pathParams = { 'project_id': projectId, };
|
|
1194
|
+
options.headers = localVarHeaderParameter;
|
|
1195
|
+
return options;
|
|
1196
|
+
},
|
|
1197
|
+
/**
|
|
1198
|
+
* 获取指定项目的应用部署成功率
|
|
1199
|
+
*
|
|
1200
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1201
|
+
*/
|
|
1202
|
+
showProjectSuccessRate: function (showProjectSuccessRateRequest) {
|
|
1203
|
+
var options = {
|
|
1204
|
+
method: "GET",
|
|
1205
|
+
url: "/v2/{project_id}/metrics/success-rate",
|
|
1206
|
+
contentType: "application/json",
|
|
1207
|
+
queryParams: {},
|
|
1208
|
+
pathParams: {},
|
|
1209
|
+
headers: {}
|
|
1210
|
+
};
|
|
1211
|
+
var localVarHeaderParameter = {};
|
|
1212
|
+
var localVarQueryParameter = {};
|
|
1213
|
+
var projectId;
|
|
1214
|
+
var startDate;
|
|
1215
|
+
var endDate;
|
|
1216
|
+
if (showProjectSuccessRateRequest !== null && showProjectSuccessRateRequest !== undefined) {
|
|
1217
|
+
if (showProjectSuccessRateRequest instanceof ShowProjectSuccessRateRequest_1.ShowProjectSuccessRateRequest) {
|
|
1218
|
+
projectId = showProjectSuccessRateRequest.projectId;
|
|
1219
|
+
startDate = showProjectSuccessRateRequest.startDate;
|
|
1220
|
+
endDate = showProjectSuccessRateRequest.endDate;
|
|
1221
|
+
}
|
|
1222
|
+
else {
|
|
1223
|
+
projectId = showProjectSuccessRateRequest['project_id'];
|
|
1224
|
+
startDate = showProjectSuccessRateRequest['start_date'];
|
|
1225
|
+
endDate = showProjectSuccessRateRequest['end_date'];
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
if (projectId === null || projectId === undefined) {
|
|
1229
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling showProjectSuccessRate.');
|
|
1230
|
+
}
|
|
1231
|
+
if (startDate === null || startDate === undefined) {
|
|
1232
|
+
throw new RequiredError('startDate', 'Required parameter startDate was null or undefined when calling showProjectSuccessRate.');
|
|
1233
|
+
}
|
|
1234
|
+
if (startDate !== null && startDate !== undefined) {
|
|
1235
|
+
localVarQueryParameter['start_date'] = startDate;
|
|
1236
|
+
}
|
|
1237
|
+
if (endDate === null || endDate === undefined) {
|
|
1238
|
+
throw new RequiredError('endDate', 'Required parameter endDate was null or undefined when calling showProjectSuccessRate.');
|
|
1239
|
+
}
|
|
1240
|
+
if (endDate !== null && endDate !== undefined) {
|
|
1241
|
+
localVarQueryParameter['end_date'] = endDate;
|
|
1242
|
+
}
|
|
1243
|
+
options.queryParams = localVarQueryParameter;
|
|
1244
|
+
options.pathParams = { 'project_id': projectId, };
|
|
1245
|
+
options.headers = localVarHeaderParameter;
|
|
1246
|
+
return options;
|
|
1247
|
+
},
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
exports.ParamCreater = ParamCreater;
|
|
1251
|
+
function newClient(client) {
|
|
1252
|
+
return new CodeArtsDeployClient(client);
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
*
|
|
1256
|
+
* @export
|
|
1257
|
+
* @class RequiredError
|
|
1258
|
+
* @extends {Error}
|
|
1259
|
+
*/
|
|
1260
|
+
var RequiredError = /** @class */ (function (_super) {
|
|
1261
|
+
__extends(RequiredError, _super);
|
|
1262
|
+
function RequiredError(field, msg) {
|
|
1263
|
+
var _this = _super.call(this, msg) || this;
|
|
1264
|
+
_this.field = field;
|
|
1265
|
+
_this.name = "RequiredError";
|
|
1266
|
+
return _this;
|
|
1267
|
+
}
|
|
1268
|
+
return RequiredError;
|
|
1269
|
+
}(Error));
|
|
1270
|
+
exports.RequiredError = RequiredError;
|