@huaweicloud/huaweicloud-sdk-vpc 3.0.19-beta → 3.0.23-beta

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.
Files changed (99) hide show
  1. package/package.json +2 -2
  2. package/v2/model/AllowedAddressPair.d.ts +2 -2
  3. package/v2/model/AllowedAddressPair.js +2 -1
  4. package/v3/VpcClient.d.ts +319 -0
  5. package/v3/VpcClient.js +727 -0
  6. package/v3/model/AddExtendCidrOption.d.ts +7 -0
  7. package/v3/model/AddExtendCidrOption.js +24 -0
  8. package/v3/model/AddVpcExtendCidrRequest.d.ts +10 -0
  9. package/v3/model/AddVpcExtendCidrRequest.js +28 -0
  10. package/v3/model/AddVpcExtendCidrRequestBody.d.ts +10 -0
  11. package/v3/model/AddVpcExtendCidrRequestBody.js +28 -0
  12. package/v3/model/AddVpcExtendCidrResponse.d.ts +11 -0
  13. package/v3/model/AddVpcExtendCidrResponse.js +45 -0
  14. package/v3/model/AddressGroup.d.ts +29 -0
  15. package/v3/model/AddressGroup.js +99 -0
  16. package/v3/model/CloudResource.d.ts +11 -0
  17. package/v3/model/CloudResource.js +39 -0
  18. package/v3/model/CreateAddressGroupOption.d.ts +15 -0
  19. package/v3/model/CreateAddressGroupOption.js +47 -0
  20. package/v3/model/CreateAddressGroupRequest.d.ts +6 -0
  21. package/v3/model/CreateAddressGroupRequest.js +13 -0
  22. package/v3/model/CreateAddressGroupRequestBody.d.ts +12 -0
  23. package/v3/model/CreateAddressGroupRequestBody.js +38 -0
  24. package/v3/model/CreateAddressGroupResponse.d.ts +13 -0
  25. package/v3/model/CreateAddressGroupResponse.js +55 -0
  26. package/v3/model/CreateVpcOption.d.ts +16 -0
  27. package/v3/model/CreateVpcOption.js +41 -0
  28. package/v3/model/CreateVpcRequest.d.ts +6 -0
  29. package/v3/model/CreateVpcRequest.js +13 -0
  30. package/v3/model/CreateVpcRequestBody.d.ts +10 -0
  31. package/v3/model/CreateVpcRequestBody.js +28 -0
  32. package/v3/model/CreateVpcResponse.d.ts +16 -0
  33. package/v3/model/CreateVpcResponse.js +69 -0
  34. package/v3/model/DeleteAddressGroupRequest.d.ts +7 -0
  35. package/v3/model/DeleteAddressGroupRequest.js +24 -0
  36. package/v3/model/DeleteAddressGroupResponse.d.ts +4 -0
  37. package/v3/model/DeleteAddressGroupResponse.js +27 -0
  38. package/v3/model/DeleteIpAddressGroupForceRequest.d.ts +7 -0
  39. package/v3/model/DeleteIpAddressGroupForceRequest.js +24 -0
  40. package/v3/model/DeleteIpAddressGroupForceResponse.d.ts +4 -0
  41. package/v3/model/DeleteIpAddressGroupForceResponse.js +27 -0
  42. package/v3/model/DeleteVpcRequest.d.ts +7 -0
  43. package/v3/model/DeleteVpcRequest.js +24 -0
  44. package/v3/model/DeleteVpcResponse.d.ts +4 -0
  45. package/v3/model/DeleteVpcResponse.js +27 -0
  46. package/v3/model/ListAddressGroupRequest.d.ts +17 -0
  47. package/v3/model/ListAddressGroupRequest.js +43 -0
  48. package/v3/model/ListAddressGroupResponse.d.ts +18 -0
  49. package/v3/model/ListAddressGroupResponse.js +69 -0
  50. package/v3/model/ListVpcsRequest.d.ts +15 -0
  51. package/v3/model/ListVpcsRequest.js +33 -0
  52. package/v3/model/ListVpcsResponse.d.ts +16 -0
  53. package/v3/model/ListVpcsResponse.js +59 -0
  54. package/v3/model/MigrateSubNetworkInterfaceOption.d.ts +17 -0
  55. package/v3/model/MigrateSubNetworkInterfaceOption.js +39 -0
  56. package/v3/model/MigrateSubNetworkInterfaceRequest.d.ts +6 -0
  57. package/v3/model/MigrateSubNetworkInterfaceRequest.js +13 -0
  58. package/v3/model/MigrateSubNetworkInterfaceRequestBody.d.ts +12 -0
  59. package/v3/model/MigrateSubNetworkInterfaceRequestBody.js +38 -0
  60. package/v3/model/MigrateSubNetworkInterfaceResponse.d.ts +13 -0
  61. package/v3/model/MigrateSubNetworkInterfaceResponse.js +55 -0
  62. package/v3/model/RemoveExtendCidrOption.d.ts +7 -0
  63. package/v3/model/RemoveExtendCidrOption.js +24 -0
  64. package/v3/model/RemoveVpcExtendCidrRequest.d.ts +10 -0
  65. package/v3/model/RemoveVpcExtendCidrRequest.js +28 -0
  66. package/v3/model/RemoveVpcExtendCidrRequestBody.d.ts +10 -0
  67. package/v3/model/RemoveVpcExtendCidrRequestBody.js +28 -0
  68. package/v3/model/RemoveVpcExtendCidrResponse.d.ts +11 -0
  69. package/v3/model/RemoveVpcExtendCidrResponse.js +45 -0
  70. package/v3/model/ShowAddressGroupRequest.d.ts +7 -0
  71. package/v3/model/ShowAddressGroupRequest.js +24 -0
  72. package/v3/model/ShowAddressGroupResponse.d.ts +13 -0
  73. package/v3/model/ShowAddressGroupResponse.js +55 -0
  74. package/v3/model/ShowVpcRequest.d.ts +7 -0
  75. package/v3/model/ShowVpcRequest.js +24 -0
  76. package/v3/model/ShowVpcResponse.d.ts +11 -0
  77. package/v3/model/ShowVpcResponse.js +45 -0
  78. package/v3/model/Tag.d.ts +7 -0
  79. package/v3/model/Tag.js +19 -0
  80. package/v3/model/UpdateAddressGroupOption.d.ts +11 -0
  81. package/v3/model/UpdateAddressGroupOption.js +31 -0
  82. package/v3/model/UpdateAddressGroupRequest.d.ts +10 -0
  83. package/v3/model/UpdateAddressGroupRequest.js +28 -0
  84. package/v3/model/UpdateAddressGroupRequestBody.d.ts +12 -0
  85. package/v3/model/UpdateAddressGroupRequestBody.js +38 -0
  86. package/v3/model/UpdateAddressGroupResponse.d.ts +13 -0
  87. package/v3/model/UpdateAddressGroupResponse.js +55 -0
  88. package/v3/model/UpdateVpcOption.d.ts +7 -0
  89. package/v3/model/UpdateVpcOption.js +17 -0
  90. package/v3/model/UpdateVpcRequest.d.ts +10 -0
  91. package/v3/model/UpdateVpcRequest.js +28 -0
  92. package/v3/model/UpdateVpcRequestBody.d.ts +10 -0
  93. package/v3/model/UpdateVpcRequestBody.js +28 -0
  94. package/v3/model/UpdateVpcResponse.d.ts +16 -0
  95. package/v3/model/UpdateVpcResponse.js +69 -0
  96. package/v3/model/Vpc.d.ts +41 -0
  97. package/v3/model/Vpc.js +129 -0
  98. package/v3/public-api.d.ts +46 -0
  99. package/v3/public-api.js +46 -0
