@ucloud-sdks/ucloud-sdk-js 0.0.5 → 0.2.1

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 (43) hide show
  1. package/lib/core/middlewares.js +1 -1
  2. package/lib/services/cube/index.d.ts +141 -1
  3. package/lib/services/cube/index.js +36 -0
  4. package/lib/services/index.d.ts +2 -0
  5. package/lib/services/index.js +14 -0
  6. package/lib/services/ipsecvpn/index.d.ts +13 -5
  7. package/lib/services/pathx/index.d.ts +986 -60
  8. package/lib/services/pathx/index.js +144 -0
  9. package/lib/services/uaccount/index.d.ts +0 -24
  10. package/lib/services/uaccount/index.js +0 -9
  11. package/lib/services/ubill/index.d.ts +284 -4
  12. package/lib/services/ubill/index.js +18 -0
  13. package/lib/services/ucdn/index.d.ts +1085 -946
  14. package/lib/services/ucdn/index.js +72 -45
  15. package/lib/services/udb/index.d.ts +89 -12
  16. package/lib/services/udb/index.js +21 -3
  17. package/lib/services/udisk/index.d.ts +32 -8
  18. package/lib/services/uec/index.d.ts +68 -8
  19. package/lib/services/uec/index.js +9 -0
  20. package/lib/services/ufile/index.d.ts +288 -0
  21. package/lib/services/ufile/index.js +45 -0
  22. package/lib/services/ufs/index.d.ts +201 -3
  23. package/lib/services/ufs/index.js +45 -0
  24. package/lib/services/uhost/index.d.ts +201 -99
  25. package/lib/services/uhost/index.js +9 -0
  26. package/lib/services/uk8s/index.d.ts +690 -9
  27. package/lib/services/uk8s/index.js +45 -0
  28. package/lib/services/ulb/index.d.ts +45 -5
  29. package/lib/services/ulb/index.js +9 -0
  30. package/lib/services/umem/index.d.ts +337 -9
  31. package/lib/services/umem/index.js +27 -0
  32. package/lib/services/unet/index.d.ts +175 -6
  33. package/lib/services/unet/index.js +36 -0
  34. package/lib/services/uphone/index.d.ts +1986 -0
  35. package/lib/services/uphone/index.js +352 -0
  36. package/lib/services/uphost/index.d.ts +221 -25
  37. package/lib/services/uphost/index.js +36 -0
  38. package/lib/services/usms/index.d.ts +23 -3
  39. package/lib/services/uvms/index.d.ts +64 -0
  40. package/lib/services/uvms/index.js +25 -0
  41. package/lib/services/vpc/index.d.ts +390 -19
  42. package/lib/services/vpc/index.js +54 -0
  43. package/package.json +7 -7
@@ -15,6 +15,12 @@ export default class UPHostClient extends Client {
15
15
  * See also: https://docs.ucloud.cn/api/uphost-api/create_phost
16
16
  */
17
17
  createPHost(request?: CreatePHostRequest): Promise<CreatePHostResponse>;
18
+ /**
19
+ * CreatePHostImage - 创建裸金属2.0用户自定义镜像
20
+ *
21
+ * See also: https://docs.ucloud.cn/api/uphost-api/create_phost_image
22
+ */
23
+ createPHostImage(request?: CreatePHostImageRequest): Promise<CreatePHostImageResponse>;
18
24
  /**
19
25
  * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息
20
26
  *
@@ -57,6 +63,12 @@ export default class UPHostClient extends Client {
57
63
  * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_price
58
64
  */
59
65
  getPHostPrice(request?: GetPHostPriceRequest): Promise<GetPHostPriceResponse>;
66
+ /**
67
+ * ModifyPHostImageInfo - 修改自定义镜像名称和备注
68
+ *
69
+ * See also: https://docs.ucloud.cn/api/uphost-api/modify_phost_image_info
70
+ */
71
+ modifyPHostImageInfo(request?: ModifyPHostImageInfoRequest): Promise<ModifyPHostImageInfoResponse>;
60
72
  /**
61
73
  * ModifyPHostInfo - 更改物理机信息
62
74
  *
@@ -99,12 +111,24 @@ export default class UPHostClient extends Client {
99
111
  * See also: https://docs.ucloud.cn/api/uphost-api/start_phost
100
112
  */
101
113
  startPHost(request?: StartPHostRequest): Promise<StartPHostResponse>;
114
+ /**
115
+ * StopPHost - 关闭物理机
116
+ *
117
+ * See also: https://docs.ucloud.cn/api/uphost-api/stop_phost
118
+ */
119
+ stopPHost(request?: StopPHostRequest): Promise<StopPHostResponse>;
102
120
  /**
103
121
  * TerminatePHost - 删除物理云主机
104
122
  *
105
123
  * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost
106
124
  */
107
125
  terminatePHost(request?: TerminatePHostRequest): Promise<TerminatePHostResponse>;
126
+ /**
127
+ * TerminatePHostImage - 删除裸金属2.0用户自定义镜像
128
+ *
129
+ * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost_image
130
+ */
131
+ terminatePHostImage(request?: TerminatePHostImageRequest): Promise<TerminatePHostImageResponse>;
108
132
  }
