@huaweicloud/huaweicloud-sdk-cbr 3.1.36 → 3.1.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/package.json +2 -2
  2. package/v1/CbrClient.d.ts +192 -0
  3. package/v1/CbrClient.js +390 -0
  4. package/v1/CbrRegion.d.ts +1 -0
  5. package/v1/CbrRegion.js +3 -1
  6. package/v1/model/AddAgentPathRequest.d.ts +10 -0
  7. package/v1/model/AddAgentPathRequest.js +28 -0
  8. package/v1/model/AddAgentPathResponse.d.ts +8 -0
  9. package/v1/model/AddAgentPathResponse.js +35 -0
  10. package/v1/model/Agent.d.ts +48 -0
  11. package/v1/model/Agent.js +158 -0
  12. package/v1/model/AgentAddPathReq.d.ts +7 -0
  13. package/v1/model/AgentAddPathReq.js +24 -0
  14. package/v1/model/AgentRegister.d.ts +31 -0
  15. package/v1/model/AgentRegister.js +111 -0
  16. package/v1/model/AgentRegisterReq.d.ts +6 -0
  17. package/v1/model/AgentRegisterReq.js +14 -0
  18. package/v1/model/AgentRemovePathReq.d.ts +7 -0
  19. package/v1/model/AgentRemovePathReq.js +24 -0
  20. package/v1/model/AgentUpdate.d.ts +12 -0
  21. package/v1/model/AgentUpdate.js +22 -0
  22. package/v1/model/AgentUpdateReq.d.ts +6 -0
  23. package/v1/model/AgentUpdateReq.js +14 -0
  24. package/v1/model/BillingCreate.d.ts +0 -5
  25. package/v1/model/BillingCreate.js +0 -14
  26. package/v1/model/InstancesResourceDetail.d.ts +6 -0
  27. package/v1/model/InstancesResourceDetail.js +13 -0
  28. package/v1/model/ListAgentRequest.d.ts +13 -0
  29. package/v1/model/ListAgentRequest.js +35 -0
  30. package/v1/model/ListAgentResponse.d.ts +13 -0
  31. package/v1/model/ListAgentResponse.js +43 -0
  32. package/v1/model/Path.d.ts +15 -0
  33. package/v1/model/Path.js +45 -0
  34. package/v1/model/PolicyoODCreate.d.ts +4 -0
  35. package/v1/model/PolicyoODCreate.js +14 -0
  36. package/v1/model/RegisterAgentRequest.d.ts +6 -0
  37. package/v1/model/RegisterAgentRequest.js +13 -0
  38. package/v1/model/RegisterAgentResponse.d.ts +7 -0
  39. package/v1/model/RegisterAgentResponse.js +31 -0
  40. package/v1/model/RemoveAgentPathRequest.d.ts +10 -0
  41. package/v1/model/RemoveAgentPathRequest.js +28 -0
  42. package/v1/model/RemoveAgentPathResponse.d.ts +10 -0
  43. package/v1/model/RemoveAgentPathResponse.js +45 -0
  44. package/v1/model/ShowAgentRequest.d.ts +7 -0
  45. package/v1/model/ShowAgentRequest.js +24 -0
  46. package/v1/model/ShowAgentResponse.d.ts +7 -0
  47. package/v1/model/ShowAgentResponse.js +31 -0
  48. package/v1/model/TagResource.d.ts +4 -4
  49. package/v1/model/UnregisterAgentRequest.d.ts +7 -0
  50. package/v1/model/UnregisterAgentRequest.js +24 -0
  51. package/v1/model/UnregisterAgentResponse.d.ts +4 -0
  52. package/v1/model/UnregisterAgentResponse.js +27 -0
  53. package/v1/model/UpdateAgentRequest.d.ts +10 -0
  54. package/v1/model/UpdateAgentRequest.js +28 -0
  55. package/v1/model/UpdateAgentResponse.d.ts +7 -0
  56. package/v1/model/UpdateAgentResponse.js +31 -0
  57. package/v1/public-api.d.ts +23 -1
  58. package/v1/public-api.js +23 -1
  59. package/v1/model/BillbingCreateExtraInfo.d.ts +0 -11
  60. package/v1/model/BillbingCreateExtraInfo.js +0 -37
