@huaweicloud/huaweicloud-sdk-smn 3.1.132 → 3.1.134

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 (81) hide show
  1. package/package.json +2 -2
  2. package/v2/SmnClient.d.ts +118 -6
  3. package/v2/SmnClient.d.ts.map +1 -1
  4. package/v2/SmnClient.js +234 -9
  5. package/v2/SmnClient.js.map +1 -1
  6. package/v2/model/AddSubscriptionRequestBody.d.ts +3 -0
  7. package/v2/model/AddSubscriptionRequestBody.d.ts.map +1 -1
  8. package/v2/model/AddSubscriptionRequestBody.js +4 -0
  9. package/v2/model/AddSubscriptionRequestBody.js.map +1 -1
  10. package/v2/model/BatchAddSubscriptionsRequestBody.d.ts +13 -0
  11. package/v2/model/BatchAddSubscriptionsRequestBody.d.ts.map +1 -0
  12. package/v2/model/BatchAddSubscriptionsRequestBody.js +27 -0
  13. package/v2/model/BatchAddSubscriptionsRequestBody.js.map +1 -0
  14. package/v2/model/CreateNotifyPolicyRequest.d.ts +11 -0
  15. package/v2/model/CreateNotifyPolicyRequest.d.ts.map +1 -0
  16. package/v2/model/CreateNotifyPolicyRequest.js +24 -0
  17. package/v2/model/CreateNotifyPolicyRequest.js.map +1 -0
  18. package/v2/model/CreateNotifyPolicyResponse.d.ts +11 -0
  19. package/v2/model/CreateNotifyPolicyResponse.d.ts.map +1 -0
  20. package/v2/model/CreateNotifyPolicyResponse.js +25 -0
  21. package/v2/model/CreateNotifyPolicyResponse.js.map +1 -0
  22. package/v2/model/DeleteNotifyPolicyRequest.d.ts +12 -0
  23. package/v2/model/DeleteNotifyPolicyRequest.d.ts.map +1 -0
  24. package/v2/model/DeleteNotifyPolicyRequest.js +31 -0
  25. package/v2/model/DeleteNotifyPolicyRequest.js.map +1 -0
  26. package/v2/model/DeleteNotifyPolicyResponse.d.ts +7 -0
  27. package/v2/model/DeleteNotifyPolicyResponse.d.ts.map +1 -0
  28. package/v2/model/DeleteNotifyPolicyResponse.js +15 -0
  29. package/v2/model/DeleteNotifyPolicyResponse.js.map +1 -0
  30. package/v2/model/ListInstanceRequestBody.d.ts +4 -0
  31. package/v2/model/ListInstanceRequestBody.d.ts.map +1 -1
  32. package/v2/model/ListInstanceRequestBody.js +10 -0
  33. package/v2/model/ListInstanceRequestBody.js.map +1 -1
  34. package/v2/model/ListTopicAttributesRequest.d.ts +1 -1
  35. package/v2/model/ListTopicAttributesRequest.d.ts.map +1 -1
  36. package/v2/model/ListTopicAttributesRequest.js +1 -2
  37. package/v2/model/ListTopicAttributesRequest.js.map +1 -1
  38. package/v2/model/NotifyPolicyRequestBody.d.ts +16 -0
  39. package/v2/model/NotifyPolicyRequestBody.d.ts.map +1 -0
  40. package/v2/model/NotifyPolicyRequestBody.js +27 -0
  41. package/v2/model/NotifyPolicyRequestBody.js.map +1 -0
  42. package/v2/model/PollingPolicyRequest.d.ts +10 -0
  43. package/v2/model/PollingPolicyRequest.d.ts.map +1 -0
  44. package/v2/model/PollingPolicyRequest.js +25 -0
  45. package/v2/model/PollingPolicyRequest.js.map +1 -0
  46. package/v2/model/PollingPolicyResponse.d.ts +9 -0
  47. package/v2/model/PollingPolicyResponse.d.ts.map +1 -0
  48. package/v2/model/PollingPolicyResponse.js +17 -0
  49. package/v2/model/PollingPolicyResponse.js.map +1 -0
  50. package/v2/model/PollingPolicySubscriptionDetails.d.ts +14 -0
  51. package/v2/model/PollingPolicySubscriptionDetails.d.ts.map +1 -0
  52. package/v2/model/PollingPolicySubscriptionDetails.js +33 -0
  53. package/v2/model/PollingPolicySubscriptionDetails.js.map +1 -0
  54. package/v2/model/PublishMessageRequestBody.d.ts +2 -0
  55. package/v2/model/PublishMessageRequestBody.d.ts.map +1 -1
  56. package/v2/model/PublishMessageRequestBody.js +4 -0
  57. package/v2/model/PublishMessageRequestBody.js.map +1 -1
  58. package/v2/model/ShowNotifyPolicyRequest.d.ts +8 -0
  59. package/v2/model/ShowNotifyPolicyRequest.d.ts.map +1 -0
  60. package/v2/model/ShowNotifyPolicyRequest.js +20 -0
  61. package/v2/model/ShowNotifyPolicyRequest.js.map +1 -0
  62. package/v2/model/ShowNotifyPolicyResponse.d.ts +23 -0
  63. package/v2/model/ShowNotifyPolicyResponse.d.ts.map +1 -0
  64. package/v2/model/ShowNotifyPolicyResponse.js +41 -0
  65. package/v2/model/ShowNotifyPolicyResponse.js.map +1 -0
  66. package/v2/model/SubscriptionExtension.d.ts +18 -0
  67. package/v2/model/SubscriptionExtension.d.ts.map +1 -1
  68. package/v2/model/SubscriptionExtension.js +34 -0
  69. package/v2/model/SubscriptionExtension.js.map +1 -1
  70. package/v2/model/UpdateNotifyPolicyRequest.d.ts +15 -0
  71. package/v2/model/UpdateNotifyPolicyRequest.d.ts.map +1 -0
  72. package/v2/model/UpdateNotifyPolicyRequest.js +35 -0
  73. package/v2/model/UpdateNotifyPolicyRequest.js.map +1 -0
  74. package/v2/model/UpdateNotifyPolicyResponse.d.ts +7 -0
  75. package/v2/model/UpdateNotifyPolicyResponse.d.ts.map +1 -0
  76. package/v2/model/UpdateNotifyPolicyResponse.js +15 -0
  77. package/v2/model/UpdateNotifyPolicyResponse.js.map +1 -0
  78. package/v2/public-api.d.ts +13 -0
  79. package/v2/public-api.d.ts.map +1 -1
  80. package/v2/public-api.js +13 -0
  81. package/v2/public-api.js.map +1 -1