109
133
  /**
110
134
  * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。
@@ -205,12 +229,42 @@ export interface CreatePHostResponse {
205
229
  */
206
230
  PHostId?: string[];
207
231
  }
232
+ /**
233
+ * CreatePHostImage - 创建裸金属2.0用户自定义镜像
234
+ */
235
+ export interface CreatePHostImageRequest {
236
+ /**
237
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
238
+ */
239
+ Zone: string;
240
+ /**
241
+ * UPHost实例ID
242
+ */
243
+ PHostId: string;
244
+ /**
245
+ * 镜像名称
246
+ */
247
+ ImageName: string;
248
+ /**
249
+ * 镜像描述
250
+ */
251
+ ImageDescription?: string;
252
+ }
253
+ /**
254
+ * CreatePHostImage - 创建裸金属2.0用户自定义镜像
255
+ */
256
+ export interface CreatePHostImageResponse {
257
+ /**
258
+ * 镜像ID
259
+ */
260
+ ImageId: string;
261
+ }
208
262
  /**
209
263
  * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息
210
264
  */
211
265
  export interface DescribeBaremetalMachineTypeRequest {
212
266
  /**
213
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
267
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
214
268
  */
215
269
  Zone: string;
216
270
  /**
@@ -223,16 +277,72 @@ export interface DescribeBaremetalMachineTypeRequest {
223
277
  */
224
278
  export interface DescribeBaremetalMachineTypeResponse {
225
279
  /**
226
- * 机型列表,模型:PHostMachineTypeSet
280
+ * 机型列表,模型:PHostCloudMachineTypeSet
227
281
  */
228
- MachineTypes?: string;
282
+ MachineTypes?: {
283
+ /**
284
+ * 物理云主机机型别名,全网唯一。
285
+ */
286
+ Type: string;
287
+ /**
288
+ * CPU信息
289
+ */
290
+ CPU?: {
291
+ /**
292
+ * CPU型号
293
+ */
294
+ Model?: string;
295
+ /**
296
+ * CPU主频
297
+ */
298
+ Frequence?: number;
299
+ /**
300
+ * CPU个数
301
+ */
302
+ Count?: number;
303
+ /**
304
+ * CPU核数
305
+ */
306
+ CoreCount?: number;
307
+ };
308
+ /**
309
+ * 内存大小,单位MB
310
+ */
311
+ Memory?: number;
312
+ /**
313
+ * 其他组件信息
314
+ */
315
+ Components?: {
316
+ /**
317
+ * 组件名称
318
+ */
319
+ Name?: string;
320
+ /**
321
+ * 组件数量
322
+ */
323
+ Count?: number;
324
+ };
325
+ /**
326
+ * 集群库存信息
327
+ */
328
+ Clusters?: {
329
+ /**
330
+ * 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G;
331
+ */
332
+ Name?: string;
333
+ /**
334
+ * 库存状态。枚举值:有库存:Available;无库存:SoldOut
335
+ */
336
+ StockStatus?: string;
337
+ }[];
338
+ }[];
229
339
  }
230
340
  /**
231
341
  * DescribePHost - 获取物理机详细信息
232
342
  */
233
343
  export interface DescribePHostRequest {
234
344
  /**
235
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
345
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
236
346
  */
237
347
  Zone?: string;
238
348
  /**
@@ -251,6 +361,10 @@ export interface DescribePHostRequest {
251
361
  * 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用
252
362
  */
253
363
  UDiskIdForAttachment?: string;
364
+ /**
365
+ * ULB使用参数,获取同VPC下机器信息。
366
+ */
367
+ VPCId?: string;
254
368
  }
255
369
  /**
256
370
  * DescribePHost - 获取物理机详细信息
@@ -277,7 +391,7 @@ export interface DescribePHostResponse {
277
391
  */
278
392
  SN?: string;
279
393
  /**
280
- * 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped;
394
+ * 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; \\ > 迁移中(裸金属云盘):Migrating
281
395
  */
282
396
  PMStatus?: string;
283
397
  /**
@@ -346,7 +460,7 @@ export interface DescribePHostResponse {
346
460
  CoreCount?: number;
347
461
  };
348
462
  /**
349
- * 磁盘信息,见 PHostDiskSet
463
+ * 磁盘信息,见 PHostDescDiskSet
350
464
  */
351
465
  DiskSet?: {
352
466
  /**
@@ -450,11 +564,11 @@ export interface DescribePHostResponse {
450
564
  */
451
565
  export interface DescribePHostImageRequest {
452
566
  /**
453
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
567
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
454
568
  */
455
569
  Zone: string;
456
570
  /**
457
- * 镜像类别,枚举值,Base是基础镜像;
571
+ * 镜像类别,枚举值,Base是基础镜像;Custom是自制镜像。
458
572
  */
459
573
  ImageType?: string;
460
574
  /**
@@ -510,6 +624,26 @@ export interface DescribePHostImageResponse {
510
624
  * 当前版本
511
625
  */
512
626
  Version?: string;
627
+ /**
628
+ * 枚举值:Base=>基础镜像,Custom=>自制镜像。
629
+ */
630
+ ImageType?: string;
631
+ /**
632
+ * 裸金属2.0参数。镜像创建时间。
633
+ */
634
+ CreateTime?: number;
635
+ /**
636
+ * 裸金属2.0参数。镜像当前状态。
637
+ */
638
+ State?: string;
639
+ /**
640
+ * 裸金属2.0参数。镜像大小。
641
+ */
642
+ ImageSize?: number;
643
+ /**
644
+ * 镜像描述
645
+ */
646
+ ImageDescription?: string;
513
647
  }[];
514
648
  }
515
649
  /**
@@ -517,7 +651,7 @@ export interface DescribePHostImageResponse {
517
651
  */
518
652
  export interface DescribePHostMachineTypeRequest {
519
653
  /**
520
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
654
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
521
655
  */
522
656
  Zone: string;
523
657
  /**
@@ -586,18 +720,6 @@ export interface DescribePHostMachineTypeResponse {
586
720
  * 磁盘IO性能,单位MB/s(待废弃)
587
721
  */
588
722
  IOCap?: number;
589
- /**
590
- * 裸金属机型参数:磁盘盘符
591
- */
592
- Drive?: string;
593
- /**
594
- * 裸金属机型参数:磁盘ID
595
- */
596
- DiskId?: string;
597
- /**
598
- * 裸金属机型参数:是否是启动盘。True/False
599
- */
600
- IsBoot?: string;
601
723
  }[];
602
724
  /**
603
725
  * 其他组件信息
@@ -610,7 +732,7 @@ export interface DescribePHostMachineTypeResponse {
610
732
  /**
611
733
  * 组件数量
612
734
  */
613
- Count?: string;
735
+ Count?: number;
614
736
  };
