tencentcloud-sdk-nodejs-intl-en 3.0.1257 → 3.0.1258

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-intl-en",
3
- "version": "3.0.1257",
3
+ "version": "3.0.1258",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,2 +1,2 @@
1
- const sdkVersion = "3.0.1257";
1
+ const sdkVersion = "3.0.1258";
2
2
  module.exports = sdkVersion
@@ -88,6 +88,7 @@ module.exports = {
88
88
  postgres: require("./postgres"),
89
89
  privatedns: require("./privatedns"),
90
90
  pts: require("./pts"),
91
+ quota: require("./quota"),
91
92
  rce: require("./rce"),
92
93
  redis: require("./redis"),
93
94
  region: require("./region"),
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ v20241204: require("./v20241204"),
3
+ };
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ Client: require("./quota_client"),
3
+ Models: require("./models"),
4
+ };
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Copyright (c) 2018 Tencent. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing,
11
+ * software distributed under the License is distributed on an
12
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
+ * KIND, either express or implied. See the License for the
14
+ * specific language governing permissions and limitations
15
+ * under the License.
16
+ */
17
+ const AbstractModel = require("../../common/abstract_model");
18
+
19
+ /**
20
+ * CreateAlarm request structure.
21
+ * @class
22
+ */
23
+ class CreateAlarmRequest extends AbstractModel {
24
+ constructor(){
25
+ super();
26
+
27
+ /**
28
+ * Alarm rule name. specifies the name of the Alarm rule.
29
+ * @type {string || null}
30
+ */
31
+ this.Name = null;
32
+
33
+ /**
34
+ * Product ID.
35
+ * @type {number || null}
36
+ */
37
+ this.ProductId = null;
38
+
39
+ /**
40
+ * Quota ID.
41
+ * @type {number || null}
42
+ */
43
+ this.QuotaId = null;
44
+
45
+ /**
46
+ * Alert metrics 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
47
+ * @type {number || null}
48
+ */
49
+ this.Metrics = null;
50
+
51
+ /**
52
+ * Specifies the Alarm threshold. value range: 0-100.
53
+ * @type {number || null}
54
+ */
55
+ this.Threshold = null;
56
+
57
+ /**
58
+ * Alarm frequency.
59
+ * @type {number || null}
60
+ */
61
+ this.Frequency = null;
62
+
63
+ /**
64
+ * Member UIN
65
+ * @type {number || null}
66
+ */
67
+ this.MemberUin = null;
68
+
69
+ }
70
+
71
+ /**
72
+ * @private
73
+ */
74
+ deserialize(params) {
75
+ if (!params) {
76
+ return;
77
+ }
78
+ this.Name = 'Name' in params ? params.Name : null;
79
+ this.ProductId = 'ProductId' in params ? params.ProductId : null;
80
+ this.QuotaId = 'QuotaId' in params ? params.QuotaId : null;
81
+ this.Metrics = 'Metrics' in params ? params.Metrics : null;
82
+ this.Threshold = 'Threshold' in params ? params.Threshold : null;
83
+ this.Frequency = 'Frequency' in params ? params.Frequency : null;
84
+ this.MemberUin = 'MemberUin' in params ? params.MemberUin : null;
85
+
86
+ }
87
+ }
88
+
89
+ /**
90
+ * CreateAlarm response structure.
91
+ * @class
92
+ */
93
+ class CreateAlarmResponse extends AbstractModel {
94
+ constructor(){
95
+ super();
96
+
97
+ /**
98
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
99
+ * @type {string || null}
100
+ */
101
+ this.RequestId = null;
102
+
103
+ }
104
+
105
+ /**
106
+ * @private
107
+ */
108
+ deserialize(params) {
109
+ if (!params) {
110
+ return;
111
+ }
112
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
113
+
114
+ }
115
+ }
116
+
117
+ module.exports = {
118
+ CreateAlarmRequest: CreateAlarmRequest,
119
+ CreateAlarmResponse: CreateAlarmResponse,
120
+
121
+ }
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright (c) 2018 Tencent. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing,
11
+ * software distributed under the License is distributed on an
12
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
+ * KIND, either express or implied. See the License for the
14
+ * specific language governing permissions and limitations
15
+ * under the License.
16
+ */
17
+ const models = require("./models");
18
+ const AbstractClient = require('../../common/abstract_client')
19
+ const CreateAlarmRequest = models.CreateAlarmRequest;
20
+ const CreateAlarmResponse = models.CreateAlarmResponse;
21
+
22
+
23
+ /**
24
+ * quota client
25
+ * @class
26
+ */
27
+ class QuotaClient extends AbstractClient {
28
+
29
+ constructor(credential, region, profile) {
30
+ super("quota.intl.tencentcloudapi.com", "2024-12-04", credential, region, profile);
31
+ }
32
+
33
+ /**
34
+ * Add alarm rules
35
+ * @param {CreateAlarmRequest} req
36
+ * @param {function(string, CreateAlarmResponse):void} cb
37
+ * @public
38
+ */
39
+ CreateAlarm(req, cb) {
40
+ let resp = new CreateAlarmResponse();
41
+ this.request("CreateAlarm", req, resp, cb);
42
+ }
43
+
44
+
45
+ }
46
+ module.exports = QuotaClient;