@huaweicloud/huaweicloud-sdk-vpc 3.1.21 → 3.1.23

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 (35) hide show
  1. package/package.json +2 -2
  2. package/v2/VpcClient.d.ts +151 -0
  3. package/v2/VpcClient.js +344 -0
  4. package/v2/model/CreateFlowLogReq.d.ts +49 -0
  5. package/v2/model/CreateFlowLogReq.js +126 -0
  6. package/v2/model/CreateFlowLogReqBody.d.ts +8 -0
  7. package/v2/model/CreateFlowLogReqBody.js +24 -0
  8. package/v2/model/CreateFlowLogRequest.d.ts +6 -0
  9. package/v2/model/CreateFlowLogRequest.js +13 -0
  10. package/v2/model/CreateFlowLogResponse.d.ts +9 -0
  11. package/v2/model/CreateFlowLogResponse.js +41 -0
  12. package/v2/model/DeleteFlowLogRequest.d.ts +7 -0
  13. package/v2/model/DeleteFlowLogRequest.js +24 -0
  14. package/v2/model/DeleteFlowLogResponse.d.ts +4 -0
  15. package/v2/model/DeleteFlowLogResponse.js +27 -0
  16. package/v2/model/FlowLogResp.d.ts +85 -0
  17. package/v2/model/FlowLogResp.js +217 -0
  18. package/v2/model/ListFlowLogsRequest.d.ts +77 -0
  19. package/v2/model/ListFlowLogsRequest.js +169 -0
  20. package/v2/model/ListFlowLogsResponse.d.ts +9 -0
  21. package/v2/model/ListFlowLogsResponse.js +41 -0
  22. package/v2/model/ShowFlowLogRequest.d.ts +7 -0
  23. package/v2/model/ShowFlowLogRequest.js +24 -0
  24. package/v2/model/ShowFlowLogResponse.d.ts +9 -0
  25. package/v2/model/ShowFlowLogResponse.js +41 -0
  26. package/v2/model/UpdateFlowLogReq.d.ts +11 -0
  27. package/v2/model/UpdateFlowLogReq.js +31 -0
  28. package/v2/model/UpdateFlowLogReqBody.d.ts +8 -0
  29. package/v2/model/UpdateFlowLogReqBody.js +24 -0
  30. package/v2/model/UpdateFlowLogRequest.d.ts +10 -0
  31. package/v2/model/UpdateFlowLogRequest.js +28 -0
  32. package/v2/model/UpdateFlowLogResponse.d.ts +9 -0
  33. package/v2/model/UpdateFlowLogResponse.js +41 -0
  34. package/v2/public-api.d.ts +15 -0
  35. package/v2/public-api.js +15 -0