615
737
  /**
616
738
  * 集群库存信息
@@ -705,7 +827,7 @@ export interface GetPHostDiskUpgradePriceResponse {
705
827
  */
706
828
  export interface GetPHostPriceRequest {
707
829
  /**
708
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
830
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
709
831
  */
710
832
  Zone?: string;
711
833
  /**
@@ -772,6 +894,36 @@ export interface GetPHostPriceResponse {
772
894
  OriginalPrice?: number;
773
895
  }[];
774
896
  }
897
+ /**
898
+ * ModifyPHostImageInfo - 修改自定义镜像名称和备注
899
+ */
900
+ export interface ModifyPHostImageInfoRequest {
901
+ /**
902
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
903
+ */
904
+ Zone: string;
905
+ /**
906
+ * 镜像ID
907
+ */
908
+ ImageId: string;
909
+ /**
910
+ * 镜像名称
911
+ */
912
+ Name?: string;
913
+ /**
914
+ * 备注
915
+ */
916
+ Remark?: string;
917
+ }
918
+ /**
919
+ * ModifyPHostImageInfo - 修改自定义镜像名称和备注
920
+ */
921
+ export interface ModifyPHostImageInfoResponse {
922
+ /**
923
+ * 镜像ID
924
+ */
925
+ ImageId?: string;
926
+ }
775
927
  /**
776
928
  * ModifyPHostInfo - 更改物理机信息
777
929
  */
@@ -935,7 +1087,7 @@ export interface ResetPHostPasswordResponse {
935
1087
  */
936
1088
  export interface ResizePHostAttachedDiskRequest {
937
1089
  /**
938
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
1090
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
939
1091
  */
940
1092
  Zone: string;
941
1093
  /**
@@ -958,7 +1110,7 @@ export interface ResizePHostAttachedDiskResponse {
958
1110
  /**
959
1111
  * 改配成功的磁盘id
960
1112
  */
961
- DiskId?: string;
1113
+ UDiskId?: string;
962
1114
  }
963
1115
  /**
964
1116
  * StartPHost - 启动物理机
@@ -982,6 +1134,28 @@ export interface StartPHostResponse {
982
1134
  */
983
1135
  PHostId?: string;
984
1136
  }
1137
+ /**
1138
+ * StopPHost - 关闭物理机
1139
+ */
1140
+ export interface StopPHostRequest {
1141
+ /**
1142
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
1143
+ */
1144
+ Zone?: string;
1145
+ /**
1146
+ * PHost资源ID
1147
+ */
1148
+ PHostId: string;
1149
+ }
1150
+ /**
1151
+ * StopPHost - 关闭物理机
1152
+ */
1153
+ export interface StopPHostResponse {
1154
+ /**
1155
+ * PHost 的资源ID
1156
+ */
1157
+ PHostId: string;
1158
+ }
985
1159
  /**
986
1160
  * TerminatePHost - 删除物理云主机
987
1161
  */
@@ -1012,3 +1186,25 @@ export interface TerminatePHostResponse {
1012
1186
  */
1013
1187
  PHostId?: string;
1014
1188
  }
1189
+ /**
1190
+ * TerminatePHostImage - 删除裸金属2.0用户自定义镜像
1191
+ */
1192
+ export interface TerminatePHostImageRequest {
1193
+ /**
1194
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
1195
+ */
1196
+ Zone: string;
1197
+ /**
1198
+ * 自制镜像ID
1199
+ */
1200
+ ImageId: string;
1201
+ }
1202
+ /**
1203
+ * TerminatePHostImage - 删除裸金属2.0用户自定义镜像
1204
+ */
1205
+ export interface TerminatePHostImageResponse {
1206
+ /**
1207
+ * 自制镜像ID
1208
+ */
1209
+ ImageId: string;
1210
+ }
@@ -21,6 +21,15 @@ class UPHostClient extends client_1.default {
21
21
  const args = Object.assign({ Action: 'CreatePHost' }, (request || {}));
22
22
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
23
23
  }
24
+ /**
25
+ * CreatePHostImage - 创建裸金属2.0用户自定义镜像
26
+ *
27
+ * See also: https://docs.ucloud.cn/api/uphost-api/create_phost_image
28
+ */
29
+ createPHostImage(request) {
30
+ const args = Object.assign({ Action: 'CreatePHostImage' }, (request || {}));
31
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
32
+ }
24
33
  /**
25
34
  * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息
26
35
  *
@@ -84,6 +93,15 @@ class UPHostClient extends client_1.default {
84
93
  const args = Object.assign({ Action: 'GetPHostPrice' }, (request || {}));
85
94
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
86
95
  }
96
+ /**
97
+ * ModifyPHostImageInfo - 修改自定义镜像名称和备注
98
+ *
99
+ * See also: https://docs.ucloud.cn/api/uphost-api/modify_phost_image_info
100
+ */
101
+ modifyPHostImageInfo(request) {
102
+ const args = Object.assign({ Action: 'ModifyPHostImageInfo' }, (request || {}));
103
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
104
+ }
87
105
  /**
88
106
  * ModifyPHostInfo - 更改物理机信息
89
107
  *
@@ -147,6 +165,15 @@ class UPHostClient extends client_1.default {
147
165
  const args = Object.assign({ Action: 'StartPHost' }, (request || {}));
148
166
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
149
167
  }
168
+ /**
169
+ * StopPHost - 关闭物理机
170
+ *
171
+ * See also: https://docs.ucloud.cn/api/uphost-api/stop_phost
172
+ */
173
+ stopPHost(request) {
174
+ const args = Object.assign({ Action: 'StopPHost' }, (request || {}));
175
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
176
+ }
150
177
  /**
151
178
  * TerminatePHost - 删除物理云主机
152
179
  *
@@ -156,5 +183,14 @@ class UPHostClient extends client_1.default {
156
183
  const args = Object.assign({ Action: 'TerminatePHost' }, (request || {}));
157
184
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
158
185
  }
186
+ /**
187
+ * TerminatePHostImage - 删除裸金属2.0用户自定义镜像
188
+ *
189
+ * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost_image
190
+ */
191
+ terminatePHostImage(request) {
192
+ const args = Object.assign({ Action: 'TerminatePHostImage' }, (request || {}));
193
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
194
+ }
159
195
  }
