@huaweicloud/huaweicloud-sdk-smn 3.1.166 → 3.1.167

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 (97) hide show
  1. package/package.json +2 -2
  2. package/v2/SmnClient.d.ts +212 -0
  3. package/v2/SmnClient.d.ts.map +1 -1
  4. package/v2/SmnClient.js +395 -0
  5. package/v2/SmnClient.js.map +1 -1
  6. package/v2/SmnRegion.d.ts +6 -0
  7. package/v2/SmnRegion.d.ts.map +1 -1
  8. package/v2/SmnRegion.js +13 -1
  9. package/v2/SmnRegion.js.map +1 -1
  10. package/v2/model/BatchDeleteSubscriptionsByTopicRequest.d.ts +11 -0
  11. package/v2/model/BatchDeleteSubscriptionsByTopicRequest.d.ts.map +1 -0
  12. package/v2/model/BatchDeleteSubscriptionsByTopicRequest.js +24 -0
  13. package/v2/model/BatchDeleteSubscriptionsByTopicRequest.js.map +1 -0
  14. package/v2/model/BatchDeleteSubscriptionsByTopicResponse.d.ts +10 -0
  15. package/v2/model/BatchDeleteSubscriptionsByTopicResponse.d.ts.map +1 -0
  16. package/v2/model/BatchDeleteSubscriptionsByTopicResponse.js +21 -0
  17. package/v2/model/BatchDeleteSubscriptionsByTopicResponse.js.map +1 -0
  18. package/v2/model/BatchDeleteSubscriptionsRequest.d.ts +7 -0
  19. package/v2/model/BatchDeleteSubscriptionsRequest.d.ts.map +1 -0
  20. package/v2/model/BatchDeleteSubscriptionsRequest.js +13 -0
  21. package/v2/model/BatchDeleteSubscriptionsRequest.js.map +1 -0
  22. package/v2/model/BatchDeleteSubscriptionsRequestBody.d.ts +9 -0
  23. package/v2/model/BatchDeleteSubscriptionsRequestBody.d.ts.map +1 -0
  24. package/v2/model/BatchDeleteSubscriptionsRequestBody.js +20 -0
  25. package/v2/model/BatchDeleteSubscriptionsRequestBody.js.map +1 -0
  26. package/v2/model/BatchDeleteSubscriptionsRequestItemInfo.d.ts +8 -0
  27. package/v2/model/BatchDeleteSubscriptionsRequestItemInfo.d.ts.map +1 -0
  28. package/v2/model/BatchDeleteSubscriptionsRequestItemInfo.js +20 -0
  29. package/v2/model/BatchDeleteSubscriptionsRequestItemInfo.js.map +1 -0
  30. package/v2/model/BatchDeleteSubscriptionsResponse.d.ts +10 -0
  31. package/v2/model/BatchDeleteSubscriptionsResponse.d.ts.map +1 -0
  32. package/v2/model/BatchDeleteSubscriptionsResponse.js +21 -0
  33. package/v2/model/BatchDeleteSubscriptionsResponse.js.map +1 -0
  34. package/v2/model/BatchDeleteSubscriptionsResponseItemInfo.d.ts +16 -0
  35. package/v2/model/BatchDeleteSubscriptionsResponseItemInfo.d.ts.map +1 -0
  36. package/v2/model/BatchDeleteSubscriptionsResponseItemInfo.js +39 -0
  37. package/v2/model/BatchDeleteSubscriptionsResponseItemInfo.js.map +1 -0
  38. package/v2/model/ConfirmSubscriptionRequest.d.ts +12 -0
  39. package/v2/model/ConfirmSubscriptionRequest.d.ts.map +1 -0
  40. package/v2/model/ConfirmSubscriptionRequest.js +28 -0
  41. package/v2/model/ConfirmSubscriptionRequest.js.map +1 -0
  42. package/v2/model/ConfirmSubscriptionResponse.d.ts +13 -0
  43. package/v2/model/ConfirmSubscriptionResponse.d.ts.map +1 -0
  44. package/v2/model/ConfirmSubscriptionResponse.js +31 -0
  45. package/v2/model/ConfirmSubscriptionResponse.js.map +1 -0
  46. package/v2/model/CreateMessageTemplateRequestBody.d.ts +1 -1
  47. package/v2/model/CreateMessageTemplateRequestBody.d.ts.map +1 -1
  48. package/v2/model/CreateMessageTemplateRequestBody.js +1 -2
  49. package/v2/model/CreateMessageTemplateRequestBody.js.map +1 -1
  50. package/v2/model/DeleteSubscriptionsByTopicRequest.d.ts +12 -0
  51. package/v2/model/DeleteSubscriptionsByTopicRequest.d.ts.map +1 -0
  52. package/v2/model/DeleteSubscriptionsByTopicRequest.js +31 -0
  53. package/v2/model/DeleteSubscriptionsByTopicRequest.js.map +1 -0
  54. package/v2/model/DeleteSubscriptionsByTopicResponse.d.ts +9 -0
  55. package/v2/model/DeleteSubscriptionsByTopicResponse.d.ts.map +1 -0
  56. package/v2/model/DeleteSubscriptionsByTopicResponse.js +21 -0
  57. package/v2/model/DeleteSubscriptionsByTopicResponse.js.map +1 -0
  58. package/v2/model/DownloadHttpCertRequest.d.ts +8 -0
  59. package/v2/model/DownloadHttpCertRequest.d.ts.map +1 -0
  60. package/v2/model/DownloadHttpCertRequest.js +20 -0
  61. package/v2/model/DownloadHttpCertRequest.js.map +1 -0
  62. package/v2/model/DownloadHttpCertResponse.d.ts +11 -0
  63. package/v2/model/DownloadHttpCertResponse.d.ts.map +1 -0
  64. package/v2/model/DownloadHttpCertResponse.js +25 -0
  65. package/v2/model/DownloadHttpCertResponse.js.map +1 -0
  66. package/v2/model/ListCloudServiceRequest.d.ts +4 -0
  67. package/v2/model/ListCloudServiceRequest.d.ts.map +1 -0
  68. package/v2/model/ListCloudServiceRequest.js +9 -0
  69. package/v2/model/ListCloudServiceRequest.js.map +1 -0
  70. package/v2/model/ListCloudServiceResponse.d.ts +14 -0
  71. package/v2/model/ListCloudServiceResponse.d.ts.map +1 -0
  72. package/v2/model/ListCloudServiceResponse.js +31 -0
  73. package/v2/model/ListCloudServiceResponse.js.map +1 -0
  74. package/v2/model/ListCloudServiceResponseItemInfo.d.ts +10 -0
  75. package/v2/model/ListCloudServiceResponseItemInfo.d.ts.map +1 -0
  76. package/v2/model/ListCloudServiceResponseItemInfo.js +25 -0
  77. package/v2/model/ListCloudServiceResponseItemInfo.js.map +1 -0
  78. package/v2/model/ListProtocolsRequest.d.ts +4 -0
  79. package/v2/model/ListProtocolsRequest.d.ts.map +1 -0
  80. package/v2/model/ListProtocolsRequest.js +9 -0
  81. package/v2/model/ListProtocolsRequest.js.map +1 -0
  82. package/v2/model/ListProtocolsResponse.d.ts +11 -0
  83. package/v2/model/ListProtocolsResponse.d.ts.map +1 -0
  84. package/v2/model/ListProtocolsResponse.js +25 -0
  85. package/v2/model/ListProtocolsResponse.js.map +1 -0
  86. package/v2/model/UnsubscribeSubscriptionRequest.d.ts +8 -0
  87. package/v2/model/UnsubscribeSubscriptionRequest.d.ts.map +1 -0
  88. package/v2/model/UnsubscribeSubscriptionRequest.js +20 -0
  89. package/v2/model/UnsubscribeSubscriptionRequest.js.map +1 -0
  90. package/v2/model/UnsubscribeSubscriptionResponse.d.ts +7 -0
  91. package/v2/model/UnsubscribeSubscriptionResponse.d.ts.map +1 -0
  92. package/v2/model/UnsubscribeSubscriptionResponse.js +15 -0
  93. package/v2/model/UnsubscribeSubscriptionResponse.js.map +1 -0
  94. package/v2/public-api.d.ts +20 -0
  95. package/v2/public-api.d.ts.map +1 -1
  96. package/v2/public-api.js +20 -0
  97. package/v2/public-api.js.map +1 -1