package/v2/VpcClient.js CHANGED
@@ -23,6 +23,7 @@ var BatchCreateSubnetTagsRequest_1 = require("./model/BatchCreateSubnetTagsReque
23
23
  var BatchCreateVpcTagsRequest_1 = require("./model/BatchCreateVpcTagsRequest");
24
24
  var BatchDeleteSubnetTagsRequest_1 = require("./model/BatchDeleteSubnetTagsRequest");
25
25
  var BatchDeleteVpcTagsRequest_1 = require("./model/BatchDeleteVpcTagsRequest");
26
+ var CreateFlowLogRequest_1 = require("./model/CreateFlowLogRequest");
26
27
  var CreatePortRequest_1 = require("./model/CreatePortRequest");
27
28
  var CreatePrivateipRequest_1 = require("./model/CreatePrivateipRequest");
28
29
  var CreateRouteTableRequest_1 = require("./model/CreateRouteTableRequest");
@@ -34,6 +35,7 @@ var CreateVpcPeeringRequest_1 = require("./model/CreateVpcPeeringRequest");
34
35
  var CreateVpcRequest_1 = require("./model/CreateVpcRequest");
35
36
  var CreateVpcResourceTagRequest_1 = require("./model/CreateVpcResourceTagRequest");
36
37
  var CreateVpcRouteRequest_1 = require("./model/CreateVpcRouteRequest");
38
+ var DeleteFlowLogRequest_1 = require("./model/DeleteFlowLogRequest");
37
39
  var DeletePortRequest_1 = require("./model/DeletePortRequest");
38
40
  var DeletePrivateipRequest_1 = require("./model/DeletePrivateipRequest");
39
41
  var DeleteRouteTableRequest_1 = require("./model/DeleteRouteTableRequest");
@@ -46,6 +48,7 @@ var DeleteVpcRequest_1 = require("./model/DeleteVpcRequest");
46
48
  var DeleteVpcRouteRequest_1 = require("./model/DeleteVpcRouteRequest");
47
49
  var DeleteVpcTagRequest_1 = require("./model/DeleteVpcTagRequest");
48
50
  var DisassociateRouteTableRequest_1 = require("./model/DisassociateRouteTableRequest");
51
+ var ListFlowLogsRequest_1 = require("./model/ListFlowLogsRequest");
49
52
  var ListPortsRequest_1 = require("./model/ListPortsRequest");
50
53
  var ListPrivateipsRequest_1 = require("./model/ListPrivateipsRequest");
51
54
  var ListRouteTablesRequest_1 = require("./model/ListRouteTablesRequest");
@@ -84,6 +87,7 @@ var NeutronUpdateFirewallPolicyRequest_1 = require("./model/NeutronUpdateFirewal
84
87
  var NeutronUpdateFirewallRuleRequest_1 = require("./model/NeutronUpdateFirewallRuleRequest");
85
88
  var NeutronUpdateSecurityGroupRequest_1 = require("./model/NeutronUpdateSecurityGroupRequest");
86
89
  var RejectVpcPeeringRequest_1 = require("./model/RejectVpcPeeringRequest");
90
+ var ShowFlowLogRequest_1 = require("./model/ShowFlowLogRequest");
87
91
  var ShowNetworkIpAvailabilitiesRequest_1 = require("./model/ShowNetworkIpAvailabilitiesRequest");
88
92
  var ShowPortRequest_1 = require("./model/ShowPortRequest");
89
93
  var ShowPrivateipRequest_1 = require("./model/ShowPrivateipRequest");
@@ -97,6 +101,7 @@ var ShowVpcPeeringRequest_1 = require("./model/ShowVpcPeeringRequest");
97
101
  var ShowVpcRequest_1 = require("./model/ShowVpcRequest");
98
102
  var ShowVpcRouteRequest_1 = require("./model/ShowVpcRouteRequest");
99
103
  var ShowVpcTagsRequest_1 = require("./model/ShowVpcTagsRequest");
104
+ var UpdateFlowLogRequest_1 = require("./model/UpdateFlowLogRequest");
100
105
  var UpdatePortRequest_1 = require("./model/UpdatePortRequest");
101
106
  var UpdateRouteTableRequest_1 = require("./model/UpdateRouteTableRequest");
102
107
  var UpdateSubnetRequest_1 = require("./model/UpdateSubnetRequest");
@@ -181,6 +186,24 @@ var VpcClient = /** @class */ (function () {
181
186
  options['responseHeaders'] = [''];
182
187
  return this.hcClient.sendRequest(options);
183
188
  };
189
+ /**
190
+ * 创建流日志。
191
+ * 流日志功能可以记录虚拟私有云中的流量信息,帮助您检查和优化安全组和网络ACL防火墙控制规则、监控网络流量、进行网络攻击分析等。
192
+ * VPC流日志功能需要与云日志服务LTS结合使用,请先在云日志服务中创建日志组和日志主题,然后再创建VPC流日志。
193
+ *
194
+ * Please refer to HUAWEI cloud API Explorer for details.
195
+ *
196
+ * @summary 创建流日志
197
+ * @param {CreateFlowLogReqBody} flowLog 创建流日志的请求体,参见CreateFlowLogReq对象。
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ VpcClient.prototype.createFlowLog = function (createFlowLogRequest) {
202
+ var options = (0, exports.ParamCreater)().createFlowLog(createFlowLogRequest);
203
+ // @ts-ignore
204
+ options['responseHeaders'] = [''];
205
+ return this.hcClient.sendRequest(options);
206
+ };
184
207
  /**
185
208
  * 创建端口。
186
209
  *
@@ -295,6 +318,22 @@ var VpcClient = /** @class */ (function () {
295
318
  options['responseHeaders'] = [''];
296
319
  return this.hcClient.sendRequest(options);
297
320
  };
321
+ /**
322
+ * 删除流日志
323
+ *
324
+ * Please refer to HUAWEI cloud API Explorer for details.
325
+ *
326
+ * @summary 删除流日志
327
+ * @param {string} flowlogId 流日志资源唯一标识
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ VpcClient.prototype.deleteFlowLog = function (deleteFlowLogRequest) {
332
+ var options = (0, exports.ParamCreater)().deleteFlowLog(deleteFlowLogRequest);
333
+ // @ts-ignore
334
+ options['responseHeaders'] = [''];
335
+ return this.hcClient.sendRequest(options);
336
+ };
298
337
  /**
299
338
  * 删除端口。
300
339
  *
@@ -428,6 +467,34 @@ var VpcClient = /** @class */ (function () {
428
467
  options['responseHeaders'] = [''];
429
468
  return this.hcClient.sendRequest(options);
430
469
  };
470
+ /**
471
+ * 查询提交请求的租户的所有流日志列表,并根据过滤条件进行过滤
472
+ *
473
+ * Please refer to HUAWEI cloud API Explorer for details.
474
+ *
475
+ * @summary 查询流日志列表
476
+ * @param {string} [id] 流日志资源唯一标识
477
+ * @param {string} [name] 功能说明:流日志名称 取值范围:0-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)
478
+ * @param {string} [tenantId] 项目ID
479
+ * @param {string} [description] 功能说明:流日志描述 取值范围:0-255个字符,不能包含“<”和“>”
480
+ * @param {'port' | 'network' | 'vpc'} [resourceType] 功能说明:流日志所属资源类型 取值范围:支持port、network、vpc 3种类型。
481
+ * @param {string} [resourceId] resource_type对应资源的唯一ID
482
+ * @param {'all' | 'reject' | 'accept'} [trafficType] 功能说明:流日志采集类型 取值范围: 1)all:采集指定资源的全部流量。 2)accept:采集指定资源允许传入、传出的流量。 3)reject:采集指定资源拒绝传入、传出的流量。
483
+ * @param {string} [logGroupId] 日志组ID 请在云日志服务中获取,详情请参见《云日志服务用户指南》。
484
+ * @param {string} [logTopicId] 日志主题ID 请在云日志服务中获取,详情请参见《云日志服务用户指南》。
485
+ * @param {'lts'} [logStoreType] 功能说明:流日志存储类型 取值范围: lts:存储类型为云日志服务(LTS)。
486
+ * @param {'ACTIVE' | 'DOWN' | 'ERROR'} [status] 功能说明:流日志状态 取值范围: ACTIVE:开启 DOWN:关闭 ERROR:异常故障
487
+ * @param {string} [limit] 功能说明:每页返回的个数 取值范围:0 ~ intmax
488
+ * @param {string} [marker] 分页查询起始的资源ID,为空时为查询第一页
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ */
492
+ VpcClient.prototype.listFlowLogs = function (listFlowLogsRequest) {
493
+ var options = (0, exports.ParamCreater)().listFlowLogs(listFlowLogsRequest);
494
+ // @ts-ignore
495
+ options['responseHeaders'] = [''];
496
+ return this.hcClient.sendRequest(options);
497
+ };
431
498
  /**
432
499
  * 查询提交请求的租户的所有端口,单次查询最多返回2000条数据。
433
500
  *
@@ -600,6 +667,22 @@ var VpcClient = /** @class */ (function () {
600
667
  options['responseHeaders'] = [''];
601
668
  return this.hcClient.sendRequest(options);
602
669
  };
670
+ /**
671
+ * 查询流日志详情
672
+ *
673
+ * Please refer to HUAWEI cloud API Explorer for details.
674
+ *
675
+ * @summary 查询流日志
676
+ * @param {string} flowlogId 流日志资源唯一标识
677
+ * @param {*} [options] Override http request option.
678
+ * @throws {RequiredError}
679
+ */
680
+ VpcClient.prototype.showFlowLog = function (showFlowLogRequest) {
681
+ var options = (0, exports.ParamCreater)().showFlowLog(showFlowLogRequest);
682
+ // @ts-ignore
683
+ options['responseHeaders'] = [''];
684
+ return this.hcClient.sendRequest(options);
685
+ };
603
686
  /**
604
687
  * 查询单个端口详情。
605
688
  *
@@ -728,6 +811,23 @@ var VpcClient = /** @class */ (function () {
728
811
  options['responseHeaders'] = [''];
729
812
  return this.hcClient.sendRequest(options);
730
813
  };
814
+ /**
815
+ * 更新流日志
816
+ *
817
+ * Please refer to HUAWEI cloud API Explorer for details.
818
+ *
819
+ * @summary 更新流日志
820
+ * @param {string} flowlogId 流日志资源唯一标识
821
+ * @param {UpdateFlowLogReqBody} flowLog 更新流日志的请求体,参见UpdateFlowLogReq对象。
822
+ * @param {*} [options] Override http request option.
823
+ * @throws {RequiredError}
824
+ */
825
+ VpcClient.prototype.updateFlowLog = function (updateFlowLogRequest) {
826
+ var options = (0, exports.ParamCreater)().updateFlowLog(updateFlowLogRequest);
827
+ // @ts-ignore
828
+ options['responseHeaders'] = [''];
829
+ return this.hcClient.sendRequest(options);
830
+ };
731
831
  /**
732
832
  * 更新端口。
733
833
  *
@@ -1774,6 +1874,41 @@ var ParamCreater = function () {
1774
1874
  options.headers = localVarHeaderParameter;
1775
1875
  return options;
1776
1876
  },
1877
+ /**
1878
+ * 创建流日志。
1879
+ * 流日志功能可以记录虚拟私有云中的流量信息,帮助您检查和优化安全组和网络ACL防火墙控制规则、监控网络流量、进行网络攻击分析等。
1880
+ * VPC流日志功能需要与云日志服务LTS结合使用,请先在云日志服务中创建日志组和日志主题,然后再创建VPC流日志。
1881
+ *
1882
+ * Please refer to HUAWEI cloud API Explorer for details.
1883
+ */
1884
+ createFlowLog: function (createFlowLogRequest) {
1885
+ var options = {
1886
+ method: "POST",
1887
+ url: "/v1/{project_id}/fl/flow_logs",
1888
+ contentType: "application/json;charset=UTF-8",
1889
+ queryParams: {},
1890
+ pathParams: {},
1891
+ headers: {},
1892
+ data: {}
1893
+ };
1894
+ var localVarHeaderParameter = {};
1895
+ var body;
1896
+ if (createFlowLogRequest !== null && createFlowLogRequest !== undefined) {
1897
+ if (createFlowLogRequest instanceof CreateFlowLogRequest_1.CreateFlowLogRequest) {
1898
+ body = createFlowLogRequest.body;
1899
+ }
1900
+ else {
1901
+ body = createFlowLogRequest['body'];
1902
+ }
1903
+ }
1904
+ if (body === null || body === undefined) {
1905
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1906
+ }
1907
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
1908
+ options.data = body !== undefined ? body : {};
1909
+ options.headers = localVarHeaderParameter;
1910
+ return options;
1911
+ },
1777
1912
  /**
1778
1913
  * 创建端口。
1779
1914
  *
@@ -2013,6 +2148,38 @@ var ParamCreater = function () {
2013
2148
  options.headers = localVarHeaderParameter;
2014
2149
  return options;
2015
2150
  },
2151
+ /**
2152
+ * 删除流日志
2153
+ *
2154
+ * Please refer to HUAWEI cloud API Explorer for details.
2155
+ */
2156
+ deleteFlowLog: function (deleteFlowLogRequest) {
2157
+ var options = {
2158
+ method: "DELETE",
2159
+ url: "/v1/{project_id}/fl/flow_logs/{flowlog_id}",
2160
+ contentType: "application/json",
2161
+ queryParams: {},
2162
+ pathParams: {},
2163
+ headers: {},
2164
+ data: {}
2165
+ };
2166
+ var localVarHeaderParameter = {};
2167
+ var flowlogId;
2168
+ if (deleteFlowLogRequest !== null && deleteFlowLogRequest !== undefined) {
2169
+ if (deleteFlowLogRequest instanceof DeleteFlowLogRequest_1.DeleteFlowLogRequest) {
2170
+ flowlogId = deleteFlowLogRequest.flowlogId;
2171
+ }
2172
+ else {
2173
+ flowlogId = deleteFlowLogRequest['flowlog_id'];
2174
+ }
2175
+ }
2176
+ if (flowlogId === null || flowlogId === undefined) {
2177
+ throw new RequiredError('flowlogId', 'Required parameter flowlogId was null or undefined when calling deleteFlowLog.');
2178
+ }
2179
+ options.pathParams = { 'flowlog_id': flowlogId, };
2180
+ options.headers = localVarHeaderParameter;
2181
+ return options;
2182
+ },
2016
2183
  /**
2017
2184
  * 删除端口。
2018
2185
  *
@@ -2291,6 +2458,111 @@ var ParamCreater = function () {
2291
2458
  options.headers = localVarHeaderParameter;
2292
2459
  return options;
2293
2460
  },
2461
+ /**
2462
+ * 查询提交请求的租户的所有流日志列表,并根据过滤条件进行过滤
2463
+ *
2464
+ * Please refer to HUAWEI cloud API Explorer for details.
2465
+ */
2466
+ listFlowLogs: function (listFlowLogsRequest) {
2467
+ var options = {
2468
+ method: "GET",
2469
+ url: "/v1/{project_id}/fl/flow_logs",
2470
+ contentType: "application/json",
2471
+ queryParams: {},
2472
+ pathParams: {},
2473
+ headers: {},
2474
+ data: {}
2475
+ };
2476
+ var localVarHeaderParameter = {};
2477
+ var localVarQueryParameter = {};
2478
+ var id;
2479
+ var name;
2480
+ var tenantId;
2481
+ var description;
2482
+ var resourceType;
2483
+ var resourceId;
2484
+ var trafficType;
2485
+ var logGroupId;
2486
+ var logTopicId;
2487
+ var logStoreType;
2488
+ var status;
2489
+ var limit;
2490
+ var marker;
2491
+ if (listFlowLogsRequest !== null && listFlowLogsRequest !== undefined) {
2492
+ if (listFlowLogsRequest instanceof ListFlowLogsRequest_1.ListFlowLogsRequest) {
2493
+ id = listFlowLogsRequest.id;
2494
+ name = listFlowLogsRequest.name;
2495
+ tenantId = listFlowLogsRequest.tenantId;
2496
+ description = listFlowLogsRequest.description;
2497
+ resourceType = listFlowLogsRequest.resourceType;
2498
+ resourceId = listFlowLogsRequest.resourceId;
2499
+ trafficType = listFlowLogsRequest.trafficType;
2500
+ logGroupId = listFlowLogsRequest.logGroupId;
2501
+ logTopicId = listFlowLogsRequest.logTopicId;
2502
+ logStoreType = listFlowLogsRequest.logStoreType;
2503
+ status = listFlowLogsRequest.status;
2504
+ limit = listFlowLogsRequest.limit;
2505
+ marker = listFlowLogsRequest.marker;
2506
+ }
2507
+ else {
2508
+ id = listFlowLogsRequest['id'];
2509
+ name = listFlowLogsRequest['name'];
2510
+ tenantId = listFlowLogsRequest['tenant_id'];
2511
+ description = listFlowLogsRequest['description'];
2512
+ resourceType = listFlowLogsRequest['resource_type'];
2513
+ resourceId = listFlowLogsRequest['resource_id'];
2514
+ trafficType = listFlowLogsRequest['traffic_type'];
2515
+ logGroupId = listFlowLogsRequest['log_group_id'];
2516
+ logTopicId = listFlowLogsRequest['log_topic_id'];
2517
+ logStoreType = listFlowLogsRequest['log_store_type'];
2518
+ status = listFlowLogsRequest['status'];
2519
+ limit = listFlowLogsRequest['limit'];
2520
+ marker = listFlowLogsRequest['marker'];
2521
+ }
2522
+ }
2523
+ if (id !== null && id !== undefined) {
2524
+ localVarQueryParameter['id'] = id;
2525
+ }
2526
+ if (name !== null && name !== undefined) {
2527
+ localVarQueryParameter['name'] = name;
2528
+ }
2529
+ if (tenantId !== null && tenantId !== undefined) {
2530
+ localVarQueryParameter['tenant_id'] = tenantId;
2531
+ }
2532
+ if (description !== null && description !== undefined) {
2533
+ localVarQueryParameter['description'] = description;
2534
+ }
2535
+ if (resourceType !== null && resourceType !== undefined) {
2536
+ localVarQueryParameter['resource_type'] = resourceType;
2537
+ }
2538
+ if (resourceId !== null && resourceId !== undefined) {
2539
+ localVarQueryParameter['resource_id'] = resourceId;
2540
+ }
2541
+ if (trafficType !== null && trafficType !== undefined) {
2542
+ localVarQueryParameter['traffic_type'] = trafficType;
2543
+ }
2544
+ if (logGroupId !== null && logGroupId !== undefined) {
2545
+ localVarQueryParameter['log_group_id'] = logGroupId;
2546
+ }
2547
+ if (logTopicId !== null && logTopicId !== undefined) {
2548
+ localVarQueryParameter['log_topic_id'] = logTopicId;
2549
+ }
2550
+ if (logStoreType !== null && logStoreType !== undefined) {
2551
+ localVarQueryParameter['log_store_type'] = logStoreType;
2552
+ }
2553
+ if (status !== null && status !== undefined) {
2554
+ localVarQueryParameter['status'] = status;
2555
+ }
2556
+ if (limit !== null && limit !== undefined) {
2557
+ localVarQueryParameter['limit'] = limit;
2558
+ }
2559
+ if (marker !== null && marker !== undefined) {
2560
+ localVarQueryParameter['marker'] = marker;
2561
+ }
2562
+ options.queryParams = localVarQueryParameter;
2563
+ options.headers = localVarHeaderParameter;
2564
+ return options;
2565
+ },
2294
2566
  /**
2295
2567
  * 查询提交请求的租户的所有端口,单次查询最多返回2000条数据。
2296
2568
  *
@@ -2747,6 +3019,38 @@ var ParamCreater = function () {
2747
3019
  options.headers = localVarHeaderParameter;
2748
3020
  return options;
2749
3021
  },
3022
+ /**
3023
+ * 查询流日志详情
3024
+ *
3025
+ * Please refer to HUAWEI cloud API Explorer for details.
3026
+ */
3027
+ showFlowLog: function (showFlowLogRequest) {
3028
+ var options = {
3029
+ method: "GET",
3030
+ url: "/v1/{project_id}/fl/flow_logs/{flowlog_id}",
3031
+ contentType: "application/json",
3032
+ queryParams: {},
3033
+ pathParams: {},
3034
+ headers: {},
3035
+ data: {}
3036
+ };
3037
+ var localVarHeaderParameter = {};
3038
+ var flowlogId;
3039
+ if (showFlowLogRequest !== null && showFlowLogRequest !== undefined) {
3040
+ if (showFlowLogRequest instanceof ShowFlowLogRequest_1.ShowFlowLogRequest) {
3041
+ flowlogId = showFlowLogRequest.flowlogId;
3042
+ }
3043
+ else {
3044
+ flowlogId = showFlowLogRequest['flowlog_id'];
3045
+ }
3046
+ }
3047
+ if (flowlogId === null || flowlogId === undefined) {
3048
+ throw new RequiredError('flowlogId', 'Required parameter flowlogId was null or undefined when calling showFlowLog.');
3049
+ }
3050
+ options.pathParams = { 'flowlog_id': flowlogId, };
3051
+ options.headers = localVarHeaderParameter;
3052
+ return options;
3053
+ },
2750
3054
  /**
2751
3055
  * 查询单个端口详情。
2752
3056
  *
@@ -3004,6 +3308,46 @@ var ParamCreater = function () {
3004
3308
  options.headers = localVarHeaderParameter;
3005
3309
  return options;
3006
3310
  },
3311
+ /**
3312
+ * 更新流日志
3313
+ *
3314
+ * Please refer to HUAWEI cloud API Explorer for details.
3315
+ */
3316
+ updateFlowLog: function (updateFlowLogRequest) {
3317
+ var options = {
3318
+ method: "PUT",
3319
+ url: "/v1/{project_id}/fl/flow_logs/{flowlog_id}",
3320
+ contentType: "application/json;charset=UTF-8",
3321
+ queryParams: {},
3322
+ pathParams: {},
3323
+ headers: {},
3324
+ data: {}
3325
+ };
3326
+ var localVarHeaderParameter = {};
3327
+ var body;
3328
+ var flowlogId;
3329
+ if (updateFlowLogRequest !== null && updateFlowLogRequest !== undefined) {
3330
+ if (updateFlowLogRequest instanceof UpdateFlowLogRequest_1.UpdateFlowLogRequest) {
3331
+ flowlogId = updateFlowLogRequest.flowlogId;
3332
+ body = updateFlowLogRequest.body;
3333
+ }
3334
+ else {
3335
+ flowlogId = updateFlowLogRequest['flowlog_id'];
3336
+ body = updateFlowLogRequest['body'];
3337
+ }
3338
+ }
3339
+ if (flowlogId === null || flowlogId === undefined) {
3340
+ throw new RequiredError('flowlogId', 'Required parameter flowlogId was null or undefined when calling updateFlowLog.');
3341
+ }
3342
+ if (body === null || body === undefined) {
3343
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
3344
+ }
3345
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
3346
+ options.data = body !== undefined ? body : {};
3347
+ options.pathParams = { 'flowlog_id': flowlogId, };
3348
+ options.headers = localVarHeaderParameter;
3349
+ return options;
3350
+ },
3007
3351
  /**
3008
3352
  * 更新端口。
3009
3353
  *
@@ -0,0 +1,49 @@
1
+ export declare class CreateFlowLogReq {
2
+ name?: string;
3
+ description?: string;
4
+ private 'resource_type';
5
+ private 'resource_id';
6
+ private 'traffic_type';
7
+ private 'log_group_id';
8
+ private 'log_topic_id';
9
+ private 'index_enabled'?;
10
+ constructor(resourceType?: any, resourceId?: any, trafficType?: any, logGroupId?: any, logTopicId?: any);
11
+ withName(name: string): CreateFlowLogReq;
12
+ withDescription(description: string): CreateFlowLogReq;
13
+ withResourceType(resourceType: CreateFlowLogReqResourceTypeEnum): CreateFlowLogReq;
14
+ set resourceType(resourceType: CreateFlowLogReqResourceTypeEnum | undefined);
15
+ get resourceType(): CreateFlowLogReqResourceTypeEnum | undefined;
16
+ withResourceId(resourceId: string): CreateFlowLogReq;
17
+ set resourceId(resourceId: string | undefined);
18
+ get resourceId(): string | undefined;
19
+ withTrafficType(trafficType: CreateFlowLogReqTrafficTypeEnum): CreateFlowLogReq;
20
+ set trafficType(trafficType: CreateFlowLogReqTrafficTypeEnum | undefined);
21
+ get trafficType(): CreateFlowLogReqTrafficTypeEnum | undefined;
22
+ withLogGroupId(logGroupId: string): CreateFlowLogReq;
23
+ set logGroupId(logGroupId: string | undefined);
24
+ get logGroupId(): string | undefined;
25
+ withLogTopicId(logTopicId: string): CreateFlowLogReq;
26
+ set logTopicId(logTopicId: string | undefined);
27
+ get logTopicId(): string | undefined;
28
+ withIndexEnabled(indexEnabled: boolean): CreateFlowLogReq;
29
+ set indexEnabled(indexEnabled: boolean | undefined);
30
+ get indexEnabled(): boolean | undefined;
31
+ }
32
+ /**
33
+ * @export
34
+ * @enum {string}
35
+ */
36
+ export declare enum CreateFlowLogReqResourceTypeEnum {
37
+ PORT = "port",
38
+ NETWORK = "network",
39
+ VPC = "vpc"
40
+ }
41
+ /**
42
+ * @export
43
+ * @enum {string}
44
+ */
45
+ export declare enum CreateFlowLogReqTrafficTypeEnum {
46
+ ALL = "all",
47
+ ACCEPT = "accept",
48
+ REJECT = "reject"
49
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateFlowLogReqTrafficTypeEnum = exports.CreateFlowLogReqResourceTypeEnum = exports.CreateFlowLogReq = void 0;
4
+ var CreateFlowLogReq = /** @class */ (function () {
5
+ function CreateFlowLogReq(resourceType, resourceId, trafficType, logGroupId, logTopicId) {
6
+ this['resource_type'] = resourceType;
7
+ this['resource_id'] = resourceId;
8
+ this['traffic_type'] = trafficType;
9
+ this['log_group_id'] = logGroupId;
10
+ this['log_topic_id'] = logTopicId;
11
+ }
12
+ CreateFlowLogReq.prototype.withName = function (name) {
13
+ this['name'] = name;
14
+ return this;
15
+ };
16
+ CreateFlowLogReq.prototype.withDescription = function (description) {
17
+ this['description'] = description;
18
+ return this;
19
+ };
20
+ CreateFlowLogReq.prototype.withResourceType = function (resourceType) {
21
+ this['resource_type'] = resourceType;
22
+ return this;
23
+ };
24
+ Object.defineProperty(CreateFlowLogReq.prototype, "resourceType", {
25
+ get: function () {
26
+ return this['resource_type'];
27
+ },
28
+ set: function (resourceType) {
29
+ this['resource_type'] = resourceType;
30
+ },
31
+ enumerable: false,
32
+ configurable: true
33
+ });
34
+ CreateFlowLogReq.prototype.withResourceId = function (resourceId) {
35
+ this['resource_id'] = resourceId;
36
+ return this;
37
+ };
38
+ Object.defineProperty(CreateFlowLogReq.prototype, "resourceId", {
39
+ get: function () {
40
+ return this['resource_id'];
41
+ },
42
+ set: function (resourceId) {
43
+ this['resource_id'] = resourceId;
44
+ },
45
+ enumerable: false,
46
+ configurable: true
47
+ });
48
+ CreateFlowLogReq.prototype.withTrafficType = function (trafficType) {
49
+ this['traffic_type'] = trafficType;
50
+ return this;
51
+ };
52
+ Object.defineProperty(CreateFlowLogReq.prototype, "trafficType", {
53
+ get: function () {
54
+ return this['traffic_type'];
55
+ },
56
+ set: function (trafficType) {
57
+ this['traffic_type'] = trafficType;
58
+ },
59
+ enumerable: false,
60
+ configurable: true
61
+ });
62
+ CreateFlowLogReq.prototype.withLogGroupId = function (logGroupId) {
63
+ this['log_group_id'] = logGroupId;
64
+ return this;
65
+ };
66
+ Object.defineProperty(CreateFlowLogReq.prototype, "logGroupId", {
67
+ get: function () {
68
+ return this['log_group_id'];
69
+ },
70
+ set: function (logGroupId) {
71
+ this['log_group_id'] = logGroupId;
72
+ },
73
+ enumerable: false,
74
+ configurable: true
75
+ });
76
+ CreateFlowLogReq.prototype.withLogTopicId = function (logTopicId) {
77
+ this['log_topic_id'] = logTopicId;
78
+ return this;
79
+ };
80
+ Object.defineProperty(CreateFlowLogReq.prototype, "logTopicId", {
81
+ get: function () {
82
+ return this['log_topic_id'];
83
+ },
84
+ set: function (logTopicId) {
85
+ this['log_topic_id'] = logTopicId;
86
+ },
87
+ enumerable: false,
88
+ configurable: true
89
+ });
90
+ CreateFlowLogReq.prototype.withIndexEnabled = function (indexEnabled) {
91
+ this['index_enabled'] = indexEnabled;
92
+ return this;
93
+ };
94
+ Object.defineProperty(CreateFlowLogReq.prototype, "indexEnabled", {
95
+ get: function () {
96
+ return this['index_enabled'];
97
+ },
98
+ set: function (indexEnabled) {
99
+ this['index_enabled'] = indexEnabled;
100
+ },
101
+ enumerable: false,
102
+ configurable: true
103
+ });
104
+ return CreateFlowLogReq;
105
+ }());
106
+ exports.CreateFlowLogReq = CreateFlowLogReq;
107
+ /**
108
+ * @export
109
+ * @enum {string}
110
+ */
111
+ var CreateFlowLogReqResourceTypeEnum;
112
+ (function (CreateFlowLogReqResourceTypeEnum) {
113
+ CreateFlowLogReqResourceTypeEnum["PORT"] = "port";
114
+ CreateFlowLogReqResourceTypeEnum["NETWORK"] = "network";
115
+ CreateFlowLogReqResourceTypeEnum["VPC"] = "vpc";
116
+ })(CreateFlowLogReqResourceTypeEnum = exports.CreateFlowLogReqResourceTypeEnum || (exports.CreateFlowLogReqResourceTypeEnum = {}));
117
+ /**
118
+ * @export
119
+ * @enum {string}
120
+ */
121
+ var CreateFlowLogReqTrafficTypeEnum;
122
+ (function (CreateFlowLogReqTrafficTypeEnum) {
123
+ CreateFlowLogReqTrafficTypeEnum["ALL"] = "all";
124
+ CreateFlowLogReqTrafficTypeEnum["ACCEPT"] = "accept";
125
+ CreateFlowLogReqTrafficTypeEnum["REJECT"] = "reject";
126
+ })(CreateFlowLogReqTrafficTypeEnum = exports.CreateFlowLogReqTrafficTypeEnum || (exports.CreateFlowLogReqTrafficTypeEnum = {}));
@@ -0,0 +1,8 @@
1
+ import { CreateFlowLogReq } from './CreateFlowLogReq';
2
+ export declare class CreateFlowLogReqBody {
3
+ private 'flow_log';
4
+ constructor(flowLog?: any);
5
+ withFlowLog(flowLog: CreateFlowLogReq): CreateFlowLogReqBody;
6
+ set flowLog(flowLog: CreateFlowLogReq | undefined);
7
+ get flowLog(): CreateFlowLogReq | undefined;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateFlowLogReqBody = void 0;
4
+ var CreateFlowLogReqBody = /** @class */ (function () {
5
+ function CreateFlowLogReqBody(flowLog) {
6
+ this['flow_log'] = flowLog;
7
+ }
8
+ CreateFlowLogReqBody.prototype.withFlowLog = function (flowLog) {
9
+ this['flow_log'] = flowLog;
10
+ return this;
11
+ };
12
+ Object.defineProperty(CreateFlowLogReqBody.prototype, "flowLog", {
13
+ get: function () {
14
+ return this['flow_log'];
15
+ },
16
+ set: function (flowLog) {
17
+ this['flow_log'] = flowLog;
18
+ },
19
+ enumerable: false,
20
+ configurable: true
21
+ });
22
+ return CreateFlowLogReqBody;
23
+ }());
24
+ exports.CreateFlowLogReqBody = CreateFlowLogReqBody;
@@ -0,0 +1,6 @@
1
+ import { CreateFlowLogReqBody } from './CreateFlowLogReqBody';
2
+ export declare class CreateFlowLogRequest {
3
+ body?: CreateFlowLogReqBody;
4
+ constructor();
5
+ withBody(body: CreateFlowLogReqBody): CreateFlowLogRequest;
6
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateFlowLogRequest = void 0;
4
+ var CreateFlowLogRequest = /** @class */ (function () {
5
+ function CreateFlowLogRequest() {
6
+ }
7
+ CreateFlowLogRequest.prototype.withBody = function (body) {
8
+ this['body'] = body;
9
+ return this;
10
+ };
11
+ return CreateFlowLogRequest;
12
+ }());
13
+ exports.CreateFlowLogRequest = CreateFlowLogRequest;