@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
@@ -43,7 +43,7 @@ exports.logMiddleware = {
43
43
  },
44
44
  error: function (ctx) {
45
45
  var _a;
46
- console.log("debug", !ctx.config.logger);
46
+ console.log('debug', !ctx.config.logger);
47
47
  if (!ctx.config.logger) {
48
48
  return;
49
49
  }
@@ -39,6 +39,12 @@ export default class CubeClient extends Client {
39
39
  * See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment
40
40
  */
41
41
  getCubeDeployment(request?: GetCubeDeploymentRequest): Promise<GetCubeDeploymentResponse>;
42
+ /**
43
+ * GetCubeExecToken - 获取登录容器的token
44
+ *
45
+ * See also: https://docs.ucloud.cn/api/cube-api/get_cube_exec_token
46
+ */
47
+ getCubeExecToken(request?: GetCubeExecTokenRequest): Promise<GetCubeExecTokenResponse>;
42
48
  /**
43
49
  * GetCubeExtendInfo - 获取Cube的额外信息
44
50
  *
@@ -63,6 +69,18 @@ export default class CubeClient extends Client {
63
69
  * See also: https://docs.ucloud.cn/api/cube-api/get_cube_price
64
70
  */
65
71
  getCubePrice(request?: GetCubePriceRequest): Promise<GetCubePriceResponse>;
72
+ /**
73
+ * GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
74
+ *
75
+ * See also: https://docs.ucloud.cn/api/cube-api/get_cube_token
76
+ */
77
+ getCubeToken(request?: GetCubeTokenRequest): Promise<GetCubeTokenResponse>;
78
+ /**
79
+ * ListCubeDeployment - 获取Cube的Deployment列表
80
+ *
81
+ * See also: https://docs.ucloud.cn/api/cube-api/list_cube_deployment
82
+ */
83
+ listCubeDeployment(request?: ListCubeDeploymentRequest): Promise<ListCubeDeploymentResponse>;
66
84
  /**
67
85
  * ListCubePod - 获取Pods列表
68
86
  *
@@ -81,6 +99,12 @@ export default class CubeClient extends Client {
81
99
  * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag
82
100
  */
83
101
  modifyCubeTag(request?: ModifyCubeTagRequest): Promise<ModifyCubeTagResponse>;
102
+ /**
103
+ * RebootCubePod - 重启Cube Pod
104
+ *
105
+ * See also: https://docs.ucloud.cn/api/cube-api/reboot_cube_pod
106
+ */
107
+ rebootCubePod(request?: RebootCubePodRequest): Promise<RebootCubePodResponse>;
84
108
  /**
85
109
  * RenewCubePod - 更新Pod
86
110
  *
@@ -284,6 +308,40 @@ export interface GetCubeDeploymentResponse {
284
308
  */
285
309
  Deployment: string;
286
310
  }
311
+ /**
312
+ * GetCubeExecToken - 获取登录容器的token
313
+ */
314
+ export interface GetCubeExecTokenRequest {
315
+ /**
316
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
317
+ */
318
+ Zone?: string;
319
+ /**
320
+ * 容器名称
321
+ */
322
+ ContainerName: string;
323
+ /**
324
+ * CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
325
+ */
326
+ CubeId?: string;
327
+ /**
328
+ * CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
329
+ */
330
+ Uid?: string;
331
+ }
332
+ /**
333
+ * GetCubeExecToken - 获取登录容器的token
334
+ */
335
+ export interface GetCubeExecTokenResponse {
336
+ /**
337
+ * 有效时间5min
338
+ */
339
+ Token: string;
340
+ /**
341
+ * terminal的登录连接地址,限单点登录,有效时间5min
342
+ */
343
+ TerminalUrl?: string;
344
+ }
287
345
  /**
288
346
  * GetCubeExtendInfo - 获取Cube的额外信息
289
347
  */
@@ -497,12 +555,72 @@ export interface GetCubePriceResponse {
497
555
  */
498
556
  OriginalPrice: number;
499
557
  }
558
+ /**
559
+ * GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
560
+ */
561
+ export interface GetCubeTokenRequest {
562
+ /**
563
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
564
+ */
565
+ Zone?: string;
566
+ /**
567
+ * 容器名称
568
+ */
569
+ ContainerName: string;
570
+ /**
571
+ * CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
572
+ */
573
+ CubeId?: string;
574
+ /**
575
+ * CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
576
+ */
577
+ Uid?: string;
578
+ }
579
+ /**
580
+ * GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
581
+ */
582
+ export interface GetCubeTokenResponse {
583
+ /**
584
+ * 有效时间5min
585
+ */
586
+ Token: string;
587
+ }
588
+ /**
589
+ * ListCubeDeployment - 获取Cube的Deployment列表
590
+ */
591
+ export interface ListCubeDeploymentRequest {
592
+ /**
593
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
594
+ */
595
+ Zone?: string;
596
+ /**
597
+ * 默认0
598
+ */
599
+ Offset: number;
600
+ /**
601
+ * 默认20
602
+ */
603
+ Limit: number;
604
+ }
605
+ /**
606
+ * ListCubeDeployment - 获取Cube的Deployment列表
607
+ */
608
+ export interface ListCubeDeploymentResponse {
609
+ /**
610
+ *
611
+ */
612
+ TotalCount: number;
613
+ /**
614
+ * DeploymentInfo
615
+ */
616
+ Deployments: string[];
617
+ }
500
618
  /**
501
619
  * ListCubePod - 获取Pods列表
502
620
  */
503
621
  export interface ListCubePodRequest {
504
622
  /**
505
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
623
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
506
624
  */
507
625
  Zone?: string;
508
626
  /**
@@ -525,6 +643,10 @@ export interface ListCubePodRequest {
525
643
  * 默认20
526
644
  */
527
645
  Limit?: number;
646
+ /**
647
+ * Deployment的Id
648
+ */
649
+ DeploymentId?: string;
528
650
  }
529
651
  /**
530
652
  * ListCubePod - 获取Pods列表
@@ -587,6 +709,24 @@ export interface ModifyCubeTagResponse {
587
709
  */
588
710
  CubeId: string;
589
711
  }