package/v3/VpcClient.js CHANGED
@@ -17,21 +17,35 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RequiredError = exports.ParamCreater = exports.VpcClient = void 0;
19
19
  var ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
20
+ var AddVpcExtendCidrRequest_1 = require("./model/AddVpcExtendCidrRequest");
20
21
  var BatchCreateSubNetworkInterfaceRequest_1 = require("./model/BatchCreateSubNetworkInterfaceRequest");
22
+ var CreateAddressGroupRequest_1 = require("./model/CreateAddressGroupRequest");
21
23
  var CreateSecurityGroupRequest_1 = require("./model/CreateSecurityGroupRequest");
22
24
  var CreateSecurityGroupRuleRequest_1 = require("./model/CreateSecurityGroupRuleRequest");
23
25
  var CreateSubNetworkInterfaceRequest_1 = require("./model/CreateSubNetworkInterfaceRequest");
26
+ var CreateVpcRequest_1 = require("./model/CreateVpcRequest");
27
+ var DeleteAddressGroupRequest_1 = require("./model/DeleteAddressGroupRequest");
28
+ var DeleteIpAddressGroupForceRequest_1 = require("./model/DeleteIpAddressGroupForceRequest");
24
29
  var DeleteSecurityGroupRequest_1 = require("./model/DeleteSecurityGroupRequest");
25
30
  var DeleteSecurityGroupRuleRequest_1 = require("./model/DeleteSecurityGroupRuleRequest");
26
31
  var DeleteSubNetworkInterfaceRequest_1 = require("./model/DeleteSubNetworkInterfaceRequest");
32
+ var DeleteVpcRequest_1 = require("./model/DeleteVpcRequest");
33
+ var ListAddressGroupRequest_1 = require("./model/ListAddressGroupRequest");
27
34
  var ListSecurityGroupRulesRequest_1 = require("./model/ListSecurityGroupRulesRequest");
28
35
  var ListSecurityGroupsRequest_1 = require("./model/ListSecurityGroupsRequest");
29
36
  var ListSubNetworkInterfacesRequest_1 = require("./model/ListSubNetworkInterfacesRequest");
37
+ var ListVpcsRequest_1 = require("./model/ListVpcsRequest");
38
+ var MigrateSubNetworkInterfaceRequest_1 = require("./model/MigrateSubNetworkInterfaceRequest");
39
+ var RemoveVpcExtendCidrRequest_1 = require("./model/RemoveVpcExtendCidrRequest");
40
+ var ShowAddressGroupRequest_1 = require("./model/ShowAddressGroupRequest");
30
41
  var ShowSecurityGroupRequest_1 = require("./model/ShowSecurityGroupRequest");
31
42
  var ShowSecurityGroupRuleRequest_1 = require("./model/ShowSecurityGroupRuleRequest");
32
43
  var ShowSubNetworkInterfaceRequest_1 = require("./model/ShowSubNetworkInterfaceRequest");
44
+ var ShowVpcRequest_1 = require("./model/ShowVpcRequest");
45
+ var UpdateAddressGroupRequest_1 = require("./model/UpdateAddressGroupRequest");
33
46
  var UpdateSecurityGroupRequest_1 = require("./model/UpdateSecurityGroupRequest");
34
47
  var UpdateSubNetworkInterfaceRequest_1 = require("./model/UpdateSubNetworkInterfaceRequest");
