@ucloud-sdks/ucloud-sdk-js 0.2.0 → 0.2.3
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/lib/services/uhost/index.d.ts +194 -3
- package/lib/services/uhost/index.js +9 -0
- package/lib/services/ulb/index.d.ts +2 -2
- package/lib/services/unet/index.d.ts +6 -2
- package/lib/services/uphone/index.d.ts +712 -24
- package/lib/services/uphone/index.js +93 -3
- package/lib/services/uvms/index.d.ts +8 -4
- package/lib/services/vpc/index.d.ts +239 -22
- package/lib/services/vpc/index.js +18 -0
- package/package.json +7 -7
|
@@ -12,6 +12,15 @@ class UPhoneClient extends client_1.default {
|
|
|
12
12
|
constructor({ config, credential, }) {
|
|
13
13
|
super({ config, credential });
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* CreateUPhone - 创建云手机
|
|
17
|
+
*
|
|
18
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone
|
|
19
|
+
*/
|
|
20
|
+
createUPhone(request) {
|
|
21
|
+
const args = Object.assign({ Action: 'CreateUPhone' }, (request || {}));
|
|
22
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
23
|
+
}
|
|
15
24
|
/**
|
|
16
25
|
* CreateUPhoneApp - 一个 app 对应多个 app_version。
|
|
17
26
|
*
|
|
@@ -49,6 +58,15 @@ class UPhoneClient extends client_1.default {
|
|
|
49
58
|
const args = Object.assign({ Action: 'CreateUPhoneServer' }, (request || {}));
|
|
50
59
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
51
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* DeleteUPhone - 删除云手机
|
|
63
|
+
*
|
|
64
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone
|
|
65
|
+
*/
|
|
66
|
+
deleteUPhone(request) {
|
|
67
|
+
const args = Object.assign({ Action: 'DeleteUPhone' }, (request || {}));
|
|
68
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
69
|
+
}
|
|
52
70
|
/**
|
|
53
71
|
* DeleteUPhoneImage - 删除自制云手机镜像。
|
|
54
72
|
*
|
|
@@ -59,7 +77,7 @@ class UPhoneClient extends client_1.default {
|
|
|
59
77
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
60
78
|
}
|
|
61
79
|
/**
|
|
62
|
-
* DeleteUPhoneServer - 删除云手机服务器。
|
|
80
|
+
* DeleteUPhoneServer - 删除云手机服务器。
|
|
63
81
|
*
|
|
64
82
|
* See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone_server
|
|
65
83
|
*/
|
|
@@ -122,7 +140,7 @@ class UPhoneClient extends client_1.default {
|
|
|
122
140
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
123
141
|
}
|
|
124
142
|
/**
|
|
125
|
-
* DescribeUPhoneIpRegions -
|
|
143
|
+
* DescribeUPhoneIpRegions - 获取云手机所在城市支持绑定独立IP的地域列表
|
|
126
144
|
*
|
|
127
145
|
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_ip_regions
|
|
128
146
|
*/
|
|
@@ -140,7 +158,7 @@ class UPhoneClient extends client_1.default {
|
|
|
140
158
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
141
159
|
}
|
|
142
160
|
/**
|
|
143
|
-
* DescribeUPhoneModel -
|
|
161
|
+
* DescribeUPhoneModel - 获取云手机规格列表。两种类型:uphone代表单云手机场景、uphone-server代表云手机服务器场景。
|
|
144
162
|
*
|
|
145
163
|
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_model
|
|
146
164
|
*/
|
|
@@ -166,6 +184,33 @@ class UPhoneClient extends client_1.default {
|
|
|
166
184
|
const args = Object.assign({ Action: 'DescribeUPhoneServerModel' }, (request || {}));
|
|
167
185
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
168
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* GetUPhoneAllowance - 获取云手机创建余量
|
|
189
|
+
*
|
|
190
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_allowance
|
|
191
|
+
*/
|
|
192
|
+
getUPhoneAllowance(request) {
|
|
193
|
+
const args = Object.assign({ Action: 'GetUPhoneAllowance' }, (request || {}));
|
|
194
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* GetUPhonePrice - 根据云手机规格名称,获取UPhone实例的价格。
|
|
198
|
+
*
|
|
199
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_price
|
|
200
|
+
*/
|
|
201
|
+
getUPhonePrice(request) {
|
|
202
|
+
const args = Object.assign({ Action: 'GetUPhonePrice' }, (request || {}));
|
|
203
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* GetUPhoneRenewPrice - 获取云手机续费价格,不包括独立ip价格。
|
|
207
|
+
*
|
|
208
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_renew_price
|
|
209
|
+
*/
|
|
210
|
+
getUPhoneRenewPrice(request) {
|
|
211
|
+
const args = Object.assign({ Action: 'GetUPhoneRenewPrice' }, (request || {}));
|
|
212
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
213
|
+
}
|
|
169
214
|
/**
|
|
170
215
|
* GetUPhoneScreenCapture - 云手机截屏
|
|
171
216
|
*
|
|
@@ -195,6 +240,15 @@ class UPhoneClient extends client_1.default {
|
|
|
195
240
|
const args = Object.assign({ Action: 'GetUPhoneServerRenewPrice' }, (request || {}));
|
|
196
241
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
197
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* ImportFile - 上传文件到云手机目录/sdcard/Download/并自动安装APK文件
|
|
245
|
+
*
|
|
246
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/import_file
|
|
247
|
+
*/
|
|
248
|
+
importFile(request) {
|
|
249
|
+
const args = Object.assign({ Action: 'ImportFile' }, (request || {}));
|
|
250
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
251
|
+
}
|
|
198
252
|
/**
|
|
199
253
|
* InstallUPhoneAppVersion - 在云手机中安装应用版本相关的Apk文件。系统会根据AppVersionId将对应的Apk文件下载后安装到云手机中。一次只支持安装一个Apk。
|
|
200
254
|
*
|
|
@@ -267,6 +321,15 @@ class UPhoneClient extends client_1.default {
|
|
|
267
321
|
const args = Object.assign({ Action: 'RebootUPhone' }, (request || {}));
|
|
268
322
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
269
323
|
}
|
|
324
|
+
/**
|
|
325
|
+
* RenewUPhone - 修改UPhone的device_id、imei、meid 以及其他相关配置,达到一键新机的效果
|
|
326
|
+
*
|
|
327
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/renew_u_phone
|
|
328
|
+
*/
|
|
329
|
+
renewUPhone(request) {
|
|
330
|
+
const args = Object.assign({ Action: 'RenewUPhone' }, (request || {}));
|
|
331
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
332
|
+
}
|
|
270
333
|
/**
|
|
271
334
|
* ResetUPhone - 将云手机恢复为创建时的状态。
|
|
272
335
|
*
|
|
@@ -294,6 +357,15 @@ class UPhoneClient extends client_1.default {
|
|
|
294
357
|
const args = Object.assign({ Action: 'RunSyncCommand' }, (request || {}));
|
|
295
358
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
296
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* SetUPhoneCallback - 设置云手机异步操作以及状态更新回调,支持云手机重置,安装应用,卸载应用,设备占用状态回调
|
|
362
|
+
*
|
|
363
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_callback
|
|
364
|
+
*/
|
|
365
|
+
setUPhoneCallback(request) {
|
|
366
|
+
const args = Object.assign({ Action: 'SetUPhoneCallback' }, (request || {}));
|
|
367
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
368
|
+
}
|
|
297
369
|
/**
|
|
298
370
|
* SetUPhoneConfig - 设置云手机画面参数(分辨率、DPI、帧率、码率)
|
|
299
371
|
*
|
|
@@ -321,6 +393,15 @@ class UPhoneClient extends client_1.default {
|
|
|
321
393
|
const args = Object.assign({ Action: 'SetUPhoneManagerMode' }, (request || {}));
|
|
322
394
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
323
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* SetUPhoneRootMode - 设置云手机Root模式
|
|
398
|
+
*
|
|
399
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_root_mode
|
|
400
|
+
*/
|
|
401
|
+
setUPhoneRootMode(request) {
|
|
402
|
+
const args = Object.assign({ Action: 'SetUPhoneRootMode' }, (request || {}));
|
|
403
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
404
|
+
}
|
|
324
405
|
/**
|
|
325
406
|
* SetUPhoneSplashScreen - 设置云手机启动画面,通过DescribeUPhone接口可以查询该地址
|
|
326
407
|
*
|
|
@@ -330,6 +411,15 @@ class UPhoneClient extends client_1.default {
|
|
|
330
411
|
const args = Object.assign({ Action: 'SetUPhoneSplashScreen' }, (request || {}));
|
|
331
412
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
332
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* SetUPhoneToken - 设置云手机RTC连接Token提高安全性
|
|
416
|
+
*
|
|
417
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_token
|
|
418
|
+
*/
|
|
419
|
+
setUPhoneToken(request) {
|
|
420
|
+
const args = Object.assign({ Action: 'SetUPhoneToken' }, (request || {}));
|
|
421
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
422
|
+
}
|
|
333
423
|
/**
|
|
334
424
|
* UnInstallUPhoneAppVersion - 传入应用版本Id,在云手机中根据应用版本的PackageName卸载相关应用。一次只支持卸载一个应用。
|
|
335
425
|
*
|
|
@@ -20,10 +20,6 @@ export default class UVMSClient extends Client {
|
|
|
20
20
|
* SendUVMSMessage - 向指定号码拨打电话
|
|
21
21
|
*/
|
|
22
22
|
export interface SendUVMSMessageRequest {
|
|
23
|
-
/**
|
|
24
|
-
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
|
|
25
|
-
*/
|
|
26
|
-
Zone: string;
|
|
27
23
|
/**
|
|
28
24
|
* 被叫号码,采用 E.164 标准,格式为+[国家代码][用户号码]。例如:+8613512345678, 其中前面有一个+号 ,86为国家码,13512345678为手机号
|
|
29
25
|
*/
|
|
@@ -44,6 +40,14 @@ export interface SendUVMSMessageRequest {
|
|
|
44
40
|
* 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符
|
|
45
41
|
*/
|
|
46
42
|
UserId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 号码组类型,1-随机组,2-专属组。如不填写则根据主叫号码判断,若主叫号码为空,则为随机组,若不为空,则为专属组。
|
|
45
|
+
*/
|
|
46
|
+
GroupType?: number;
|
|
47
|
+
/**
|
|
48
|
+
* 调度规则,0-默认(归属地优先),1-随机。当不指定外显号码(主叫号码为空)时生效。如不填写,默认为归属地优先。
|
|
49
|
+
*/
|
|
50
|
+
DispatchRule?: number;
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* SendUVMSMessage - 向指定号码拨打电话
|
|
@@ -27,6 +27,12 @@ export default class VPCClient extends Client {
|
|
|
27
27
|
* See also: https://docs.ucloud.cn/api/vpc2.0-api/add_white_list_resource
|
|
28
28
|
*/
|
|
29
29
|
addWhiteListResource(request?: AddWhiteListResourceRequest): Promise<AddWhiteListResourceResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP
|
|
32
|
+
*
|
|
33
|
+
* See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_batch_secondary_ip
|
|
34
|
+
*/
|
|
35
|
+
allocateBatchSecondaryIp(request?: AllocateBatchSecondaryIpRequest): Promise<AllocateBatchSecondaryIpResponse>;
|
|
30
36
|
/**
|
|
31
37
|
* AllocateSecondaryIp - 分配ip(用于uk8s使用)
|
|
32
38
|
*
|
|
@@ -81,6 +87,12 @@ export default class VPCClient extends Client {
|
|
|
81
87
|
* See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_entry
|
|
82
88
|
*/
|
|
83
89
|
createNetworkAclEntry(request?: CreateNetworkAclEntryRequest): Promise<CreateNetworkAclEntryResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* CreateNetworkInterface - 创建虚拟网卡
|
|
92
|
+
*
|
|
93
|
+
* See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_interface
|
|
94
|
+
*/
|
|
95
|
+
createNetworkInterface(request?: CreateNetworkInterfaceRequest): Promise<CreateNetworkInterfaceResponse>;
|
|
84
96
|
/**
|
|
85
97
|
* CreateRouteTable - 创建路由表
|
|
86
98
|
*
|
|
@@ -474,6 +486,86 @@ export interface AddWhiteListResourceRequest {
|
|
|
474
486
|
*/
|
|
475
487
|
export interface AddWhiteListResourceResponse {
|
|
476
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP
|
|
491
|
+
*/
|
|
492
|
+
export interface AllocateBatchSecondaryIpRequest {
|
|
493
|
+
/**
|
|
494
|
+
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
|
|
495
|
+
*/
|
|
496
|
+
Zone: string;
|
|
497
|
+
/**
|
|
498
|
+
* 节点mac
|
|
499
|
+
*/
|
|
500
|
+
Mac: string;
|
|
501
|
+
/**
|
|
502
|
+
* 资源Id
|
|
503
|
+
*/
|
|
504
|
+
ObjectId: string;
|
|
505
|
+
/**
|
|
506
|
+
* 子网Id(若未指定,则根据zone获取默认子网进行创建)
|
|
507
|
+
*/
|
|
508
|
+
SubnetId?: string;
|
|
509
|
+
/**
|
|
510
|
+
* vpcId
|
|
511
|
+
*/
|
|
512
|
+
VPCId?: string;
|
|
513
|
+
/**
|
|
514
|
+
* 【arry】支持按如下方式申请:①按网段:如192.168.1.32/27,掩码数字最小为27 ②指定IP地址,如192.168.1.3
|
|
515
|
+
*/
|
|
516
|
+
Ip?: string[];
|
|
517
|
+
/**
|
|
518
|
+
* 申请的内网IP数量
|
|
519
|
+
*/
|
|
520
|
+
Count?: number;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP
|
|
524
|
+
*/
|
|
525
|
+
export interface AllocateBatchSecondaryIpResponse {
|
|
526
|
+
/**
|
|
527
|
+
* 详见IpsInfo
|
|
528
|
+
*/
|
|
529
|
+
IpsInfo: {
|
|
530
|
+
/**
|
|
531
|
+
* 内网IP地址
|
|
532
|
+
*/
|
|
533
|
+
Ip?: string;
|
|
534
|
+
/**
|
|
535
|
+
* 掩码
|
|
536
|
+
*/
|
|
537
|
+
Mask?: string;
|
|
538
|
+
/**
|
|
539
|
+
* 网关
|
|
540
|
+
*/
|
|
541
|
+
Gateway?: string;
|
|
542
|
+
/**
|
|
543
|
+
* MAC地址
|
|
544
|
+
*/
|
|
545
|
+
Mac?: string;
|
|
546
|
+
/**
|
|
547
|
+
* 子网资源ID
|
|
548
|
+
*/
|
|
549
|
+
SubnetId?: string;
|
|
550
|
+
/**
|
|
551
|
+
* VPC资源ID
|
|
552
|
+
*/
|
|
553
|
+
VPCId?: string;
|
|
554
|
+
/**
|
|
555
|
+
* IP分配结果,详见StatusInfo
|
|
556
|
+
*/
|
|
557
|
+
Status?: {
|
|
558
|
+
/**
|
|
559
|
+
* 枚举值:Succeeded,Failed
|
|
560
|
+
*/
|
|
561
|
+
StatusCode?: string;
|
|
562
|
+
/**
|
|
563
|
+
* IP分配失败原因
|
|
564
|
+
*/
|
|
565
|
+
Message?: string;
|
|
566
|
+
};
|
|
567
|
+
}[];
|
|
568
|
+
}
|
|
477
569
|
/**
|
|
478
570
|
* AllocateSecondaryIp - 分配ip(用于uk8s使用)
|
|
479
571
|
*/
|
|
@@ -851,6 +943,105 @@ export interface CreateNetworkAclEntryResponse {
|
|
|
851
943
|
*/
|
|
852
944
|
EntryId: string;
|
|
853
945
|
}
|
|
946
|
+
/**
|
|
947
|
+
* CreateNetworkInterface - 创建虚拟网卡
|
|
948
|
+
*/
|
|
949
|
+
export interface CreateNetworkInterfaceRequest {
|
|
950
|
+
/**
|
|
951
|
+
* 所属VPCID
|
|
952
|
+
*/
|
|
953
|
+
VPCId: string;
|
|
954
|
+
/**
|
|
955
|
+
* 所属子网ID
|
|
956
|
+
*/
|
|
957
|
+
SubnetId: string;
|
|
958
|
+
/**
|
|
959
|
+
* 虚拟网卡名称,默认为 NetworkInterface
|
|
960
|
+
*/
|
|
961
|
+
Name?: string;
|
|
962
|
+
/**
|
|
963
|
+
* 指定内网IP。当前一个网卡仅支持绑定一个内网IP
|
|
964
|
+
*/
|
|
965
|
+
PrivateIp?: string[];
|
|
966
|
+
/**
|
|
967
|
+
* 防火墙GroupId,默认:Web推荐防火墙 可由DescribeSecurityGroupResponse中的GroupId取得
|
|
968
|
+
*/
|
|
969
|
+
SecurityGroupId?: string;
|
|
970
|
+
/**
|
|
971
|
+
* 业务组
|
|
972
|
+
*/
|
|
973
|
+
Tag?: string;
|
|
974
|
+
/**
|
|
975
|
+
* 备注
|
|
976
|
+
*/
|
|
977
|
+
Remark?: string;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* CreateNetworkInterface - 创建虚拟网卡
|
|
981
|
+
*/
|
|
982
|
+
export interface CreateNetworkInterfaceResponse {
|
|
983
|
+
/**
|
|
984
|
+
* 若创建成功,则返回虚拟网卡信息。创建失败,无此参数
|
|
985
|
+
*/
|
|
986
|
+
NetworkInterface?: {
|
|
987
|
+
/**
|
|
988
|
+
* 虚拟网卡资源ID
|
|
989
|
+
*/
|
|
990
|
+
InterfaceId: string;
|
|
991
|
+
/**
|
|
992
|
+
* 所属VPC
|
|
993
|
+
*/
|
|
994
|
+
VPCId: string;
|
|
995
|
+
/**
|
|
996
|
+
* 所属子网
|
|
997
|
+
*/
|
|
998
|
+
SubnetId: string;
|
|
999
|
+
/**
|
|
1000
|
+
* 关联内网IP。当前一个网卡仅支持绑定一个内网IP
|
|
1001
|
+
*/
|
|
1002
|
+
PrivateIpSet: string[];
|
|
1003
|
+
/**
|
|
1004
|
+
* 关联Mac
|
|
1005
|
+
*/
|
|
1006
|
+
MacAddress: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* 绑定状态
|
|
1009
|
+
*/
|
|
1010
|
+
Status: number;
|
|
1011
|
+
/**
|
|
1012
|
+
* 虚拟网卡名称
|
|
1013
|
+
*/
|
|
1014
|
+
Name?: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* 内网IP掩码
|
|
1017
|
+
*/
|
|
1018
|
+
Netmask?: string;
|
|
1019
|
+
/**
|
|
1020
|
+
* 默认网关
|
|
1021
|
+
*/
|
|
1022
|
+
Gateway?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* 绑定实例资源ID
|
|
1025
|
+
*/
|
|
1026
|
+
AttachInstanceId?: string;
|
|
1027
|
+
/**
|
|
1028
|
+
* 是否是绑定实例的默认网卡 false:不是 true:是
|
|
1029
|
+
*/
|
|
1030
|
+
Default?: boolean;
|
|
1031
|
+
/**
|
|
1032
|
+
* 创建时间
|
|
1033
|
+
*/
|
|
1034
|
+
CreateTime?: number;
|
|
1035
|
+
/**
|
|
1036
|
+
* 备注
|
|
1037
|
+
*/
|
|
1038
|
+
Remark?: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* 业务组
|
|
1041
|
+
*/
|
|
1042
|
+
Tag?: string;
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
854
1045
|
/**
|
|
855
1046
|
* CreateRouteTable - 创建路由表
|
|
856
1047
|
*/
|
|
@@ -1292,10 +1483,6 @@ export interface DescribeInstanceNetworkInterfaceResponse {
|
|
|
1292
1483
|
* 绑定状态
|
|
1293
1484
|
*/
|
|
1294
1485
|
Status: number;
|
|
1295
|
-
/**
|
|
1296
|
-
* 网卡的内网IP信息
|
|
1297
|
-
*/
|
|
1298
|
-
PrivateIp: string[];
|
|
1299
1486
|
/**
|
|
1300
1487
|
* 虚拟网卡名称
|
|
1301
1488
|
*/
|
|
@@ -1336,10 +1523,6 @@ export interface DescribeInstanceNetworkInterfaceResponse {
|
|
|
1336
1523
|
* 虚拟网卡绑定的防火墙ID信息
|
|
1337
1524
|
*/
|
|
1338
1525
|
FirewallIdSet?: string[];
|
|
1339
|
-
/**
|
|
1340
|
-
* 网卡的内网IP配额信息
|
|
1341
|
-
*/
|
|
1342
|
-
PrivateIplimit?: string[];
|
|
1343
1526
|
}[];
|
|
1344
1527
|
}
|
|
1345
1528
|
/**
|
|
@@ -1374,35 +1557,35 @@ export interface DescribeNATGWResponse {
|
|
|
1374
1557
|
/**
|
|
1375
1558
|
* natgw id
|
|
1376
1559
|
*/
|
|
1377
|
-
NATGWId
|
|
1560
|
+
NATGWId: string;
|
|
1378
1561
|
/**
|
|
1379
1562
|
* natgw名称
|
|
1380
1563
|
*/
|
|
1381
|
-
NATGWName
|
|
1564
|
+
NATGWName: string;
|
|
1382
1565
|
/**
|
|
1383
1566
|
* 业务组
|
|
1384
1567
|
*/
|
|
1385
|
-
Tag
|
|
1568
|
+
Tag: string;
|
|
1386
1569
|
/**
|
|
1387
1570
|
* 备注
|
|
1388
1571
|
*/
|
|
1389
|
-
Remark
|
|
1572
|
+
Remark: string;
|
|
1390
1573
|
/**
|
|
1391
1574
|
* natgw创建时间
|
|
1392
1575
|
*/
|
|
1393
|
-
CreateTime
|
|
1576
|
+
CreateTime: number;
|
|
1394
1577
|
/**
|
|
1395
1578
|
* 绑定的防火墙Id
|
|
1396
1579
|
*/
|
|
1397
|
-
FirewallId
|
|
1580
|
+
FirewallId: string;
|
|
1398
1581
|
/**
|
|
1399
1582
|
* 所属VPC Id
|
|
1400
1583
|
*/
|
|
1401
|
-
VPCId
|
|
1584
|
+
VPCId: string;
|
|
1402
1585
|
/**
|
|
1403
1586
|
* 子网 Id
|
|
1404
1587
|
*/
|
|
1405
|
-
SubnetSet
|
|
1588
|
+
SubnetSet: {
|
|
1406
1589
|
/**
|
|
1407
1590
|
* 子网id
|
|
1408
1591
|
*/
|
|
@@ -1419,7 +1602,7 @@ export interface DescribeNATGWResponse {
|
|
|
1419
1602
|
/**
|
|
1420
1603
|
* 绑定的EIP 信息
|
|
1421
1604
|
*/
|
|
1422
|
-
IPSet
|
|
1605
|
+
IPSet: {
|
|
1423
1606
|
/**
|
|
1424
1607
|
* 外网IP的 EIPId
|
|
1425
1608
|
*/
|
|
@@ -1453,15 +1636,15 @@ export interface DescribeNATGWResponse {
|
|
|
1453
1636
|
/**
|
|
1454
1637
|
* VPC名称
|
|
1455
1638
|
*/
|
|
1456
|
-
VPCName
|
|
1639
|
+
VPCName: string;
|
|
1457
1640
|
/**
|
|
1458
1641
|
* 枚举值,“enable”,默认出口规则使用了负载均衡;“disable”,默认出口规则未使用负载均衡。
|
|
1459
1642
|
*/
|
|
1460
|
-
IsSnatpoolEnabled
|
|
1643
|
+
IsSnatpoolEnabled: string;
|
|
1461
1644
|
/**
|
|
1462
1645
|
* 转发策略Id
|
|
1463
1646
|
*/
|
|
1464
|
-
PolicyId
|
|
1647
|
+
PolicyId: string[];
|
|
1465
1648
|
}[];
|
|
1466
1649
|
}
|
|
1467
1650
|
/**
|
|
@@ -1939,7 +2122,16 @@ export interface DescribeNetworkInterfaceResponse {
|
|
|
1939
2122
|
/**
|
|
1940
2123
|
* 网卡的内网IP信息
|
|
1941
2124
|
*/
|
|
1942
|
-
PrivateIp
|
|
2125
|
+
PrivateIp?: {
|
|
2126
|
+
/**
|
|
2127
|
+
* ip类型 SecondaryIp/PrimaryIp
|
|
2128
|
+
*/
|
|
2129
|
+
IpType?: string;
|
|
2130
|
+
/**
|
|
2131
|
+
* ip 地址
|
|
2132
|
+
*/
|
|
2133
|
+
IpAddr?: string[];
|
|
2134
|
+
}[];
|
|
1943
2135
|
/**
|
|
1944
2136
|
* 虚拟网卡名称
|
|
1945
2137
|
*/
|
|
@@ -1983,7 +2175,16 @@ export interface DescribeNetworkInterfaceResponse {
|
|
|
1983
2175
|
/**
|
|
1984
2176
|
* 网卡的内网IP配额信息
|
|
1985
2177
|
*/
|
|
1986
|
-
|
|
2178
|
+
PrivateIpLimit?: {
|
|
2179
|
+
/**
|
|
2180
|
+
* 网卡拥有的内网IP数量
|
|
2181
|
+
*/
|
|
2182
|
+
PrivateIpCount?: number;
|
|
2183
|
+
/**
|
|
2184
|
+
* 网卡内网IP配额
|
|
2185
|
+
*/
|
|
2186
|
+
PrivateIpQuota?: number;
|
|
2187
|
+
};
|
|
1987
2188
|
}[];
|
|
1988
2189
|
/**
|
|
1989
2190
|
* 虚拟网卡总数
|
|
@@ -2014,6 +2215,14 @@ export interface DescribeRouteTableRequest {
|
|
|
2014
2215
|
* 业务组ID
|
|
2015
2216
|
*/
|
|
2016
2217
|
BusinessId?: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* 默认为 false, 返回详细路由规则信息
|
|
2220
|
+
*/
|
|
2221
|
+
Brief?: boolean;
|
|
2222
|
+
/**
|
|
2223
|
+
* 默认为 false, 表示路由表是短 ID
|
|
2224
|
+
*/
|
|
2225
|
+
LongId?: string;
|
|
2017
2226
|
}
|
|
2018
2227
|
/**
|
|
2019
2228
|
* DescribeRouteTable - 获取路由表详细信息(包括路由策略)
|
|
@@ -2035,6 +2244,10 @@ export interface DescribeRouteTableResponse {
|
|
|
2035
2244
|
* 绑定该路由表的子网数量
|
|
2036
2245
|
*/
|
|
2037
2246
|
SubnetCount?: number;
|
|
2247
|
+
/**
|
|
2248
|
+
* 绑定该路由表的子网
|
|
2249
|
+
*/
|
|
2250
|
+
SubnetIds?: string[];
|
|
2038
2251
|
/**
|
|
2039
2252
|
* 路由表所属的VPC资源ID
|
|
2040
2253
|
*/
|
|
@@ -2079,6 +2292,10 @@ export interface DescribeRouteTableResponse {
|
|
|
2079
2292
|
* 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。
|
|
2080
2293
|
*/
|
|
2081
2294
|
NexthopType?: string;
|
|
2295
|
+
/**
|
|
2296
|
+
* 实例类型,枚举值:UHOST,云主机;UNI,虚拟网卡;PHOST,物理云主机
|
|
2297
|
+
*/
|
|
2298
|
+
InstanceType?: string;
|
|
2082
2299
|
/**
|
|
2083
2300
|
* 保留字段,暂未使用
|
|
2084
2301
|
*/
|
|
@@ -39,6 +39,15 @@ class VPCClient extends client_1.default {
|
|
|
39
39
|
const args = Object.assign({ Action: 'AddWhiteListResource' }, (request || {}));
|
|
40
40
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP
|
|
44
|
+
*
|
|
45
|
+
* See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_batch_secondary_ip
|
|
46
|
+
*/
|
|
47
|
+
allocateBatchSecondaryIp(request) {
|
|
48
|
+
const args = Object.assign({ Action: 'AllocateBatchSecondaryIp' }, (request || {}));
|
|
49
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
50
|
+
}
|
|
42
51
|
/**
|
|
43
52
|
* AllocateSecondaryIp - 分配ip(用于uk8s使用)
|
|
44
53
|
*
|
|
@@ -120,6 +129,15 @@ class VPCClient extends client_1.default {
|
|
|
120
129
|
const args = Object.assign({ Action: 'CreateNetworkAclEntry' }, (request || {}));
|
|
121
130
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
122
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* CreateNetworkInterface - 创建虚拟网卡
|
|
134
|
+
*
|
|
135
|
+
* See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_interface
|
|
136
|
+
*/
|
|
137
|
+
createNetworkInterface(request) {
|
|
138
|
+
const args = Object.assign({ Action: 'CreateNetworkInterface' }, (request || {}));
|
|
139
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
140
|
+
}
|
|
123
141
|
/**
|
|
124
142
|
* CreateRouteTable - 创建路由表
|
|
125
143
|
*
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ucloud-sdks/ucloud-sdk-js",
|
|
3
3
|
"description": "ucloud-sdk-js",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"author": "oas@ucloud.cn",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./lib",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
"files": [
|
|
10
|
+
"package.json",
|
|
11
|
+
"README",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"lib"
|
|
14
|
+
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"start": "node lib/index.js",
|
|
17
17
|
"start:example": "node --no-warnings example/index.js",
|