package/v2/SmnClient.js CHANGED
@@ -6,9 +6,12 @@ const AddSubscriptionFromSubscriptionUserRequest_1 = require("./model/AddSubscri
6
6
  const AddSubscriptionRequest_1 = require("./model/AddSubscriptionRequest");
7
7
  const BatchCreateOrDeleteResourceTagsRequest_1 = require("./model/BatchCreateOrDeleteResourceTagsRequest");
8
8
  const BatchCreateSubscriptionsFilterPolicesRequest_1 = require("./model/BatchCreateSubscriptionsFilterPolicesRequest");
9
+ const BatchDeleteSubscriptionsByTopicRequest_1 = require("./model/BatchDeleteSubscriptionsByTopicRequest");
9
10
  const BatchDeleteSubscriptionsFilterPolicesRequest_1 = require("./model/BatchDeleteSubscriptionsFilterPolicesRequest");
11
+ const BatchDeleteSubscriptionsRequest_1 = require("./model/BatchDeleteSubscriptionsRequest");
10
12
  const BatchUpdateSubscriptionsFilterPolicesRequest_1 = require("./model/BatchUpdateSubscriptionsFilterPolicesRequest");
11
13
  const CancelSubscriptionRequest_1 = require("./model/CancelSubscriptionRequest");
14
+ const ConfirmSubscriptionRequest_1 = require("./model/ConfirmSubscriptionRequest");
12
15
  const CreateApplicationEndpointRequest_1 = require("./model/CreateApplicationEndpointRequest");
13
16
  const CreateApplicationRequest_1 = require("./model/CreateApplicationRequest");
14
17
  const CreateLogtankRequest_1 = require("./model/CreateLogtankRequest");
@@ -22,9 +25,11 @@ const DeleteLogtankRequest_1 = require("./model/DeleteLogtankRequest");
22
25
  const DeleteMessageTemplateRequest_1 = require("./model/DeleteMessageTemplateRequest");
23
26
  const DeleteNotifyPolicyRequest_1 = require("./model/DeleteNotifyPolicyRequest");
24
27
  const DeleteResourceTagRequest_1 = require("./model/DeleteResourceTagRequest");
28
+ const DeleteSubscriptionsByTopicRequest_1 = require("./model/DeleteSubscriptionsByTopicRequest");
25
29
  const DeleteTopicAttributeByNameRequest_1 = require("./model/DeleteTopicAttributeByNameRequest");
26
30
  const DeleteTopicAttributesRequest_1 = require("./model/DeleteTopicAttributesRequest");
27
31
  const DeleteTopicRequest_1 = require("./model/DeleteTopicRequest");
32
+ const DownloadHttpCertRequest_1 = require("./model/DownloadHttpCertRequest");
28
33
  const ListApplicationAttributesRequest_1 = require("./model/ListApplicationAttributesRequest");
29
34
  const ListApplicationEndpointAttributesRequest_1 = require("./model/ListApplicationEndpointAttributesRequest");
30
35
  const ListApplicationEndpointsRequest_1 = require("./model/ListApplicationEndpointsRequest");
@@ -46,6 +51,7 @@ const PublishHttpDetectRequest_1 = require("./model/PublishHttpDetectRequest");
46
51
  const PublishMessageRequest_1 = require("./model/PublishMessageRequest");
47
52
  const ShowHttpDetectResultRequest_1 = require("./model/ShowHttpDetectResultRequest");
48
53
  const ShowNotifyPolicyRequest_1 = require("./model/ShowNotifyPolicyRequest");
54
+ const UnsubscribeSubscriptionRequest_1 = require("./model/UnsubscribeSubscriptionRequest");
49
55
  const UpdateApplicationEndpointRequest_1 = require("./model/UpdateApplicationEndpointRequest");
50
56
  const UpdateApplicationRequest_1 = require("./model/UpdateApplicationRequest");
51
57
  const UpdateLogtankRequest_1 = require("./model/UpdateLogtankRequest");
@@ -136,6 +142,39 @@ class SmnClient {
136
142
  options['responseHeaders'] = [''];
137
143
  return this.hcClient.sendRequest(options);
138
144
  }
145
+ /**
146
+ * 批量删除订阅,每个订阅终端的删除结果在响应体中依次展示。
147
+ *
148
+ * Please refer to HUAWEI cloud API Explorer for details.
149
+ *
150
+ * @summary 批量删除订阅
151
+ * @param {BatchDeleteSubscriptionsRequestBody} batchDeleteSubscriptionsRequestBody 批量删除订阅请求体
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ batchDeleteSubscriptions(batchDeleteSubscriptionsRequest) {
156
+ const options = (0, exports.ParamCreater)().batchDeleteSubscriptions(batchDeleteSubscriptionsRequest);
157
+ // @ts-ignore
158
+ options['responseHeaders'] = [''];
159
+ return this.hcClient.sendRequest(options);
160
+ }
161
+ /**
162
+ * 批量删除指定主题的订阅,每个订阅终端的删除结果在响应体中依次展示。
163
+ *
164
+ * Please refer to HUAWEI cloud API Explorer for details.
165
+ *
166
+ * @summary 批量删除指定主题的订阅
167
+ * @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
168
+ * @param {BatchDeleteSubscriptionsRequestBody} batchDeleteSubscriptionsRequestBody 批量删除的请求体
169
+ * @param {*} [options] Override http request option.
170
+ * @throws {RequiredError}
171
+ */
172
+ batchDeleteSubscriptionsByTopic(batchDeleteSubscriptionsByTopicRequest) {
173
+ const options = (0, exports.ParamCreater)().batchDeleteSubscriptionsByTopic(batchDeleteSubscriptionsByTopicRequest);
174
+ // @ts-ignore
175
+ options['responseHeaders'] = [''];
176
+ return this.hcClient.sendRequest(options);
177
+ }
139
178
  /**
140
179
  * 删除订阅者的消息过滤策略。
141
180
  *
@@ -184,6 +223,24 @@ class SmnClient {
184
223
  options['responseHeaders'] = [''];
185
224
  return this.hcClient.sendRequest(options);
186
225
  }
226
+ /**
227
+ * 确认订阅主题消息。
228
+ *
229
+ * Please refer to HUAWEI cloud API Explorer for details.
230
+ *
231
+ * @summary 确认订阅
232
+ * @param {string} token 确认订阅Token信息。
233
+ * @param {string} [topicUrn] Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
234
+ * @param {string} [endpoint] 订阅终端地址。
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ confirmSubscription(confirmSubscriptionRequest) {
239
+ const options = (0, exports.ParamCreater)().confirmSubscription(confirmSubscriptionRequest);
240
+ // @ts-ignore
241
+ options['responseHeaders'] = [''];
242
+ return this.hcClient.sendRequest(options);
243
+ }
187
244
  /**
188
245
  * 为指定Topic绑定一个云日志,用于记录主题消息发送状态等信息。
189
246
  *
@@ -338,6 +395,23 @@ class SmnClient {
338
395
  options['responseHeaders'] = [''];
339
396
  return this.hcClient.sendRequest(options);
340
397
  }
398
+ /**
399
+ * 删除指定主题的订阅
400
+ *
401
+ * Please refer to HUAWEI cloud API Explorer for details.
402
+ *
403
+ * @summary 删除指定主题的订阅
404
+ * @param {string} topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](smn_api_51004.xml)获取该标识。
405
+ * @param {string} subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](ListSubscriptions.xml)获取该标识。
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ deleteSubscriptionsByTopic(deleteSubscriptionsByTopicRequest) {
410
+ const options = (0, exports.ParamCreater)().deleteSubscriptionsByTopic(deleteSubscriptionsByTopicRequest);
411
+ // @ts-ignore
412
+ options['responseHeaders'] = [''];
413
+ return this.hcClient.sendRequest(options);
414
+ }
341
415
  /**
342
416
  * 删除主题。
343
417
  *
@@ -387,6 +461,37 @@ class SmnClient {
387
461
  options['responseHeaders'] = [''];
388
462
  return this.hcClient.sendRequest(options);
389
463
  }
464
+ /**
465
+ * 下载http消息校验证书
466
+ *
467
+ * Please refer to HUAWEI cloud API Explorer for details.
468
+ *
469
+ * @summary 下载证书
470
+ * @param {string} certificateId 证书文件ID名称,格式为SMN-{RegionID}-{UUID}.pem
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ downloadHttpCert(downloadHttpCertRequest) {
475
+ const options = (0, exports.ParamCreater)().downloadHttpCert(downloadHttpCertRequest);
476
+ // @ts-ignore
477
+ options['responseHeaders'] = ['content-type'];
478
+ return this.hcClient.sendRequest(options);
479
+ }
480
+ /**
481
+ * 查询授权云服务列表。
482
+ *
483
+ * Please refer to HUAWEI cloud API Explorer for details.
484
+ *
485
+ * @summary 查询授权云服务列表
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ listCloudService(listCloudServiceRequest) {
490
+ const options = (0, exports.ParamCreater)().listCloudService();
491
+ // @ts-ignore
492
+ options['responseHeaders'] = [''];
493
+ return this.hcClient.sendRequest(options);
494
+ }
390
495
  /**
391
496
  * 查询指定Topic绑定的云日志。
392
497
  *
@@ -454,6 +559,21 @@ class SmnClient {
454
559
  options['responseHeaders'] = [''];
455
560
  return this.hcClient.sendRequest(options);
456
561
  }
562
+ /**
563
+ * 查询SMN支持的协议列表。
564
+ *
565
+ * Please refer to HUAWEI cloud API Explorer for details.
566
+ *
567
+ * @summary 查询协议列表
568
+ * @param {*} [options] Override http request option.
569
+ * @throws {RequiredError}
570
+ */
571
+ listProtocols(listProtocolsRequest) {
572
+ const options = (0, exports.ParamCreater)().listProtocols();
573
+ // @ts-ignore
574
+ options['responseHeaders'] = [''];
575
+ return this.hcClient.sendRequest(options);
576
+ }
457
577
  /**
458
578
  * 使用标签过滤实例。
459
579
  *
@@ -708,6 +828,22 @@ class SmnClient {
708
828
  options['responseHeaders'] = [''];
709
829
  return this.hcClient.sendRequest(options);
710
830
  }
831
+ /**
832
+ * 取消订阅主题
833
+ *
834
+ * Please refer to HUAWEI cloud API Explorer for details.
835
+ *
836
+ * @summary 取消订阅
837
+ * @param {string} subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](ListSubscriptions.xml)获取该标识。
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ unsubscribeSubscription(unsubscribeSubscriptionRequest) {
842
+ const options = (0, exports.ParamCreater)().unsubscribeSubscription(unsubscribeSubscriptionRequest);
843
+ // @ts-ignore
844
+ options['responseHeaders'] = [''];
845
+ return this.hcClient.sendRequest(options);
846
+ }
711
847
  /**
712
848
  * 更新指定Topic绑定的云日志。
713
849
  *
@@ -1162,6 +1298,79 @@ const ParamCreater = function () {
1162
1298
  options.headers = localVarHeaderParameter;
1163
1299
  return options;
1164
1300
  },
1301
+ /**
1302
+ * 批量删除订阅,每个订阅终端的删除结果在响应体中依次展示。
1303
+ *
1304
+ * Please refer to HUAWEI cloud API Explorer for details.
1305
+ */
1306
+ batchDeleteSubscriptions(batchDeleteSubscriptionsRequest) {
1307
+ const options = {
1308
+ method: "DELETE",
1309
+ url: "/v2/{project_id}/notifications/subscriptions",
1310
+ contentType: "application/json;charset=UTF-8",
1311
+ queryParams: {},
1312
+ pathParams: {},
1313
+ headers: {},
1314
+ data: {}
1315
+ };
1316
+ const localVarHeaderParameter = {};
1317
+ let body;
1318
+ if (batchDeleteSubscriptionsRequest !== null && batchDeleteSubscriptionsRequest !== undefined) {
1319
+ if (batchDeleteSubscriptionsRequest instanceof BatchDeleteSubscriptionsRequest_1.BatchDeleteSubscriptionsRequest) {
1320
+ body = batchDeleteSubscriptionsRequest.body;
1321
+ }
1322
+ else {
1323
+ body = batchDeleteSubscriptionsRequest['body'];
1324
+ }
1325
+ }
1326
+ if (body === null || body === undefined) {
1327
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1328
+ }
1329
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
1330
+ options.data = body !== undefined ? body : {};
1331
+ options.headers = localVarHeaderParameter;
1332
+ return options;
1333
+ },
1334
+ /**
1335
+ * 批量删除指定主题的订阅,每个订阅终端的删除结果在响应体中依次展示。
1336
+ *
1337
+ * Please refer to HUAWEI cloud API Explorer for details.
1338
+ */
1339
+ batchDeleteSubscriptionsByTopic(batchDeleteSubscriptionsByTopicRequest) {
1340
+ const options = {
1341
+ method: "DELETE",
1342
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions",
1343
+ contentType: "application/json;charset=UTF-8",
1344
+ queryParams: {},
1345
+ pathParams: {},
1346
+ headers: {},
1347
+ data: {}
1348
+ };
1349
+ const localVarHeaderParameter = {};
1350
+ let body;
1351
+ let topicUrn;
1352
+ if (batchDeleteSubscriptionsByTopicRequest !== null && batchDeleteSubscriptionsByTopicRequest !== undefined) {
1353
+ if (batchDeleteSubscriptionsByTopicRequest instanceof BatchDeleteSubscriptionsByTopicRequest_1.BatchDeleteSubscriptionsByTopicRequest) {
1354
+ topicUrn = batchDeleteSubscriptionsByTopicRequest.topicUrn;
1355
+ body = batchDeleteSubscriptionsByTopicRequest.body;
1356
+ }
1357
+ else {
1358
+ topicUrn = batchDeleteSubscriptionsByTopicRequest['topic_urn'];
1359
+ body = batchDeleteSubscriptionsByTopicRequest['body'];
1360
+ }
1361
+ }
1362
+ if (topicUrn === null || topicUrn === undefined) {
1363
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling batchDeleteSubscriptionsByTopic.');
1364
+ }
1365
+ if (body === null || body === undefined) {
1366
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
1367
+ }
1368
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
1369
+ options.data = body !== undefined ? body : {};
1370
+ options.pathParams = { 'topic_urn': topicUrn, };
1371
+ options.headers = localVarHeaderParameter;
1372
+ return options;
1373
+ },
1165
1374
  /**
1166
1375
  * 删除订阅者的消息过滤策略。
1167
1376
  *
@@ -1259,6 +1468,53 @@ const ParamCreater = function () {
1259
1468
  options.headers = localVarHeaderParameter;
1260
1469
  return options;
1261
1470
  },
1471
+ /**
1472
+ * 确认订阅主题消息。
1473
+ *
1474
+ * Please refer to HUAWEI cloud API Explorer for details.
1475
+ */
1476
+ confirmSubscription(confirmSubscriptionRequest) {
1477
+ const options = {
1478
+ method: "GET",
1479
+ url: "/rest/v2/notifications/subscription/confirm",
1480
+ contentType: "application/json",
1481
+ queryParams: {},
1482
+ pathParams: {},
1483
+ headers: {}
1484
+ };
1485
+ const localVarHeaderParameter = {};
1486
+ const localVarQueryParameter = {};
1487
+ let token;
1488
+ let topicUrn;
1489
+ let endpoint;
1490
+ if (confirmSubscriptionRequest !== null && confirmSubscriptionRequest !== undefined) {
1491
+ if (confirmSubscriptionRequest instanceof ConfirmSubscriptionRequest_1.ConfirmSubscriptionRequest) {
1492
+ token = confirmSubscriptionRequest.token;
1493
+ topicUrn = confirmSubscriptionRequest.topicUrn;
1494
+ endpoint = confirmSubscriptionRequest.endpoint;
1495
+ }
1496
+ else {
1497
+ token = confirmSubscriptionRequest['token'];
1498
+ topicUrn = confirmSubscriptionRequest['topic_urn'];
1499
+ endpoint = confirmSubscriptionRequest['endpoint'];
1500
+ }
1501
+ }
1502
+ if (token === null || token === undefined) {
1503
+ throw new RequiredError('token', 'Required parameter token was null or undefined when calling confirmSubscription.');
1504
+ }
1505
+ if (token !== null && token !== undefined) {
1506
+ localVarQueryParameter['token'] = token;
1507
+ }
1508
+ if (topicUrn !== null && topicUrn !== undefined) {
1509
+ localVarQueryParameter['topic_urn'] = topicUrn;
1510
+ }
1511
+ if (endpoint !== null && endpoint !== undefined) {
1512
+ localVarQueryParameter['endpoint'] = endpoint;
1513
+ }
1514
+ options.queryParams = localVarQueryParameter;
1515
+ options.headers = localVarHeaderParameter;
1516
+ return options;
1517
+ },
1262
1518
  /**
1263
1519
  * 为指定Topic绑定一个云日志,用于记录主题消息发送状态等信息。
1264
1520
  *
@@ -1595,6 +1851,43 @@ const ParamCreater = function () {
1595
1851
  options.headers = localVarHeaderParameter;
1596
1852
  return options;
1597
1853
  },
1854
+ /**
1855
+ * 删除指定主题的订阅
1856
+ *
1857
+ * Please refer to HUAWEI cloud API Explorer for details.
1858
+ */
1859
+ deleteSubscriptionsByTopic(deleteSubscriptionsByTopicRequest) {
1860
+ const options = {
1861
+ method: "DELETE",
1862
+ url: "/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions/{subscription_urn}",
1863
+ contentType: "application/json",
1864
+ queryParams: {},
1865
+ pathParams: {},
1866
+ headers: {}
1867
+ };
1868
+ const localVarHeaderParameter = {};
1869
+ let topicUrn;
1870
+ let subscriptionUrn;
1871
+ if (deleteSubscriptionsByTopicRequest !== null && deleteSubscriptionsByTopicRequest !== undefined) {
1872
+ if (deleteSubscriptionsByTopicRequest instanceof DeleteSubscriptionsByTopicRequest_1.DeleteSubscriptionsByTopicRequest) {
1873
+ topicUrn = deleteSubscriptionsByTopicRequest.topicUrn;
1874
+ subscriptionUrn = deleteSubscriptionsByTopicRequest.subscriptionUrn;
1875
+ }
1876
+ else {
1877
+ topicUrn = deleteSubscriptionsByTopicRequest['topic_urn'];
1878
+ subscriptionUrn = deleteSubscriptionsByTopicRequest['subscription_urn'];
1879
+ }
1880
+ }
1881
+ if (topicUrn === null || topicUrn === undefined) {
1882
+ throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling deleteSubscriptionsByTopic.');
1883
+ }
1884
+ if (subscriptionUrn === null || subscriptionUrn === undefined) {
1885
+ throw new RequiredError('subscriptionUrn', 'Required parameter subscriptionUrn was null or undefined when calling deleteSubscriptionsByTopic.');
1886
+ }
1887
+ options.pathParams = { 'topic_urn': topicUrn, 'subscription_urn': subscriptionUrn, };
1888
+ options.headers = localVarHeaderParameter;
1889
+ return options;
1890
+ },
1598
1891
  /**
1599
1892
  * 删除主题。
1600
1893
  *
@@ -1694,6 +1987,55 @@ const ParamCreater = function () {
1694
1987
  options.headers = localVarHeaderParameter;
1695
1988
  return options;
1696
1989
  },
1990
+ /**
1991
+ * 下载http消息校验证书
1992
+ *
1993
+ * Please refer to HUAWEI cloud API Explorer for details.
1994
+ */
1995
+ downloadHttpCert(downloadHttpCertRequest) {
1996
+ const options = {
1997
+ method: "GET",
1998
+ url: "/smn/{certificate_id}",
1999
+ contentType: "application/json",
2000
+ queryParams: {},
2001
+ pathParams: {},
2002
+ headers: {}
2003
+ };
2004
+ const localVarHeaderParameter = {};
2005
+ let certificateId;
2006
+ if (downloadHttpCertRequest !== null && downloadHttpCertRequest !== undefined) {
2007
+ if (downloadHttpCertRequest instanceof DownloadHttpCertRequest_1.DownloadHttpCertRequest) {
2008
+ certificateId = downloadHttpCertRequest.certificateId;
2009
+ }
2010
+ else {
2011
+ certificateId = downloadHttpCertRequest['certificate_id'];
2012
+ }
2013
+ }
2014
+ if (certificateId === null || certificateId === undefined) {
2015
+ throw new RequiredError('certificateId', 'Required parameter certificateId was null or undefined when calling downloadHttpCert.');
2016
+ }
2017
+ options.pathParams = { 'certificate_id': certificateId, };
2018
+ options.headers = localVarHeaderParameter;
2019
+ return options;
2020
+ },
2021
+ /**
2022
+ * 查询授权云服务列表。
2023
+ *
2024
+ * Please refer to HUAWEI cloud API Explorer for details.
2025
+ */
2026
+ listCloudService() {
2027
+ const options = {
2028
+ method: "GET",
2029
+ url: "/v2/notifications/cloud_service",
2030
+ contentType: "application/json",
2031
+ queryParams: {},
2032
+ pathParams: {},
2033
+ headers: {}
2034
+ };
2035
+ const localVarHeaderParameter = {};
2036
+ options.headers = localVarHeaderParameter;
2037
+ return options;
2038
+ },
1697
2039
  /**
1698
2040
  * 查询指定Topic绑定的云日志。
1699
2041
  *
@@ -1837,6 +2179,24 @@ const ParamCreater = function () {
1837
2179
  options.headers = localVarHeaderParameter;
1838
2180
  return options;
1839
2181
  },
2182
+ /**
2183
+ * 查询SMN支持的协议列表。
2184
+ *
2185
+ * Please refer to HUAWEI cloud API Explorer for details.
2186
+ */
2187
+ listProtocols() {
2188
+ const options = {
2189
+ method: "GET",
2190
+ url: "/v2/notifications/protocols",
2191
+ contentType: "application/json",
2192
+ queryParams: {},
2193
+ pathParams: {},
2194
+ headers: {}
2195
+ };
2196
+ const localVarHeaderParameter = {};
2197
+ options.headers = localVarHeaderParameter;
2198
+ return options;
2199
+ },
1840
2200
  /**
1841
2201
  * 使用标签过滤实例。
1842
2202
  *
@@ -2404,6 +2764,41 @@ const ParamCreater = function () {
2404
2764
  options.headers = localVarHeaderParameter;
2405
2765
  return options;
2406
2766
  },
2767
+ /**
2768
+ * 取消订阅主题
2769
+ *
2770
+ * Please refer to HUAWEI cloud API Explorer for details.
2771
+ */
2772
+ unsubscribeSubscription(unsubscribeSubscriptionRequest) {
2773
+ const options = {
2774
+ method: "GET",
2775
+ url: "/rest/v2/notifications/subscription/unsubscribe",
2776
+ contentType: "application/json",
2777
+ queryParams: {},
2778
+ pathParams: {},
2779
+ headers: {}
2780
+ };
2781
+ const localVarHeaderParameter = {};
2782
+ const localVarQueryParameter = {};
2783
+ let subscriptionUrn;
2784
+ if (unsubscribeSubscriptionRequest !== null && unsubscribeSubscriptionRequest !== undefined) {
2785
+ if (unsubscribeSubscriptionRequest instanceof UnsubscribeSubscriptionRequest_1.UnsubscribeSubscriptionRequest) {
2786
+ subscriptionUrn = unsubscribeSubscriptionRequest.subscriptionUrn;
2787
+ }
2788
+ else {
2789
+ subscriptionUrn = unsubscribeSubscriptionRequest['subscription_urn'];
2790
+ }
2791
+ }
2792
+ if (subscriptionUrn === null || subscriptionUrn === undefined) {
2793
+ throw new RequiredError('subscriptionUrn', 'Required parameter subscriptionUrn was null or undefined when calling unsubscribeSubscription.');
2794
+ }
2795
+ if (subscriptionUrn !== null && subscriptionUrn !== undefined) {
2796
+ localVarQueryParameter['subscription_urn'] = subscriptionUrn;
2797
+ }
2798
+ options.queryParams = localVarQueryParameter;
2799
+ options.headers = localVarHeaderParameter;
2800
+ return options;
2801
+ },
2407
2802
  /**
2408
2803
  * 更新指定Topic绑定的云日志。
2409
2804
  *