712
+ /**
713
+ * RebootCubePod - 重启Cube Pod
714
+ */
715
+ export interface RebootCubePodRequest {
716
+ /**
717
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
718
+ */
719
+ Zone?: string;
720
+ /**
721
+ * cube资源id(cube-xxxxxx)
722
+ */
723
+ CubeId: string;
724
+ }
725
+ /**
726
+ * RebootCubePod - 重启Cube Pod
727
+ */
728
+ export interface RebootCubePodResponse {
729
+ }
590
730
  /**
591
731
  * RenewCubePod - 更新Pod
592
732
  */
@@ -57,6 +57,15 @@ class CubeClient extends client_1.default {
57
57
  const args = Object.assign({ Action: 'GetCubeDeployment' }, (request || {}));
58
58
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
59
59
  }
60
+ /**
61
+ * GetCubeExecToken - 获取登录容器的token
62
+ *
63
+ * See also: https://docs.ucloud.cn/api/cube-api/get_cube_exec_token
64
+ */
65
+ getCubeExecToken(request) {
66
+ const args = Object.assign({ Action: 'GetCubeExecToken' }, (request || {}));
67
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
68
+ }
60
69
  /**
61
70
  * GetCubeExtendInfo - 获取Cube的额外信息
62
71
  *
@@ -93,6 +102,24 @@ class CubeClient extends client_1.default {
93
102
  const args = Object.assign({ Action: 'GetCubePrice' }, (request || {}));
94
103
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
95
104
  }
105
+ /**
106
+ * GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
107
+ *
108
+ * See also: https://docs.ucloud.cn/api/cube-api/get_cube_token
109
+ */
110
+ getCubeToken(request) {
111
+ const args = Object.assign({ Action: 'GetCubeToken' }, (request || {}));
112
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
113
+ }
114
+ /**
115
+ * ListCubeDeployment - 获取Cube的Deployment列表
116
+ *
117
+ * See also: https://docs.ucloud.cn/api/cube-api/list_cube_deployment
118
+ */
119
+ listCubeDeployment(request) {
120
+ const args = Object.assign({ Action: 'ListCubeDeployment' }, (request || {}));
121
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
122
+ }
96
123
  /**
97
124
  * ListCubePod - 获取Pods列表
98
125
  *
@@ -120,6 +147,15 @@ class CubeClient extends client_1.default {
120
147
  const args = Object.assign({ Action: 'ModifyCubeTag' }, (request || {}));
121
148
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
122
149
  }
150
+ /**
151
+ * RebootCubePod - 重启Cube Pod
152
+ *
153
+ * See also: https://docs.ucloud.cn/api/cube-api/reboot_cube_pod
154
+ */
155
+ rebootCubePod(request) {
156
+ const args = Object.assign({ Action: 'RebootCubePod' }, (request || {}));
157
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
158
+ }
123
159
  /**
124
160
  * RenewCubePod - 更新Pod
125
161
  *
@@ -24,8 +24,10 @@ export declare class Client extends BaseClient {
24
24
  ulb(): any;
25
25
  umem(): any;
26
26
  unet(): any;
27
+ uphone(): any;
27
28
  uphost(): any;
28
29
  usms(): any;
30
+ uvms(): any;
29
31
  vpc(): any;
30
32
  }
31
33
  export {};
@@ -20,8 +20,10 @@ const UK8SClient = require('./uk8s').default;
20
20
  const ULBClient = require('./ulb').default;
21
21
  const UMemClient = require('./umem').default;
22
22
  const UNetClient = require('./unet').default;
23
+ const UPhoneClient = require('./uphone').default;
23
24
  const UPHostClient = require('./uphost').default;
24
25
  const USMSClient = require('./usms').default;
26
+ const UVMSClient = require('./uvms').default;
25
27
  const VPCClient = require('./vpc').default;
26
28
  class Client extends BaseClient {
27
29
  constructor({ config, credential, }) {
@@ -102,6 +104,12 @@ class Client extends BaseClient {
102
104
  unet() {
103
105
  return new UNetClient({ config: this.config, credential: this.credential });
104
106
  }
107
+ uphone() {
108
+ return new UPhoneClient({
109
+ config: this.config,
110
+ credential: this.credential,
111
+ });
112
+ }
105
113
  uphost() {
106
114
  return new UPHostClient({
107
115
  config: this.config,
@@ -111,8 +119,14 @@ class Client extends BaseClient {
111
119
  usms() {
112
120
  return new USMSClient({ config: this.config, credential: this.credential });
113
121
  }
122
+ uvms() {
123
+ return new UVMSClient({ config: this.config, credential: this.credential });
124
+ }
114
125
  vpc() {
115
126
  return new VPCClient({ config: this.config, credential: this.credential });
116
127
  }
117
128
  }
118
129
  exports.Client = Client;
130
+ module.exports = {
131
+ Client: Client,
132
+ };
@@ -196,6 +196,10 @@ export interface CreateVPNTunnelRequest {
196
196
  * vpcId
197
197
  */
