@huaweicloud/huaweicloud-sdk-codeartsdeploy 3.1.53 → 3.1.55
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/package.json +2 -2
- package/v2/CodeArtsDeployClient.d.ts +489 -28
- package/v2/CodeArtsDeployClient.d.ts.map +1 -1
- package/v2/CodeArtsDeployClient.js +1173 -103
- package/v2/CodeArtsDeployClient.js.map +1 -1
- package/v2/model/AppBaseResponse.d.ts +15 -0
- package/v2/model/AppBaseResponse.d.ts.map +1 -0
- package/v2/model/AppBaseResponse.js +31 -0
- package/v2/model/AppBaseResponse.js.map +1 -0
- package/v2/model/AppDetailInfo.d.ts +88 -0
- package/v2/model/AppDetailInfo.d.ts.map +1 -0
- package/v2/model/AppDetailInfo.js +215 -0
- package/v2/model/AppDetailInfo.js.map +1 -0
- package/v2/model/AppExecutionInfo.d.ts +99 -0
- package/v2/model/AppExecutionInfo.d.ts.map +1 -0
- package/v2/model/AppExecutionInfo.js +241 -0
- package/v2/model/AppExecutionInfo.js.map +1 -0
- package/v2/model/CreateAppRequest.d.ts +19 -0
- package/v2/model/CreateAppRequest.d.ts.map +1 -0
- package/v2/model/CreateAppRequest.js +33 -0
- package/v2/model/CreateAppRequest.js.map +1 -0
- package/v2/model/CreateAppRequestBody.d.ts +39 -0
- package/v2/model/CreateAppRequestBody.d.ts.map +1 -0
- package/v2/model/CreateAppRequestBody.js +83 -0
- package/v2/model/CreateAppRequestBody.js.map +1 -0
- package/v2/model/CreateAppResponse.d.ts +10 -0
- package/v2/model/CreateAppResponse.d.ts.map +1 -0
- package/v2/model/CreateAppResponse.js +19 -0
- package/v2/model/CreateAppResponse.js.map +1 -0
- package/v2/model/CreateEnvironmentRequest.d.ts +23 -0
- package/v2/model/CreateEnvironmentRequest.d.ts.map +1 -0
- package/v2/model/CreateEnvironmentRequest.js +44 -0
- package/v2/model/CreateEnvironmentRequest.js.map +1 -0
- package/v2/model/CreateEnvironmentResponse.d.ts +9 -0
- package/v2/model/CreateEnvironmentResponse.d.ts.map +1 -0
- package/v2/model/CreateEnvironmentResponse.js +19 -0
- package/v2/model/CreateEnvironmentResponse.js.map +1 -0
- package/v2/model/CreateHostClusterRequest.d.ts +19 -0
- package/v2/model/CreateHostClusterRequest.d.ts.map +1 -0
- package/v2/model/CreateHostClusterRequest.js +33 -0
- package/v2/model/CreateHostClusterRequest.js.map +1 -0
- package/v2/model/CreateHostClusterRequestBody.d.ts +30 -0
- package/v2/model/CreateHostClusterRequestBody.d.ts.map +1 -0
- package/v2/model/CreateHostClusterRequestBody.js +64 -0
- package/v2/model/CreateHostClusterRequestBody.js.map +1 -0
- package/v2/model/CreateHostClusterResponse.d.ts +9 -0
- package/v2/model/CreateHostClusterResponse.d.ts.map +1 -0
- package/v2/model/CreateHostClusterResponse.js +19 -0
- package/v2/model/CreateHostClusterResponse.js.map +1 -0
- package/v2/model/CreateHostRequest.d.ts +23 -0
- package/v2/model/CreateHostRequest.d.ts.map +1 -0
- package/v2/model/CreateHostRequest.js +44 -0
- package/v2/model/CreateHostRequest.js.map +1 -0
- package/v2/model/CreateHostRequestBody.d.ts +37 -0
- package/v2/model/CreateHostRequestBody.d.ts.map +1 -0
- package/v2/model/CreateHostRequestBody.js +80 -0
- package/v2/model/CreateHostRequestBody.js.map +1 -0
- package/v2/model/CreateHostResponse.d.ts +9 -0
- package/v2/model/CreateHostResponse.d.ts.map +1 -0
- package/v2/model/CreateHostResponse.js +19 -0
- package/v2/model/CreateHostResponse.js.map +1 -0
- package/v2/model/DeleteApplicationRequest.d.ts +20 -0
- package/v2/model/DeleteApplicationRequest.d.ts.map +1 -0
- package/v2/model/DeleteApplicationRequest.js +40 -0
- package/v2/model/DeleteApplicationRequest.js.map +1 -0
- package/v2/model/DeleteApplicationResponse.d.ts +10 -0
- package/v2/model/DeleteApplicationResponse.d.ts.map +1 -0
- package/v2/model/DeleteApplicationResponse.js +19 -0
- package/v2/model/DeleteApplicationResponse.js.map +1 -0
- package/v2/model/DeleteEnvironmentRequest.d.ts +24 -0
- package/v2/model/DeleteEnvironmentRequest.d.ts.map +1 -0
- package/v2/model/DeleteEnvironmentRequest.js +51 -0
- package/v2/model/DeleteEnvironmentRequest.js.map +1 -0
- package/v2/model/DeleteEnvironmentResponse.d.ts +9 -0
- package/v2/model/DeleteEnvironmentResponse.d.ts.map +1 -0
- package/v2/model/DeleteEnvironmentResponse.js +19 -0
- package/v2/model/DeleteEnvironmentResponse.js.map +1 -0
- package/v2/model/DeleteHostFromEnvironmentRequest.d.ts +28 -0
- package/v2/model/DeleteHostFromEnvironmentRequest.d.ts.map +1 -0
- package/v2/model/DeleteHostFromEnvironmentRequest.js +62 -0
- package/v2/model/DeleteHostFromEnvironmentRequest.js.map +1 -0
- package/v2/model/DeleteHostFromEnvironmentResponse.d.ts +9 -0
- package/v2/model/DeleteHostFromEnvironmentResponse.d.ts.map +1 -0
- package/v2/model/DeleteHostFromEnvironmentResponse.js +19 -0
- package/v2/model/DeleteHostFromEnvironmentResponse.js.map +1 -0
- package/v2/model/DeployV2OperationsDO.d.ts +20 -0
- package/v2/model/DeployV2OperationsDO.d.ts.map +1 -0
- package/v2/model/DeployV2OperationsDO.js +43 -0
- package/v2/model/DeployV2OperationsDO.js.map +1 -0
- package/v2/model/EnvironmentDetail.d.ts +36 -0
- package/v2/model/EnvironmentDetail.d.ts.map +1 -0
- package/v2/model/EnvironmentDetail.js +79 -0
- package/v2/model/EnvironmentDetail.js.map +1 -0
- package/v2/model/EnvironmentPermissionDetail.d.ts +24 -0
- package/v2/model/EnvironmentPermissionDetail.d.ts.map +1 -0
- package/v2/model/EnvironmentPermissionDetail.js +59 -0
- package/v2/model/EnvironmentPermissionDetail.js.map +1 -0
- package/v2/model/EnvironmentRequestBody.d.ts +26 -0
- package/v2/model/EnvironmentRequestBody.d.ts.map +1 -0
- package/v2/model/EnvironmentRequestBody.js +54 -0
- package/v2/model/EnvironmentRequestBody.js.map +1 -0
- package/v2/model/HostAuthorizationBody.d.ts +24 -0
- package/v2/model/HostAuthorizationBody.d.ts.map +1 -0
- package/v2/model/HostAuthorizationBody.js +48 -0
- package/v2/model/HostAuthorizationBody.js.map +1 -0
- package/v2/model/HostClusterInfo.d.ts +40 -0
- package/v2/model/HostClusterInfo.d.ts.map +1 -0
- package/v2/model/HostClusterInfo.js +89 -0
- package/v2/model/HostClusterInfo.js.map +1 -0
- package/v2/model/HostClusterInfoDetail.d.ts +40 -0
- package/v2/model/HostClusterInfoDetail.d.ts.map +1 -0
- package/v2/model/HostClusterInfoDetail.js +89 -0
- package/v2/model/HostClusterInfoDetail.js.map +1 -0
- package/v2/model/HostInfo.d.ts +74 -0
- package/v2/model/HostInfo.d.ts.map +1 -0
- package/v2/model/HostInfo.js +173 -0
- package/v2/model/HostInfo.js.map +1 -0
- package/v2/model/HostInfoDetail.d.ts +72 -0
- package/v2/model/HostInfoDetail.d.ts.map +1 -0
- package/v2/model/HostInfoDetail.js +169 -0
- package/v2/model/HostInfoDetail.js.map +1 -0
- package/v2/model/ImportHostToEnvironmentRequest.d.ts +27 -0
- package/v2/model/ImportHostToEnvironmentRequest.d.ts.map +1 -0
- package/v2/model/ImportHostToEnvironmentRequest.js +55 -0
- package/v2/model/ImportHostToEnvironmentRequest.js.map +1 -0
- package/v2/model/ImportHostToEnvironmentRequestBody.d.ts +12 -0
- package/v2/model/ImportHostToEnvironmentRequestBody.d.ts.map +1 -0
- package/v2/model/ImportHostToEnvironmentRequestBody.js +31 -0
- package/v2/model/ImportHostToEnvironmentRequestBody.js.map +1 -0
- package/v2/model/ImportHostToEnvironmentResponse.d.ts +9 -0
- package/v2/model/ImportHostToEnvironmentResponse.d.ts.map +1 -0
- package/v2/model/ImportHostToEnvironmentResponse.js +19 -0
- package/v2/model/ImportHostToEnvironmentResponse.js.map +1 -0
- package/v2/model/ListAllAppRequest.d.ts +19 -0
- package/v2/model/ListAllAppRequest.d.ts.map +1 -0
- package/v2/model/ListAllAppRequest.js +33 -0
- package/v2/model/ListAllAppRequest.js.map +1 -0
- package/v2/model/ListAllAppRequestBody.d.ts +28 -0
- package/v2/model/ListAllAppRequestBody.d.ts.map +1 -0
- package/v2/model/ListAllAppRequestBody.js +57 -0
- package/v2/model/ListAllAppRequestBody.js.map +1 -0
- package/v2/model/ListAllAppResponse.d.ts +12 -0
- package/v2/model/ListAllAppResponse.d.ts.map +1 -0
- package/v2/model/ListAllAppResponse.js +25 -0
- package/v2/model/ListAllAppResponse.js.map +1 -0
- package/v2/model/ListEnvironmentsRequest.d.ts +48 -0
- package/v2/model/ListEnvironmentsRequest.d.ts.map +1 -0
- package/v2/model/ListEnvironmentsRequest.js +95 -0
- package/v2/model/ListEnvironmentsRequest.js.map +1 -0
- package/v2/model/ListEnvironmentsResponse.d.ts +12 -0
- package/v2/model/ListEnvironmentsResponse.d.ts.map +1 -0
- package/v2/model/ListEnvironmentsResponse.js +23 -0
- package/v2/model/ListEnvironmentsResponse.js.map +1 -0
- package/v2/model/ListHostClustersRequest.d.ts +52 -0
- package/v2/model/ListHostClustersRequest.d.ts.map +1 -0
- package/v2/model/ListHostClustersRequest.js +106 -0
- package/v2/model/ListHostClustersRequest.js.map +1 -0
- package/v2/model/ListHostClustersResponse.d.ts +12 -0
- package/v2/model/ListHostClustersResponse.d.ts.map +1 -0
- package/v2/model/ListHostClustersResponse.js +23 -0
- package/v2/model/ListHostClustersResponse.js.map +1 -0
- package/v2/model/ListHostGroupsRequest.d.ts +1 -1
- package/v2/model/ListHostGroupsRequest.d.ts.map +1 -1
- package/v2/model/ListHostGroupsRequest.js +2 -1
- package/v2/model/ListHostGroupsRequest.js.map +1 -1
- package/v2/model/ListNewHostsRequest.d.ts +44 -0
- package/v2/model/ListNewHostsRequest.d.ts.map +1 -0
- package/v2/model/ListNewHostsRequest.js +99 -0
- package/v2/model/ListNewHostsRequest.js.map +1 -0
- package/v2/model/ListNewHostsResponse.d.ts +12 -0
- package/v2/model/ListNewHostsResponse.d.ts.map +1 -0
- package/v2/model/ListNewHostsResponse.js +23 -0
- package/v2/model/ListNewHostsResponse.js.map +1 -0
- package/v2/model/PermissionClusterDetail.d.ts +24 -0
- package/v2/model/PermissionClusterDetail.d.ts.map +1 -0
- package/v2/model/PermissionClusterDetail.js +59 -0
- package/v2/model/PermissionClusterDetail.js.map +1 -0
- package/v2/model/ShowAppDetailByIdRequest.d.ts +8 -0
- package/v2/model/ShowAppDetailByIdRequest.d.ts.map +1 -0
- package/v2/model/ShowAppDetailByIdRequest.js +20 -0
- package/v2/model/ShowAppDetailByIdRequest.js.map +1 -0
- package/v2/model/ShowAppDetailByIdResponse.d.ts +10 -0
- package/v2/model/ShowAppDetailByIdResponse.d.ts.map +1 -0
- package/v2/model/ShowAppDetailByIdResponse.js +19 -0
- package/v2/model/ShowAppDetailByIdResponse.js.map +1 -0
- package/v2/model/ShowEnvironmentDetailRequest.d.ts +12 -0
- package/v2/model/ShowEnvironmentDetailRequest.d.ts.map +1 -0
- package/v2/model/ShowEnvironmentDetailRequest.js +31 -0
- package/v2/model/ShowEnvironmentDetailRequest.js.map +1 -0
- package/v2/model/ShowEnvironmentDetailResponse.d.ts +10 -0
- package/v2/model/ShowEnvironmentDetailResponse.d.ts.map +1 -0
- package/v2/model/ShowEnvironmentDetailResponse.js +19 -0
- package/v2/model/ShowEnvironmentDetailResponse.js.map +1 -0
- package/v2/model/ShowHostClusterDetailRequest.d.ts +8 -0
- package/v2/model/ShowHostClusterDetailRequest.d.ts.map +1 -0
- package/v2/model/ShowHostClusterDetailRequest.js +20 -0
- package/v2/model/ShowHostClusterDetailRequest.js.map +1 -0
- package/v2/model/ShowHostClusterDetailResponse.d.ts +10 -0
- package/v2/model/ShowHostClusterDetailResponse.d.ts.map +1 -0
- package/v2/model/ShowHostClusterDetailResponse.js +19 -0
- package/v2/model/ShowHostClusterDetailResponse.js.map +1 -0
- package/v2/model/ShowHostDetailRequest.d.ts +12 -0
- package/v2/model/ShowHostDetailRequest.d.ts.map +1 -0
- package/v2/model/ShowHostDetailRequest.js +31 -0
- package/v2/model/ShowHostDetailRequest.js.map +1 -0
- package/v2/model/ShowHostDetailResponse.d.ts +10 -0
- package/v2/model/ShowHostDetailResponse.d.ts.map +1 -0
- package/v2/model/ShowHostDetailResponse.js +19 -0
- package/v2/model/ShowHostDetailResponse.js.map +1 -0
- package/v2/model/TaskBaseBody.d.ts +6 -0
- package/v2/model/TaskBaseBody.d.ts.map +1 -0
- package/v2/model/TaskBaseBody.js +13 -0
- package/v2/model/TaskBaseBody.js.map +1 -0
- package/v2/model/TaskBaseResponseBody.d.ts +12 -0
- package/v2/model/TaskBaseResponseBody.d.ts.map +1 -0
- package/v2/model/TaskBaseResponseBody.js +27 -0
- package/v2/model/TaskBaseResponseBody.js.map +1 -0
- package/v2/model/TaskTriggerVO.d.ts +16 -0
- package/v2/model/TaskTriggerVO.d.ts.map +1 -0
- package/v2/model/TaskTriggerVO.js +39 -0
- package/v2/model/TaskTriggerVO.js.map +1 -0
- package/v2/model/TaskV2RequestBody.d.ts +13 -0
- package/v2/model/TaskV2RequestBody.d.ts.map +1 -0
- package/v2/model/TaskV2RequestBody.js +29 -0
- package/v2/model/TaskV2RequestBody.js.map +1 -0
- package/v2/public-api.d.ts +54 -0
- package/v2/public-api.d.ts.map +1 -1
- package/v2/public-api.js +54 -0
- package/v2/public-api.js.map +1 -1
|
@@ -2,20 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RequiredError = exports.ParamCreater = exports.CodeArtsDeployClient = void 0;
|
|
4
4
|
const ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
|
|
5
|
+
const CreateAppRequest_1 = require("./model/CreateAppRequest");
|
|
5
6
|
const CreateDeployTaskByTemplateRequest_1 = require("./model/CreateDeployTaskByTemplateRequest");
|
|
6
7
|
const CreateDeploymentGroupRequest_1 = require("./model/CreateDeploymentGroupRequest");
|
|
7
8
|
const CreateDeploymentHostRequest_1 = require("./model/CreateDeploymentHostRequest");
|
|
9
|
+
const CreateEnvironmentRequest_1 = require("./model/CreateEnvironmentRequest");
|
|
10
|
+
const CreateHostClusterRequest_1 = require("./model/CreateHostClusterRequest");
|
|
11
|
+
const CreateHostRequest_1 = require("./model/CreateHostRequest");
|
|
12
|
+
const DeleteApplicationRequest_1 = require("./model/DeleteApplicationRequest");
|
|
8
13
|
const DeleteDeployTaskRequest_1 = require("./model/DeleteDeployTaskRequest");
|
|
9
14
|
const DeleteDeploymentGroupRequest_1 = require("./model/DeleteDeploymentGroupRequest");
|
|
10
15
|
const DeleteDeploymentHostRequest_1 = require("./model/DeleteDeploymentHostRequest");
|
|
16
|
+
const DeleteEnvironmentRequest_1 = require("./model/DeleteEnvironmentRequest");
|
|
17
|
+
const DeleteHostFromEnvironmentRequest_1 = require("./model/DeleteHostFromEnvironmentRequest");
|
|
18
|
+
const ImportHostToEnvironmentRequest_1 = require("./model/ImportHostToEnvironmentRequest");
|
|
19
|
+
const ListAllAppRequest_1 = require("./model/ListAllAppRequest");
|
|
11
20
|
const ListDeployTaskHistoryByDateRequest_1 = require("./model/ListDeployTaskHistoryByDateRequest");
|
|
12
21
|
const ListDeployTasksRequest_1 = require("./model/ListDeployTasksRequest");
|
|
22
|
+
const ListEnvironmentsRequest_1 = require("./model/ListEnvironmentsRequest");
|
|
23
|
+
const ListHostClustersRequest_1 = require("./model/ListHostClustersRequest");
|
|
13
24
|
const ListHostGroupsRequest_1 = require("./model/ListHostGroupsRequest");
|
|
14
25
|
const ListHostsRequest_1 = require("./model/ListHostsRequest");
|
|
26
|
+
const ListNewHostsRequest_1 = require("./model/ListNewHostsRequest");
|
|
15
27
|
const ListTaskSuccessRateRequest_1 = require("./model/ListTaskSuccessRateRequest");
|
|
28
|
+
const ShowAppDetailByIdRequest_1 = require("./model/ShowAppDetailByIdRequest");
|
|
16
29
|
const ShowDeployTaskDetailRequest_1 = require("./model/ShowDeployTaskDetailRequest");
|
|
17
30
|
const ShowDeploymentGroupDetailRequest_1 = require("./model/ShowDeploymentGroupDetailRequest");
|
|
18
31
|
const ShowDeploymentHostDetailRequest_1 = require("./model/ShowDeploymentHostDetailRequest");
|
|
32
|
+
const ShowEnvironmentDetailRequest_1 = require("./model/ShowEnvironmentDetailRequest");
|
|
33
|
+
const ShowHostClusterDetailRequest_1 = require("./model/ShowHostClusterDetailRequest");
|
|
34
|
+
const ShowHostDetailRequest_1 = require("./model/ShowHostDetailRequest");
|
|
19
35
|
const ShowProjectSuccessRateRequest_1 = require("./model/ShowProjectSuccessRateRequest");
|
|
20
36
|
const StartDeployTaskRequest_1 = require("./model/StartDeployTaskRequest");
|
|
21
37
|
const UpdateDeploymentGroupRequest_1 = require("./model/UpdateDeploymentGroupRequest");
|
|
@@ -31,7 +47,24 @@ class CodeArtsDeployClient {
|
|
|
31
47
|
return __dirname;
|
|
32
48
|
}
|
|
33
49
|
/**
|
|
34
|
-
*
|
|
50
|
+
* 新建应用。
|
|
51
|
+
*
|
|
52
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
53
|
+
*
|
|
54
|
+
* @summary 新建应用
|
|
55
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
56
|
+
* @param {CreateAppRequestBody} createAppRequestBody Body参数
|
|
57
|
+
* @param {*} [options] Override http request option.
|
|
58
|
+
* @throws {RequiredError}
|
|
59
|
+
*/
|
|
60
|
+
createApp(createAppRequest) {
|
|
61
|
+
const options = (0, exports.ParamCreater)().createApp(createAppRequest);
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
options['responseHeaders'] = [''];
|
|
64
|
+
return this.hcClient.sendRequest(options);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 通过模板新建应用。该接口于2024年09月30日后不再维护,推荐使用新版CreateApp接口。
|
|
35
68
|
*
|
|
36
69
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
37
70
|
*
|
|
@@ -48,7 +81,24 @@ class CodeArtsDeployClient {
|
|
|
48
81
|
return this.hcClient.sendRequest(options);
|
|
49
82
|
}
|
|
50
83
|
/**
|
|
51
|
-
*
|
|
84
|
+
* 根据应用id删除应用。
|
|
85
|
+
*
|
|
86
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
87
|
+
*
|
|
88
|
+
* @summary 删除应用
|
|
89
|
+
* @param {string} appId 应用id
|
|
90
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
*/
|
|
94
|
+
deleteApplication(deleteApplicationRequest) {
|
|
95
|
+
const options = (0, exports.ParamCreater)().deleteApplication(deleteApplicationRequest);
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
options['responseHeaders'] = [''];
|
|
98
|
+
return this.hcClient.sendRequest(options);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 根据部署任务id删除应用。该接口于2024年09月30日后不再维护,推荐使用新版DeleteApplication接口。
|
|
52
102
|
*
|
|
53
103
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
54
104
|
*
|
|
@@ -64,6 +114,23 @@ class CodeArtsDeployClient {
|
|
|
64
114
|
options['responseHeaders'] = [''];
|
|
65
115
|
return this.hcClient.sendRequest(options);
|
|
66
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* 查询项目下应用列表
|
|
119
|
+
*
|
|
120
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
121
|
+
*
|
|
122
|
+
* @summary 获取应用列表
|
|
123
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
124
|
+
* @param {ListAllAppRequestBody} listAllAppRequestBody Body参数
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
*/
|
|
128
|
+
listAllApp(listAllAppRequest) {
|
|
129
|
+
const options = (0, exports.ParamCreater)().listAllApp(listAllAppRequest);
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
options['responseHeaders'] = [''];
|
|
132
|
+
return this.hcClient.sendRequest(options);
|
|
133
|
+
}
|
|
67
134
|
/**
|
|
68
135
|
* 根据开始时间和结束时间查询项目下指定应用的历史部署记录列表
|
|
69
136
|
*
|
|
@@ -87,7 +154,7 @@ class CodeArtsDeployClient {
|
|
|
87
154
|
return this.hcClient.sendRequest(options);
|
|
88
155
|
}
|
|
89
156
|
/**
|
|
90
|
-
*
|
|
157
|
+
* 查询项目下应用列表。该接口于2024年09月30日后不再维护,推荐使用新版ListAllApp接口。
|
|
91
158
|
*
|
|
92
159
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
93
160
|
*
|
|
@@ -106,7 +173,23 @@ class CodeArtsDeployClient {
|
|
|
106
173
|
return this.hcClient.sendRequest(options);
|
|
107
174
|
}
|
|
108
175
|
/**
|
|
109
|
-
*
|
|
176
|
+
* 根据应用id获取应用详情。
|
|
177
|
+
*
|
|
178
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
179
|
+
*
|
|
180
|
+
* @summary 获取应用详情
|
|
181
|
+
* @param {string} appId 应用id
|
|
182
|
+
* @param {*} [options] Override http request option.
|
|
183
|
+
* @throws {RequiredError}
|
|
184
|
+
*/
|
|
185
|
+
showAppDetailById(showAppDetailByIdRequest) {
|
|
186
|
+
const options = (0, exports.ParamCreater)().showAppDetailById(showAppDetailByIdRequest);
|
|
187
|
+
// @ts-ignore
|
|
188
|
+
options['responseHeaders'] = [''];
|
|
189
|
+
return this.hcClient.sendRequest(options);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* 根据部署任务id获取应用详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowAppDetailById接口。
|
|
110
193
|
*
|
|
111
194
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
112
195
|
*
|
|
@@ -140,7 +223,120 @@ class CodeArtsDeployClient {
|
|
|
140
223
|
return this.hcClient.sendRequest(options);
|
|
141
224
|
}
|
|
142
225
|
/**
|
|
143
|
-
*
|
|
226
|
+
* 应用下创建环境
|
|
227
|
+
*
|
|
228
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
229
|
+
*
|
|
230
|
+
* @summary 应用下创建环境
|
|
231
|
+
* @param {string} applicationId 应用id
|
|
232
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
233
|
+
* @param {EnvironmentRequestBody} createEnvironmentRequestBody Body参数
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
*/
|
|
237
|
+
createEnvironment(createEnvironmentRequest) {
|
|
238
|
+
const options = (0, exports.ParamCreater)().createEnvironment(createEnvironmentRequest);
|
|
239
|
+
// @ts-ignore
|
|
240
|
+
options['responseHeaders'] = [''];
|
|
241
|
+
return this.hcClient.sendRequest(options);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* 删除应用下的环境
|
|
245
|
+
*
|
|
246
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
247
|
+
*
|
|
248
|
+
* @summary 删除应用下的环境
|
|
249
|
+
* @param {string} applicationId 应用id
|
|
250
|
+
* @param {string} environmentId 环境id
|
|
251
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
deleteEnvironment(deleteEnvironmentRequest) {
|
|
256
|
+
const options = (0, exports.ParamCreater)().deleteEnvironment(deleteEnvironmentRequest);
|
|
257
|
+
// @ts-ignore
|
|
258
|
+
options['responseHeaders'] = [''];
|
|
259
|
+
return this.hcClient.sendRequest(options);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* 环境下删除主机
|
|
263
|
+
*
|
|
264
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
265
|
+
*
|
|
266
|
+
* @summary 环境下删除主机
|
|
267
|
+
* @param {string} applicationId 应用id
|
|
268
|
+
* @param {string} environmentId 环境id
|
|
269
|
+
* @param {string} hostId 主机id
|
|
270
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
271
|
+
* @param {*} [options] Override http request option.
|
|
272
|
+
* @throws {RequiredError}
|
|
273
|
+
*/
|
|
274
|
+
deleteHostFromEnvironment(deleteHostFromEnvironmentRequest) {
|
|
275
|
+
const options = (0, exports.ParamCreater)().deleteHostFromEnvironment(deleteHostFromEnvironmentRequest);
|
|
276
|
+
// @ts-ignore
|
|
277
|
+
options['responseHeaders'] = [''];
|
|
278
|
+
return this.hcClient.sendRequest(options);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* 环境下导入主机
|
|
282
|
+
*
|
|
283
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
284
|
+
*
|
|
285
|
+
* @summary 环境下导入主机
|
|
286
|
+
* @param {string} applicationId 应用id
|
|
287
|
+
* @param {string} environmentId 环境id
|
|
288
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
289
|
+
* @param {ImportHostToEnvironmentRequestBody} importHostToEnvironmentRequestBody Body参数
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
importHostToEnvironment(importHostToEnvironmentRequest) {
|
|
294
|
+
const options = (0, exports.ParamCreater)().importHostToEnvironment(importHostToEnvironmentRequest);
|
|
295
|
+
// @ts-ignore
|
|
296
|
+
options['responseHeaders'] = [''];
|
|
297
|
+
return this.hcClient.sendRequest(options);
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* 查询应用下环境列表
|
|
301
|
+
*
|
|
302
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
303
|
+
*
|
|
304
|
+
* @summary 查询应用下环境列表
|
|
305
|
+
* @param {string} applicationId 应用id
|
|
306
|
+
* @param {string} projectId 项目ID
|
|
307
|
+
* @param {number} [pageIndex] 分页页码, 表示从此页开始查询, page大于等于1
|
|
308
|
+
* @param {number} [pageSize] 每页显示的条目数量,size小于等于100
|
|
309
|
+
* @param {string} [name] 要查询的环境名称
|
|
310
|
+
* @param {'NAME' | 'USER_NAME' | 'CREATED_TIME' | 'NICK_NAME'} [sortKey] 排序字段,支持按照环境名称|用户名称|创建时间|用户昵称排序
|
|
311
|
+
* @param {'DESC' | 'ASC'} [sortDir] 排序顺序,DESC降序,ASC升序
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
listEnvironments(listEnvironmentsRequest) {
|
|
316
|
+
const options = (0, exports.ParamCreater)().listEnvironments(listEnvironmentsRequest);
|
|
317
|
+
// @ts-ignore
|
|
318
|
+
options['responseHeaders'] = [''];
|
|
319
|
+
return this.hcClient.sendRequest(options);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* 查询环境详情
|
|
323
|
+
*
|
|
324
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
325
|
+
*
|
|
326
|
+
* @summary 查询环境详情
|
|
327
|
+
* @param {string} applicationId 应用id
|
|
328
|
+
* @param {string} environmentId 环境id
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
showEnvironmentDetail(showEnvironmentDetailRequest) {
|
|
333
|
+
const options = (0, exports.ParamCreater)().showEnvironmentDetail(showEnvironmentDetailRequest);
|
|
334
|
+
// @ts-ignore
|
|
335
|
+
options['responseHeaders'] = [''];
|
|
336
|
+
return this.hcClient.sendRequest(options);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* 在指定主机集群下新建主机。该接口于2024年09月30日后不再维护,推荐使用新版CreateHost接口。
|
|
144
340
|
*
|
|
145
341
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
146
342
|
*
|
|
@@ -158,7 +354,25 @@ class CodeArtsDeployClient {
|
|
|
158
354
|
return this.hcClient.sendRequest(options);
|
|
159
355
|
}
|
|
160
356
|
/**
|
|
161
|
-
*
|
|
357
|
+
* 在指定主机集群下新建主机。
|
|
358
|
+
*
|
|
359
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
360
|
+
*
|
|
361
|
+
* @summary 新建主机
|
|
362
|
+
* @param {string} groupId 主机集群id
|
|
363
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
364
|
+
* @param {CreateHostRequestBody} createHostRequestBody 创建主机请求体
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
*/
|
|
368
|
+
createHost(createHostRequest) {
|
|
369
|
+
const options = (0, exports.ParamCreater)().createHost(createHostRequest);
|
|
370
|
+
// @ts-ignore
|
|
371
|
+
options['responseHeaders'] = [''];
|
|
372
|
+
return this.hcClient.sendRequest(options);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* 根据主机id删除主机。该接口于2024年9月30日后不再维护。
|
|
162
376
|
*
|
|
163
377
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
164
378
|
*
|
|
@@ -176,14 +390,14 @@ class CodeArtsDeployClient {
|
|
|
176
390
|
return this.hcClient.sendRequest(options);
|
|
177
391
|
}
|
|
178
392
|
/**
|
|
179
|
-
* 根据主机集群id
|
|
393
|
+
* 根据主机集群id查询指定主机集群下的主机列表。该接口于2024年09月30日后不再维护,推荐使用新版ListNewHosts接口。
|
|
180
394
|
*
|
|
181
395
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
182
396
|
*
|
|
183
397
|
* @summary 查询主机列表
|
|
184
398
|
* @param {string} groupId 主机集群id
|
|
185
399
|
* @param {boolean} [asProxy] 是否为代理机
|
|
186
|
-
* @param {number} [offset]
|
|
400
|
+
* @param {number} [offset] 偏移量,表示从此偏移量开始查询,offset大于等于0
|
|
187
401
|
* @param {number} [limit] 每页显示的条目数量,默认为1000
|
|
188
402
|
* @param {string} [name] 主机名,可输入中英文,数字和符号(-_.)
|
|
189
403
|
* @param {string} [sortKey] 排序字段,支持:AS_PROXY|HOST_NAME|OS|OWNER_NAME|as_proxy|host_name|os|owner_name|nickName。不填默认为:as_proxy
|
|
@@ -199,7 +413,30 @@ class CodeArtsDeployClient {
|
|
|
199
413
|
return this.hcClient.sendRequest(options);
|
|
200
414
|
}
|
|
201
415
|
/**
|
|
202
|
-
*
|
|
416
|
+
* 根据主机集群id查询指定主机集群下的主机列表。
|
|
417
|
+
*
|
|
418
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
419
|
+
*
|
|
420
|
+
* @summary 查询主机列表
|
|
421
|
+
* @param {string} groupId 项目ID
|
|
422
|
+
* @param {string} [keyField] 主机名模糊查询信息
|
|
423
|
+
* @param {string} [environmentId] 环境id
|
|
424
|
+
* @param {number} [pageIndex] 页码数
|
|
425
|
+
* @param {number} [pageSize] 每页显示的条目数量,默认为10
|
|
426
|
+
* @param {string} [sortKey] 排序字段:as_proxy|host_name|owner_name,不传使用默认排序
|
|
427
|
+
* @param {'DESC' | 'ASC'} [sortDir] 排序方式:DESC、ASC,默认为DESC
|
|
428
|
+
* @param {boolean} [asProxy] 是否为代理机
|
|
429
|
+
* @param {*} [options] Override http request option.
|
|
430
|
+
* @throws {RequiredError}
|
|
431
|
+
*/
|
|
432
|
+
listNewHosts(listNewHostsRequest) {
|
|
433
|
+
const options = (0, exports.ParamCreater)().listNewHosts(listNewHostsRequest);
|
|
434
|
+
// @ts-ignore
|
|
435
|
+
options['responseHeaders'] = [''];
|
|
436
|
+
return this.hcClient.sendRequest(options);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* 根据主机id查询主机详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowHostDetail接口。
|
|
203
440
|
*
|
|
204
441
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
205
442
|
*
|
|
@@ -216,7 +453,24 @@ class CodeArtsDeployClient {
|
|
|
216
453
|
return this.hcClient.sendRequest(options);
|
|
217
454
|
}
|
|
218
455
|
/**
|
|
219
|
-
* 根据主机id
|
|
456
|
+
* 根据主机id查询主机详情。
|
|
457
|
+
*
|
|
458
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
459
|
+
*
|
|
460
|
+
* @summary 查询主机详情
|
|
461
|
+
* @param {string} groupId 主机集群id
|
|
462
|
+
* @param {string} hostId 主机id
|
|
463
|
+
* @param {*} [options] Override http request option.
|
|
464
|
+
* @throws {RequiredError}
|
|
465
|
+
*/
|
|
466
|
+
showHostDetail(showHostDetailRequest) {
|
|
467
|
+
const options = (0, exports.ParamCreater)().showHostDetail(showHostDetailRequest);
|
|
468
|
+
// @ts-ignore
|
|
469
|
+
options['responseHeaders'] = [''];
|
|
470
|
+
return this.hcClient.sendRequest(options);
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* 根据主机id修改主机信息。该接口于2024年9月30日后不再维护。
|
|
220
474
|
*
|
|
221
475
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
222
476
|
*
|
|
@@ -235,7 +489,7 @@ class CodeArtsDeployClient {
|
|
|
235
489
|
return this.hcClient.sendRequest(options);
|
|
236
490
|
}
|
|
237
491
|
/**
|
|
238
|
-
*
|
|
492
|
+
* 在项目下新建主机集群。该接口于2024年09月30日后不再维护,推荐使用新版CreateHostCluster接口。
|
|
239
493
|
*
|
|
240
494
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
241
495
|
*
|
|
@@ -252,7 +506,24 @@ class CodeArtsDeployClient {
|
|
|
252
506
|
return this.hcClient.sendRequest(options);
|
|
253
507
|
}
|
|
254
508
|
/**
|
|
255
|
-
*
|
|
509
|
+
* 在项目下新建主机集群。
|
|
510
|
+
*
|
|
511
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
512
|
+
*
|
|
513
|
+
* @summary 新建主机集群
|
|
514
|
+
* @param {'application/json;charset=utf-8' | 'application/json'} contentType 消息体的类型(格式),下方类型可任选其一使用: application/json;charset=utf-8 application/json
|
|
515
|
+
* @param {CreateHostClusterRequestBody} createHostClusterRequestBody 创建主机集群请求体
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
*/
|
|
519
|
+
createHostCluster(createHostClusterRequest) {
|
|
520
|
+
const options = (0, exports.ParamCreater)().createHostCluster(createHostClusterRequest);
|
|
521
|
+
// @ts-ignore
|
|
522
|
+
options['responseHeaders'] = [''];
|
|
523
|
+
return this.hcClient.sendRequest(options);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* 根据主机集群id删除主机集群。该接口于2024年9月30日后不再维护。
|
|
256
527
|
*
|
|
257
528
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
258
529
|
*
|
|
@@ -274,8 +545,32 @@ class CodeArtsDeployClient {
|
|
|
274
545
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
275
546
|
*
|
|
276
547
|
* @summary 查询主机集群列表
|
|
548
|
+
* @param {string} projectId 项目ID
|
|
549
|
+
* @param {string} [name] 主机集群模糊查询信息
|
|
550
|
+
* @param {'windows' | 'linux'} [os] 操作系统:windows|linux
|
|
551
|
+
* @param {number} [pageIndex] 页码数
|
|
552
|
+
* @param {number} [pageSize] 每页显示的条目数量,默认为10
|
|
553
|
+
* @param {string} [sortField] 排序字段:nick_name|name|owner_name|create_time,不传使用默认排序
|
|
554
|
+
* @param {'DESC' | 'ASC'} [sortType] 排序方式:DESC、ASC,默认为DESC
|
|
555
|
+
* @param {number} [isProxyMode] 是否为代理机
|
|
556
|
+
* @param {string} [slaveClusterId] 自定义资源池id
|
|
557
|
+
* @param {*} [options] Override http request option.
|
|
558
|
+
* @throws {RequiredError}
|
|
559
|
+
*/
|
|
560
|
+
listHostClusters(listHostClustersRequest) {
|
|
561
|
+
const options = (0, exports.ParamCreater)().listHostClusters(listHostClustersRequest);
|
|
562
|
+
// @ts-ignore
|
|
563
|
+
options['responseHeaders'] = [''];
|
|
564
|
+
return this.hcClient.sendRequest(options);
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* 按条件查询主机集群列表。该接口于2024年09月30日后不再维护,推荐使用新版ListHostClusters接口。
|
|
568
|
+
*
|
|
569
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
570
|
+
*
|
|
571
|
+
* @summary 查询主机集群列表
|
|
572
|
+
* @param {string} projectId 项目ID
|
|
277
573
|
* @param {string} regionName 局点信息
|
|
278
|
-
* @param {string} [projectId] 项目ID
|
|
279
574
|
* @param {'windows' | 'linux'} [os] 操作系统:windows|linux
|
|
280
575
|
* @param {number} [offset] 偏移量,表示从此偏移量开始查询,offset大于等于0
|
|
281
576
|
* @param {number} [limit] 每页显示的条目数量,默认为1000
|
|
@@ -292,7 +587,7 @@ class CodeArtsDeployClient {
|
|
|
292
587
|
return this.hcClient.sendRequest(options);
|
|
293
588
|
}
|
|
294
589
|
/**
|
|
295
|
-
* 根据主机集群id
|
|
590
|
+
* 根据主机集群id查询主机集群详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowHostClusterDetail接口。
|
|
296
591
|
*
|
|
297
592
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
298
593
|
*
|
|
@@ -308,7 +603,23 @@ class CodeArtsDeployClient {
|
|
|
308
603
|
return this.hcClient.sendRequest(options);
|
|
309
604
|
}
|
|
310
605
|
/**
|
|
311
|
-
* 根据主机集群id
|
|
606
|
+
* 根据主机集群id查询主机集群详情。
|
|
607
|
+
*
|
|
608
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
609
|
+
*
|
|
610
|
+
* @summary 查询主机集群
|
|
611
|
+
* @param {string} groupId 主机集群id
|
|
612
|
+
* @param {*} [options] Override http request option.
|
|
613
|
+
* @throws {RequiredError}
|
|
614
|
+
*/
|
|
615
|
+
showHostClusterDetail(showHostClusterDetailRequest) {
|
|
616
|
+
const options = (0, exports.ParamCreater)().showHostClusterDetail(showHostClusterDetailRequest);
|
|
617
|
+
// @ts-ignore
|
|
618
|
+
options['responseHeaders'] = [''];
|
|
619
|
+
return this.hcClient.sendRequest(options);
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* 根据主机集群id修改主机集群信息。该接口于2024年9月30日后不再维护。
|
|
312
623
|
*
|
|
313
624
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
314
625
|
*
|
|
@@ -365,14 +676,14 @@ exports.CodeArtsDeployClient = CodeArtsDeployClient;
|
|
|
365
676
|
const ParamCreater = function () {
|
|
366
677
|
return {
|
|
367
678
|
/**
|
|
368
|
-
*
|
|
679
|
+
* 新建应用。
|
|
369
680
|
*
|
|
370
681
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
371
682
|
*/
|
|
372
|
-
|
|
683
|
+
createApp(createAppRequest) {
|
|
373
684
|
const options = {
|
|
374
685
|
method: "POST",
|
|
375
|
-
url: "/
|
|
686
|
+
url: "/v1/applications",
|
|
376
687
|
contentType: "application/json",
|
|
377
688
|
queryParams: {},
|
|
378
689
|
pathParams: {},
|
|
@@ -382,14 +693,14 @@ const ParamCreater = function () {
|
|
|
382
693
|
const localVarHeaderParameter = {};
|
|
383
694
|
let body;
|
|
384
695
|
let contentType;
|
|
385
|
-
if (
|
|
386
|
-
if (
|
|
387
|
-
contentType =
|
|
388
|
-
body =
|
|
696
|
+
if (createAppRequest !== null && createAppRequest !== undefined) {
|
|
697
|
+
if (createAppRequest instanceof CreateAppRequest_1.CreateAppRequest) {
|
|
698
|
+
contentType = createAppRequest.contentType;
|
|
699
|
+
body = createAppRequest.body;
|
|
389
700
|
}
|
|
390
701
|
else {
|
|
391
|
-
contentType =
|
|
392
|
-
body =
|
|
702
|
+
contentType = createAppRequest['Content-Type'];
|
|
703
|
+
body = createAppRequest['body'];
|
|
393
704
|
}
|
|
394
705
|
}
|
|
395
706
|
if (body === null || body === undefined) {
|
|
@@ -404,39 +715,154 @@ const ParamCreater = function () {
|
|
|
404
715
|
return options;
|
|
405
716
|
},
|
|
406
717
|
/**
|
|
407
|
-
*
|
|
718
|
+
* 通过模板新建应用。该接口于2024年09月30日后不再维护,推荐使用新版CreateApp接口。
|
|
408
719
|
*
|
|
409
720
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
410
721
|
*/
|
|
411
|
-
|
|
722
|
+
createDeployTaskByTemplate(createDeployTaskByTemplateRequest) {
|
|
412
723
|
const options = {
|
|
413
|
-
method: "
|
|
414
|
-
url: "/v2/tasks/
|
|
724
|
+
method: "POST",
|
|
725
|
+
url: "/v2/tasks/template-task",
|
|
415
726
|
contentType: "application/json",
|
|
416
727
|
queryParams: {},
|
|
417
728
|
pathParams: {},
|
|
418
|
-
headers: {}
|
|
729
|
+
headers: {},
|
|
730
|
+
data: {}
|
|
419
731
|
};
|
|
420
732
|
const localVarHeaderParameter = {};
|
|
421
|
-
let
|
|
733
|
+
let body;
|
|
422
734
|
let contentType;
|
|
423
|
-
if (
|
|
424
|
-
if (
|
|
425
|
-
|
|
426
|
-
|
|
735
|
+
if (createDeployTaskByTemplateRequest !== null && createDeployTaskByTemplateRequest !== undefined) {
|
|
736
|
+
if (createDeployTaskByTemplateRequest instanceof CreateDeployTaskByTemplateRequest_1.CreateDeployTaskByTemplateRequest) {
|
|
737
|
+
contentType = createDeployTaskByTemplateRequest.contentType;
|
|
738
|
+
body = createDeployTaskByTemplateRequest.body;
|
|
427
739
|
}
|
|
428
740
|
else {
|
|
429
|
-
|
|
430
|
-
|
|
741
|
+
contentType = createDeployTaskByTemplateRequest['Content-Type'];
|
|
742
|
+
body = createDeployTaskByTemplateRequest['body'];
|
|
431
743
|
}
|
|
432
744
|
}
|
|
433
|
-
if (
|
|
434
|
-
throw new RequiredError('
|
|
745
|
+
if (body === null || body === undefined) {
|
|
746
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
435
747
|
}
|
|
436
748
|
if (contentType !== undefined && contentType !== null) {
|
|
437
749
|
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
438
750
|
}
|
|
439
|
-
|
|
751
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
752
|
+
options.data = body !== undefined ? body : {};
|
|
753
|
+
options.headers = localVarHeaderParameter;
|
|
754
|
+
return options;
|
|
755
|
+
},
|
|
756
|
+
/**
|
|
757
|
+
* 根据应用id删除应用。
|
|
758
|
+
*
|
|
759
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
760
|
+
*/
|
|
761
|
+
deleteApplication(deleteApplicationRequest) {
|
|
762
|
+
const options = {
|
|
763
|
+
method: "DELETE",
|
|
764
|
+
url: "/v1/applications/{app_id}",
|
|
765
|
+
contentType: "application/json",
|
|
766
|
+
queryParams: {},
|
|
767
|
+
pathParams: {},
|
|
768
|
+
headers: {}
|
|
769
|
+
};
|
|
770
|
+
const localVarHeaderParameter = {};
|
|
771
|
+
let appId;
|
|
772
|
+
let contentType;
|
|
773
|
+
if (deleteApplicationRequest !== null && deleteApplicationRequest !== undefined) {
|
|
774
|
+
if (deleteApplicationRequest instanceof DeleteApplicationRequest_1.DeleteApplicationRequest) {
|
|
775
|
+
appId = deleteApplicationRequest.appId;
|
|
776
|
+
contentType = deleteApplicationRequest.contentType;
|
|
777
|
+
}
|
|
778
|
+
else {
|
|
779
|
+
appId = deleteApplicationRequest['app_id'];
|
|
780
|
+
contentType = deleteApplicationRequest['Content-Type'];
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (appId === null || appId === undefined) {
|
|
784
|
+
throw new RequiredError('appId', 'Required parameter appId was null or undefined when calling deleteApplication.');
|
|
785
|
+
}
|
|
786
|
+
if (contentType !== undefined && contentType !== null) {
|
|
787
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
788
|
+
}
|
|
789
|
+
options.pathParams = { 'app_id': appId, };
|
|
790
|
+
options.headers = localVarHeaderParameter;
|
|
791
|
+
return options;
|
|
792
|
+
},
|
|
793
|
+
/**
|
|
794
|
+
* 根据部署任务id删除应用。该接口于2024年09月30日后不再维护,推荐使用新版DeleteApplication接口。
|
|
795
|
+
*
|
|
796
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
797
|
+
*/
|
|
798
|
+
deleteDeployTask(deleteDeployTaskRequest) {
|
|
799
|
+
const options = {
|
|
800
|
+
method: "DELETE",
|
|
801
|
+
url: "/v2/tasks/{task_id}",
|
|
802
|
+
contentType: "application/json",
|
|
803
|
+
queryParams: {},
|
|
804
|
+
pathParams: {},
|
|
805
|
+
headers: {}
|
|
806
|
+
};
|
|
807
|
+
const localVarHeaderParameter = {};
|
|
808
|
+
let taskId;
|
|
809
|
+
let contentType;
|
|
810
|
+
if (deleteDeployTaskRequest !== null && deleteDeployTaskRequest !== undefined) {
|
|
811
|
+
if (deleteDeployTaskRequest instanceof DeleteDeployTaskRequest_1.DeleteDeployTaskRequest) {
|
|
812
|
+
taskId = deleteDeployTaskRequest.taskId;
|
|
813
|
+
contentType = deleteDeployTaskRequest.contentType;
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
taskId = deleteDeployTaskRequest['task_id'];
|
|
817
|
+
contentType = deleteDeployTaskRequest['Content-Type'];
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if (taskId === null || taskId === undefined) {
|
|
821
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling deleteDeployTask.');
|
|
822
|
+
}
|
|
823
|
+
if (contentType !== undefined && contentType !== null) {
|
|
824
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
825
|
+
}
|
|
826
|
+
options.pathParams = { 'task_id': taskId, };
|
|
827
|
+
options.headers = localVarHeaderParameter;
|
|
828
|
+
return options;
|
|
829
|
+
},
|
|
830
|
+
/**
|
|
831
|
+
* 查询项目下应用列表
|
|
832
|
+
*
|
|
833
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
834
|
+
*/
|
|
835
|
+
listAllApp(listAllAppRequest) {
|
|
836
|
+
const options = {
|
|
837
|
+
method: "POST",
|
|
838
|
+
url: "/v1/applications/list",
|
|
839
|
+
contentType: "application/json",
|
|
840
|
+
queryParams: {},
|
|
841
|
+
pathParams: {},
|
|
842
|
+
headers: {},
|
|
843
|
+
data: {}
|
|
844
|
+
};
|
|
845
|
+
const localVarHeaderParameter = {};
|
|
846
|
+
let body;
|
|
847
|
+
let contentType;
|
|
848
|
+
if (listAllAppRequest !== null && listAllAppRequest !== undefined) {
|
|
849
|
+
if (listAllAppRequest instanceof ListAllAppRequest_1.ListAllAppRequest) {
|
|
850
|
+
contentType = listAllAppRequest.contentType;
|
|
851
|
+
body = listAllAppRequest.body;
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
contentType = listAllAppRequest['Content-Type'];
|
|
855
|
+
body = listAllAppRequest['body'];
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
if (body === null || body === undefined) {
|
|
859
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
860
|
+
}
|
|
861
|
+
if (contentType !== undefined && contentType !== null) {
|
|
862
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
863
|
+
}
|
|
864
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
865
|
+
options.data = body !== undefined ? body : {};
|
|
440
866
|
options.headers = localVarHeaderParameter;
|
|
441
867
|
return options;
|
|
442
868
|
},
|
|
@@ -522,7 +948,7 @@ const ParamCreater = function () {
|
|
|
522
948
|
return options;
|
|
523
949
|
},
|
|
524
950
|
/**
|
|
525
|
-
*
|
|
951
|
+
* 查询项目下应用列表。该接口于2024年09月30日后不再维护,推荐使用新版ListAllApp接口。
|
|
526
952
|
*
|
|
527
953
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
528
954
|
*/
|
|
@@ -556,68 +982,444 @@ const ParamCreater = function () {
|
|
|
556
982
|
}
|
|
557
983
|
}
|
|
558
984
|
if (projectId === null || projectId === undefined) {
|
|
559
|
-
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listDeployTasks.');
|
|
985
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listDeployTasks.');
|
|
986
|
+
}
|
|
987
|
+
if (page === null || page === undefined) {
|
|
988
|
+
throw new RequiredError('page', 'Required parameter page was null or undefined when calling listDeployTasks.');
|
|
989
|
+
}
|
|
990
|
+
if (page !== null && page !== undefined) {
|
|
991
|
+
localVarQueryParameter['page'] = page;
|
|
992
|
+
}
|
|
993
|
+
if (size === null || size === undefined) {
|
|
994
|
+
throw new RequiredError('size', 'Required parameter size was null or undefined when calling listDeployTasks.');
|
|
995
|
+
}
|
|
996
|
+
if (size !== null && size !== undefined) {
|
|
997
|
+
localVarQueryParameter['size'] = size;
|
|
998
|
+
}
|
|
999
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1000
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1001
|
+
}
|
|
1002
|
+
options.queryParams = localVarQueryParameter;
|
|
1003
|
+
options.pathParams = { 'project_id': projectId, };
|
|
1004
|
+
options.headers = localVarHeaderParameter;
|
|
1005
|
+
return options;
|
|
1006
|
+
},
|
|
1007
|
+
/**
|
|
1008
|
+
* 根据应用id获取应用详情。
|
|
1009
|
+
*
|
|
1010
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1011
|
+
*/
|
|
1012
|
+
showAppDetailById(showAppDetailByIdRequest) {
|
|
1013
|
+
const options = {
|
|
1014
|
+
method: "GET",
|
|
1015
|
+
url: "/v1/applications/{app_id}/info",
|
|
1016
|
+
contentType: "application/json",
|
|
1017
|
+
queryParams: {},
|
|
1018
|
+
pathParams: {},
|
|
1019
|
+
headers: {}
|
|
1020
|
+
};
|
|
1021
|
+
const localVarHeaderParameter = {};
|
|
1022
|
+
let appId;
|
|
1023
|
+
if (showAppDetailByIdRequest !== null && showAppDetailByIdRequest !== undefined) {
|
|
1024
|
+
if (showAppDetailByIdRequest instanceof ShowAppDetailByIdRequest_1.ShowAppDetailByIdRequest) {
|
|
1025
|
+
appId = showAppDetailByIdRequest.appId;
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
appId = showAppDetailByIdRequest['app_id'];
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
if (appId === null || appId === undefined) {
|
|
1032
|
+
throw new RequiredError('appId', 'Required parameter appId was null or undefined when calling showAppDetailById.');
|
|
1033
|
+
}
|
|
1034
|
+
options.pathParams = { 'app_id': appId, };
|
|
1035
|
+
options.headers = localVarHeaderParameter;
|
|
1036
|
+
return options;
|
|
1037
|
+
},
|
|
1038
|
+
/**
|
|
1039
|
+
* 根据部署任务id获取应用详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowAppDetailById接口。
|
|
1040
|
+
*
|
|
1041
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1042
|
+
*/
|
|
1043
|
+
showDeployTaskDetail(showDeployTaskDetailRequest) {
|
|
1044
|
+
const options = {
|
|
1045
|
+
method: "GET",
|
|
1046
|
+
url: "/v2/tasks/{task_id}",
|
|
1047
|
+
contentType: "application/json",
|
|
1048
|
+
queryParams: {},
|
|
1049
|
+
pathParams: {},
|
|
1050
|
+
headers: {}
|
|
1051
|
+
};
|
|
1052
|
+
const localVarHeaderParameter = {};
|
|
1053
|
+
let taskId;
|
|
1054
|
+
if (showDeployTaskDetailRequest !== null && showDeployTaskDetailRequest !== undefined) {
|
|
1055
|
+
if (showDeployTaskDetailRequest instanceof ShowDeployTaskDetailRequest_1.ShowDeployTaskDetailRequest) {
|
|
1056
|
+
taskId = showDeployTaskDetailRequest.taskId;
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
taskId = showDeployTaskDetailRequest['task_id'];
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
if (taskId === null || taskId === undefined) {
|
|
1063
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling showDeployTaskDetail.');
|
|
1064
|
+
}
|
|
1065
|
+
options.pathParams = { 'task_id': taskId, };
|
|
1066
|
+
options.headers = localVarHeaderParameter;
|
|
1067
|
+
return options;
|
|
1068
|
+
},
|
|
1069
|
+
/**
|
|
1070
|
+
* 根据部署任务id部署应用。
|
|
1071
|
+
*
|
|
1072
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1073
|
+
*/
|
|
1074
|
+
startDeployTask(startDeployTaskRequest) {
|
|
1075
|
+
const options = {
|
|
1076
|
+
method: "POST",
|
|
1077
|
+
url: "/v2/tasks/{task_id}/start",
|
|
1078
|
+
contentType: "application/json",
|
|
1079
|
+
queryParams: {},
|
|
1080
|
+
pathParams: {},
|
|
1081
|
+
headers: {},
|
|
1082
|
+
data: {}
|
|
1083
|
+
};
|
|
1084
|
+
const localVarHeaderParameter = {};
|
|
1085
|
+
let body;
|
|
1086
|
+
let taskId;
|
|
1087
|
+
let contentType;
|
|
1088
|
+
if (startDeployTaskRequest !== null && startDeployTaskRequest !== undefined) {
|
|
1089
|
+
if (startDeployTaskRequest instanceof StartDeployTaskRequest_1.StartDeployTaskRequest) {
|
|
1090
|
+
taskId = startDeployTaskRequest.taskId;
|
|
1091
|
+
contentType = startDeployTaskRequest.contentType;
|
|
1092
|
+
body = startDeployTaskRequest.body;
|
|
1093
|
+
}
|
|
1094
|
+
else {
|
|
1095
|
+
taskId = startDeployTaskRequest['task_id'];
|
|
1096
|
+
contentType = startDeployTaskRequest['Content-Type'];
|
|
1097
|
+
body = startDeployTaskRequest['body'];
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
if (taskId === null || taskId === undefined) {
|
|
1101
|
+
throw new RequiredError('taskId', 'Required parameter taskId was null or undefined when calling startDeployTask.');
|
|
1102
|
+
}
|
|
1103
|
+
if (body === null || body === undefined) {
|
|
1104
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1105
|
+
}
|
|
1106
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1107
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1108
|
+
}
|
|
1109
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1110
|
+
options.data = body !== undefined ? body : {};
|
|
1111
|
+
options.pathParams = { 'task_id': taskId, };
|
|
1112
|
+
options.headers = localVarHeaderParameter;
|
|
1113
|
+
return options;
|
|
1114
|
+
},
|
|
1115
|
+
/**
|
|
1116
|
+
* 应用下创建环境
|
|
1117
|
+
*
|
|
1118
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1119
|
+
*/
|
|
1120
|
+
createEnvironment(createEnvironmentRequest) {
|
|
1121
|
+
const options = {
|
|
1122
|
+
method: "POST",
|
|
1123
|
+
url: "/v1/applications/{application_id}/environments",
|
|
1124
|
+
contentType: "application/json",
|
|
1125
|
+
queryParams: {},
|
|
1126
|
+
pathParams: {},
|
|
1127
|
+
headers: {},
|
|
1128
|
+
data: {}
|
|
1129
|
+
};
|
|
1130
|
+
const localVarHeaderParameter = {};
|
|
1131
|
+
let body;
|
|
1132
|
+
let applicationId;
|
|
1133
|
+
let contentType;
|
|
1134
|
+
if (createEnvironmentRequest !== null && createEnvironmentRequest !== undefined) {
|
|
1135
|
+
if (createEnvironmentRequest instanceof CreateEnvironmentRequest_1.CreateEnvironmentRequest) {
|
|
1136
|
+
applicationId = createEnvironmentRequest.applicationId;
|
|
1137
|
+
contentType = createEnvironmentRequest.contentType;
|
|
1138
|
+
body = createEnvironmentRequest.body;
|
|
1139
|
+
}
|
|
1140
|
+
else {
|
|
1141
|
+
applicationId = createEnvironmentRequest['application_id'];
|
|
1142
|
+
contentType = createEnvironmentRequest['Content-Type'];
|
|
1143
|
+
body = createEnvironmentRequest['body'];
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1147
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling createEnvironment.');
|
|
1148
|
+
}
|
|
1149
|
+
if (body === null || body === undefined) {
|
|
1150
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1151
|
+
}
|
|
1152
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1153
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1154
|
+
}
|
|
1155
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1156
|
+
options.data = body !== undefined ? body : {};
|
|
1157
|
+
options.pathParams = { 'application_id': applicationId, };
|
|
1158
|
+
options.headers = localVarHeaderParameter;
|
|
1159
|
+
return options;
|
|
1160
|
+
},
|
|
1161
|
+
/**
|
|
1162
|
+
* 删除应用下的环境
|
|
1163
|
+
*
|
|
1164
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1165
|
+
*/
|
|
1166
|
+
deleteEnvironment(deleteEnvironmentRequest) {
|
|
1167
|
+
const options = {
|
|
1168
|
+
method: "DELETE",
|
|
1169
|
+
url: "/v1/applications/{application_id}/environments/{environment_id}",
|
|
1170
|
+
contentType: "application/json",
|
|
1171
|
+
queryParams: {},
|
|
1172
|
+
pathParams: {},
|
|
1173
|
+
headers: {}
|
|
1174
|
+
};
|
|
1175
|
+
const localVarHeaderParameter = {};
|
|
1176
|
+
let applicationId;
|
|
1177
|
+
let environmentId;
|
|
1178
|
+
let contentType;
|
|
1179
|
+
if (deleteEnvironmentRequest !== null && deleteEnvironmentRequest !== undefined) {
|
|
1180
|
+
if (deleteEnvironmentRequest instanceof DeleteEnvironmentRequest_1.DeleteEnvironmentRequest) {
|
|
1181
|
+
applicationId = deleteEnvironmentRequest.applicationId;
|
|
1182
|
+
environmentId = deleteEnvironmentRequest.environmentId;
|
|
1183
|
+
contentType = deleteEnvironmentRequest.contentType;
|
|
1184
|
+
}
|
|
1185
|
+
else {
|
|
1186
|
+
applicationId = deleteEnvironmentRequest['application_id'];
|
|
1187
|
+
environmentId = deleteEnvironmentRequest['environment_id'];
|
|
1188
|
+
contentType = deleteEnvironmentRequest['Content-Type'];
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1192
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling deleteEnvironment.');
|
|
1193
|
+
}
|
|
1194
|
+
if (environmentId === null || environmentId === undefined) {
|
|
1195
|
+
throw new RequiredError('environmentId', 'Required parameter environmentId was null or undefined when calling deleteEnvironment.');
|
|
1196
|
+
}
|
|
1197
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1198
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1199
|
+
}
|
|
1200
|
+
options.pathParams = { 'application_id': applicationId, 'environment_id': environmentId, };
|
|
1201
|
+
options.headers = localVarHeaderParameter;
|
|
1202
|
+
return options;
|
|
1203
|
+
},
|
|
1204
|
+
/**
|
|
1205
|
+
* 环境下删除主机
|
|
1206
|
+
*
|
|
1207
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1208
|
+
*/
|
|
1209
|
+
deleteHostFromEnvironment(deleteHostFromEnvironmentRequest) {
|
|
1210
|
+
const options = {
|
|
1211
|
+
method: "DELETE",
|
|
1212
|
+
url: "/v1/applications/{application_id}/environments/{environment_id}/{host_id}",
|
|
1213
|
+
contentType: "application/json",
|
|
1214
|
+
queryParams: {},
|
|
1215
|
+
pathParams: {},
|
|
1216
|
+
headers: {}
|
|
1217
|
+
};
|
|
1218
|
+
const localVarHeaderParameter = {};
|
|
1219
|
+
let applicationId;
|
|
1220
|
+
let environmentId;
|
|
1221
|
+
let hostId;
|
|
1222
|
+
let contentType;
|
|
1223
|
+
if (deleteHostFromEnvironmentRequest !== null && deleteHostFromEnvironmentRequest !== undefined) {
|
|
1224
|
+
if (deleteHostFromEnvironmentRequest instanceof DeleteHostFromEnvironmentRequest_1.DeleteHostFromEnvironmentRequest) {
|
|
1225
|
+
applicationId = deleteHostFromEnvironmentRequest.applicationId;
|
|
1226
|
+
environmentId = deleteHostFromEnvironmentRequest.environmentId;
|
|
1227
|
+
hostId = deleteHostFromEnvironmentRequest.hostId;
|
|
1228
|
+
contentType = deleteHostFromEnvironmentRequest.contentType;
|
|
1229
|
+
}
|
|
1230
|
+
else {
|
|
1231
|
+
applicationId = deleteHostFromEnvironmentRequest['application_id'];
|
|
1232
|
+
environmentId = deleteHostFromEnvironmentRequest['environment_id'];
|
|
1233
|
+
hostId = deleteHostFromEnvironmentRequest['host_id'];
|
|
1234
|
+
contentType = deleteHostFromEnvironmentRequest['Content-Type'];
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1238
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling deleteHostFromEnvironment.');
|
|
1239
|
+
}
|
|
1240
|
+
if (environmentId === null || environmentId === undefined) {
|
|
1241
|
+
throw new RequiredError('environmentId', 'Required parameter environmentId was null or undefined when calling deleteHostFromEnvironment.');
|
|
1242
|
+
}
|
|
1243
|
+
if (hostId === null || hostId === undefined) {
|
|
1244
|
+
throw new RequiredError('hostId', 'Required parameter hostId was null or undefined when calling deleteHostFromEnvironment.');
|
|
1245
|
+
}
|
|
1246
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1247
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1248
|
+
}
|
|
1249
|
+
options.pathParams = { 'application_id': applicationId, 'environment_id': environmentId, 'host_id': hostId, };
|
|
1250
|
+
options.headers = localVarHeaderParameter;
|
|
1251
|
+
return options;
|
|
1252
|
+
},
|
|
1253
|
+
/**
|
|
1254
|
+
* 环境下导入主机
|
|
1255
|
+
*
|
|
1256
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1257
|
+
*/
|
|
1258
|
+
importHostToEnvironment(importHostToEnvironmentRequest) {
|
|
1259
|
+
const options = {
|
|
1260
|
+
method: "POST",
|
|
1261
|
+
url: "/v1/applications/{application_id}/environments/{environment_id}/hosts/import",
|
|
1262
|
+
contentType: "application/json",
|
|
1263
|
+
queryParams: {},
|
|
1264
|
+
pathParams: {},
|
|
1265
|
+
headers: {},
|
|
1266
|
+
data: {}
|
|
1267
|
+
};
|
|
1268
|
+
const localVarHeaderParameter = {};
|
|
1269
|
+
let body;
|
|
1270
|
+
let applicationId;
|
|
1271
|
+
let environmentId;
|
|
1272
|
+
let contentType;
|
|
1273
|
+
if (importHostToEnvironmentRequest !== null && importHostToEnvironmentRequest !== undefined) {
|
|
1274
|
+
if (importHostToEnvironmentRequest instanceof ImportHostToEnvironmentRequest_1.ImportHostToEnvironmentRequest) {
|
|
1275
|
+
applicationId = importHostToEnvironmentRequest.applicationId;
|
|
1276
|
+
environmentId = importHostToEnvironmentRequest.environmentId;
|
|
1277
|
+
contentType = importHostToEnvironmentRequest.contentType;
|
|
1278
|
+
body = importHostToEnvironmentRequest.body;
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
applicationId = importHostToEnvironmentRequest['application_id'];
|
|
1282
|
+
environmentId = importHostToEnvironmentRequest['environment_id'];
|
|
1283
|
+
contentType = importHostToEnvironmentRequest['Content-Type'];
|
|
1284
|
+
body = importHostToEnvironmentRequest['body'];
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1288
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling importHostToEnvironment.');
|
|
1289
|
+
}
|
|
1290
|
+
if (environmentId === null || environmentId === undefined) {
|
|
1291
|
+
throw new RequiredError('environmentId', 'Required parameter environmentId was null or undefined when calling importHostToEnvironment.');
|
|
1292
|
+
}
|
|
1293
|
+
if (body === null || body === undefined) {
|
|
1294
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1295
|
+
}
|
|
1296
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1297
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1298
|
+
}
|
|
1299
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1300
|
+
options.data = body !== undefined ? body : {};
|
|
1301
|
+
options.pathParams = { 'application_id': applicationId, 'environment_id': environmentId, };
|
|
1302
|
+
options.headers = localVarHeaderParameter;
|
|
1303
|
+
return options;
|
|
1304
|
+
},
|
|
1305
|
+
/**
|
|
1306
|
+
* 查询应用下环境列表
|
|
1307
|
+
*
|
|
1308
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1309
|
+
*/
|
|
1310
|
+
listEnvironments(listEnvironmentsRequest) {
|
|
1311
|
+
const options = {
|
|
1312
|
+
method: "GET",
|
|
1313
|
+
url: "/v1/applications/{application_id}/environments",
|
|
1314
|
+
contentType: "application/json",
|
|
1315
|
+
queryParams: {},
|
|
1316
|
+
pathParams: {},
|
|
1317
|
+
headers: {}
|
|
1318
|
+
};
|
|
1319
|
+
const localVarHeaderParameter = {};
|
|
1320
|
+
const localVarQueryParameter = {};
|
|
1321
|
+
let applicationId;
|
|
1322
|
+
let projectId;
|
|
1323
|
+
let pageIndex;
|
|
1324
|
+
let pageSize;
|
|
1325
|
+
let name;
|
|
1326
|
+
let sortKey;
|
|
1327
|
+
let sortDir;
|
|
1328
|
+
if (listEnvironmentsRequest !== null && listEnvironmentsRequest !== undefined) {
|
|
1329
|
+
if (listEnvironmentsRequest instanceof ListEnvironmentsRequest_1.ListEnvironmentsRequest) {
|
|
1330
|
+
applicationId = listEnvironmentsRequest.applicationId;
|
|
1331
|
+
projectId = listEnvironmentsRequest.projectId;
|
|
1332
|
+
pageIndex = listEnvironmentsRequest.pageIndex;
|
|
1333
|
+
pageSize = listEnvironmentsRequest.pageSize;
|
|
1334
|
+
name = listEnvironmentsRequest.name;
|
|
1335
|
+
sortKey = listEnvironmentsRequest.sortKey;
|
|
1336
|
+
sortDir = listEnvironmentsRequest.sortDir;
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
applicationId = listEnvironmentsRequest['application_id'];
|
|
1340
|
+
projectId = listEnvironmentsRequest['project_id'];
|
|
1341
|
+
pageIndex = listEnvironmentsRequest['page_index'];
|
|
1342
|
+
pageSize = listEnvironmentsRequest['page_size'];
|
|
1343
|
+
name = listEnvironmentsRequest['name'];
|
|
1344
|
+
sortKey = listEnvironmentsRequest['sort_key'];
|
|
1345
|
+
sortDir = listEnvironmentsRequest['sort_dir'];
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1349
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling listEnvironments.');
|
|
1350
|
+
}
|
|
1351
|
+
if (projectId === null || projectId === undefined) {
|
|
1352
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listEnvironments.');
|
|
560
1353
|
}
|
|
561
|
-
if (
|
|
562
|
-
|
|
1354
|
+
if (projectId !== null && projectId !== undefined) {
|
|
1355
|
+
localVarQueryParameter['project_id'] = projectId;
|
|
563
1356
|
}
|
|
564
|
-
if (
|
|
565
|
-
localVarQueryParameter['
|
|
1357
|
+
if (pageIndex !== null && pageIndex !== undefined) {
|
|
1358
|
+
localVarQueryParameter['page_index'] = pageIndex;
|
|
566
1359
|
}
|
|
567
|
-
if (
|
|
568
|
-
|
|
1360
|
+
if (pageSize !== null && pageSize !== undefined) {
|
|
1361
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
569
1362
|
}
|
|
570
|
-
if (
|
|
571
|
-
localVarQueryParameter['
|
|
1363
|
+
if (name !== null && name !== undefined) {
|
|
1364
|
+
localVarQueryParameter['name'] = name;
|
|
572
1365
|
}
|
|
573
|
-
if (
|
|
574
|
-
|
|
1366
|
+
if (sortKey !== null && sortKey !== undefined) {
|
|
1367
|
+
localVarQueryParameter['sort_key'] = sortKey;
|
|
1368
|
+
}
|
|
1369
|
+
if (sortDir !== null && sortDir !== undefined) {
|
|
1370
|
+
localVarQueryParameter['sort_dir'] = sortDir;
|
|
575
1371
|
}
|
|
576
1372
|
options.queryParams = localVarQueryParameter;
|
|
577
|
-
options.pathParams = { '
|
|
1373
|
+
options.pathParams = { 'application_id': applicationId, };
|
|
578
1374
|
options.headers = localVarHeaderParameter;
|
|
579
1375
|
return options;
|
|
580
1376
|
},
|
|
581
1377
|
/**
|
|
582
|
-
*
|
|
1378
|
+
* 查询环境详情
|
|
583
1379
|
*
|
|
584
1380
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
585
1381
|
*/
|
|
586
|
-
|
|
1382
|
+
showEnvironmentDetail(showEnvironmentDetailRequest) {
|
|
587
1383
|
const options = {
|
|
588
1384
|
method: "GET",
|
|
589
|
-
url: "/
|
|
1385
|
+
url: "/v1/applications/{application_id}/environments/{environment_id}",
|
|
590
1386
|
contentType: "application/json",
|
|
591
1387
|
queryParams: {},
|
|
592
1388
|
pathParams: {},
|
|
593
1389
|
headers: {}
|
|
594
1390
|
};
|
|
595
1391
|
const localVarHeaderParameter = {};
|
|
596
|
-
let
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
1392
|
+
let applicationId;
|
|
1393
|
+
let environmentId;
|
|
1394
|
+
if (showEnvironmentDetailRequest !== null && showEnvironmentDetailRequest !== undefined) {
|
|
1395
|
+
if (showEnvironmentDetailRequest instanceof ShowEnvironmentDetailRequest_1.ShowEnvironmentDetailRequest) {
|
|
1396
|
+
applicationId = showEnvironmentDetailRequest.applicationId;
|
|
1397
|
+
environmentId = showEnvironmentDetailRequest.environmentId;
|
|
600
1398
|
}
|
|
601
1399
|
else {
|
|
602
|
-
|
|
1400
|
+
applicationId = showEnvironmentDetailRequest['application_id'];
|
|
1401
|
+
environmentId = showEnvironmentDetailRequest['environment_id'];
|
|
603
1402
|
}
|
|
604
1403
|
}
|
|
605
|
-
if (
|
|
606
|
-
throw new RequiredError('
|
|
1404
|
+
if (applicationId === null || applicationId === undefined) {
|
|
1405
|
+
throw new RequiredError('applicationId', 'Required parameter applicationId was null or undefined when calling showEnvironmentDetail.');
|
|
607
1406
|
}
|
|
608
|
-
|
|
1407
|
+
if (environmentId === null || environmentId === undefined) {
|
|
1408
|
+
throw new RequiredError('environmentId', 'Required parameter environmentId was null or undefined when calling showEnvironmentDetail.');
|
|
1409
|
+
}
|
|
1410
|
+
options.pathParams = { 'application_id': applicationId, 'environment_id': environmentId, };
|
|
609
1411
|
options.headers = localVarHeaderParameter;
|
|
610
1412
|
return options;
|
|
611
1413
|
},
|
|
612
1414
|
/**
|
|
613
|
-
*
|
|
1415
|
+
* 在指定主机集群下新建主机。该接口于2024年09月30日后不再维护,推荐使用新版CreateHost接口。
|
|
614
1416
|
*
|
|
615
1417
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
616
1418
|
*/
|
|
617
|
-
|
|
1419
|
+
createDeploymentHost(createDeploymentHostRequest) {
|
|
618
1420
|
const options = {
|
|
619
1421
|
method: "POST",
|
|
620
|
-
url: "/v2/
|
|
1422
|
+
url: "/v2/host-groups/{group_id}/hosts",
|
|
621
1423
|
contentType: "application/json",
|
|
622
1424
|
queryParams: {},
|
|
623
1425
|
pathParams: {},
|
|
@@ -626,22 +1428,22 @@ const ParamCreater = function () {
|
|
|
626
1428
|
};
|
|
627
1429
|
const localVarHeaderParameter = {};
|
|
628
1430
|
let body;
|
|
629
|
-
let
|
|
1431
|
+
let groupId;
|
|
630
1432
|
let contentType;
|
|
631
|
-
if (
|
|
632
|
-
if (
|
|
633
|
-
|
|
634
|
-
contentType =
|
|
635
|
-
body =
|
|
1433
|
+
if (createDeploymentHostRequest !== null && createDeploymentHostRequest !== undefined) {
|
|
1434
|
+
if (createDeploymentHostRequest instanceof CreateDeploymentHostRequest_1.CreateDeploymentHostRequest) {
|
|
1435
|
+
groupId = createDeploymentHostRequest.groupId;
|
|
1436
|
+
contentType = createDeploymentHostRequest.contentType;
|
|
1437
|
+
body = createDeploymentHostRequest.body;
|
|
636
1438
|
}
|
|
637
1439
|
else {
|
|
638
|
-
|
|
639
|
-
contentType =
|
|
640
|
-
body =
|
|
1440
|
+
groupId = createDeploymentHostRequest['group_id'];
|
|
1441
|
+
contentType = createDeploymentHostRequest['Content-Type'];
|
|
1442
|
+
body = createDeploymentHostRequest['body'];
|
|
641
1443
|
}
|
|
642
1444
|
}
|
|
643
|
-
if (
|
|
644
|
-
throw new RequiredError('
|
|
1445
|
+
if (groupId === null || groupId === undefined) {
|
|
1446
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling createDeploymentHost.');
|
|
645
1447
|
}
|
|
646
1448
|
if (body === null || body === undefined) {
|
|
647
1449
|
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
@@ -651,7 +1453,7 @@ const ParamCreater = function () {
|
|
|
651
1453
|
}
|
|
652
1454
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
653
1455
|
options.data = body !== undefined ? body : {};
|
|
654
|
-
options.pathParams = { '
|
|
1456
|
+
options.pathParams = { 'group_id': groupId, };
|
|
655
1457
|
options.headers = localVarHeaderParameter;
|
|
656
1458
|
return options;
|
|
657
1459
|
},
|
|
@@ -660,10 +1462,10 @@ const ParamCreater = function () {
|
|
|
660
1462
|
*
|
|
661
1463
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
662
1464
|
*/
|
|
663
|
-
|
|
1465
|
+
createHost(createHostRequest) {
|
|
664
1466
|
const options = {
|
|
665
1467
|
method: "POST",
|
|
666
|
-
url: "/
|
|
1468
|
+
url: "/v1/resources/host-groups/{group_id}/hosts",
|
|
667
1469
|
contentType: "application/json",
|
|
668
1470
|
queryParams: {},
|
|
669
1471
|
pathParams: {},
|
|
@@ -674,20 +1476,20 @@ const ParamCreater = function () {
|
|
|
674
1476
|
let body;
|
|
675
1477
|
let groupId;
|
|
676
1478
|
let contentType;
|
|
677
|
-
if (
|
|
678
|
-
if (
|
|
679
|
-
groupId =
|
|
680
|
-
contentType =
|
|
681
|
-
body =
|
|
1479
|
+
if (createHostRequest !== null && createHostRequest !== undefined) {
|
|
1480
|
+
if (createHostRequest instanceof CreateHostRequest_1.CreateHostRequest) {
|
|
1481
|
+
groupId = createHostRequest.groupId;
|
|
1482
|
+
contentType = createHostRequest.contentType;
|
|
1483
|
+
body = createHostRequest.body;
|
|
682
1484
|
}
|
|
683
1485
|
else {
|
|
684
|
-
groupId =
|
|
685
|
-
contentType =
|
|
686
|
-
body =
|
|
1486
|
+
groupId = createHostRequest['group_id'];
|
|
1487
|
+
contentType = createHostRequest['Content-Type'];
|
|
1488
|
+
body = createHostRequest['body'];
|
|
687
1489
|
}
|
|
688
1490
|
}
|
|
689
1491
|
if (groupId === null || groupId === undefined) {
|
|
690
|
-
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling
|
|
1492
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling createHost.');
|
|
691
1493
|
}
|
|
692
1494
|
if (body === null || body === undefined) {
|
|
693
1495
|
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
@@ -702,7 +1504,7 @@ const ParamCreater = function () {
|
|
|
702
1504
|
return options;
|
|
703
1505
|
},
|
|
704
1506
|
/**
|
|
705
|
-
* 根据主机id
|
|
1507
|
+
* 根据主机id删除主机。该接口于2024年9月30日后不再维护。
|
|
706
1508
|
*
|
|
707
1509
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
708
1510
|
*/
|
|
@@ -745,7 +1547,7 @@ const ParamCreater = function () {
|
|
|
745
1547
|
return options;
|
|
746
1548
|
},
|
|
747
1549
|
/**
|
|
748
|
-
* 根据主机集群id
|
|
1550
|
+
* 根据主机集群id查询指定主机集群下的主机列表。该接口于2024年09月30日后不再维护,推荐使用新版ListNewHosts接口。
|
|
749
1551
|
*
|
|
750
1552
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
751
1553
|
*/
|
|
@@ -820,7 +1622,82 @@ const ParamCreater = function () {
|
|
|
820
1622
|
return options;
|
|
821
1623
|
},
|
|
822
1624
|
/**
|
|
823
|
-
*
|
|
1625
|
+
* 根据主机集群id查询指定主机集群下的主机列表。
|
|
1626
|
+
*
|
|
1627
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1628
|
+
*/
|
|
1629
|
+
listNewHosts(listNewHostsRequest) {
|
|
1630
|
+
const options = {
|
|
1631
|
+
method: "GET",
|
|
1632
|
+
url: "/v1/resources/host-groups/{group_id}/hosts",
|
|
1633
|
+
contentType: "application/json",
|
|
1634
|
+
queryParams: {},
|
|
1635
|
+
pathParams: {},
|
|
1636
|
+
headers: {}
|
|
1637
|
+
};
|
|
1638
|
+
const localVarHeaderParameter = {};
|
|
1639
|
+
const localVarQueryParameter = {};
|
|
1640
|
+
let groupId;
|
|
1641
|
+
let keyField;
|
|
1642
|
+
let environmentId;
|
|
1643
|
+
let pageIndex;
|
|
1644
|
+
let pageSize;
|
|
1645
|
+
let sortKey;
|
|
1646
|
+
let sortDir;
|
|
1647
|
+
let asProxy;
|
|
1648
|
+
if (listNewHostsRequest !== null && listNewHostsRequest !== undefined) {
|
|
1649
|
+
if (listNewHostsRequest instanceof ListNewHostsRequest_1.ListNewHostsRequest) {
|
|
1650
|
+
groupId = listNewHostsRequest.groupId;
|
|
1651
|
+
keyField = listNewHostsRequest.keyField;
|
|
1652
|
+
environmentId = listNewHostsRequest.environmentId;
|
|
1653
|
+
pageIndex = listNewHostsRequest.pageIndex;
|
|
1654
|
+
pageSize = listNewHostsRequest.pageSize;
|
|
1655
|
+
sortKey = listNewHostsRequest.sortKey;
|
|
1656
|
+
sortDir = listNewHostsRequest.sortDir;
|
|
1657
|
+
asProxy = listNewHostsRequest.asProxy;
|
|
1658
|
+
}
|
|
1659
|
+
else {
|
|
1660
|
+
groupId = listNewHostsRequest['group_id'];
|
|
1661
|
+
keyField = listNewHostsRequest['key_field'];
|
|
1662
|
+
environmentId = listNewHostsRequest['environment_id'];
|
|
1663
|
+
pageIndex = listNewHostsRequest['page_index'];
|
|
1664
|
+
pageSize = listNewHostsRequest['page_size'];
|
|
1665
|
+
sortKey = listNewHostsRequest['sort_key'];
|
|
1666
|
+
sortDir = listNewHostsRequest['sort_dir'];
|
|
1667
|
+
asProxy = listNewHostsRequest['as_proxy'];
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
if (groupId === null || groupId === undefined) {
|
|
1671
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling listNewHosts.');
|
|
1672
|
+
}
|
|
1673
|
+
if (keyField !== null && keyField !== undefined) {
|
|
1674
|
+
localVarQueryParameter['key_field'] = keyField;
|
|
1675
|
+
}
|
|
1676
|
+
if (environmentId !== null && environmentId !== undefined) {
|
|
1677
|
+
localVarQueryParameter['environment_id'] = environmentId;
|
|
1678
|
+
}
|
|
1679
|
+
if (pageIndex !== null && pageIndex !== undefined) {
|
|
1680
|
+
localVarQueryParameter['page_index'] = pageIndex;
|
|
1681
|
+
}
|
|
1682
|
+
if (pageSize !== null && pageSize !== undefined) {
|
|
1683
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
1684
|
+
}
|
|
1685
|
+
if (sortKey !== null && sortKey !== undefined) {
|
|
1686
|
+
localVarQueryParameter['sort_key'] = sortKey;
|
|
1687
|
+
}
|
|
1688
|
+
if (sortDir !== null && sortDir !== undefined) {
|
|
1689
|
+
localVarQueryParameter['sort_dir'] = sortDir;
|
|
1690
|
+
}
|
|
1691
|
+
if (asProxy !== null && asProxy !== undefined) {
|
|
1692
|
+
localVarQueryParameter['as_proxy'] = asProxy;
|
|
1693
|
+
}
|
|
1694
|
+
options.queryParams = localVarQueryParameter;
|
|
1695
|
+
options.pathParams = { 'group_id': groupId, };
|
|
1696
|
+
options.headers = localVarHeaderParameter;
|
|
1697
|
+
return options;
|
|
1698
|
+
},
|
|
1699
|
+
/**
|
|
1700
|
+
* 根据主机id查询主机详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowHostDetail接口。
|
|
824
1701
|
*
|
|
825
1702
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
826
1703
|
*/
|
|
@@ -857,7 +1734,44 @@ const ParamCreater = function () {
|
|
|
857
1734
|
return options;
|
|
858
1735
|
},
|
|
859
1736
|
/**
|
|
860
|
-
* 根据主机id
|
|
1737
|
+
* 根据主机id查询主机详情。
|
|
1738
|
+
*
|
|
1739
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1740
|
+
*/
|
|
1741
|
+
showHostDetail(showHostDetailRequest) {
|
|
1742
|
+
const options = {
|
|
1743
|
+
method: "GET",
|
|
1744
|
+
url: "/v1/resources/host-groups/{group_id}/hosts/{host_id}",
|
|
1745
|
+
contentType: "application/json",
|
|
1746
|
+
queryParams: {},
|
|
1747
|
+
pathParams: {},
|
|
1748
|
+
headers: {}
|
|
1749
|
+
};
|
|
1750
|
+
const localVarHeaderParameter = {};
|
|
1751
|
+
let groupId;
|
|
1752
|
+
let hostId;
|
|
1753
|
+
if (showHostDetailRequest !== null && showHostDetailRequest !== undefined) {
|
|
1754
|
+
if (showHostDetailRequest instanceof ShowHostDetailRequest_1.ShowHostDetailRequest) {
|
|
1755
|
+
groupId = showHostDetailRequest.groupId;
|
|
1756
|
+
hostId = showHostDetailRequest.hostId;
|
|
1757
|
+
}
|
|
1758
|
+
else {
|
|
1759
|
+
groupId = showHostDetailRequest['group_id'];
|
|
1760
|
+
hostId = showHostDetailRequest['host_id'];
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
if (groupId === null || groupId === undefined) {
|
|
1764
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling showHostDetail.');
|
|
1765
|
+
}
|
|
1766
|
+
if (hostId === null || hostId === undefined) {
|
|
1767
|
+
throw new RequiredError('hostId', 'Required parameter hostId was null or undefined when calling showHostDetail.');
|
|
1768
|
+
}
|
|
1769
|
+
options.pathParams = { 'group_id': groupId, 'host_id': hostId, };
|
|
1770
|
+
options.headers = localVarHeaderParameter;
|
|
1771
|
+
return options;
|
|
1772
|
+
},
|
|
1773
|
+
/**
|
|
1774
|
+
* 根据主机id修改主机信息。该接口于2024年9月30日后不再维护。
|
|
861
1775
|
*
|
|
862
1776
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
863
1777
|
*/
|
|
@@ -909,7 +1823,7 @@ const ParamCreater = function () {
|
|
|
909
1823
|
return options;
|
|
910
1824
|
},
|
|
911
1825
|
/**
|
|
912
|
-
*
|
|
1826
|
+
* 在项目下新建主机集群。该接口于2024年09月30日后不再维护,推荐使用新版CreateHostCluster接口。
|
|
913
1827
|
*
|
|
914
1828
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
915
1829
|
*/
|
|
@@ -948,7 +1862,46 @@ const ParamCreater = function () {
|
|
|
948
1862
|
return options;
|
|
949
1863
|
},
|
|
950
1864
|
/**
|
|
951
|
-
*
|
|
1865
|
+
* 在项目下新建主机集群。
|
|
1866
|
+
*
|
|
1867
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1868
|
+
*/
|
|
1869
|
+
createHostCluster(createHostClusterRequest) {
|
|
1870
|
+
const options = {
|
|
1871
|
+
method: "POST",
|
|
1872
|
+
url: "/v1/resources/host-groups",
|
|
1873
|
+
contentType: "application/json",
|
|
1874
|
+
queryParams: {},
|
|
1875
|
+
pathParams: {},
|
|
1876
|
+
headers: {},
|
|
1877
|
+
data: {}
|
|
1878
|
+
};
|
|
1879
|
+
const localVarHeaderParameter = {};
|
|
1880
|
+
let body;
|
|
1881
|
+
let contentType;
|
|
1882
|
+
if (createHostClusterRequest !== null && createHostClusterRequest !== undefined) {
|
|
1883
|
+
if (createHostClusterRequest instanceof CreateHostClusterRequest_1.CreateHostClusterRequest) {
|
|
1884
|
+
contentType = createHostClusterRequest.contentType;
|
|
1885
|
+
body = createHostClusterRequest.body;
|
|
1886
|
+
}
|
|
1887
|
+
else {
|
|
1888
|
+
contentType = createHostClusterRequest['Content-Type'];
|
|
1889
|
+
body = createHostClusterRequest['body'];
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
if (body === null || body === undefined) {
|
|
1893
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1894
|
+
}
|
|
1895
|
+
if (contentType !== undefined && contentType !== null) {
|
|
1896
|
+
localVarHeaderParameter['Content-Type'] = String(contentType);
|
|
1897
|
+
}
|
|
1898
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1899
|
+
options.data = body !== undefined ? body : {};
|
|
1900
|
+
options.headers = localVarHeaderParameter;
|
|
1901
|
+
return options;
|
|
1902
|
+
},
|
|
1903
|
+
/**
|
|
1904
|
+
* 根据主机集群id删除主机集群。该接口于2024年9月30日后不再维护。
|
|
952
1905
|
*
|
|
953
1906
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
954
1907
|
*/
|
|
@@ -989,6 +1942,89 @@ const ParamCreater = function () {
|
|
|
989
1942
|
*
|
|
990
1943
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
991
1944
|
*/
|
|
1945
|
+
listHostClusters(listHostClustersRequest) {
|
|
1946
|
+
const options = {
|
|
1947
|
+
method: "GET",
|
|
1948
|
+
url: "/v1/resources/host-groups",
|
|
1949
|
+
contentType: "application/json",
|
|
1950
|
+
queryParams: {},
|
|
1951
|
+
pathParams: {},
|
|
1952
|
+
headers: {}
|
|
1953
|
+
};
|
|
1954
|
+
const localVarHeaderParameter = {};
|
|
1955
|
+
const localVarQueryParameter = {};
|
|
1956
|
+
let projectId;
|
|
1957
|
+
let name;
|
|
1958
|
+
let os;
|
|
1959
|
+
let pageIndex;
|
|
1960
|
+
let pageSize;
|
|
1961
|
+
let sortField;
|
|
1962
|
+
let sortType;
|
|
1963
|
+
let isProxyMode;
|
|
1964
|
+
let slaveClusterId;
|
|
1965
|
+
if (listHostClustersRequest !== null && listHostClustersRequest !== undefined) {
|
|
1966
|
+
if (listHostClustersRequest instanceof ListHostClustersRequest_1.ListHostClustersRequest) {
|
|
1967
|
+
projectId = listHostClustersRequest.projectId;
|
|
1968
|
+
name = listHostClustersRequest.name;
|
|
1969
|
+
os = listHostClustersRequest.os;
|
|
1970
|
+
pageIndex = listHostClustersRequest.pageIndex;
|
|
1971
|
+
pageSize = listHostClustersRequest.pageSize;
|
|
1972
|
+
sortField = listHostClustersRequest.sortField;
|
|
1973
|
+
sortType = listHostClustersRequest.sortType;
|
|
1974
|
+
isProxyMode = listHostClustersRequest.isProxyMode;
|
|
1975
|
+
slaveClusterId = listHostClustersRequest.slaveClusterId;
|
|
1976
|
+
}
|
|
1977
|
+
else {
|
|
1978
|
+
projectId = listHostClustersRequest['project_id'];
|
|
1979
|
+
name = listHostClustersRequest['name'];
|
|
1980
|
+
os = listHostClustersRequest['os'];
|
|
1981
|
+
pageIndex = listHostClustersRequest['page_index'];
|
|
1982
|
+
pageSize = listHostClustersRequest['page_size'];
|
|
1983
|
+
sortField = listHostClustersRequest['sort_field'];
|
|
1984
|
+
sortType = listHostClustersRequest['sort_type'];
|
|
1985
|
+
isProxyMode = listHostClustersRequest['is_proxy_mode'];
|
|
1986
|
+
slaveClusterId = listHostClustersRequest['slave_cluster_id'];
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
if (projectId === null || projectId === undefined) {
|
|
1990
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listHostClusters.');
|
|
1991
|
+
}
|
|
1992
|
+
if (projectId !== null && projectId !== undefined) {
|
|
1993
|
+
localVarQueryParameter['project_id'] = projectId;
|
|
1994
|
+
}
|
|
1995
|
+
if (name !== null && name !== undefined) {
|
|
1996
|
+
localVarQueryParameter['name'] = name;
|
|
1997
|
+
}
|
|
1998
|
+
if (os !== null && os !== undefined) {
|
|
1999
|
+
localVarQueryParameter['os'] = os;
|
|
2000
|
+
}
|
|
2001
|
+
if (pageIndex !== null && pageIndex !== undefined) {
|
|
2002
|
+
localVarQueryParameter['page_index'] = pageIndex;
|
|
2003
|
+
}
|
|
2004
|
+
if (pageSize !== null && pageSize !== undefined) {
|
|
2005
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
2006
|
+
}
|
|
2007
|
+
if (sortField !== null && sortField !== undefined) {
|
|
2008
|
+
localVarQueryParameter['sort_field'] = sortField;
|
|
2009
|
+
}
|
|
2010
|
+
if (sortType !== null && sortType !== undefined) {
|
|
2011
|
+
localVarQueryParameter['sort_type'] = sortType;
|
|
2012
|
+
}
|
|
2013
|
+
if (isProxyMode !== null && isProxyMode !== undefined) {
|
|
2014
|
+
localVarQueryParameter['is_proxy_mode'] = isProxyMode;
|
|
2015
|
+
}
|
|
2016
|
+
if (slaveClusterId !== null && slaveClusterId !== undefined) {
|
|
2017
|
+
localVarQueryParameter['slave_cluster_id'] = slaveClusterId;
|
|
2018
|
+
}
|
|
2019
|
+
options.queryParams = localVarQueryParameter;
|
|
2020
|
+
options.headers = localVarHeaderParameter;
|
|
2021
|
+
return options;
|
|
2022
|
+
},
|
|
2023
|
+
/**
|
|
2024
|
+
* 按条件查询主机集群列表。该接口于2024年09月30日后不再维护,推荐使用新版ListHostClusters接口。
|
|
2025
|
+
*
|
|
2026
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2027
|
+
*/
|
|
992
2028
|
listHostGroups(listHostGroupsRequest) {
|
|
993
2029
|
const options = {
|
|
994
2030
|
method: "GET",
|
|
@@ -1000,8 +2036,8 @@ const ParamCreater = function () {
|
|
|
1000
2036
|
};
|
|
1001
2037
|
const localVarHeaderParameter = {};
|
|
1002
2038
|
const localVarQueryParameter = {};
|
|
1003
|
-
let regionName;
|
|
1004
2039
|
let projectId;
|
|
2040
|
+
let regionName;
|
|
1005
2041
|
let os;
|
|
1006
2042
|
let offset;
|
|
1007
2043
|
let limit;
|
|
@@ -1010,8 +2046,8 @@ const ParamCreater = function () {
|
|
|
1010
2046
|
let sortDir;
|
|
1011
2047
|
if (listHostGroupsRequest !== null && listHostGroupsRequest !== undefined) {
|
|
1012
2048
|
if (listHostGroupsRequest instanceof ListHostGroupsRequest_1.ListHostGroupsRequest) {
|
|
1013
|
-
regionName = listHostGroupsRequest.regionName;
|
|
1014
2049
|
projectId = listHostGroupsRequest.projectId;
|
|
2050
|
+
regionName = listHostGroupsRequest.regionName;
|
|
1015
2051
|
os = listHostGroupsRequest.os;
|
|
1016
2052
|
offset = listHostGroupsRequest.offset;
|
|
1017
2053
|
limit = listHostGroupsRequest.limit;
|
|
@@ -1020,8 +2056,8 @@ const ParamCreater = function () {
|
|
|
1020
2056
|
sortDir = listHostGroupsRequest.sortDir;
|
|
1021
2057
|
}
|
|
1022
2058
|
else {
|
|
1023
|
-
regionName = listHostGroupsRequest['region_name'];
|
|
1024
2059
|
projectId = listHostGroupsRequest['project_id'];
|
|
2060
|
+
regionName = listHostGroupsRequest['region_name'];
|
|
1025
2061
|
os = listHostGroupsRequest['os'];
|
|
1026
2062
|
offset = listHostGroupsRequest['offset'];
|
|
1027
2063
|
limit = listHostGroupsRequest['limit'];
|
|
@@ -1030,15 +2066,18 @@ const ParamCreater = function () {
|
|
|
1030
2066
|
sortDir = listHostGroupsRequest['sort_dir'];
|
|
1031
2067
|
}
|
|
1032
2068
|
}
|
|
2069
|
+
if (projectId === null || projectId === undefined) {
|
|
2070
|
+
throw new RequiredError('projectId', 'Required parameter projectId was null or undefined when calling listHostGroups.');
|
|
2071
|
+
}
|
|
2072
|
+
if (projectId !== null && projectId !== undefined) {
|
|
2073
|
+
localVarQueryParameter['project_id'] = projectId;
|
|
2074
|
+
}
|
|
1033
2075
|
if (regionName === null || regionName === undefined) {
|
|
1034
2076
|
throw new RequiredError('regionName', 'Required parameter regionName was null or undefined when calling listHostGroups.');
|
|
1035
2077
|
}
|
|
1036
2078
|
if (regionName !== null && regionName !== undefined) {
|
|
1037
2079
|
localVarQueryParameter['region_name'] = regionName;
|
|
1038
2080
|
}
|
|
1039
|
-
if (projectId !== null && projectId !== undefined) {
|
|
1040
|
-
localVarQueryParameter['project_id'] = projectId;
|
|
1041
|
-
}
|
|
1042
2081
|
if (os !== null && os !== undefined) {
|
|
1043
2082
|
localVarQueryParameter['os'] = os;
|
|
1044
2083
|
}
|
|
@@ -1062,7 +2101,7 @@ const ParamCreater = function () {
|
|
|
1062
2101
|
return options;
|
|
1063
2102
|
},
|
|
1064
2103
|
/**
|
|
1065
|
-
* 根据主机集群id
|
|
2104
|
+
* 根据主机集群id查询主机集群详情。该接口于2024年09月30日后不再维护,推荐使用新版ShowHostClusterDetail接口。
|
|
1066
2105
|
*
|
|
1067
2106
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1068
2107
|
*/
|
|
@@ -1093,7 +2132,38 @@ const ParamCreater = function () {
|
|
|
1093
2132
|
return options;
|
|
1094
2133
|
},
|
|
1095
2134
|
/**
|
|
1096
|
-
* 根据主机集群id
|
|
2135
|
+
* 根据主机集群id查询主机集群详情。
|
|
2136
|
+
*
|
|
2137
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2138
|
+
*/
|
|
2139
|
+
showHostClusterDetail(showHostClusterDetailRequest) {
|
|
2140
|
+
const options = {
|
|
2141
|
+
method: "GET",
|
|
2142
|
+
url: "/v1/resources/host-groups/{group_id}",
|
|
2143
|
+
contentType: "application/json",
|
|
2144
|
+
queryParams: {},
|
|
2145
|
+
pathParams: {},
|
|
2146
|
+
headers: {}
|
|
2147
|
+
};
|
|
2148
|
+
const localVarHeaderParameter = {};
|
|
2149
|
+
let groupId;
|
|
2150
|
+
if (showHostClusterDetailRequest !== null && showHostClusterDetailRequest !== undefined) {
|
|
2151
|
+
if (showHostClusterDetailRequest instanceof ShowHostClusterDetailRequest_1.ShowHostClusterDetailRequest) {
|
|
2152
|
+
groupId = showHostClusterDetailRequest.groupId;
|
|
2153
|
+
}
|
|
2154
|
+
else {
|
|
2155
|
+
groupId = showHostClusterDetailRequest['group_id'];
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (groupId === null || groupId === undefined) {
|
|
2159
|
+
throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling showHostClusterDetail.');
|
|
2160
|
+
}
|
|
2161
|
+
options.pathParams = { 'group_id': groupId, };
|
|
2162
|
+
options.headers = localVarHeaderParameter;
|
|
2163
|
+
return options;
|
|
2164
|
+
},
|
|
2165
|
+
/**
|
|
2166
|
+
* 根据主机集群id修改主机集群信息。该接口于2024年9月30日后不再维护。
|
|
1097
2167
|
*
|
|
1098
2168
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1099
2169
|
*/
|