package/v2/SmnClient.js CHANGED
@@ -13,12 +13,14 @@ const CreateApplicationEndpointRequest_1 = require("./model/CreateApplicationEnd
13
13
  const CreateApplicationRequest_1 = require("./model/CreateApplicationRequest");
14
14
  const CreateLogtankRequest_1 = require("./model/CreateLogtankRequest");
15
15
  const CreateMessageTemplateRequest_1 = require("./model/CreateMessageTemplateRequest");
16
+ const CreateNotifyPolicyRequest_1 = require("./model/CreateNotifyPolicyRequest");
16
17
  const CreateResourceTagRequest_1 = require("./model/CreateResourceTagRequest");
17
18
  const CreateTopicRequest_1 = require("./model/CreateTopicRequest");
18
19
  const DeleteApplicationEndpointRequest_1 = require("./model/DeleteApplicationEndpointRequest");
19
20
  const DeleteApplicationRequest_1 = require("./model/DeleteApplicationRequest");
20
21
  const DeleteLogtankRequest_1 = require("./model/DeleteLogtankRequest");
21
22
  const DeleteMessageTemplateRequest_1 = require("./model/DeleteMessageTemplateRequest");
23
+ const DeleteNotifyPolicyRequest_1 = require("./model/DeleteNotifyPolicyRequest");
22
24
  const DeleteResourceTagRequest_1 = require("./model/DeleteResourceTagRequest");
23
25
  const DeleteTopicAttributeByNameRequest_1 = require("./model/DeleteTopicAttributeByNameRequest");
24
26
  const DeleteTopicAttributesRequest_1 = require("./model/DeleteTopicAttributesRequest");
@@ -42,10 +44,12 @@ const PublishAppMessageRequest_1 = require("./model/PublishAppMessageRequest");
42
44
  const PublishHttpDetectRequest_1 = require("./model/PublishHttpDetectRequest");
43
45
  const PublishMessageRequest_1 = require("./model/PublishMessageRequest");
44
46
  const ShowHttpDetectResultRequest_1 = require("./model/ShowHttpDetectResultRequest");
47
+ const ShowNotifyPolicyRequest_1 = require("./model/ShowNotifyPolicyRequest");
45
48
  const UpdateApplicationEndpointRequest_1 = require("./model/UpdateApplicationEndpointRequest");
46
49
  const UpdateApplicationRequest_1 = require("./model/UpdateApplicationRequest");
47
50
  const UpdateLogtankRequest_1 = require("./model/UpdateLogtankRequest");
48
51
  const UpdateMessageTemplateRequest_1 = require("./model/UpdateMessageTemplateRequest");
52
+ const UpdateNotifyPolicyRequest_1 = require("./model/UpdateNotifyPolicyRequest");
49
53
  const UpdateSubscriptionRequest_1 = require("./model/UpdateSubscriptionRequest");
50
54
  const UpdateTopicAttributeRequest_1 = require("./model/UpdateTopicAttributeRequest");
51
55
  const UpdateTopicRequest_1 = require("./model/UpdateTopicRequest");
@@ -213,6 +217,23 @@ class SmnClient {
213
217
  options['responseHeaders'] = [''];
214
218
  return this.hcClient.sendRequest(options);
215
219
  }
220
+ /**
221
+ * 创建通知策略
222
+ *
223
+ * Please refer to HUAWEI cloud API Explorer for details.
224
+ *
225
+ * @summary 创建通知策略
226
+ * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
227
+ * @param {NotifyPolicyRequestBody} createNotifyPolicyRequestBody 创建通知策略请求体。
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ createNotifyPolicy(createNotifyPolicyRequest) {
232
+ const options = (0, exports.ParamCreater)().createNotifyPolicy(createNotifyPolicyRequest);
233
+ // @ts-ignore
234
+ options['responseHeaders'] = [''];
235
+ return this.hcClient.sendRequest(options);
236
+ }
216
237
  /**
217
238
  * 一个资源上最多有10个标签。此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。
218
239
  *
@@ -281,6 +302,23 @@ class SmnClient {
281
302
  options['responseHeaders'] = [''];
282
303
  return this.hcClient.sendRequest(options);
283
304
  }
305
+ /**
306
+ * 删除通知策略
307
+ *
308
+ * Please refer to HUAWEI cloud API Explorer for details.
309
+ *
310
+ * @summary 删除通知策略
311
+ * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
312
+ * @param {string} notifyPolicyId 通知策略ID。
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ deleteNotifyPolicy(deleteNotifyPolicyRequest) {
317
+ const options = (0, exports.ParamCreater)().deleteNotifyPolicy(deleteNotifyPolicyRequest);
318
+ // @ts-ignore
319
+ options['responseHeaders'] = [''];
320
+ return this.hcClient.sendRequest(options);
321
+ }
284
322
  /**
285
323
  * 幂等接口:删除时,不对标签做校验。删除的key不存在报404,key不能为空或者空字符串。
286
324
  *
@@ -389,7 +427,7 @@ class SmnClient {
389
427
  * @param {number} [offset] 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。
390
428
  * @param {number} [limit] 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。
391
429
  * @param {string} [messageTemplateName] 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。
392
- * @param {string} [protocol] 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。
430
+ * @param {string} [protocol] 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “http”、“https”:HTTP/HTTPS传输协议。
393
431
  * @param {*} [options] Override http request option.
394
432
  * @throws {RequiredError}
395
433
  */
@@ -457,7 +495,7 @@ class SmnClient {
457
495
  * @summary 查询订阅者列表
458
496
  * @param {number} [offset] 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。
459
497
  * @param {number} [limit] 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。
460
- * @param {string} [protocol] 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application
498
+ * @param {string} [protocol] 协议名称, 枚举值:http、https、sms、email、functionstage。
461
499
  * @param {number} [status] 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。
462
500
  * @param {string} [endpoint] 订阅终端。
463
501
  * @param {string} [fuzzyRemark] 检索的订阅备注字段,模糊匹配。最大长度限制为128个字节。
@@ -496,7 +534,7 @@ class SmnClient {
496
534
  *
497
535
  * @summary 查询主题策略
498
536
  * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
499
- * @param {string} name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](smn_api_a1000.xml)。
537
+ * @param {string} [name] 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](smn_api_a1000.xml)。
500
538
  * @param {*} [options] Override http request option.
501
539
  * @throws {RequiredError}
502
540
  */
@@ -530,7 +568,7 @@ class SmnClient {
530
568
  * @summary 查询主题列表
531
569
  * @param {number} [offset] 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。
532
570
  * @param {number} [limit] 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。
533
- * @param {string} [enterpriseProjectId] 企业项目id,默认企业项目id为0
571
+ * @param {string} [enterpriseProjectId] 企业项目id。
534
572
  * @param {string} [name] 检索的主题名称,完全匹配。
535
573
  * @param {string} [fuzzyName] 检索的主题名称,模糊匹配。
536
574
  * @param {string} [topicId] 检索的主题ID,完全匹配。
@@ -592,7 +630,8 @@ class SmnClient {
592
630
  return this.hcClient.sendRequest(options);
593
631
  }
594
632
  /**
595
- * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。三种消息发送方式
633
+ * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。为确保您的消息能够成功推送到各个订阅者,请确保您的消息内容符合当地法律法规要求。
634
+ * 三种消息发送方式
596
635
  *
597
636
  * message
598
637
  *
@@ -634,6 +673,22 @@ class SmnClient {
634
673
  options['responseHeaders'] = [''];
635
674
  return this.hcClient.sendRequest(options);
636
675
  }
676
+ /**
677
+ * 查询通知策略
678
+ *
679
+ * Please refer to HUAWEI cloud API Explorer for details.
680
+ *
681
+ * @summary 查询通知策略
682
+ * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ */
686
+ showNotifyPolicy(showNotifyPolicyRequest) {
687
+ const options = (0, exports.ParamCreater)().showNotifyPolicy(showNotifyPolicyRequest);
688
+ // @ts-ignore
689
+ options['responseHeaders'] = [''];
690
+ return this.hcClient.sendRequest(options);
691
+ }
637
692
  /**
638
693
  * 更新指定Topic绑定的云日志。
639
694
  *
@@ -669,6 +724,24 @@ class SmnClient {
669
724
  options['responseHeaders'] = [''];
670
725
  return this.hcClient.sendRequest(options);
671
726
  }
727
+ /**
728
+ * 修改通知策略,该接口仅支持全量修改,不支持部分修改。
729
+ *
730
+ * Please refer to HUAWEI cloud API Explorer for details.
731
+ *
732
+ * @summary 修改通知策略
733
+ * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
734
+ * @param {string} notifyPolicyId 通知策略ID。
735
+ * @param {NotifyPolicyRequestBody} createNotifyPolicyRequestBody 通知策略
736
+ * @param {*} [options] Override http request option.
737
+ * @throws {RequiredError}
738
+ */
739
+ updateNotifyPolicy(updateNotifyPolicyRequest) {
740
+ const options = (0, exports.ParamCreater)().updateNotifyPolicy(updateNotifyPolicyRequest);
741
+ // @ts-ignore
742
+ options['responseHeaders'] = [''];
743
+ return this.hcClient.sendRequest(options);
744
+ }
672
745
  /**
673
746
  * 更新订阅者备注。
674
747
  *
@@ -1238,6 +1311,46 @@ const ParamCreater = function () {
1238
1311
  options.headers = localVarHeaderParameter;
1239
1312
  return options;
1240
1313
  },
1314
+ /**
1315
+ * 创建通知策略
1316
+ *
1317
+ * Please refer to HUAWEI cloud API Explorer for details.
1318
+ */
1319
+ createNotifyPolicy(createNotifyPolicyRequest) {
1320
+ const options = {
1321
+ method: "POST",
1322
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy",
1323
+ contentType: "application/json;charset=UTF-8",
1324
+ queryParams: {},
1325
+ pathParams: {},
1326
+ headers: {},
1327
+ data: {}
1328
+ };
1329
+ const localVarHeaderParameter = {};
1330
+ let body;
1331
+ let topicUrn;
1332
+ if (createNotifyPolicyRequest !== null && createNotifyPolicyRequest !== undefined) {
1333
+ if (createNotifyPolicyRequest instanceof CreateNotifyPolicyRequest_1.CreateNotifyPolicyRequest) {
1334
+ topicUrn = createNotifyPolicyRequest.topicUrn;
1335
+ body = createNotifyPolicyRequest.body;
1336
+ }
1337
+ else {
1338
+ topicUrn = createNotifyPolicyRequest['topic_urn'];
1339
+ body = createNotifyPolicyRequest['body'];
1340
+ }
1341
+ }
1342
+ if (topicUrn === null || topicUrn === undefined) {
1343
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling createNotifyPolicy.');
1344
+ }
1345
+ if (body === null || body === undefined) {
1346
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1347
+ }
1348
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
1349
+ options.data = body !== undefined ? body : {};
1350
+ options.pathParams = { 'topic_urn': topicUrn, };
1351
+ options.headers = localVarHeaderParameter;
1352
+ return options;
1353
+ },
1241
1354
  /**
1242
1355
  * 一个资源上最多有10个标签。此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。
1243
1356
  *
@@ -1383,6 +1496,43 @@ const ParamCreater = function () {
1383
1496
  options.headers = localVarHeaderParameter;
1384
1497
  return options;
1385
1498
  },
1499
+ /**
1500
+ * 删除通知策略
1501
+ *
1502
+ * Please refer to HUAWEI cloud API Explorer for details.
1503
+ */
1504
+ deleteNotifyPolicy(deleteNotifyPolicyRequest) {
1505
+ const options = {
1506
+ method: "DELETE",
1507
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}",
1508
+ contentType: "application/json",
1509
+ queryParams: {},
1510
+ pathParams: {},
1511
+ headers: {}
1512
+ };
1513
+ const localVarHeaderParameter = {};
1514
+ let topicUrn;
1515
+ let notifyPolicyId;
1516
+ if (deleteNotifyPolicyRequest !== null && deleteNotifyPolicyRequest !== undefined) {
1517
+ if (deleteNotifyPolicyRequest instanceof DeleteNotifyPolicyRequest_1.DeleteNotifyPolicyRequest) {
1518
+ topicUrn = deleteNotifyPolicyRequest.topicUrn;
1519
+ notifyPolicyId = deleteNotifyPolicyRequest.notifyPolicyId;
1520
+ }
1521
+ else {
1522
+ topicUrn = deleteNotifyPolicyRequest['topic_urn'];
1523
+ notifyPolicyId = deleteNotifyPolicyRequest['notify_policy_id'];
1524
+ }
1525
+ }
1526
+ if (topicUrn === null || topicUrn === undefined) {
1527
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling deleteNotifyPolicy.');
1528
+ }
1529
+ if (notifyPolicyId === null || notifyPolicyId === undefined) {
1530
+ throw new RequiredError('notifyPolicyId', 'Required parameter notifyPolicyId was null or undefined when calling deleteNotifyPolicy.');
1531
+ }
1532
+ options.pathParams = { 'topic_urn': topicUrn, 'notify_policy_id': notifyPolicyId, };
1533
+ options.headers = localVarHeaderParameter;
1534
+ return options;
1535
+ },
1386
1536
  /**
1387
1537
  * 幂等接口:删除时,不对标签做校验。删除的key不存在报404,key不能为空或者空字符串。
1388
1538
  *
@@ -1886,9 +2036,6 @@ const ParamCreater = function () {
1886
2036
  if (topicUrn === null || topicUrn === undefined) {
1887
2037
  throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling listTopicAttributes.');
1888
2038
  }
1889
- if (name === null || name === undefined) {
1890
- throw new RequiredError('name', 'Required parameter name was null or undefined when calling listTopicAttributes.');
1891
- }
1892
2039
  if (name !== null && name !== undefined) {
1893
2040
  localVarQueryParameter['name'] = name;
1894
2041
  }
@@ -2073,7 +2220,8 @@ const ParamCreater = function () {
2073
2220
  return options;
2074
2221
  },
2075
2222
  /**
2076
- * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。三种消息发送方式
2223
+ * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。为确保您的消息能够成功推送到各个订阅者,请确保您的消息内容符合当地法律法规要求。
2224
+ * 三种消息发送方式
2077
2225
  *
2078
2226
  * message
2079
2227
  *
@@ -2155,6 +2303,37 @@ const ParamCreater = function () {
2155
2303
  options.headers = localVarHeaderParameter;
2156
2304
  return options;
2157
2305
  },
2306
+ /**
2307
+ * 查询通知策略
2308
+ *
2309
+ * Please refer to HUAWEI cloud API Explorer for details.
2310
+ */
2311
+ showNotifyPolicy(showNotifyPolicyRequest) {
2312
+ const options = {
2313
+ method: "GET",
2314
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy",
2315
+ contentType: "application/json",
2316
+ queryParams: {},
2317
+ pathParams: {},
2318
+ headers: {}
2319
+ };
2320
+ const localVarHeaderParameter = {};
2321
+ let topicUrn;
2322
+ if (showNotifyPolicyRequest !== null && showNotifyPolicyRequest !== undefined) {
2323
+ if (showNotifyPolicyRequest instanceof ShowNotifyPolicyRequest_1.ShowNotifyPolicyRequest) {
2324
+ topicUrn = showNotifyPolicyRequest.topicUrn;
2325
+ }
2326
+ else {
2327
+ topicUrn = showNotifyPolicyRequest['topic_urn'];
2328
+ }
2329
+ }
2330
+ if (topicUrn === null || topicUrn === undefined) {
2331
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling showNotifyPolicy.');
2332
+ }
2333
+ options.pathParams = { 'topic_urn': topicUrn, };
2334
+ options.headers = localVarHeaderParameter;
2335
+ return options;
2336
+ },
2158
2337
  /**
2159
2338
  * 更新指定Topic绑定的云日志。
2160
2339
  *
@@ -2238,6 +2417,52 @@ const ParamCreater = function () {
2238
2417
  options.headers = localVarHeaderParameter;
2239
2418
  return options;
2240
2419
  },
2420
+ /**
2421
+ * 修改通知策略,该接口仅支持全量修改,不支持部分修改。
2422
+ *
2423
+ * Please refer to HUAWEI cloud API Explorer for details.
2424
+ */
2425
+ updateNotifyPolicy(updateNotifyPolicyRequest) {
2426
+ const options = {
2427
+ method: "PUT",
2428
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}",
2429
+ contentType: "application/json;charset=UTF-8",
2430
+ queryParams: {},
2431
+ pathParams: {},
2432
+ headers: {},
2433
+ data: {}
2434
+ };
2435
+ const localVarHeaderParameter = {};
2436
+ let body;
2437
+ let topicUrn;
2438
+ let notifyPolicyId;
2439
+ if (updateNotifyPolicyRequest !== null && updateNotifyPolicyRequest !== undefined) {
2440
+ if (updateNotifyPolicyRequest instanceof UpdateNotifyPolicyRequest_1.UpdateNotifyPolicyRequest) {
2441
+ topicUrn = updateNotifyPolicyRequest.topicUrn;
2442
+ notifyPolicyId = updateNotifyPolicyRequest.notifyPolicyId;
2443
+ body = updateNotifyPolicyRequest.body;
2444
+ }
2445
+ else {
2446
+ topicUrn = updateNotifyPolicyRequest['topic_urn'];
2447
+ notifyPolicyId = updateNotifyPolicyRequest['notify_policy_id'];
2448
+ body = updateNotifyPolicyRequest['body'];
2449
+ }
2450
+ }
2451
+ if (topicUrn === null || topicUrn === undefined) {
2452
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling updateNotifyPolicy.');
2453
+ }
2454
+ if (notifyPolicyId === null || notifyPolicyId === undefined) {
2455
+ throw new RequiredError('notifyPolicyId', 'Required parameter notifyPolicyId was null or undefined when calling updateNotifyPolicy.');
2456
+ }
2457
+ if (body === null || body === undefined) {
2458
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
2459
+ }
2460
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
2461
+ options.data = body !== undefined ? body : {};
2462
+ options.pathParams = { 'topic_urn': topicUrn, 'notify_policy_id': notifyPolicyId, };
2463
+ options.headers = localVarHeaderParameter;
2464
+ return options;
2465
+ },
2241
2466
  /**
2242
2467
  * 更新订阅者备注。
2243
2468
  *