@huaweicloud/huaweicloud-sdk-smn 3.1.176 → 3.1.178
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.
- package/package.json +2 -2
- package/v2/SmnClient.d.ts +249 -0
- package/v2/SmnClient.d.ts.map +1 -1
- package/v2/SmnClient.js +518 -0
- package/v2/SmnClient.js.map +1 -1
- package/v2/SmnRegion.d.ts +3 -0
- package/v2/SmnRegion.d.ts.map +1 -1
- package/v2/SmnRegion.js +7 -1
- package/v2/SmnRegion.js.map +1 -1
- package/v2/model/AddKmsKeyRequestBody.d.ts +8 -0
- package/v2/model/AddKmsKeyRequestBody.d.ts.map +1 -0
- package/v2/model/AddKmsKeyRequestBody.js +20 -0
- package/v2/model/AddKmsKeyRequestBody.js.map +1 -0
- package/v2/model/CreateKmsKeyRequest.d.ts +11 -0
- package/v2/model/CreateKmsKeyRequest.d.ts.map +1 -0
- package/v2/model/CreateKmsKeyRequest.js +24 -0
- package/v2/model/CreateKmsKeyRequest.js.map +1 -0
- package/v2/model/CreateKmsKeyResponse.d.ts +11 -0
- package/v2/model/CreateKmsKeyResponse.d.ts.map +1 -0
- package/v2/model/CreateKmsKeyResponse.js +25 -0
- package/v2/model/CreateKmsKeyResponse.js.map +1 -0
- package/v2/model/DeleteKmsKeyRequest.d.ts +10 -0
- package/v2/model/DeleteKmsKeyRequest.d.ts.map +1 -0
- package/v2/model/DeleteKmsKeyRequest.js +25 -0
- package/v2/model/DeleteKmsKeyRequest.js.map +1 -0
- package/v2/model/DeleteKmsKeyResponse.d.ts +9 -0
- package/v2/model/DeleteKmsKeyResponse.d.ts.map +1 -0
- package/v2/model/DeleteKmsKeyResponse.js +21 -0
- package/v2/model/DeleteKmsKeyResponse.js.map +1 -0
- package/v2/model/DownloadHttpCertResponse.d.ts +0 -2
- package/v2/model/DownloadHttpCertResponse.d.ts.map +1 -1
- package/v2/model/DownloadHttpCertResponse.js +0 -4
- package/v2/model/DownloadHttpCertResponse.js.map +1 -1
- package/v2/model/DownloadHttpSignCertRequest.d.ts +8 -0
- package/v2/model/DownloadHttpSignCertRequest.d.ts.map +1 -0
- package/v2/model/DownloadHttpSignCertRequest.js +20 -0
- package/v2/model/DownloadHttpSignCertRequest.js.map +1 -0
- package/v2/model/DownloadHttpSignCertResponse.d.ts +9 -0
- package/v2/model/DownloadHttpSignCertResponse.d.ts.map +1 -0
- package/v2/model/DownloadHttpSignCertResponse.js +21 -0
- package/v2/model/DownloadHttpSignCertResponse.js.map +1 -0
- package/v2/model/ListCloudServicesRequest.d.ts +4 -0
- package/v2/model/ListCloudServicesRequest.d.ts.map +1 -0
- package/v2/model/ListCloudServicesRequest.js +9 -0
- package/v2/model/ListCloudServicesRequest.js.map +1 -0
- package/v2/model/ListCloudServicesResponse.d.ts +14 -0
- package/v2/model/ListCloudServicesResponse.d.ts.map +1 -0
- package/v2/model/ListCloudServicesResponse.js +31 -0
- package/v2/model/ListCloudServicesResponse.js.map +1 -0
- package/v2/model/ListTopicsItem.d.ts +9 -1
- package/v2/model/ListTopicsItem.d.ts.map +1 -1
- package/v2/model/ListTopicsItem.js +23 -1
- package/v2/model/ListTopicsItem.js.map +1 -1
- package/v2/model/ListTopicsWithAssociatedResourcesItem.d.ts +43 -0
- package/v2/model/ListTopicsWithAssociatedResourcesItem.d.ts.map +1 -0
- package/v2/model/ListTopicsWithAssociatedResourcesItem.js +106 -0
- package/v2/model/ListTopicsWithAssociatedResourcesItem.js.map +1 -0
- package/v2/model/ListTopicsWithAssociatedResourcesRequest.d.ts +26 -0
- package/v2/model/ListTopicsWithAssociatedResourcesRequest.d.ts.map +1 -0
- package/v2/model/ListTopicsWithAssociatedResourcesRequest.js +61 -0
- package/v2/model/ListTopicsWithAssociatedResourcesRequest.js.map +1 -0
- package/v2/model/ListTopicsWithAssociatedResourcesResponse.d.ts +16 -0
- package/v2/model/ListTopicsWithAssociatedResourcesResponse.d.ts.map +1 -0
- package/v2/model/ListTopicsWithAssociatedResourcesResponse.js +35 -0
- package/v2/model/ListTopicsWithAssociatedResourcesResponse.js.map +1 -0
- package/v2/model/ShowKmsKeyRequest.d.ts +8 -0
- package/v2/model/ShowKmsKeyRequest.d.ts.map +1 -0
- package/v2/model/ShowKmsKeyRequest.js +20 -0
- package/v2/model/ShowKmsKeyRequest.js.map +1 -0
- package/v2/model/ShowKmsKeyResponse.d.ts +29 -0
- package/v2/model/ShowKmsKeyResponse.d.ts.map +1 -0
- package/v2/model/ShowKmsKeyResponse.js +52 -0
- package/v2/model/ShowKmsKeyResponse.js.map +1 -0
- package/v2/model/SubscribeTopicRequest.d.ts +12 -0
- package/v2/model/SubscribeTopicRequest.d.ts.map +1 -0
- package/v2/model/SubscribeTopicRequest.js +28 -0
- package/v2/model/SubscribeTopicRequest.js.map +1 -0
- package/v2/model/SubscribeTopicResponse.d.ts +13 -0
- package/v2/model/SubscribeTopicResponse.d.ts.map +1 -0
- package/v2/model/SubscribeTopicResponse.js +31 -0
- package/v2/model/SubscribeTopicResponse.js.map +1 -0
- package/v2/model/TopicAccessPolicyAttribute.d.ts +16 -0
- package/v2/model/TopicAccessPolicyAttribute.d.ts.map +1 -0
- package/v2/model/TopicAccessPolicyAttribute.js +39 -0
- package/v2/model/TopicAccessPolicyAttribute.js.map +1 -0
- package/v2/model/TopicAttribute.d.ts +8 -0
- package/v2/model/TopicAttribute.d.ts.map +1 -1
- package/v2/model/TopicAttribute.js +20 -0
- package/v2/model/TopicAttribute.js.map +1 -1
- package/v2/model/UnsubscribeTopicRequest.d.ts +8 -0
- package/v2/model/UnsubscribeTopicRequest.d.ts.map +1 -0
- package/v2/model/UnsubscribeTopicRequest.js +20 -0
- package/v2/model/UnsubscribeTopicRequest.js.map +1 -0
- package/v2/model/UnsubscribeTopicResponse.d.ts +7 -0
- package/v2/model/UnsubscribeTopicResponse.d.ts.map +1 -0
- package/v2/model/UnsubscribeTopicResponse.js +15 -0
- package/v2/model/UnsubscribeTopicResponse.js.map +1 -0
- package/v2/model/UpdateKmsKeyRequest.d.ts +13 -0
- package/v2/model/UpdateKmsKeyRequest.d.ts.map +1 -0
- package/v2/model/UpdateKmsKeyRequest.js +29 -0
- package/v2/model/UpdateKmsKeyRequest.js.map +1 -0
- package/v2/model/UpdateKmsKeyRequestBody.d.ts +8 -0
- package/v2/model/UpdateKmsKeyRequestBody.d.ts.map +1 -0
- package/v2/model/UpdateKmsKeyRequestBody.js +20 -0
- package/v2/model/UpdateKmsKeyRequestBody.js.map +1 -0
- package/v2/model/UpdateKmsKeyResponse.d.ts +11 -0
- package/v2/model/UpdateKmsKeyResponse.d.ts.map +1 -0
- package/v2/model/UpdateKmsKeyResponse.js +25 -0
- package/v2/model/UpdateKmsKeyResponse.js.map +1 -0
- package/v2/public-api.d.ts +22 -0
- package/v2/public-api.d.ts.map +1 -1
- package/v2/public-api.js +22 -0
- package/v2/public-api.js.map +1 -1
package/v2/SmnClient.js
CHANGED
|
@@ -14,6 +14,7 @@ const CancelSubscriptionRequest_1 = require("./model/CancelSubscriptionRequest")
|
|
|
14
14
|
const ConfirmSubscriptionRequest_1 = require("./model/ConfirmSubscriptionRequest");
|
|
15
15
|
const CreateApplicationEndpointRequest_1 = require("./model/CreateApplicationEndpointRequest");
|
|
16
16
|
const CreateApplicationRequest_1 = require("./model/CreateApplicationRequest");
|
|
17
|
+
const CreateKmsKeyRequest_1 = require("./model/CreateKmsKeyRequest");
|
|
17
18
|
const CreateLogtankRequest_1 = require("./model/CreateLogtankRequest");
|
|
18
19
|
const CreateMessageTemplateRequest_1 = require("./model/CreateMessageTemplateRequest");
|
|
19
20
|
const CreateNotifyPolicyRequest_1 = require("./model/CreateNotifyPolicyRequest");
|
|
@@ -21,6 +22,7 @@ const CreateResourceTagRequest_1 = require("./model/CreateResourceTagRequest");
|
|
|
21
22
|
const CreateTopicRequest_1 = require("./model/CreateTopicRequest");
|
|
22
23
|
const DeleteApplicationEndpointRequest_1 = require("./model/DeleteApplicationEndpointRequest");
|
|
23
24
|
const DeleteApplicationRequest_1 = require("./model/DeleteApplicationRequest");
|
|
25
|
+
const DeleteKmsKeyRequest_1 = require("./model/DeleteKmsKeyRequest");
|
|
24
26
|
const DeleteLogtankRequest_1 = require("./model/DeleteLogtankRequest");
|
|
25
27
|
const DeleteMessageTemplateRequest_1 = require("./model/DeleteMessageTemplateRequest");
|
|
26
28
|
const DeleteNotifyPolicyRequest_1 = require("./model/DeleteNotifyPolicyRequest");
|
|
@@ -30,6 +32,7 @@ const DeleteTopicAttributeByNameRequest_1 = require("./model/DeleteTopicAttribut
|
|
|
30
32
|
const DeleteTopicAttributesRequest_1 = require("./model/DeleteTopicAttributesRequest");
|
|
31
33
|
const DeleteTopicRequest_1 = require("./model/DeleteTopicRequest");
|
|
32
34
|
const DownloadHttpCertRequest_1 = require("./model/DownloadHttpCertRequest");
|
|
35
|
+
const DownloadHttpSignCertRequest_1 = require("./model/DownloadHttpSignCertRequest");
|
|
33
36
|
const ListApplicationAttributesRequest_1 = require("./model/ListApplicationAttributesRequest");
|
|
34
37
|
const ListApplicationEndpointAttributesRequest_1 = require("./model/ListApplicationEndpointAttributesRequest");
|
|
35
38
|
const ListApplicationEndpointsRequest_1 = require("./model/ListApplicationEndpointsRequest");
|
|
@@ -46,14 +49,19 @@ const ListTopicAttributesRequest_1 = require("./model/ListTopicAttributesRequest
|
|
|
46
49
|
const ListTopicDetailsRequest_1 = require("./model/ListTopicDetailsRequest");
|
|
47
50
|
const ListTopicMessageStatisticsRequest_1 = require("./model/ListTopicMessageStatisticsRequest");
|
|
48
51
|
const ListTopicsRequest_1 = require("./model/ListTopicsRequest");
|
|
52
|
+
const ListTopicsWithAssociatedResourcesRequest_1 = require("./model/ListTopicsWithAssociatedResourcesRequest");
|
|
49
53
|
const PublishAppMessageRequest_1 = require("./model/PublishAppMessageRequest");
|
|
50
54
|
const PublishHttpDetectRequest_1 = require("./model/PublishHttpDetectRequest");
|
|
51
55
|
const PublishMessageRequest_1 = require("./model/PublishMessageRequest");
|
|
52
56
|
const ShowHttpDetectResultRequest_1 = require("./model/ShowHttpDetectResultRequest");
|
|
57
|
+
const ShowKmsKeyRequest_1 = require("./model/ShowKmsKeyRequest");
|
|
53
58
|
const ShowNotifyPolicyRequest_1 = require("./model/ShowNotifyPolicyRequest");
|
|
59
|
+
const SubscribeTopicRequest_1 = require("./model/SubscribeTopicRequest");
|
|
54
60
|
const UnsubscribeSubscriptionRequest_1 = require("./model/UnsubscribeSubscriptionRequest");
|
|
61
|
+
const UnsubscribeTopicRequest_1 = require("./model/UnsubscribeTopicRequest");
|
|
55
62
|
const UpdateApplicationEndpointRequest_1 = require("./model/UpdateApplicationEndpointRequest");
|
|
56
63
|
const UpdateApplicationRequest_1 = require("./model/UpdateApplicationRequest");
|
|
64
|
+
const UpdateKmsKeyRequest_1 = require("./model/UpdateKmsKeyRequest");
|
|
57
65
|
const UpdateLogtankRequest_1 = require("./model/UpdateLogtankRequest");
|
|
58
66
|
const UpdateMessageTemplateRequest_1 = require("./model/UpdateMessageTemplateRequest");
|
|
59
67
|
const UpdateNotifyPolicyRequest_1 = require("./model/UpdateNotifyPolicyRequest");
|
|
@@ -241,6 +249,23 @@ class SmnClient {
|
|
|
241
249
|
options['responseHeaders'] = [''];
|
|
242
250
|
return this.hcClient.sendRequest(options);
|
|
243
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* 为主题绑定KMS密钥。KMS密钥于绑定后五分钟生效,生效后该主题下发布的消息(确认订阅消息、取消订阅消息、主题消息)均使用指定密钥的数据密钥进行加解密,并将消息内容在SMN服务内部加密传输。执行绑定KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。SMN会使用该委托进行创建数据密钥操作。
|
|
254
|
+
*
|
|
255
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
256
|
+
*
|
|
257
|
+
* @summary 主题绑定KMS密钥
|
|
258
|
+
* @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
|
|
259
|
+
* @param {AddKmsKeyRequestBody} addKmsKeyRequestBody 在主题下绑定密钥的请求体。
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
createKmsKey(createKmsKeyRequest) {
|
|
264
|
+
const options = (0, exports.ParamCreater)().createKmsKey(createKmsKeyRequest);
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
options['responseHeaders'] = [''];
|
|
267
|
+
return this.hcClient.sendRequest(options);
|
|
268
|
+
}
|
|
244
269
|
/**
|
|
245
270
|
* 为指定Topic绑定一个云日志,用于记录主题消息发送状态等信息。
|
|
246
271
|
*
|
|
@@ -327,6 +352,23 @@ class SmnClient {
|
|
|
327
352
|
options['responseHeaders'] = [''];
|
|
328
353
|
return this.hcClient.sendRequest(options);
|
|
329
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* 删除主题绑定的密钥。
|
|
357
|
+
*
|
|
358
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
359
|
+
*
|
|
360
|
+
* @summary 删除主题下KMS密钥
|
|
361
|
+
* @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
|
|
362
|
+
* @param {string} id 当前已绑定密钥的资源ID。
|
|
363
|
+
* @param {*} [options] Override http request option.
|
|
364
|
+
* @throws {RequiredError}
|
|
365
|
+
*/
|
|
366
|
+
deleteKmsKey(deleteKmsKeyRequest) {
|
|
367
|
+
const options = (0, exports.ParamCreater)().deleteKmsKey(deleteKmsKeyRequest);
|
|
368
|
+
// @ts-ignore
|
|
369
|
+
options['responseHeaders'] = [''];
|
|
370
|
+
return this.hcClient.sendRequest(options);
|
|
371
|
+
}
|
|
330
372
|
/**
|
|
331
373
|
* 解绑指定Topic绑定的云日志。
|
|
332
374
|
*
|
|
@@ -477,6 +519,22 @@ class SmnClient {
|
|
|
477
519
|
options['responseHeaders'] = ['content-type'];
|
|
478
520
|
return this.hcClient.sendRequest(options);
|
|
479
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* 下载HTTP签名证书
|
|
524
|
+
*
|
|
525
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
526
|
+
*
|
|
527
|
+
* @summary 下载HTTP签名证书
|
|
528
|
+
* @param {string} certificateId 证书文件ID名称,格式为SMN-{RegionID}-{UUID}.pem
|
|
529
|
+
* @param {*} [options] Override http request option.
|
|
530
|
+
* @throws {RequiredError}
|
|
531
|
+
*/
|
|
532
|
+
downloadHttpSignCert(downloadHttpSignCertRequest) {
|
|
533
|
+
const options = (0, exports.ParamCreater)().downloadHttpSignCert(downloadHttpSignCertRequest);
|
|
534
|
+
// @ts-ignore
|
|
535
|
+
options['responseHeaders'] = ['content-type'];
|
|
536
|
+
return this.hcClient.sendRequest(options);
|
|
537
|
+
}
|
|
480
538
|
/**
|
|
481
539
|
* 查询授权云服务列表。
|
|
482
540
|
*
|
|
@@ -492,6 +550,21 @@ class SmnClient {
|
|
|
492
550
|
options['responseHeaders'] = [''];
|
|
493
551
|
return this.hcClient.sendRequest(options);
|
|
494
552
|
}
|
|
553
|
+
/**
|
|
554
|
+
* 查询授权服务列表
|
|
555
|
+
*
|
|
556
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
557
|
+
*
|
|
558
|
+
* @summary 查询授权服务列表
|
|
559
|
+
* @param {*} [options] Override http request option.
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
*/
|
|
562
|
+
listCloudServices(listCloudServicesRequest) {
|
|
563
|
+
const options = (0, exports.ParamCreater)().listCloudServices();
|
|
564
|
+
// @ts-ignore
|
|
565
|
+
options['responseHeaders'] = [''];
|
|
566
|
+
return this.hcClient.sendRequest(options);
|
|
567
|
+
}
|
|
495
568
|
/**
|
|
496
569
|
* 查询指定Topic绑定的云日志。
|
|
497
570
|
*
|
|
@@ -721,6 +794,28 @@ class SmnClient {
|
|
|
721
794
|
options['responseHeaders'] = [''];
|
|
722
795
|
return this.hcClient.sendRequest(options);
|
|
723
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* 查询Topic及Topic关联资源信息列表,关联资源信息随业务演进会持续扩展。Topic列表默认按照创建时间进行降序排列。分页查询可以指定offset以及limit。如果不存在Topic,则返回空列表。
|
|
799
|
+
*
|
|
800
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
801
|
+
*
|
|
802
|
+
* @summary 查询主题列表及主题关联资源信息
|
|
803
|
+
* @param {number} [offset] 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。
|
|
804
|
+
* @param {number} [limit] 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。
|
|
805
|
+
* @param {string} [topicId] 检索的主题ID,完全匹配。
|
|
806
|
+
* @param {string} [enterpriseProjectId] 企业项目id。
|
|
807
|
+
* @param {string} [name] 检索的主题名称,完全匹配。
|
|
808
|
+
* @param {string} [fuzzyName] 检索的主题名称,模糊匹配。
|
|
809
|
+
* @param {string} [fuzzyDisplayName] 检索的主题显示名。模糊匹配。参数字节长度不能大于192字节。
|
|
810
|
+
* @param {*} [options] Override http request option.
|
|
811
|
+
* @throws {RequiredError}
|
|
812
|
+
*/
|
|
813
|
+
listTopicsWithAssociatedResources(listTopicsWithAssociatedResourcesRequest) {
|
|
814
|
+
const options = (0, exports.ParamCreater)().listTopicsWithAssociatedResources(listTopicsWithAssociatedResourcesRequest);
|
|
815
|
+
// @ts-ignore
|
|
816
|
+
options['responseHeaders'] = [''];
|
|
817
|
+
return this.hcClient.sendRequest(options);
|
|
818
|
+
}
|
|
724
819
|
/**
|
|
725
820
|
* 查询SMN API V2版本信息。
|
|
726
821
|
*
|
|
@@ -780,6 +875,7 @@ class SmnClient {
|
|
|
780
875
|
*
|
|
781
876
|
* 只需要设置其中一个,如果同时设置,生效的优先级为
|
|
782
877
|
* message_structure > message_template_name > message。
|
|
878
|
+
* 若发布消息的主题下绑定了KMS密钥,请确保发布消息前,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。当发布消息时,SMN会使用该委托进行创建数据密钥和解密数据密钥操作。
|
|
783
879
|
*
|
|
784
880
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
785
881
|
*
|
|
@@ -812,6 +908,22 @@ class SmnClient {
|
|
|
812
908
|
options['responseHeaders'] = [''];
|
|
813
909
|
return this.hcClient.sendRequest(options);
|
|
814
910
|
}
|
|
911
|
+
/**
|
|
912
|
+
* 查询主题下密钥ID。执行绑定KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。SMN会使用该委托进行查询密钥信息操作。
|
|
913
|
+
*
|
|
914
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
915
|
+
*
|
|
916
|
+
* @summary 查询主题下KMS密钥
|
|
917
|
+
* @param {string} topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](smn_api_51004.xml)获取该标识。
|
|
918
|
+
* @param {*} [options] Override http request option.
|
|
919
|
+
* @throws {RequiredError}
|
|
920
|
+
*/
|
|
921
|
+
showKmsKey(showKmsKeyRequest) {
|
|
922
|
+
const options = (0, exports.ParamCreater)().showKmsKey(showKmsKeyRequest);
|
|
923
|
+
// @ts-ignore
|
|
924
|
+
options['responseHeaders'] = [''];
|
|
925
|
+
return this.hcClient.sendRequest(options);
|
|
926
|
+
}
|
|
815
927
|
/**
|
|
816
928
|
* 查询通知策略
|
|
817
929
|
*
|
|
@@ -828,6 +940,24 @@ class SmnClient {
|
|
|
828
940
|
options['responseHeaders'] = [''];
|
|
829
941
|
return this.hcClient.sendRequest(options);
|
|
830
942
|
}
|
|
943
|
+
/**
|
|
944
|
+
* 订阅终端确认订阅主题消息。
|
|
945
|
+
*
|
|
946
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
947
|
+
*
|
|
948
|
+
* @summary 订阅主题
|
|
949
|
+
* @param {string} token 订阅主题Token信息。
|
|
950
|
+
* @param {string} [topicUrn] Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
|
|
951
|
+
* @param {string} [endpoint] 订阅终端地址。
|
|
952
|
+
* @param {*} [options] Override http request option.
|
|
953
|
+
* @throws {RequiredError}
|
|
954
|
+
*/
|
|
955
|
+
subscribeTopic(subscribeTopicRequest) {
|
|
956
|
+
const options = (0, exports.ParamCreater)().subscribeTopic(subscribeTopicRequest);
|
|
957
|
+
// @ts-ignore
|
|
958
|
+
options['responseHeaders'] = [''];
|
|
959
|
+
return this.hcClient.sendRequest(options);
|
|
960
|
+
}
|
|
831
961
|
/**
|
|
832
962
|
* 取消订阅主题
|
|
833
963
|
*
|
|
@@ -844,6 +974,40 @@ class SmnClient {
|
|
|
844
974
|
options['responseHeaders'] = [''];
|
|
845
975
|
return this.hcClient.sendRequest(options);
|
|
846
976
|
}
|
|
977
|
+
/**
|
|
978
|
+
* 订阅终端取消订阅主题消息。
|
|
979
|
+
*
|
|
980
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
981
|
+
*
|
|
982
|
+
* @summary 取消订阅主题
|
|
983
|
+
* @param {string} subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](ListSubscriptions.xml)获取该标识。
|
|
984
|
+
* @param {*} [options] Override http request option.
|
|
985
|
+
* @throws {RequiredError}
|
|
986
|
+
*/
|
|
987
|
+
unsubscribeTopic(unsubscribeTopicRequest) {
|
|
988
|
+
const options = (0, exports.ParamCreater)().unsubscribeTopic(unsubscribeTopicRequest);
|
|
989
|
+
// @ts-ignore
|
|
990
|
+
options['responseHeaders'] = [''];
|
|
991
|
+
return this.hcClient.sendRequest(options);
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* 更新密钥ID。执行更新KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将对应的资源操作权限授权给SMN服务。SMN会使用该委托进行查询密钥状态和创建数据密钥操作。
|
|
995
|
+
*
|
|
996
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
997
|
+
*
|
|
998
|
+
* @summary 更新主题下KMS密钥
|
|
999
|
+
* @param {string} topicUrn Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。
|
|
1000
|
+
* @param {string} id 当前已绑定密钥的资源ID。
|
|
1001
|
+
* @param {UpdateKmsKeyRequestBody} updateKmsKeyRequestBody
|
|
1002
|
+
* @param {*} [options] Override http request option.
|
|
1003
|
+
* @throws {RequiredError}
|
|
1004
|
+
*/
|
|
1005
|
+
updateKmsKey(updateKmsKeyRequest) {
|
|
1006
|
+
const options = (0, exports.ParamCreater)().updateKmsKey(updateKmsKeyRequest);
|
|
1007
|
+
// @ts-ignore
|
|
1008
|
+
options['responseHeaders'] = [''];
|
|
1009
|
+
return this.hcClient.sendRequest(options);
|
|
1010
|
+
}
|
|
847
1011
|
/**
|
|
848
1012
|
* 更新指定Topic绑定的云日志。
|
|
849
1013
|
*
|
|
@@ -1515,6 +1679,46 @@ const ParamCreater = function () {
|
|
|
1515
1679
|
options.headers = localVarHeaderParameter;
|
|
1516
1680
|
return options;
|
|
1517
1681
|
},
|
|
1682
|
+
/**
|
|
1683
|
+
* 为主题绑定KMS密钥。KMS密钥于绑定后五分钟生效,生效后该主题下发布的消息(确认订阅消息、取消订阅消息、主题消息)均使用指定密钥的数据密钥进行加解密,并将消息内容在SMN服务内部加密传输。执行绑定KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。SMN会使用该委托进行创建数据密钥操作。
|
|
1684
|
+
*
|
|
1685
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1686
|
+
*/
|
|
1687
|
+
createKmsKey(createKmsKeyRequest) {
|
|
1688
|
+
const options = {
|
|
1689
|
+
method: "POST",
|
|
1690
|
+
url: "/v2/{project_id}/notifications/topics/{topic_urn}/kms",
|
|
1691
|
+
contentType: "application/json;charset=UTF-8",
|
|
1692
|
+
queryParams: {},
|
|
1693
|
+
pathParams: {},
|
|
1694
|
+
headers: {},
|
|
1695
|
+
data: {}
|
|
1696
|
+
};
|
|
1697
|
+
const localVarHeaderParameter = {};
|
|
1698
|
+
let body;
|
|
1699
|
+
let topicUrn;
|
|
1700
|
+
if (createKmsKeyRequest !== null && createKmsKeyRequest !== undefined) {
|
|
1701
|
+
if (createKmsKeyRequest instanceof CreateKmsKeyRequest_1.CreateKmsKeyRequest) {
|
|
1702
|
+
topicUrn = createKmsKeyRequest.topicUrn;
|
|
1703
|
+
body = createKmsKeyRequest.body;
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
topicUrn = createKmsKeyRequest['topic_urn'];
|
|
1707
|
+
body = createKmsKeyRequest['body'];
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
if (topicUrn === null || topicUrn === undefined) {
|
|
1711
|
+
throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling createKmsKey.');
|
|
1712
|
+
}
|
|
1713
|
+
if (body === null || body === undefined) {
|
|
1714
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
1715
|
+
}
|
|
1716
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
|
1717
|
+
options.data = body !== undefined ? body : {};
|
|
1718
|
+
options.pathParams = { 'topic_urn': topicUrn, };
|
|
1719
|
+
options.headers = localVarHeaderParameter;
|
|
1720
|
+
return options;
|
|
1721
|
+
},
|
|
1518
1722
|
/**
|
|
1519
1723
|
* 为指定Topic绑定一个云日志,用于记录主题消息发送状态等信息。
|
|
1520
1724
|
*
|
|
@@ -1703,6 +1907,43 @@ const ParamCreater = function () {
|
|
|
1703
1907
|
options.headers = localVarHeaderParameter;
|
|
1704
1908
|
return options;
|
|
1705
1909
|
},
|
|
1910
|
+
/**
|
|
1911
|
+
* 删除主题绑定的密钥。
|
|
1912
|
+
*
|
|
1913
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
1914
|
+
*/
|
|
1915
|
+
deleteKmsKey(deleteKmsKeyRequest) {
|
|
1916
|
+
const options = {
|
|
1917
|
+
method: "DELETE",
|
|
1918
|
+
url: "/v2/{project_id}/notifications/topics/{topic_urn}/kms/{id}",
|
|
1919
|
+
contentType: "application/json",
|
|
1920
|
+
queryParams: {},
|
|
1921
|
+
pathParams: {},
|
|
1922
|
+
headers: {}
|
|
1923
|
+
};
|
|
1924
|
+
const localVarHeaderParameter = {};
|
|
1925
|
+
let topicUrn;
|
|
1926
|
+
let id;
|
|
1927
|
+
if (deleteKmsKeyRequest !== null && deleteKmsKeyRequest !== undefined) {
|
|
1928
|
+
if (deleteKmsKeyRequest instanceof DeleteKmsKeyRequest_1.DeleteKmsKeyRequest) {
|
|
1929
|
+
topicUrn = deleteKmsKeyRequest.topicUrn;
|
|
1930
|
+
id = deleteKmsKeyRequest.id;
|
|
1931
|
+
}
|
|
1932
|
+
else {
|
|
1933
|
+
topicUrn = deleteKmsKeyRequest['topic_urn'];
|
|
1934
|
+
id = deleteKmsKeyRequest['id'];
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
if (topicUrn === null || topicUrn === undefined) {
|
|
1938
|
+
throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling deleteKmsKey.');
|
|
1939
|
+
}
|
|
1940
|
+
if (id === null || id === undefined) {
|
|
1941
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteKmsKey.');
|
|
1942
|
+
}
|
|
1943
|
+
options.pathParams = { 'topic_urn': topicUrn, 'id': id, };
|
|
1944
|
+
options.headers = localVarHeaderParameter;
|
|
1945
|
+
return options;
|
|
1946
|
+
},
|
|
1706
1947
|
/**
|
|
1707
1948
|
* 解绑指定Topic绑定的云日志。
|
|
1708
1949
|
*
|
|
@@ -2018,6 +2259,37 @@ const ParamCreater = function () {
|
|
|
2018
2259
|
options.headers = localVarHeaderParameter;
|
|
2019
2260
|
return options;
|
|
2020
2261
|
},
|
|
2262
|
+
/**
|
|
2263
|
+
* 下载HTTP签名证书
|
|
2264
|
+
*
|
|
2265
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2266
|
+
*/
|
|
2267
|
+
downloadHttpSignCert(downloadHttpSignCertRequest) {
|
|
2268
|
+
const options = {
|
|
2269
|
+
method: "GET",
|
|
2270
|
+
url: "/v2/notifications/certifications/download/{certificate_id}",
|
|
2271
|
+
contentType: "application/json",
|
|
2272
|
+
queryParams: {},
|
|
2273
|
+
pathParams: {},
|
|
2274
|
+
headers: {}
|
|
2275
|
+
};
|
|
2276
|
+
const localVarHeaderParameter = {};
|
|
2277
|
+
let certificateId;
|
|
2278
|
+
if (downloadHttpSignCertRequest !== null && downloadHttpSignCertRequest !== undefined) {
|
|
2279
|
+
if (downloadHttpSignCertRequest instanceof DownloadHttpSignCertRequest_1.DownloadHttpSignCertRequest) {
|
|
2280
|
+
certificateId = downloadHttpSignCertRequest.certificateId;
|
|
2281
|
+
}
|
|
2282
|
+
else {
|
|
2283
|
+
certificateId = downloadHttpSignCertRequest['certificate_id'];
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
if (certificateId === null || certificateId === undefined) {
|
|
2287
|
+
throw new RequiredError('certificateId', 'Required parameter certificateId was null or undefined when calling downloadHttpSignCert.');
|
|
2288
|
+
}
|
|
2289
|
+
options.pathParams = { 'certificate_id': certificateId, };
|
|
2290
|
+
options.headers = localVarHeaderParameter;
|
|
2291
|
+
return options;
|
|
2292
|
+
},
|
|
2021
2293
|
/**
|
|
2022
2294
|
* 查询授权云服务列表。
|
|
2023
2295
|
*
|
|
@@ -2036,6 +2308,24 @@ const ParamCreater = function () {
|
|
|
2036
2308
|
options.headers = localVarHeaderParameter;
|
|
2037
2309
|
return options;
|
|
2038
2310
|
},
|
|
2311
|
+
/**
|
|
2312
|
+
* 查询授权服务列表
|
|
2313
|
+
*
|
|
2314
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2315
|
+
*/
|
|
2316
|
+
listCloudServices() {
|
|
2317
|
+
const options = {
|
|
2318
|
+
method: "GET",
|
|
2319
|
+
url: "/v2/notifications/cloud-services",
|
|
2320
|
+
contentType: "application/json",
|
|
2321
|
+
queryParams: {},
|
|
2322
|
+
pathParams: {},
|
|
2323
|
+
headers: {}
|
|
2324
|
+
};
|
|
2325
|
+
const localVarHeaderParameter = {};
|
|
2326
|
+
options.headers = localVarHeaderParameter;
|
|
2327
|
+
return options;
|
|
2328
|
+
},
|
|
2039
2329
|
/**
|
|
2040
2330
|
* 查询指定Topic绑定的云日志。
|
|
2041
2331
|
*
|
|
@@ -2573,6 +2863,74 @@ const ParamCreater = function () {
|
|
|
2573
2863
|
options.headers = localVarHeaderParameter;
|
|
2574
2864
|
return options;
|
|
2575
2865
|
},
|
|
2866
|
+
/**
|
|
2867
|
+
* 查询Topic及Topic关联资源信息列表,关联资源信息随业务演进会持续扩展。Topic列表默认按照创建时间进行降序排列。分页查询可以指定offset以及limit。如果不存在Topic,则返回空列表。
|
|
2868
|
+
*
|
|
2869
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2870
|
+
*/
|
|
2871
|
+
listTopicsWithAssociatedResources(listTopicsWithAssociatedResourcesRequest) {
|
|
2872
|
+
const options = {
|
|
2873
|
+
method: "GET",
|
|
2874
|
+
url: "/v2/{project_id}/notifications/topics-with-associated-resources",
|
|
2875
|
+
contentType: "application/json",
|
|
2876
|
+
queryParams: {},
|
|
2877
|
+
pathParams: {},
|
|
2878
|
+
headers: {}
|
|
2879
|
+
};
|
|
2880
|
+
const localVarHeaderParameter = {};
|
|
2881
|
+
const localVarQueryParameter = {};
|
|
2882
|
+
let offset;
|
|
2883
|
+
let limit;
|
|
2884
|
+
let topicId;
|
|
2885
|
+
let enterpriseProjectId;
|
|
2886
|
+
let name;
|
|
2887
|
+
let fuzzyName;
|
|
2888
|
+
let fuzzyDisplayName;
|
|
2889
|
+
if (listTopicsWithAssociatedResourcesRequest !== null && listTopicsWithAssociatedResourcesRequest !== undefined) {
|
|
2890
|
+
if (listTopicsWithAssociatedResourcesRequest instanceof ListTopicsWithAssociatedResourcesRequest_1.ListTopicsWithAssociatedResourcesRequest) {
|
|
2891
|
+
offset = listTopicsWithAssociatedResourcesRequest.offset;
|
|
2892
|
+
limit = listTopicsWithAssociatedResourcesRequest.limit;
|
|
2893
|
+
topicId = listTopicsWithAssociatedResourcesRequest.topicId;
|
|
2894
|
+
enterpriseProjectId = listTopicsWithAssociatedResourcesRequest.enterpriseProjectId;
|
|
2895
|
+
name = listTopicsWithAssociatedResourcesRequest.name;
|
|
2896
|
+
fuzzyName = listTopicsWithAssociatedResourcesRequest.fuzzyName;
|
|
2897
|
+
fuzzyDisplayName = listTopicsWithAssociatedResourcesRequest.fuzzyDisplayName;
|
|
2898
|
+
}
|
|
2899
|
+
else {
|
|
2900
|
+
offset = listTopicsWithAssociatedResourcesRequest['offset'];
|
|
2901
|
+
limit = listTopicsWithAssociatedResourcesRequest['limit'];
|
|
2902
|
+
topicId = listTopicsWithAssociatedResourcesRequest['topic_id'];
|
|
2903
|
+
enterpriseProjectId = listTopicsWithAssociatedResourcesRequest['enterprise_project_id'];
|
|
2904
|
+
name = listTopicsWithAssociatedResourcesRequest['name'];
|
|
2905
|
+
fuzzyName = listTopicsWithAssociatedResourcesRequest['fuzzy_name'];
|
|
2906
|
+
fuzzyDisplayName = listTopicsWithAssociatedResourcesRequest['fuzzy_display_name'];
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
if (offset !== null && offset !== undefined) {
|
|
2910
|
+
localVarQueryParameter['offset'] = offset;
|
|
2911
|
+
}
|
|
2912
|
+
if (limit !== null && limit !== undefined) {
|
|
2913
|
+
localVarQueryParameter['limit'] = limit;
|
|
2914
|
+
}
|
|
2915
|
+
if (topicId !== null && topicId !== undefined) {
|
|
2916
|
+
localVarQueryParameter['topic_id'] = topicId;
|
|
2917
|
+
}
|
|
2918
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
|
2919
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
|
2920
|
+
}
|
|
2921
|
+
if (name !== null && name !== undefined) {
|
|
2922
|
+
localVarQueryParameter['name'] = name;
|
|
2923
|
+
}
|
|
2924
|
+
if (fuzzyName !== null && fuzzyName !== undefined) {
|
|
2925
|
+
localVarQueryParameter['fuzzy_name'] = fuzzyName;
|
|
2926
|
+
}
|
|
2927
|
+
if (fuzzyDisplayName !== null && fuzzyDisplayName !== undefined) {
|
|
2928
|
+
localVarQueryParameter['fuzzy_display_name'] = fuzzyDisplayName;
|
|
2929
|
+
}
|
|
2930
|
+
options.queryParams = localVarQueryParameter;
|
|
2931
|
+
options.headers = localVarHeaderParameter;
|
|
2932
|
+
return options;
|
|
2933
|
+
},
|
|
2576
2934
|
/**
|
|
2577
2935
|
* 查询SMN API V2版本信息。
|
|
2578
2936
|
*
|
|
@@ -2661,6 +3019,7 @@ const ParamCreater = function () {
|
|
|
2661
3019
|
*
|
|
2662
3020
|
* 只需要设置其中一个,如果同时设置,生效的优先级为
|
|
2663
3021
|
* message_structure > message_template_name > message。
|
|
3022
|
+
* 若发布消息的主题下绑定了KMS密钥,请确保发布消息前,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。当发布消息时,SMN会使用该委托进行创建数据密钥和解密数据密钥操作。
|
|
2664
3023
|
*
|
|
2665
3024
|
* Please refer to HUAWEI cloud API Explorer for details.
|
|
2666
3025
|
*/
|
|
@@ -2733,6 +3092,37 @@ const ParamCreater = function () {
|
|
|
2733
3092
|
options.headers = localVarHeaderParameter;
|
|
2734
3093
|
return options;
|
|
2735
3094
|
},
|
|
3095
|
+
/**
|
|
3096
|
+
* 查询主题下密钥ID。执行绑定KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将资源操作权限授权给SMN服务。SMN会使用该委托进行查询密钥信息操作。
|
|
3097
|
+
*
|
|
3098
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
3099
|
+
*/
|
|
3100
|
+
showKmsKey(showKmsKeyRequest) {
|
|
3101
|
+
const options = {
|
|
3102
|
+
method: "GET",
|
|
3103
|
+
url: "/v2/{project_id}/notifications/topics/{topic_urn}/kms",
|
|
3104
|
+
contentType: "application/json",
|
|
3105
|
+
queryParams: {},
|
|
3106
|
+
pathParams: {},
|
|
3107
|
+
headers: {}
|
|
3108
|
+
};
|
|
3109
|
+
const localVarHeaderParameter = {};
|
|
3110
|
+
let topicUrn;
|
|
3111
|
+
if (showKmsKeyRequest !== null && showKmsKeyRequest !== undefined) {
|
|
3112
|
+
if (showKmsKeyRequest instanceof ShowKmsKeyRequest_1.ShowKmsKeyRequest) {
|
|
3113
|
+
topicUrn = showKmsKeyRequest.topicUrn;
|
|
3114
|
+
}
|
|
3115
|
+
else {
|
|
3116
|
+
topicUrn = showKmsKeyRequest['topic_urn'];
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
if (topicUrn === null || topicUrn === undefined) {
|
|
3120
|
+
throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling showKmsKey.');
|
|
3121
|
+
}
|
|
3122
|
+
options.pathParams = { 'topic_urn': topicUrn, };
|
|
3123
|
+
options.headers = localVarHeaderParameter;
|
|
3124
|
+
return options;
|
|
3125
|
+
},
|
|
2736
3126
|
/**
|
|
2737
3127
|
* 查询通知策略
|
|
2738
3128
|
*
|
|
@@ -2764,6 +3154,53 @@ const ParamCreater = function () {
|
|
|
2764
3154
|
options.headers = localVarHeaderParameter;
|
|
2765
3155
|
return options;
|
|
2766
3156
|
},
|
|
3157
|
+
/**
|
|
3158
|
+
* 订阅终端确认订阅主题消息。
|
|
3159
|
+
*
|
|
3160
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
3161
|
+
*/
|
|
3162
|
+
subscribeTopic(subscribeTopicRequest) {
|
|
3163
|
+
const options = {
|
|
3164
|
+
method: "GET",
|
|
3165
|
+
url: "/v2/notifications/subscriptions/subscribe",
|
|
3166
|
+
contentType: "application/json",
|
|
3167
|
+
queryParams: {},
|
|
3168
|
+
pathParams: {},
|
|
3169
|
+
headers: {}
|
|
3170
|
+
};
|
|
3171
|
+
const localVarHeaderParameter = {};
|
|
3172
|
+
const localVarQueryParameter = {};
|
|
3173
|
+
let token;
|
|
3174
|
+
let topicUrn;
|
|
3175
|
+
let endpoint;
|
|
3176
|
+
if (subscribeTopicRequest !== null && subscribeTopicRequest !== undefined) {
|
|
3177
|
+
if (subscribeTopicRequest instanceof SubscribeTopicRequest_1.SubscribeTopicRequest) {
|
|
3178
|
+
token = subscribeTopicRequest.token;
|
|
3179
|
+
topicUrn = subscribeTopicRequest.topicUrn;
|
|
3180
|
+
endpoint = subscribeTopicRequest.endpoint;
|
|
3181
|
+
}
|
|
3182
|
+
else {
|
|
3183
|
+
token = subscribeTopicRequest['token'];
|
|
3184
|
+
topicUrn = subscribeTopicRequest['topic_urn'];
|
|
3185
|
+
endpoint = subscribeTopicRequest['endpoint'];
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
if (token === null || token === undefined) {
|
|
3189
|
+
throw new RequiredError('token', 'Required parameter token was null or undefined when calling subscribeTopic.');
|
|
3190
|
+
}
|
|
3191
|
+
if (token !== null && token !== undefined) {
|
|
3192
|
+
localVarQueryParameter['token'] = token;
|
|
3193
|
+
}
|
|
3194
|
+
if (topicUrn !== null && topicUrn !== undefined) {
|
|
3195
|
+
localVarQueryParameter['topic_urn'] = topicUrn;
|
|
3196
|
+
}
|
|
3197
|
+
if (endpoint !== null && endpoint !== undefined) {
|
|
3198
|
+
localVarQueryParameter['endpoint'] = endpoint;
|
|
3199
|
+
}
|
|
3200
|
+
options.queryParams = localVarQueryParameter;
|
|
3201
|
+
options.headers = localVarHeaderParameter;
|
|
3202
|
+
return options;
|
|
3203
|
+
},
|
|
2767
3204
|
/**
|
|
2768
3205
|
* 取消订阅主题
|
|
2769
3206
|
*
|
|
@@ -2799,6 +3236,87 @@ const ParamCreater = function () {
|
|
|
2799
3236
|
options.headers = localVarHeaderParameter;
|
|
2800
3237
|
return options;
|
|
2801
3238
|
},
|
|
3239
|
+
/**
|
|
3240
|
+
* 订阅终端取消订阅主题消息。
|
|
3241
|
+
*
|
|
3242
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
3243
|
+
*/
|
|
3244
|
+
unsubscribeTopic(unsubscribeTopicRequest) {
|
|
3245
|
+
const options = {
|
|
3246
|
+
method: "GET",
|
|
3247
|
+
url: "/v2/notifications/subscriptions/unsubscribe",
|
|
3248
|
+
contentType: "application/json",
|
|
3249
|
+
queryParams: {},
|
|
3250
|
+
pathParams: {},
|
|
3251
|
+
headers: {}
|
|
3252
|
+
};
|
|
3253
|
+
const localVarHeaderParameter = {};
|
|
3254
|
+
const localVarQueryParameter = {};
|
|
3255
|
+
let subscriptionUrn;
|
|
3256
|
+
if (unsubscribeTopicRequest !== null && unsubscribeTopicRequest !== undefined) {
|
|
3257
|
+
if (unsubscribeTopicRequest instanceof UnsubscribeTopicRequest_1.UnsubscribeTopicRequest) {
|
|
3258
|
+
subscriptionUrn = unsubscribeTopicRequest.subscriptionUrn;
|
|
3259
|
+
}
|
|
3260
|
+
else {
|
|
3261
|
+
subscriptionUrn = unsubscribeTopicRequest['subscription_urn'];
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
if (subscriptionUrn === null || subscriptionUrn === undefined) {
|
|
3265
|
+
throw new RequiredError('subscriptionUrn', 'Required parameter subscriptionUrn was null or undefined when calling unsubscribeTopic.');
|
|
3266
|
+
}
|
|
3267
|
+
if (subscriptionUrn !== null && subscriptionUrn !== undefined) {
|
|
3268
|
+
localVarQueryParameter['subscription_urn'] = subscriptionUrn;
|
|
3269
|
+
}
|
|
3270
|
+
options.queryParams = localVarQueryParameter;
|
|
3271
|
+
options.headers = localVarHeaderParameter;
|
|
3272
|
+
return options;
|
|
3273
|
+
},
|
|
3274
|
+
/**
|
|
3275
|
+
* 更新密钥ID。执行更新KMS密钥时,用户需要先在IAM处创建名为smn_kms_agency的委托,并将对应的资源操作权限授权给SMN服务。SMN会使用该委托进行查询密钥状态和创建数据密钥操作。
|
|
3276
|
+
*
|
|
3277
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
|
3278
|
+
*/
|
|
3279
|
+
updateKmsKey(updateKmsKeyRequest) {
|
|
3280
|
+
const options = {
|
|
3281
|
+
method: "PUT",
|
|
3282
|
+
url: "/v2/{project_id}/notifications/topics/{topic_urn}/kms/{id}",
|
|
3283
|
+
contentType: "application/json;charset=UTF-8",
|
|
3284
|
+
queryParams: {},
|
|
3285
|
+
pathParams: {},
|
|
3286
|
+
headers: {},
|
|
3287
|
+
data: {}
|
|
3288
|
+
};
|
|
3289
|
+
const localVarHeaderParameter = {};
|
|
3290
|
+
let body;
|
|
3291
|
+
let topicUrn;
|
|
3292
|
+
let id;
|
|
3293
|
+
if (updateKmsKeyRequest !== null && updateKmsKeyRequest !== undefined) {
|
|
3294
|
+
if (updateKmsKeyRequest instanceof UpdateKmsKeyRequest_1.UpdateKmsKeyRequest) {
|
|
3295
|
+
topicUrn = updateKmsKeyRequest.topicUrn;
|
|
3296
|
+
id = updateKmsKeyRequest.id;
|
|
3297
|
+
body = updateKmsKeyRequest.body;
|
|
3298
|
+
}
|
|
3299
|
+
else {
|
|
3300
|
+
topicUrn = updateKmsKeyRequest['topic_urn'];
|
|
3301
|
+
id = updateKmsKeyRequest['id'];
|
|
3302
|
+
body = updateKmsKeyRequest['body'];
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
if (topicUrn === null || topicUrn === undefined) {
|
|
3306
|
+
throw new RequiredError('topicUrn', 'Required parameter topicUrn was null or undefined when calling updateKmsKey.');
|
|
3307
|
+
}
|
|
3308
|
+
if (id === null || id === undefined) {
|
|
3309
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateKmsKey.');
|
|
3310
|
+
}
|
|
3311
|
+
if (body === null || body === undefined) {
|
|
3312
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
|
3313
|
+
}
|
|
3314
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
|
3315
|
+
options.data = body !== undefined ? body : {};
|
|
3316
|
+
options.pathParams = { 'topic_urn': topicUrn, 'id': id, };
|
|
3317
|
+
options.headers = localVarHeaderParameter;
|
|
3318
|
+
return options;
|
|
3319
|
+
},
|
|
2802
3320
|
/**
|
|
2803
3321
|
* 更新指定Topic绑定的云日志。
|
|
2804
3322
|
*
|