package/v1/CbrClient.js CHANGED
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RequiredError = exports.ParamCreater = exports.CbrClient = void 0;
19
19
  var ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
20
+ var AddAgentPathRequest_1 = require("./model/AddAgentPathRequest");
20
21
  var AddMemberRequest_1 = require("./model/AddMemberRequest");
21
22
  var AddVaultResourceRequest_1 = require("./model/AddVaultResourceRequest");
22
23
  var AssociateVaultPolicyRequest_1 = require("./model/AssociateVaultPolicyRequest");
@@ -34,14 +35,18 @@ var DeleteVaultRequest_1 = require("./model/DeleteVaultRequest");
34
35
  var DeleteVaultTagRequest_1 = require("./model/DeleteVaultTagRequest");
35
36
  var DisassociateVaultPolicyRequest_1 = require("./model/DisassociateVaultPolicyRequest");
36
37
  var ImportBackupRequest_1 = require("./model/ImportBackupRequest");
38
+ var ListAgentRequest_1 = require("./model/ListAgentRequest");
37
39
  var ListBackupsRequest_1 = require("./model/ListBackupsRequest");
38
40
  var ListOpLogsRequest_1 = require("./model/ListOpLogsRequest");
39
41
  var ListPoliciesRequest_1 = require("./model/ListPoliciesRequest");
40
42
  var ListProtectableRequest_1 = require("./model/ListProtectableRequest");
41
43
  var ListVaultRequest_1 = require("./model/ListVaultRequest");
42
44
  var MigrateVaultResourceRequest_1 = require("./model/MigrateVaultResourceRequest");
45
+ var RegisterAgentRequest_1 = require("./model/RegisterAgentRequest");
46
+ var RemoveAgentPathRequest_1 = require("./model/RemoveAgentPathRequest");
43
47
  var RemoveVaultResourceRequest_1 = require("./model/RemoveVaultResourceRequest");
44
48
  var RestoreBackupRequest_1 = require("./model/RestoreBackupRequest");
49
+ var ShowAgentRequest_1 = require("./model/ShowAgentRequest");
45
50
  var ShowBackupRequest_1 = require("./model/ShowBackupRequest");
46
51
  var ShowCheckpointRequest_1 = require("./model/ShowCheckpointRequest");
47
52
  var ShowMemberDetailRequest_1 = require("./model/ShowMemberDetailRequest");
@@ -52,6 +57,8 @@ var ShowProtectableRequest_1 = require("./model/ShowProtectableRequest");
52
57
  var ShowVaultRequest_1 = require("./model/ShowVaultRequest");
53
58
  var ShowVaultResourceInstancesRequest_1 = require("./model/ShowVaultResourceInstancesRequest");
54
59
  var ShowVaultTagRequest_1 = require("./model/ShowVaultTagRequest");
60
+ var UnregisterAgentRequest_1 = require("./model/UnregisterAgentRequest");
61
+ var UpdateAgentRequest_1 = require("./model/UpdateAgentRequest");
55
62
  var UpdateMemberStatusRequest_1 = require("./model/UpdateMemberStatusRequest");
56
63
  var UpdatePolicyRequest_1 = require("./model/UpdatePolicyRequest");
57
64
  var UpdateVaultRequest_1 = require("./model/UpdateVaultRequest");