160
196
  exports.default = UPHostClient;
@@ -80,6 +80,10 @@ export default class USMSClient extends Client {
80
80
  * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名
81
81
  */
82
82
  export interface CreateUSMSSignatureRequest {
83
+ /**
84
+ * 签名内容
85
+ */
86
+ SigContent: string;
83
87
  /**
84
88
  * 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称;
85
89
  */
@@ -142,6 +146,14 @@ export interface CreateUSMSTemplateRequest {
142
146
  * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。
143
147
  */
144
148
  Remark?: string;
149
+ /**
150
+ * 当Purpose为3时,也即会员推广类短信模板,该项必填。枚举值:TD退订、回T退订、回N退订、回TD退订、退订回T、退订回D、退订回TD、退订回复T、退订回复D、退订回复N、退订回复TD、拒收回T
151
+ */
152
+ UnsubscribeInfo?: string;
153
+ /**
154
+ * 模板变量属性说明
155
+ */
156
+ Instruction?: string;
145
157
  }
146
158
  /**
147
159
  * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板
@@ -189,7 +201,7 @@ export interface GetUSMSSendReceiptRequest {
189
201
  */
190
202
  Zone?: string;
191
203
  /**
192
- * 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式
204
+ * 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式,单次调用集合数需控制在100个以内
193
205
  */
194
206
  SessionNoSet: string[];
195
207
  }
@@ -332,6 +344,10 @@ export interface QueryUSMSTemplateResponse {
332
344
  * 创建时间
333
345
  */
334
346
  CreateTime: number;
347
+ /**
348
+ * 模板变量属性说明
349
+ */
350
+ Instruction?: string;
335
351
  };
336
352
  }