198
198
  VPCId: string;
199
+ /**
200
+ * ike版本,枚举值: "IKE V1","IKE V2",默认v1
201
+ */
202
+ IKEVersion: string;
199
203
  /**
200
204
  * 指定VPN连接的本地子网的资源ID,最多可填写10个。
201
205
  */
@@ -204,10 +208,6 @@ export interface CreateVPNTunnelRequest {
204
208
  * 指定VPN连接的客户网段,最多可填写20个。
205
209
  */
206
210
  IPSecRemoteSubnets: string[];
207
- /**
208
- * ike版本,枚举值: "IKE V1","IKE V2",默认v1
209
- */
210
- IKEVersion: string;
211
211
  /**
212
212
  * 业务组,默认为“Default”
213
213
  */
@@ -253,7 +253,7 @@ export interface CreateVPNTunnelRequest {
253
253
  */
254
254
  IPSecEncryptionAlgorithm?: string;
255
255
  /**
256
- * IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1”
256
+ * IPSec隧道中使用的认证算法,枚举值,"md5", "sha1","sha2-256"。默认值为“sha1”
257
257
  */
258
258
  IPSecAuthenticationAlgorithm?: string;
259
259
  /**
@@ -268,6 +268,10 @@ export interface CreateVPNTunnelRequest {
268
268
  * IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。
269
269
  */
270
270
  IPSecPFSDhGroup?: string;
271
+ /**
272
+ * IPSec隧道关闭后的处理动作,枚举值:“none”,流量触发;“restart”,自动重联,默认为none
273
+ */
274
+ IPSecCloseAction?: string;
271
275
  }
272
276
  /**
273
277
  * CreateVPNTunnel - 创建VPN隧道
@@ -794,6 +798,10 @@ export interface UpdateVPNTunnelAttributeRequest {
794
798
  * 枚举值:"IKE V1","IKE V2"
795
799
  */
796
800
  IKEVersion?: string;
801
+ /**
802
+ * IPSec隧道关闭后的处理动作,默认与原本一致,若原本为空,必传。枚举值:“none”,不处理(推荐为none,流量会自动触发隧道重建);“restart”重建
803
+ */
804
+ IPSecCloseAction?: string;
797
805
  }
798
806
  /**
799
807
  * UpdateVPNTunnelAttribute - 更新VPN隧道属性