@@ -65,6 +72,23 @@ var CbrClient = /** @class */ (function () {
65
72
  CbrClient.prototype.getPath = function () {
66
73
  return __dirname;
67
74
  };
75
+ /**
76
+ * 对客户端新增备份路径,新增的路径不会校验是否存在。
77
+ *
78
+ * Please refer to HUAWEI cloud API Explorer for details.
79
+ *
80
+ * @summary 新增备份路径
81
+ * @param {string} agentId 客户端ID
82
+ * @param {AgentAddPathReq} addAgentPathRequestBody 新增文件备份路径参数
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ CbrClient.prototype.addAgentPath = function (addAgentPathRequest) {
87
+ var options = (0, exports.ParamCreater)().addAgentPath(addAgentPathRequest);
88
+ // @ts-ignore
89
+ options['responseHeaders'] = [''];
90
+ return this.hcClient.sendRequest(options);
91
+ };
68
92
  /**
69
93
  * 添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
70
94
  *
@@ -354,6 +378,25 @@ var CbrClient = /** @class */ (function () {
354
378
  options['responseHeaders'] = [''];
355
379
  return this.hcClient.sendRequest(options);
356
380
  };
381
+ /**
382
+ * 查询客户端列表
383
+ *
384
+ * Please refer to HUAWEI cloud API Explorer for details.
385
+ *
386
+ * @summary 查询客户端列表
387
+ * @param {string} [limit] 每页显示条目数,正整数
388
+ * @param {number} [offset] 偏移值,正整数
389
+ * @param {string} [status] 状态
390
+ * @param {string} [agentId] 客户端ID
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ CbrClient.prototype.listAgent = function (listAgentRequest) {
395
+ var options = (0, exports.ParamCreater)().listAgent(listAgentRequest);
396
+ // @ts-ignore
397
+ options['responseHeaders'] = [''];
398
+ return this.hcClient.sendRequest(options);
399
+ };
357
400
  /**
358
401
  * 查询所有副本
359
402
  *
@@ -502,6 +545,39 @@ var CbrClient = /** @class */ (function () {
502
545
  options['responseHeaders'] = [''];
503
546
  return this.hcClient.sendRequest(options);
504
547
  };
548
+ /**
549
+ * 注册客户端,安装时候由Agent调用,无需手动注册。
550
+ *
551
+ * Please refer to HUAWEI cloud API Explorer for details.
552
+ *
553
+ * @summary 注册客户端
554
+ * @param {AgentRegisterReq} registerAgentRequestBody 注册客户端参数明细
555
+ * @param {*} [options] Override http request option.
556
+ * @throws {RequiredError}
557
+ */
558
+ CbrClient.prototype.registerAgent = function (registerAgentRequest) {
559
+ var options = (0, exports.ParamCreater)().registerAgent(registerAgentRequest);
560
+ // @ts-ignore
561
+ options['responseHeaders'] = [''];
562
+ return this.hcClient.sendRequest(options);
563
+ };
564
+ /**
565
+ * 移除已添加的文件备份路径。
566
+ *
567
+ * Please refer to HUAWEI cloud API Explorer for details.
568
+ *
569
+ * @summary 移除备份路径
570
+ * @param {string} agentId 客户端ID
571
+ * @param {AgentRemovePathReq} removeAgentPathRequestBody 移除文件备份路径参数
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ CbrClient.prototype.removeAgentPath = function (removeAgentPathRequest) {
576
+ var options = (0, exports.ParamCreater)().removeAgentPath(removeAgentPathRequest);
577
+ // @ts-ignore
578
+ options['responseHeaders'] = [''];
579
+ return this.hcClient.sendRequest(options);
580
+ };
505
581
  /**
506
582
  * 移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
507
583
  *
@@ -536,6 +612,22 @@ var CbrClient = /** @class */ (function () {
536
612
  options['responseHeaders'] = [''];
537
613
  return this.hcClient.sendRequest(options);
538
614
  };
615
+ /**
616
+ * 查询指定客户端
617
+ *
618
+ * Please refer to HUAWEI cloud API Explorer for details.
619
+ *
620
+ * @summary 查询指定客户端
621
+ * @param {string} agentId 客户端ID
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ CbrClient.prototype.showAgent = function (showAgentRequest) {
626
+ var options = (0, exports.ParamCreater)().showAgent(showAgentRequest);
627
+ // @ts-ignore
628
+ options['responseHeaders'] = [''];
629
+ return this.hcClient.sendRequest(options);
630
+ };
539
631
  /**
540
632
  * 根据指定id查询单个副本。
541
633
  *
@@ -739,6 +831,39 @@ var CbrClient = /** @class */ (function () {
739
831
  options['responseHeaders'] = [''];
740
832
  return this.hcClient.sendRequest(options);
741
833
  };
834
+ /**
835
+ * 移除客户端,移除客户端时将会删除该客户端所有备份,请谨慎操作。
836
+ *
837
+ * Please refer to HUAWEI cloud API Explorer for details.
838
+ *
839
+ * @summary 移除客户端
840
+ * @param {string} agentId 客户端ID
841
+ * @param {*} [options] Override http request option.
842
+ * @throws {RequiredError}
843
+ */
844
+ CbrClient.prototype.unregisterAgent = function (unregisterAgentRequest) {
845
+ var options = (0, exports.ParamCreater)().unregisterAgent(unregisterAgentRequest);
846
+ // @ts-ignore
847
+ options['responseHeaders'] = [''];
848
+ return this.hcClient.sendRequest(options);
849
+ };
850
+ /**
851
+ * 修改客户端状态
852
+ *
853
+ * Please refer to HUAWEI cloud API Explorer for details.
854
+ *
855
+ * @summary 修改客户端
856
+ * @param {string} agentId
857
+ * @param {AgentUpdateReq} updateAgentRequestBody
858
+ * @param {*} [options] Override http request option.
859
+ * @throws {RequiredError}
860
+ */
861
+ CbrClient.prototype.updateAgent = function (updateAgentRequest) {
862
+ var options = (0, exports.ParamCreater)().updateAgent(updateAgentRequest);
863
+ // @ts-ignore
864
+ options['responseHeaders'] = [''];
865
+ return this.hcClient.sendRequest(options);
866
+ };
742
867
  /**
743
868
  * 更新备份共享成员的状态,需要接收方执行此API。
744
869
  *
@@ -796,6 +921,46 @@ var CbrClient = /** @class */ (function () {
796
921
  exports.CbrClient = CbrClient;
797
922
  var ParamCreater = function () {
798
923
  return {
924
+ /**
925
+ * 对客户端新增备份路径,新增的路径不会校验是否存在。
926
+ *
927
+ * Please refer to HUAWEI cloud API Explorer for details.
928
+ */
929
+ addAgentPath: function (addAgentPathRequest) {
930
+ var options = {
931
+ method: "POST",
932
+ url: "/v3/{project_id}/agents/{agent_id}/add-path",
933
+ contentType: "application/json;charset=UTF-8",
934
+ queryParams: {},
935
+ pathParams: {},
936
+ headers: {},
937
+ data: {}
938
+ };
939
+ var localVarHeaderParameter = {};
940
+ var body;
941
+ var agentId;
942
+ if (addAgentPathRequest !== null && addAgentPathRequest !== undefined) {
943
+ if (addAgentPathRequest instanceof AddAgentPathRequest_1.AddAgentPathRequest) {
944
+ agentId = addAgentPathRequest.agentId;
945
+ body = addAgentPathRequest.body;
946
+ }
947
+ else {
948
+ agentId = addAgentPathRequest['agent_id'];
949
+ body = addAgentPathRequest['body'];
950
+ }
951
+ }
952
+ if (agentId === null || agentId === undefined) {
953
+ throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling addAgentPath.');
954
+ }
955
+ if (body === null || body === undefined) {
956
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
957
+ }
958
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
959
+ options.data = body !== undefined ? body : {};
960
+ options.pathParams = { 'agent_id': agentId, };
961
+ options.headers = localVarHeaderParameter;
962
+ return options;
963
+ },
799
964
  /**
800
965
  * 添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
801
966
  *
@@ -1410,6 +1575,56 @@ var ParamCreater = function () {
1410
1575
  options.headers = localVarHeaderParameter;
1411
1576
  return options;
1412
1577
  },
1578
+ /**
1579
+ * 查询客户端列表
1580
+ *
1581
+ * Please refer to HUAWEI cloud API Explorer for details.
1582
+ */
1583
+ listAgent: function (listAgentRequest) {
1584
+ var options = {
1585
+ method: "GET",
1586
+ url: "/v3/{project_id}/agents",
1587
+ contentType: "application/json",
1588
+ queryParams: {},
1589
+ pathParams: {},
1590
+ headers: {}
1591
+ };
1592
+ var localVarHeaderParameter = {};
1593
+ var localVarQueryParameter = {};
1594
+ var limit;
1595
+ var offset;
1596
+ var status;
1597
+ var agentId;
1598
+ if (listAgentRequest !== null && listAgentRequest !== undefined) {
1599
+ if (listAgentRequest instanceof ListAgentRequest_1.ListAgentRequest) {
1600
+ limit = listAgentRequest.limit;
1601
+ offset = listAgentRequest.offset;
1602
+ status = listAgentRequest.status;
1603
+ agentId = listAgentRequest.agentId;
1604
+ }
1605
+ else {
1606
+ limit = listAgentRequest['limit'];
1607
+ offset = listAgentRequest['offset'];
1608
+ status = listAgentRequest['status'];
1609
+ agentId = listAgentRequest['agent_id'];
1610
+ }
1611
+ }
1612
+ if (limit !== null && limit !== undefined) {
1613
+ localVarQueryParameter['limit'] = limit;
1614
+ }
1615
+ if (offset !== null && offset !== undefined) {
1616
+ localVarQueryParameter['offset'] = offset;
1617
+ }
1618
+ if (status !== null && status !== undefined) {
1619
+ localVarQueryParameter['status'] = status;
1620
+ }
1621
+ if (agentId !== null && agentId !== undefined) {
1622
+ localVarQueryParameter['agent_id'] = agentId;
1623
+ }
1624
+ options.queryParams = localVarQueryParameter;
1625
+ options.headers = localVarHeaderParameter;
1626
+ return options;
1627
+ },
1413
1628
  /**
1414
1629
  * 查询所有副本
1415
1630
  *
@@ -1917,6 +2132,79 @@ var ParamCreater = function () {
1917
2132
  options.headers = localVarHeaderParameter;
1918
2133
  return options;
1919
2134
  },
2135
+ /**
2136
+ * 注册客户端,安装时候由Agent调用,无需手动注册。
2137
+ *
2138
+ * Please refer to HUAWEI cloud API Explorer for details.
2139
+ */
2140
+ registerAgent: function (registerAgentRequest) {
2141
+ var options = {
2142
+ method: "POST",
2143
+ url: "/v3/{project_id}/agents",
2144
+ contentType: "application/json;charset=UTF-8",
2145
+ queryParams: {},
2146
+ pathParams: {},
2147
+ headers: {},
2148
+ data: {}
2149
+ };
2150
+ var localVarHeaderParameter = {};
2151
+ var body;
2152
+ if (registerAgentRequest !== null && registerAgentRequest !== undefined) {
2153
+ if (registerAgentRequest instanceof RegisterAgentRequest_1.RegisterAgentRequest) {
2154
+ body = registerAgentRequest.body;
2155
+ }
2156
+ else {
2157
+ body = registerAgentRequest['body'];
2158
+ }
2159
+ }
2160
+ if (body === null || body === undefined) {
2161
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
2162
+ }
2163
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
2164
+ options.data = body !== undefined ? body : {};
2165
+ options.headers = localVarHeaderParameter;
2166
+ return options;
2167
+ },
2168
+ /**
2169
+ * 移除已添加的文件备份路径。
2170
+ *
2171
+ * Please refer to HUAWEI cloud API Explorer for details.
2172
+ */
2173
+ removeAgentPath: function (removeAgentPathRequest) {
2174
+ var options = {
2175
+ method: "POST",
2176
+ url: "/v3/{project_id}/agents/{agent_id}/remove-path",
2177
+ contentType: "application/json;charset=UTF-8",
2178
+ queryParams: {},
2179
+ pathParams: {},
2180
+ headers: {},
2181
+ data: {}
2182
+ };
2183
+ var localVarHeaderParameter = {};
2184
+ var body;
2185
+ var agentId;
2186
+ if (removeAgentPathRequest !== null && removeAgentPathRequest !== undefined) {
2187
+ if (removeAgentPathRequest instanceof RemoveAgentPathRequest_1.RemoveAgentPathRequest) {
2188
+ agentId = removeAgentPathRequest.agentId;
2189
+ body = removeAgentPathRequest.body;
2190
+ }
2191
+ else {
2192
+ agentId = removeAgentPathRequest['agent_id'];
2193
+ body = removeAgentPathRequest['body'];
2194
+ }
2195
+ }
2196
+ if (agentId === null || agentId === undefined) {
2197
+ throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling removeAgentPath.');
2198
+ }
2199
+ if (body === null || body === undefined) {
2200
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
2201
+ }
2202
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
2203
+ options.data = body !== undefined ? body : {};
2204
+ options.pathParams = { 'agent_id': agentId, };
2205
+ options.headers = localVarHeaderParameter;
2206
+ return options;
2207
+ },
1920
2208
  /**
1921
2209
  * 移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
1922
2210
  *
@@ -1997,6 +2285,37 @@ var ParamCreater = function () {
1997
2285
  options.headers = localVarHeaderParameter;
1998
2286
  return options;
1999
2287
  },
2288
+ /**
2289
+ * 查询指定客户端
2290
+ *
2291
+ * Please refer to HUAWEI cloud API Explorer for details.
2292
+ */
2293
+ showAgent: function (showAgentRequest) {
2294
+ var options = {
2295
+ method: "GET",
2296
+ url: "/v3/{project_id}/agents/{agent_id}",
2297
+ contentType: "application/json",
2298
+ queryParams: {},
2299
+ pathParams: {},
2300
+ headers: {}
2301
+ };
2302
+ var localVarHeaderParameter = {};
2303
+ var agentId;
2304
+ if (showAgentRequest !== null && showAgentRequest !== undefined) {
2305
+ if (showAgentRequest instanceof ShowAgentRequest_1.ShowAgentRequest) {
2306
+ agentId = showAgentRequest.agentId;
2307
+ }
2308
+ else {
2309
+ agentId = showAgentRequest['agent_id'];
2310
+ }
2311
+ }
2312
+ if (agentId === null || agentId === undefined) {
2313
+ throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling showAgent.');
2314
+ }
2315
+ options.pathParams = { 'agent_id': agentId, };
2316
+ options.headers = localVarHeaderParameter;
2317
+ return options;
2318
+ },
2000
2319
  /**
2001
2320
  * 根据指定id查询单个副本。
2002
2321
  *
@@ -2410,6 +2729,77 @@ var ParamCreater = function () {
2410
2729
  options.headers = localVarHeaderParameter;
2411
2730
  return options;
2412
2731
  },
2732
+ /**
2733
+ * 移除客户端,移除客户端时将会删除该客户端所有备份,请谨慎操作。
2734
+ *
2735
+ * Please refer to HUAWEI cloud API Explorer for details.
2736
+ */
2737
+ unregisterAgent: function (unregisterAgentRequest) {
2738
+ var options = {
2739
+ method: "DELETE",
2740
+ url: "/v3/{project_id}/agents/{agent_id}",
2741
+ contentType: "application/json",
2742
+ queryParams: {},
2743
+ pathParams: {},
2744
+ headers: {}
2745
+ };
2746
+ var localVarHeaderParameter = {};
2747
+ var agentId;
2748
+ if (unregisterAgentRequest !== null && unregisterAgentRequest !== undefined) {
2749
+ if (unregisterAgentRequest instanceof UnregisterAgentRequest_1.UnregisterAgentRequest) {
2750
+ agentId = unregisterAgentRequest.agentId;
2751
+ }
2752
+ else {
2753
+ agentId = unregisterAgentRequest['agent_id'];
2754
+ }
2755
+ }
2756
+ if (agentId === null || agentId === undefined) {
2757
+ throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling unregisterAgent.');
2758
+ }
2759
+ options.pathParams = { 'agent_id': agentId, };
2760
+ options.headers = localVarHeaderParameter;
2761
+ return options;
2762
+ },
2763
+ /**
2764
+ * 修改客户端状态
2765
+ *
2766
+ * Please refer to HUAWEI cloud API Explorer for details.
2767
+ */
2768
+ updateAgent: function (updateAgentRequest) {
2769
+ var options = {
2770
+ method: "PUT",
2771
+ url: "/v3/{project_id}/agents/{agent_id}",
2772
+ contentType: "application/json;charset=UTF-8",
2773
+ queryParams: {},
2774
+ pathParams: {},
2775
+ headers: {},
2776
+ data: {}
2777
+ };
2778
+ var localVarHeaderParameter = {};
2779
+ var body;
2780
+ var agentId;
2781
+ if (updateAgentRequest !== null && updateAgentRequest !== undefined) {
2782
+ if (updateAgentRequest instanceof UpdateAgentRequest_1.UpdateAgentRequest) {
2783
+ agentId = updateAgentRequest.agentId;
2784
+ body = updateAgentRequest.body;
2785
+ }
2786
+ else {
2787
+ agentId = updateAgentRequest['agent_id'];
2788
+ body = updateAgentRequest['body'];
2789
+ }
2790
+ }
2791
+ if (agentId === null || agentId === undefined) {
2792
+ throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling updateAgent.');
2793
+ }
2794
+ if (body === null || body === undefined) {
2795
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
2796
+ }
2797
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
2798
+ options.data = body !== undefined ? body : {};
2799
+ options.pathParams = { 'agent_id': agentId, };
2800
+ options.headers = localVarHeaderParameter;
2801
+ return options;
2802
+ },
2413
2803
  /**
2414
2804
  * 更新备份共享成员的状态,需要接收方执行此API。
2415
2805
  *
package/v1/CbrRegion.d.ts CHANGED
@@ -17,6 +17,7 @@ export declare class CbrRegion {
17
17
  static CN_SOUTH_2: any;
18
18
  static CN_NORTH_9: any;
19
19
  static CN_NORTH_2: any;
20
+ static AP_SOUTHEAST_4: any;
20
21
  private static REGION_MAP;
21
22
  static valueOf(regionId: string): any;
22
23
  }
package/v1/CbrRegion.js CHANGED
@@ -33,6 +33,7 @@ var CbrRegion = exports.CbrRegion = /** @class */ (function () {
33
33
  CbrRegion.CN_SOUTH_2 = new region_1.Region("cn-south-2", ["https://cbr.cn-south-2.myhuaweicloud.com"]);
34
34
  CbrRegion.CN_NORTH_9 = new region_1.Region("cn-north-9", ["https://cbr.cn-north-9.myhuaweicloud.com"]);
35
35
  CbrRegion.CN_NORTH_2 = new region_1.Region("cn-north-2", ["https://cbr.cn-north-2.myhuaweicloud.com"]);
36
+ CbrRegion.AP_SOUTHEAST_4 = new region_1.Region("ap-southeast-4", ["https://cbr.ap-southeast-4.myhuaweicloud.com"]);
36
37
  CbrRegion.REGION_MAP = {
37
38
  "cn-north-1": CbrRegion.CN_NORTH_1,
38
39
  "cn-north-4": CbrRegion.CN_NORTH_4,
@@ -51,7 +52,8 @@ var CbrRegion = exports.CbrRegion = /** @class */ (function () {
51
52
  "la-south-2": CbrRegion.LA_SOUTH_2,
52
53
  "cn-south-2": CbrRegion.CN_SOUTH_2,
53
54
  "cn-north-9": CbrRegion.CN_NORTH_9,
54
- "cn-north-2": CbrRegion.CN_NORTH_2
55
+ "cn-north-2": CbrRegion.CN_NORTH_2,
56
+ "ap-southeast-4": CbrRegion.AP_SOUTHEAST_4
55
57
  };
56
58
  return CbrRegion;
57
59
  }());
@@ -0,0 +1,10 @@
1
+ import { AgentAddPathReq } from './AgentAddPathReq';
2
+ export declare class AddAgentPathRequest {
3
+ private 'agent_id';
4
+ body?: AgentAddPathReq;
5
+ constructor(agentId?: any);
6
+ withAgentId(agentId: string): AddAgentPathRequest;
7
+ set agentId(agentId: string | undefined);
8
+ get agentId(): string | undefined;
9
+ withBody(body: AgentAddPathReq): AddAgentPathRequest;
10
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddAgentPathRequest = void 0;
4
+ var AddAgentPathRequest = /** @class */ (function () {
5
+ function AddAgentPathRequest(agentId) {
6
+ this['agent_id'] = agentId;
7
+ }
8
+ AddAgentPathRequest.prototype.withAgentId = function (agentId) {
9
+ this['agent_id'] = agentId;
10
+ return this;
11
+ };
12
+ Object.defineProperty(AddAgentPathRequest.prototype, "agentId", {
13
+ get: function () {
14
+ return this['agent_id'];
15
+ },
16
+ set: function (agentId) {
17
+ this['agent_id'] = agentId;
18
+ },
19
+ enumerable: false,
20
+ configurable: true
21
+ });
22
+ AddAgentPathRequest.prototype.withBody = function (body) {
23
+ this['body'] = body;
24
+ return this;
25
+ };
26
+ return AddAgentPathRequest;
27
+ }());
28
+ exports.AddAgentPathRequest = AddAgentPathRequest;
@@ -0,0 +1,8 @@
1
+ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse";
2
+ export declare class AddAgentPathResponse extends SdkResponse {
3
+ added?: Array<string>;
4
+ existed?: Array<string>;
5
+ constructor();
6
+ withAdded(added: Array<string>): AddAgentPathResponse;
7
+ withExisted(existed: Array<string>): AddAgentPathResponse;
8
+ }
@@ -0,0 +1,35 @@
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.AddAgentPathResponse = void 0;
19
+ var SdkResponse_1 = require("@huaweicloud/huaweicloud-sdk-core/SdkResponse");
20
+ var AddAgentPathResponse = /** @class */ (function (_super) {
21
+ __extends(AddAgentPathResponse, _super);
22
+ function AddAgentPathResponse() {
23
+ return _super.call(this) || this;
24
+ }
25
+ AddAgentPathResponse.prototype.withAdded = function (added) {
26
+ this['added'] = added;
27
+ return this;
28
+ };
29
+ AddAgentPathResponse.prototype.withExisted = function (existed) {
30
+ this['existed'] = existed;
31
+ return this;
32
+ };
33
+ return AddAgentPathResponse;
34
+ }(SdkResponse_1.SdkResponse));
35
+ exports.AddAgentPathResponse = AddAgentPathResponse;
@@ -0,0 +1,48 @@
1
+ import { Path } from './Path';
2
+ export declare class Agent {
3
+ private 'created_at'?;
4
+ private 'updated_at'?;
5
+ private 'agent_id';
6
+ private 'agent_version'?;
7
+ private 'agent_type'?;
8
+ private 'host_name'?;
9
+ private 'host_nickname'?;
10
+ private 'host_ip'?;
11
+ private 'host_os'?;
12
+ status?: string;
13
+ private 'last_active_time'?;
14
+ paths?: Array<Path>;
15
+ constructor(agentId?: any);
16
+ withCreatedAt(createdAt: Date): Agent;
17
+ set createdAt(createdAt: Date | undefined);
18
+ get createdAt(): Date | undefined;
19
+ withUpdatedAt(updatedAt: Date): Agent;
20
+ set updatedAt(updatedAt: Date | undefined);
21
+ get updatedAt(): Date | undefined;
22
+ withAgentId(agentId: string): Agent;
23
+ set agentId(agentId: string | undefined);
24
+ get agentId(): string | undefined;
25
+ withAgentVersion(agentVersion: string): Agent;
26
+ set agentVersion(agentVersion: string | undefined);
27
+ get agentVersion(): string | undefined;
28
+ withAgentType(agentType: string): Agent;
29
+ set agentType(agentType: string | undefined);
30
+ get agentType(): string | undefined;
31
+ withHostName(hostName: string): Agent;
32
+ set hostName(hostName: string | undefined);
33
+ get hostName(): string | undefined;
34
+ withHostNickname(hostNickname: string): Agent;
35
+ set hostNickname(hostNickname: string | undefined);
36
+ get hostNickname(): string | undefined;
37
+ withHostIp(hostIp: string): Agent;
38
+ set hostIp(hostIp: string | undefined);
39
+ get hostIp(): string | undefined;
40
+ withHostOs(hostOs: string): Agent;
41
+ set hostOs(hostOs: string | undefined);
42
+ get hostOs(): string | undefined;
43
+ withStatus(status: string): Agent;
44
+ withLastActiveTime(lastActiveTime: Date): Agent;
45
+ set lastActiveTime(lastActiveTime: Date | undefined);
46
+ get lastActiveTime(): Date | undefined;
47
+ withPaths(paths: Array<Path>): Agent;
48
+ }