337
353
  /**
@@ -419,7 +435,7 @@ export interface SendUSMSMessageRequest {
419
435
  */
420
436
  TemplateId: string;
421
437
  /**
422
- * 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送;
438
+ * 模板可变参数,以数组的方式填写,举例,TemplateParams.0,TemplateParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送;
423
439
  */
424
440
  TemplateParams?: string[];
425
441
  /**
@@ -427,7 +443,7 @@ export interface SendUSMSMessageRequest {
427
443
  */
428
444
  ExtendCode?: string;
429
445
  /**
430
- * 自定义的业务标识ID,字符串( 长度不能超过32 位)
446
+ * 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符
431
447
  */
432
448
  UserId?: string;
433
449
  }
@@ -510,6 +526,10 @@ export interface UpdateUSMSTemplateRequest {
510
526
  * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。
511
527
  */
512
528
  Remark?: string;
529
+ /**
530
+ * 模板变量属性说明
531
+ */
532
+ Instruction?: string;
513
533
  }
514
534
  /**
515
535
  * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核
@@ -0,0 +1,64 @@
1
+ import Client from '../../core/client';
2
+ import { ConfigOptions } from '../../core/config';
3
+ import { CredentialOptions } from '../../core/credential';
4
+ /**
5
+ * This client is used to call actions of **uvms** service
6
+ */
7
+ export default class UVMSClient extends Client {
8
+ constructor({ config, credential, }: {
9
+ config: ConfigOptions;
10
+ credential: CredentialOptions;
11
+ });
12
+ /**
13
+ * SendUVMSMessage - 向指定号码拨打电话
14
+ *
15
+ * See also: https://docs.ucloud.cn/api/uvms-api/send_uvms_message
16
+ */
17
+ sendUVMSMessage(request?: SendUVMSMessageRequest): Promise<SendUVMSMessageResponse>;
18
+ }
19
+ /**
20
+ * SendUVMSMessage - 向指定号码拨打电话
21
+ */
22
+ export interface SendUVMSMessageRequest {
23
+ /**
24
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
25
+ */
26
+ Zone: string;
27
+ /**
28
+ * 被叫号码,采用 E.164 标准,格式为+[国家代码][用户号码]。例如:+8613512345678, 其中前面有一个+号 ,86为国家码,13512345678为手机号
29
+ */
30
+ CalledNumber: string;
31
+ /**
32
+ * 模板 ID,在控制台审核通过的模板 ID。
33
+ */
34
+ TemplateId: string;
35
+ /**
36
+ * 模板可变参数,以数组的方式填写,举例,TemplateParams.0,TemplateParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送;
37
+ */
38
+ TemplateParams?: string[];
39
+ /**
40
+ * 主叫号码,号码随机时不填。专属号码时传入已购买的号码,仅支持一个号码,在控制台查看已购买的号码。
41
+ */
42
+ FromNumber?: string;
43
+ /**
44
+ * 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符
45
+ */
46
+ UserId?: string;
47
+ }
48
+ /**
49
+ * SendUVMSMessage - 向指定号码拨打电话
50
+ */
51
+ export interface SendUVMSMessageResponse {
52
+ /**
53
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 ReqUuid。
54
+ */
55
+ ReqUuid: string;
56
+ /**
57
+ * 本次提交发送语音的唯一ID,可根据该值查询本次发送详情
58
+ */
59
+ SessionNo?: string;
60
+ /**
61
+ * 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。
62
+ */
63
+ UserId?: string;
64
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const client_1 = __importDefault(require("../../core/client"));
7
+ const request_1 = __importDefault(require("../../core/request"));
8
+ /**
9
+ * This client is used to call actions of **uvms** service
10
+ */
11
+ class UVMSClient extends client_1.default {
12
+ constructor({ config, credential, }) {
13
+ super({ config, credential });
14
+ }
15
+ /**
16
+ * SendUVMSMessage - 向指定号码拨打电话
17
+ *
18
+ * See also: https://docs.ucloud.cn/api/uvms-api/send_uvms_message
19
+ */
20
+ sendUVMSMessage(request) {
21
+ const args = Object.assign({ Action: 'SendUVMSMessage' }, (request || {}));
22
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
23
+ }
24
+ }
25
+ exports.default = UVMSClient;