48
+ var UpdateVpcRequest_1 = require("./model/UpdateVpcRequest");
35
49
  var VpcClient = /** @class */ (function () {
36
50
  function VpcClient(client) {
37
51
  this.hcClient = client;
@@ -193,6 +207,19 @@ var VpcClient = /** @class */ (function () {
193
207
  // @ts-ignore
194
208
  return this.hcClient.sendRequest(options);
195
209
  };
210
+ /**
211
+ * 批量迁移辅助弹性网卡
212
+ * @summary 迁移辅助弹性网卡
213
+ * @param {MigrateSubNetworkInterfaceRequestBody} migrateSubNetworkInterfaceRequestBody This is a auto create Body Object
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ VpcClient.prototype.migrateSubNetworkInterface = function (migrateSubNetworkInterfaceRequest) {
218
+ var options = (0, exports.ParamCreater)().migrateSubNetworkInterface(migrateSubNetworkInterfaceRequest);
219
+ options['responseHeaders'] = [''];
220
+ // @ts-ignore
221
+ return this.hcClient.sendRequest(options);
222
+ };
196
223
  /**
197
224
  * 查询单个安全组详情
198
225
  * @summary 查询安全组
@@ -272,6 +299,189 @@ var VpcClient = /** @class */ (function () {
272
299
  // @ts-ignore
273
300
  return this.hcClient.sendRequest(options);
274
301
  };
302
+ /**
303
+ * 创建地址组
304
+ * @summary 创建地址组
305
+ * @param {CreateAddressGroupRequestBody} createAddressGroupRequestBody This is a auto create Body Object
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ VpcClient.prototype.createAddressGroup = function (createAddressGroupRequest) {
310
+ var options = (0, exports.ParamCreater)().createAddressGroup(createAddressGroupRequest);
311
+ options['responseHeaders'] = [''];
312
+ // @ts-ignore
313
+ return this.hcClient.sendRequest(options);
314
+ };
315
+ /**
316
+ * 删除地址组,非强制删除,删除前请确保未被其他资源引用
317
+ * @summary 删除地址组
318
+ * @param {string} addressGroupId 地址组的唯一标识
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ VpcClient.prototype.deleteAddressGroup = function (deleteAddressGroupRequest) {
323
+ var options = (0, exports.ParamCreater)().deleteAddressGroup(deleteAddressGroupRequest);
324
+ options['responseHeaders'] = [''];
325
+ // @ts-ignore
326
+ return this.hcClient.sendRequest(options);
327
+ };
328
+ /**
329
+ * 强制删除地址组,删除的地址组与安全组规则关联时,会删除地址组与关联的安全组规则。
330
+ * @summary 强制删除地址组
331
+ * @param {string} addressGroupId IP地址组的唯一标识,要删除的IP地址组ID
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ VpcClient.prototype.deleteIpAddressGroupForce = function (deleteIpAddressGroupForceRequest) {
336
+ var options = (0, exports.ParamCreater)().deleteIpAddressGroupForce(deleteIpAddressGroupForceRequest);
337
+ options['responseHeaders'] = [''];
338
+ // @ts-ignore
339
+ return this.hcClient.sendRequest(options);
340
+ };
341
+ /**
342
+ * 查询地址组列表,根据过滤条件进行过滤。
343
+ * @summary 查询地址组列表
344
+ * @param {number} [limit] 功能说明:每页返回的个数 取值范围:0~2000
345
+ * @param {string} [marker] 分页查询起始的资源ID,为空时查询第一页
346
+ * @param {Array<string>} [id] 地址组唯一标识,填写后接口按照id进行过滤,支持多ID同时过滤
347
+ * @param {Array<string>} [name] 地址组名称,填写后按照名称进行过滤,支持多名称同时过滤
348
+ * @param {number} [ipVersion] IP地址组ip版本,当前只支持ipv4,填写后按照ip版本进行过滤
349
+ * @param {Array<string>} [description] 地址组描述信息,填写后按照地址组描述信息过滤,支持多描述同时过滤
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ VpcClient.prototype.listAddressGroup = function (listAddressGroupRequest) {
354
+ var options = (0, exports.ParamCreater)().listAddressGroup(listAddressGroupRequest);
355
+ options['responseHeaders'] = [''];
356
+ // @ts-ignore
357
+ return this.hcClient.sendRequest(options);
358
+ };
359
+ /**
360
+ * 查询地址组详情。
361
+ * @summary 查询地址组
362
+ * @param {string} addressGroupId 地址组的唯一标识
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ VpcClient.prototype.showAddressGroup = function (showAddressGroupRequest) {
367
+ var options = (0, exports.ParamCreater)().showAddressGroup(showAddressGroupRequest);
368
+ options['responseHeaders'] = [''];
369
+ // @ts-ignore
370
+ return this.hcClient.sendRequest(options);
371
+ };
372
+ /**
373
+ * 更新地址组。
374
+ * @summary 更新地址组
375
+ * @param {string} addressGroupId 地址组的唯一标识
376
+ * @param {UpdateAddressGroupRequestBody} updateAddressGroupRequestBody This is a auto create Body Object
377
+ * @param {*} [options] Override http request option.
378
+ * @throws {RequiredError}
379
+ */
380
+ VpcClient.prototype.updateAddressGroup = function (updateAddressGroupRequest) {
381
+ var options = (0, exports.ParamCreater)().updateAddressGroup(updateAddressGroupRequest);
382
+ options['responseHeaders'] = [''];
383
+ // @ts-ignore
384
+ return this.hcClient.sendRequest(options);
385
+ };
386
+ /**
387
+ * 添加VPC的扩展网段
388
+ * @summary 添加VPC扩展网段
389
+ * @param {string} vpcId VPC资源ID
390
+ * @param {AddVpcExtendCidrRequestBody} addVpcExtendCidrRequestBody This is a auto create Body Object
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ VpcClient.prototype.addVpcExtendCidr = function (addVpcExtendCidrRequest) {
395
+ var options = (0, exports.ParamCreater)().addVpcExtendCidr(addVpcExtendCidrRequest);
396
+ options['responseHeaders'] = [''];
397
+ // @ts-ignore
398
+ return this.hcClient.sendRequest(options);
399
+ };
400
+ /**
401
+ * 创建虚拟私有云
402
+ * @summary 创建VPC
403
+ * @param {CreateVpcRequestBody} createVpcRequestBody This is a auto create Body Object
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ VpcClient.prototype.createVpc = function (createVpcRequest) {
408
+ var options = (0, exports.ParamCreater)().createVpc(createVpcRequest);
409
+ options['responseHeaders'] = [''];
410
+ // @ts-ignore
411
+ return this.hcClient.sendRequest(options);
412
+ };
413
+ /**
414
+ * 删除VPC
415
+ * @summary 删除VPC
416
+ * @param {string} vpcId VPC的资源ID
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ VpcClient.prototype.deleteVpc = function (deleteVpcRequest) {
421
+ var options = (0, exports.ParamCreater)().deleteVpc(deleteVpcRequest);
422
+ options['responseHeaders'] = [''];
423
+ // @ts-ignore
424
+ return this.hcClient.sendRequest(options);
425
+ };
426
+ /**
427
+ * 查询vpc列表
428
+ * @summary 查询VPC列表
429
+ * @param {number} [limit] 功能说明:每页返回的个数 取值范围:0-2000
430
+ * @param {string} [marker] 分页查询起始的资源ID,为空时查询第一页
431
+ * @param {Array<string>} [id] VPC资源ID。可以使用该字段过滤VPC
432
+ * @param {Array<string>} [name] VPC的name信息,可以使用该字段过滤VPC
433
+ * @param {Array<string>} [description] VPC的描述信息。可以使用该字段过滤VPC
434
+ * @param {Array<string>} [cidr] VPC的CIDR。可以使用该字段过滤VPC
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ VpcClient.prototype.listVpcs = function (listVpcsRequest) {
439
+ var options = (0, exports.ParamCreater)().listVpcs(listVpcsRequest);
440
+ options['responseHeaders'] = [''];
441
+ // @ts-ignore
442
+ return this.hcClient.sendRequest(options);
443
+ };
444
+ /**
445
+ * 移除VPC扩展网段
446
+ * @summary 移除VPC扩展网段
447
+ * @param {string} vpcId VPC资源ID
448
+ * @param {RemoveVpcExtendCidrRequestBody} removeVpcExtendCidrRequestBody This is a auto create Body Object
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ VpcClient.prototype.removeVpcExtendCidr = function (removeVpcExtendCidrRequest) {
453
+ var options = (0, exports.ParamCreater)().removeVpcExtendCidr(removeVpcExtendCidrRequest);
454
+ options['responseHeaders'] = [''];
455
+ // @ts-ignore
456
+ return this.hcClient.sendRequest(options);
457
+ };
458
+ /**
459
+ * 查询vpc详情
460
+ * @summary 查询VPC详情
461
+ * @param {string} vpcId VPC资源ID
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ VpcClient.prototype.showVpc = function (showVpcRequest) {
466
+ var options = (0, exports.ParamCreater)().showVpc(showVpcRequest);
467
+ options['responseHeaders'] = [''];
468
+ // @ts-ignore
469
+ return this.hcClient.sendRequest(options);
470
+ };
471
+ /**
472
+ * 更新vpc
473
+ * @summary 更新VPC
474
+ * @param {string} vpcId VPC资源ID
475
+ * @param {UpdateVpcRequestBody} updateVpcRequestBody This is a auto create Body Object
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ VpcClient.prototype.updateVpc = function (updateVpcRequest) {
480
+ var options = (0, exports.ParamCreater)().updateVpc(updateVpcRequest);
481
+ options['responseHeaders'] = [''];
482
+ // @ts-ignore
483
+ return this.hcClient.sendRequest(options);
484
+ };
275
485
  return VpcClient;
276
486
  }());
277
487
  exports.VpcClient = VpcClient;
@@ -710,6 +920,37 @@ var ParamCreater = function () {
710
920
  options.headers = localVarHeaderParameter;
711
921
  return options;
712
922
  },
923
+ /**
924
+ * 批量迁移辅助弹性网卡
925
+ */
926
+ migrateSubNetworkInterface: function (migrateSubNetworkInterfaceRequest) {
927
+ var options = {
928
+ method: "PUT",
929
+ url: "/v3/{project_id}/vpc/sub-network-interfaces/migrate",
930
+ contentType: "application/json",
931
+ queryParams: {},
932
+ pathParams: {},
933
+ headers: {},
934
+ data: {}
935
+ };
936
+ var localVarHeaderParameter = {};
937
+ var body;
938
+ if (migrateSubNetworkInterfaceRequest !== null && migrateSubNetworkInterfaceRequest !== undefined) {
939
+ if (migrateSubNetworkInterfaceRequest instanceof MigrateSubNetworkInterfaceRequest_1.MigrateSubNetworkInterfaceRequest) {
940
+ body = migrateSubNetworkInterfaceRequest.body;
941
+ }
942
+ else {
943
+ body = migrateSubNetworkInterfaceRequest['body'];
944
+ }
945
+ }
946
+ if (body === null || body === undefined) {
947
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
948
+ }
949
+ localVarHeaderParameter['Content-Type'] = 'application/json';
950
+ options.data = body !== undefined ? body : {};
951
+ options.headers = localVarHeaderParameter;
952
+ return options;
953
+ },
713
954
  /**
714
955
  * 查询单个安全组详情
715
956
  */
@@ -893,6 +1134,492 @@ var ParamCreater = function () {
893
1134
  options.headers = localVarHeaderParameter;
894
1135
  return options;
895
1136
  },
1137
+ /**
1138
+ * 创建地址组
1139
+ */
1140
+ createAddressGroup: function (createAddressGroupRequest) {
1141
+ var options = {
1142
+ method: "POST",
1143
+ url: "/v3/{project_id}/vpc/address-groups",
1144
+ contentType: "application/json",
1145
+ queryParams: {},
1146
+ pathParams: {},
1147
+ headers: {},
1148
+ data: {}
1149
+ };
1150
+ var localVarHeaderParameter = {};
1151
+ var body;
1152
+ if (createAddressGroupRequest !== null && createAddressGroupRequest !== undefined) {
1153
+ if (createAddressGroupRequest instanceof CreateAddressGroupRequest_1.CreateAddressGroupRequest) {
1154
+ body = createAddressGroupRequest.body;
1155
+ }
1156
+ else {
1157
+ body = createAddressGroupRequest['body'];
1158
+ }
1159
+ }
1160
+ if (body === null || body === undefined) {
1161
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1162
+ }
1163
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1164
+ options.data = body !== undefined ? body : {};
1165
+ options.headers = localVarHeaderParameter;
1166
+ return options;
1167
+ },
1168
+ /**
1169
+ * 删除地址组,非强制删除,删除前请确保未被其他资源引用
1170
+ */
1171
+ deleteAddressGroup: function (deleteAddressGroupRequest) {
1172
+ var options = {
1173
+ method: "DELETE",
1174
+ url: "/v3/{project_id}/vpc/address-groups/{address_group_id}",
1175
+ contentType: "application/json",
1176
+ queryParams: {},
1177
+ pathParams: {},
1178
+ headers: {},
1179
+ data: {}
1180
+ };
1181
+ var localVarHeaderParameter = {};
1182
+ var addressGroupId;
1183
+ if (deleteAddressGroupRequest !== null && deleteAddressGroupRequest !== undefined) {
1184
+ if (deleteAddressGroupRequest instanceof DeleteAddressGroupRequest_1.DeleteAddressGroupRequest) {
1185
+ addressGroupId = deleteAddressGroupRequest.addressGroupId;
1186
+ }
1187
+ else {
1188
+ addressGroupId = deleteAddressGroupRequest['address_group_id'];
1189
+ }
1190
+ }
1191
+ if (addressGroupId === null || addressGroupId === undefined) {
1192
+ throw new RequiredError('addressGroupId', 'Required parameter addressGroupId was null or undefined when calling deleteAddressGroup.');
1193
+ }
1194
+ options.pathParams = { 'address_group_id': addressGroupId, };
1195
+ options.headers = localVarHeaderParameter;
1196
+ return options;
1197
+ },
1198
+ /**
1199
+ * 强制删除地址组,删除的地址组与安全组规则关联时,会删除地址组与关联的安全组规则。
1200
+ */
1201
+ deleteIpAddressGroupForce: function (deleteIpAddressGroupForceRequest) {
1202
+ var options = {
1203
+ method: "DELETE",
1204
+ url: "/v3/{project_id}/vpc/address-groups/{address_group_id}/force",
1205
+ contentType: "application/json",
1206
+ queryParams: {},
1207
+ pathParams: {},
1208
+ headers: {},
1209
+ data: {}
1210
+ };
1211
+ var localVarHeaderParameter = {};
1212
+ var addressGroupId;
1213
+ if (deleteIpAddressGroupForceRequest !== null && deleteIpAddressGroupForceRequest !== undefined) {
1214
+ if (deleteIpAddressGroupForceRequest instanceof DeleteIpAddressGroupForceRequest_1.DeleteIpAddressGroupForceRequest) {
1215
+ addressGroupId = deleteIpAddressGroupForceRequest.addressGroupId;
1216
+ }
1217
+ else {
1218
+ addressGroupId = deleteIpAddressGroupForceRequest['address_group_id'];
1219
+ }
1220
+ }
1221
+ if (addressGroupId === null || addressGroupId === undefined) {
1222
+ throw new RequiredError('addressGroupId', 'Required parameter addressGroupId was null or undefined when calling deleteIpAddressGroupForce.');
1223
+ }
1224
+ options.pathParams = { 'address_group_id': addressGroupId, };
1225
+ options.headers = localVarHeaderParameter;
1226
+ return options;
1227
+ },
1228
+ /**
1229
+ * 查询地址组列表,根据过滤条件进行过滤。
1230
+ */
1231
+ listAddressGroup: function (listAddressGroupRequest) {
1232
+ var options = {
1233
+ method: "GET",
1234
+ url: "/v3/{project_id}/vpc/address-groups",
1235
+ contentType: "application/json",
1236
+ queryParams: {},
1237
+ pathParams: {},
1238
+ headers: {},
1239
+ data: {}
1240
+ };
1241
+ var localVarHeaderParameter = {};
1242
+ var localVarQueryParameter = {};
1243
+ var limit;
1244
+ var marker;
1245
+ var id;
1246
+ var name;
1247
+ var ipVersion;
1248
+ var description;
1249
+ if (listAddressGroupRequest !== null && listAddressGroupRequest !== undefined) {
1250
+ if (listAddressGroupRequest instanceof ListAddressGroupRequest_1.ListAddressGroupRequest) {
1251
+ limit = listAddressGroupRequest.limit;
1252
+ marker = listAddressGroupRequest.marker;
1253
+ id = listAddressGroupRequest.id;
1254
+ name = listAddressGroupRequest.name;
1255
+ ipVersion = listAddressGroupRequest.ipVersion;
1256
+ description = listAddressGroupRequest.description;
1257
+ }
1258
+ else {
1259
+ limit = listAddressGroupRequest['limit'];
1260
+ marker = listAddressGroupRequest['marker'];
1261
+ id = listAddressGroupRequest['id'];
1262
+ name = listAddressGroupRequest['name'];
1263
+ ipVersion = listAddressGroupRequest['ip_version'];
1264
+ description = listAddressGroupRequest['description'];
1265
+ }
1266
+ }
1267
+ if (limit !== null && limit !== undefined) {
1268
+ localVarQueryParameter['limit'] = limit;
1269
+ }
1270
+ if (marker !== null && marker !== undefined) {
1271
+ localVarQueryParameter['marker'] = marker;
1272
+ }
1273
+ if (id !== null && id !== undefined) {
1274
+ localVarQueryParameter['id'] = id;
1275
+ }
1276
+ if (name !== null && name !== undefined) {
1277
+ localVarQueryParameter['name'] = name;
1278
+ }
1279
+ if (ipVersion !== null && ipVersion !== undefined) {
1280
+ localVarQueryParameter['ip_version'] = ipVersion;
1281
+ }
1282
+ if (description !== null && description !== undefined) {
1283
+ localVarQueryParameter['description'] = description;
1284
+ }
1285
+ options.queryParams = localVarQueryParameter;
1286
+ options.headers = localVarHeaderParameter;
1287
+ return options;
1288
+ },
1289
+ /**
1290
+ * 查询地址组详情。
1291
+ */
1292
+ showAddressGroup: function (showAddressGroupRequest) {
1293
+ var options = {
1294
+ method: "GET",
1295
+ url: "/v3/{project_id}/vpc/address-groups/{address_group_id}",
1296
+ contentType: "application/json",
1297
+ queryParams: {},
1298
+ pathParams: {},
1299
+ headers: {},
1300
+ data: {}
1301
+ };
1302
+ var localVarHeaderParameter = {};
1303
+ var addressGroupId;
1304
+ if (showAddressGroupRequest !== null && showAddressGroupRequest !== undefined) {
1305
+ if (showAddressGroupRequest instanceof ShowAddressGroupRequest_1.ShowAddressGroupRequest) {
1306
+ addressGroupId = showAddressGroupRequest.addressGroupId;
1307
+ }
1308
+ else {
1309
+ addressGroupId = showAddressGroupRequest['address_group_id'];
1310
+ }
1311
+ }
1312
+ if (addressGroupId === null || addressGroupId === undefined) {
1313
+ throw new RequiredError('addressGroupId', 'Required parameter addressGroupId was null or undefined when calling showAddressGroup.');
1314
+ }
1315
+ options.pathParams = { 'address_group_id': addressGroupId, };
1316
+ options.headers = localVarHeaderParameter;
1317
+ return options;
1318
+ },
1319
+ /**
1320
+ * 更新地址组。
1321
+ */
1322
+ updateAddressGroup: function (updateAddressGroupRequest) {
1323
+ var options = {
1324
+ method: "PUT",
1325
+ url: "/v3/{project_id}/vpc/address-groups/{address_group_id}",
1326
+ contentType: "application/json",
1327
+ queryParams: {},
1328
+ pathParams: {},
1329
+ headers: {},
1330
+ data: {}
1331
+ };
1332
+ var localVarHeaderParameter = {};
1333
+ var body;
1334
+ var addressGroupId;
1335
+ if (updateAddressGroupRequest !== null && updateAddressGroupRequest !== undefined) {
1336
+ if (updateAddressGroupRequest instanceof UpdateAddressGroupRequest_1.UpdateAddressGroupRequest) {
1337
+ addressGroupId = updateAddressGroupRequest.addressGroupId;
1338
+ body = updateAddressGroupRequest.body;
1339
+ }
1340
+ else {
1341
+ addressGroupId = updateAddressGroupRequest['address_group_id'];
1342
+ body = updateAddressGroupRequest['body'];
1343
+ }
1344
+ }
1345
+ if (addressGroupId === null || addressGroupId === undefined) {
1346
+ throw new RequiredError('addressGroupId', 'Required parameter addressGroupId was null or undefined when calling updateAddressGroup.');
1347
+ }
1348
+ if (body === null || body === undefined) {
1349
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1350
+ }
1351
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1352
+ options.data = body !== undefined ? body : {};
1353
+ options.pathParams = { 'address_group_id': addressGroupId, };
1354
+ options.headers = localVarHeaderParameter;
1355
+ return options;
1356
+ },
1357
+ /**
1358
+ * 添加VPC的扩展网段
1359
+ */
1360
+ addVpcExtendCidr: function (addVpcExtendCidrRequest) {
1361
+ var options = {
1362
+ method: "PUT",
1363
+ url: "/v3/{project_id}/vpc/vpcs/{vpc_id}/add-extend-cidr",
1364
+ contentType: "application/json",
1365
+ queryParams: {},
1366
+ pathParams: {},
1367
+ headers: {},
1368
+ data: {}
1369
+ };
1370
+ var localVarHeaderParameter = {};
1371
+ var body;
1372
+ var vpcId;
1373
+ if (addVpcExtendCidrRequest !== null && addVpcExtendCidrRequest !== undefined) {
1374
+ if (addVpcExtendCidrRequest instanceof AddVpcExtendCidrRequest_1.AddVpcExtendCidrRequest) {
1375
+ vpcId = addVpcExtendCidrRequest.vpcId;
1376
+ body = addVpcExtendCidrRequest.body;
1377
+ }
1378
+ else {
1379
+ vpcId = addVpcExtendCidrRequest['vpc_id'];
1380
+ body = addVpcExtendCidrRequest['body'];
1381
+ }
1382
+ }
1383
+ if (vpcId === null || vpcId === undefined) {
1384
+ throw new RequiredError('vpcId', 'Required parameter vpcId was null or undefined when calling addVpcExtendCidr.');
1385
+ }
1386
+ if (body === null || body === undefined) {
1387
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1388
+ }
1389
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1390
+ options.data = body !== undefined ? body : {};
1391
+ options.pathParams = { 'vpc_id': vpcId, };
1392
+ options.headers = localVarHeaderParameter;
1393
+ return options;
1394
+ },
1395
+ /**
1396
+ * 创建虚拟私有云
1397
+ */
1398
+ createVpc: function (createVpcRequest) {
1399
+ var options = {
1400
+ method: "POST",
1401
+ url: "/v3/{project_id}/vpc/vpcs",
1402
+ contentType: "application/json",
1403
+ queryParams: {},
1404
+ pathParams: {},
1405
+ headers: {},
1406
+ data: {}
1407
+ };
1408
+ var localVarHeaderParameter = {};
1409
+ var body;
1410
+ if (createVpcRequest !== null && createVpcRequest !== undefined) {
1411
+ if (createVpcRequest instanceof CreateVpcRequest_1.CreateVpcRequest) {
1412
+ body = createVpcRequest.body;
1413
+ }
1414
+ else {
1415
+ body = createVpcRequest['body'];
1416
+ }
1417
+ }
1418
+ if (body === null || body === undefined) {
1419
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1420
+ }
1421
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1422
+ options.data = body !== undefined ? body : {};
1423
+ options.headers = localVarHeaderParameter;
1424
+ return options;
1425
+ },
1426
+ /**
1427
+ * 删除VPC
1428
+ */
1429
+ deleteVpc: function (deleteVpcRequest) {
1430
+ var options = {
1431
+ method: "DELETE",
1432
+ url: "/v3/{project_id}/vpc/vpcs/{vpc_id}",
1433
+ contentType: "application/json",
1434
+ queryParams: {},
1435
+ pathParams: {},
1436
+ headers: {},
1437
+ data: {}
1438
+ };
1439
+ var localVarHeaderParameter = {};
1440
+ var vpcId;
1441
+ if (deleteVpcRequest !== null && deleteVpcRequest !== undefined) {
1442
+ if (deleteVpcRequest instanceof DeleteVpcRequest_1.DeleteVpcRequest) {
1443
+ vpcId = deleteVpcRequest.vpcId;
1444
+ }
1445
+ else {
1446
+ vpcId = deleteVpcRequest['vpc_id'];
1447
+ }
1448
+ }
1449
+ if (vpcId === null || vpcId === undefined) {
1450
+ throw new RequiredError('vpcId', 'Required parameter vpcId was null or undefined when calling deleteVpc.');
1451
+ }
1452
+ options.pathParams = { 'vpc_id': vpcId, };
1453
+ options.headers = localVarHeaderParameter;
1454
+ return options;
1455
+ },
1456
+ /**
1457
+ * 查询vpc列表
1458
+ */
1459
+ listVpcs: function (listVpcsRequest) {
1460
+ var options = {
1461
+ method: "GET",
1462
+ url: "/v3/{project_id}/vpc/vpcs",
1463
+ contentType: "application/json",
1464
+ queryParams: {},
1465
+ pathParams: {},
1466
+ headers: {},
1467
+ data: {}
1468
+ };
1469
+ var localVarHeaderParameter = {};
1470
+ var localVarQueryParameter = {};
1471
+ var limit;
1472
+ var marker;
1473
+ var id;
1474
+ var name;
1475
+ var description;
1476
+ var cidr;
1477
+ if (listVpcsRequest !== null && listVpcsRequest !== undefined) {
1478
+ if (listVpcsRequest instanceof ListVpcsRequest_1.ListVpcsRequest) {
1479
+ limit = listVpcsRequest.limit;
1480
+ marker = listVpcsRequest.marker;
1481
+ id = listVpcsRequest.id;
1482
+ name = listVpcsRequest.name;
1483
+ description = listVpcsRequest.description;
1484
+ cidr = listVpcsRequest.cidr;
1485
+ }
1486
+ else {
1487
+ limit = listVpcsRequest['limit'];
1488
+ marker = listVpcsRequest['marker'];
1489
+ id = listVpcsRequest['id'];
1490
+ name = listVpcsRequest['name'];
1491
+ description = listVpcsRequest['description'];
1492
+ cidr = listVpcsRequest['cidr'];
1493
+ }
1494
+ }
1495
+ if (limit !== null && limit !== undefined) {
1496
+ localVarQueryParameter['limit'] = limit;
1497
+ }
1498
+ if (marker !== null && marker !== undefined) {
1499
+ localVarQueryParameter['marker'] = marker;
1500
+ }
1501
+ if (id !== null && id !== undefined) {
1502
+ localVarQueryParameter['id'] = id;
1503
+ }
1504
+ if (name !== null && name !== undefined) {
1505
+ localVarQueryParameter['name'] = name;
1506
+ }
1507
+ if (description !== null && description !== undefined) {
1508
+ localVarQueryParameter['description'] = description;
1509
+ }
1510
+ if (cidr !== null && cidr !== undefined) {
1511
+ localVarQueryParameter['cidr'] = cidr;
1512
+ }
1513
+ options.queryParams = localVarQueryParameter;
1514
+ options.headers = localVarHeaderParameter;
1515
+ return options;
1516
+ },
1517
+ /**
1518
+ * 移除VPC扩展网段
1519
+ */
1520
+ removeVpcExtendCidr: function (removeVpcExtendCidrRequest) {
1521
+ var options = {
1522
+ method: "PUT",
1523
+ url: "/v3/{project_id}/vpc/vpcs/{vpc_id}/remove-extend-cidr",
1524
+ contentType: "application/json",
1525
+ queryParams: {},
1526
+ pathParams: {},
1527
+ headers: {},
1528
+ data: {}
1529
+ };
1530
+ var localVarHeaderParameter = {};
1531
+ var body;
1532
+ var vpcId;
1533
+ if (removeVpcExtendCidrRequest !== null && removeVpcExtendCidrRequest !== undefined) {
1534
+ if (removeVpcExtendCidrRequest instanceof RemoveVpcExtendCidrRequest_1.RemoveVpcExtendCidrRequest) {
1535
+ vpcId = removeVpcExtendCidrRequest.vpcId;
1536
+ body = removeVpcExtendCidrRequest.body;
1537
+ }
1538
+ else {
1539
+ vpcId = removeVpcExtendCidrRequest['vpc_id'];
1540
+ body = removeVpcExtendCidrRequest['body'];
1541
+ }
1542
+ }
1543
+ if (vpcId === null || vpcId === undefined) {
1544
+ throw new RequiredError('vpcId', 'Required parameter vpcId was null or undefined when calling removeVpcExtendCidr.');
1545
+ }
1546
+ if (body === null || body === undefined) {
1547
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1548
+ }
1549
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1550
+ options.data = body !== undefined ? body : {};
1551
+ options.pathParams = { 'vpc_id': vpcId, };
1552
+ options.headers = localVarHeaderParameter;
1553
+ return options;
1554
+ },
1555
+ /**
1556
+ * 查询vpc详情
1557
+ */
1558
+ showVpc: function (showVpcRequest) {
1559
+ var options = {
1560
+ method: "GET",
1561
+ url: "/v3/{project_id}/vpc/vpcs/{vpc_id}",
1562
+ contentType: "application/json",
1563
+ queryParams: {},
1564
+ pathParams: {},
1565
+ headers: {},
1566
+ data: {}
1567
+ };
1568
+ var localVarHeaderParameter = {};
1569
+ var vpcId;
1570
+ if (showVpcRequest !== null && showVpcRequest !== undefined) {
1571
+ if (showVpcRequest instanceof ShowVpcRequest_1.ShowVpcRequest) {
1572
+ vpcId = showVpcRequest.vpcId;
1573
+ }
1574
+ else {
1575
+ vpcId = showVpcRequest['vpc_id'];
1576
+ }
1577
+ }
1578
+ if (vpcId === null || vpcId === undefined) {
1579
+ throw new RequiredError('vpcId', 'Required parameter vpcId was null or undefined when calling showVpc.');
1580
+ }
1581
+ options.pathParams = { 'vpc_id': vpcId, };
1582
+ options.headers = localVarHeaderParameter;
1583
+ return options;
1584
+ },
1585
+ /**
1586
+ * 更新vpc
1587
+ */
1588
+ updateVpc: function (updateVpcRequest) {
1589
+ var options = {
1590
+ method: "PUT",
1591
+ url: "/v3/{project_id}/vpc/vpcs/{vpc_id}",
1592
+ contentType: "application/json",
1593
+ queryParams: {},
1594
+ pathParams: {},
1595
+ headers: {},
1596
+ data: {}
1597
+ };
1598
+ var localVarHeaderParameter = {};
1599
+ var body;
1600
+ var vpcId;
1601
+ if (updateVpcRequest !== null && updateVpcRequest !== undefined) {
1602
+ if (updateVpcRequest instanceof UpdateVpcRequest_1.UpdateVpcRequest) {
1603
+ vpcId = updateVpcRequest.vpcId;
1604
+ body = updateVpcRequest.body;
1605
+ }
1606
+ else {
1607
+ vpcId = updateVpcRequest['vpc_id'];
1608
+ body = updateVpcRequest['body'];
1609
+ }
1610
+ }
1611
+ if (vpcId === null || vpcId === undefined) {
1612
+ throw new RequiredError('vpcId', 'Required parameter vpcId was null or undefined when calling updateVpc.');
1613
+ }
1614
+ if (body === null || body === undefined) {
1615
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1616
+ }
1617
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1618
+ options.data = body !== undefined ? body : {};
1619
+ options.pathParams = { 'vpc_id': vpcId, };
1620
+ options.headers = localVarHeaderParameter;
1621
+ return options;
1622
+ },
896
1623
  };
897
1624
  };
898
1625
  exports.ParamCreater = ParamCreater;