Skip to content

Commit 6c5ba6a

Browse files
authored
update (#4)
1 parent 6d783cf commit 6c5ba6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+11593
-2602
lines changed

Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ gen:
4141
--only "UFile" \
4242
--only "USMS" \
4343
--only "UEC" \
44+
--only "UVMS" \
4445
--public \
45-
-s https://git.ucloudadmin.com/apispec/apispec.git \
46-
/Users/user/code/oas/plugins/template-opensdk-js .
46+
-s $(HOME)/.oas/vcs/git.ucloudadmin.com/apispec/apispec/specification \
47+
$(HOME)/.oas/vcs/git.ucloudadmin.com/apispec/template-opensdk-js .
48+

lib/core/middlewares.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ exports.logMiddleware = {
4343
},
4444
error: function (ctx) {
4545
var _a;
46-
console.log("debug", !ctx.config.logger);
46+
console.log('debug', !ctx.config.logger);
4747
if (!ctx.config.logger) {
4848
return;
4949
}

lib/services/cube/index.d.ts

+141-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ export default class CubeClient extends Client {
3939
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment
4040
*/
4141
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>;
4248
/**
4349
* GetCubeExtendInfo - 获取Cube的额外信息
4450
*
@@ -63,6 +69,18 @@ export default class CubeClient extends Client {
6369
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_price
6470
*/
6571
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>;
6684
/**
6785
* ListCubePod - 获取Pods列表
6886
*
@@ -81,6 +99,12 @@ export default class CubeClient extends Client {
8199
* See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag
82100
*/
83101
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>;
84108
/**
85109
* RenewCubePod - 更新Pod
86110
*
@@ -284,6 +308,40 @@ export interface GetCubeDeploymentResponse {
284308
*/
285309
Deployment: string;
286310
}
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+
}
287345
/**
288346
* GetCubeExtendInfo - 获取Cube的额外信息
289347
*/
@@ -497,12 +555,72 @@ export interface GetCubePriceResponse {
497555
*/
498556
OriginalPrice: number;
499557
}
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+
}
500618
/**
501619
* ListCubePod - 获取Pods列表
502620
*/
503621
export interface ListCubePodRequest {
504622
/**
505-
* 可用区。参见 [可用区列表](../summary/regionlist.html)
623+
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
506624
*/
507625
Zone?: string;
508626
/**
@@ -525,6 +643,10 @@ export interface ListCubePodRequest {
525643
* 默认20
526644
*/
527645
Limit?: number;
646+
/**
647+
* Deployment的Id
648+
*/
649+
DeploymentId?: string;
528650
}
529651
/**
530652
* ListCubePod - 获取Pods列表
@@ -587,6 +709,24 @@ export interface ModifyCubeTagResponse {
587709
*/
588710
CubeId: string;
589711
}
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+
}
590730
/**
591731
* RenewCubePod - 更新Pod
592732
*/

lib/services/cube/index.js

+36
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ class CubeClient extends client_1.default {
5757
const args = Object.assign({ Action: 'GetCubeDeployment' }, (request || {}));
5858
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
5959
}
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+
}
6069
/**
6170
* GetCubeExtendInfo - 获取Cube的额外信息
6271
*
@@ -93,6 +102,24 @@ class CubeClient extends client_1.default {
93102
const args = Object.assign({ Action: 'GetCubePrice' }, (request || {}));
94103
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
95104
}
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+
}
96123
/**
97124
* ListCubePod - 获取Pods列表
98125
*
@@ -120,6 +147,15 @@ class CubeClient extends client_1.default {
120147
const args = Object.assign({ Action: 'ModifyCubeTag' }, (request || {}));
121148
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
122149
}
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+
}
123159
/**
124160
* RenewCubePod - 更新Pod
125161
*

lib/services/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export declare class Client extends BaseClient {
2626
unet(): any;
2727
uphost(): any;
2828
usms(): any;
29+
uvms(): any;
2930
vpc(): any;
3031
}
3132
export {};

lib/services/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const UMemClient = require('./umem').default;
2222
const UNetClient = require('./unet').default;
2323
const UPHostClient = require('./uphost').default;
2424
const USMSClient = require('./usms').default;
25+
const UVMSClient = require('./uvms').default;
2526
const VPCClient = require('./vpc').default;
2627
class Client extends BaseClient {
2728
constructor({ config, credential, }) {
@@ -111,8 +112,14 @@ class Client extends BaseClient {
111112
usms() {
112113
return new USMSClient({ config: this.config, credential: this.credential });
113114
}
115+
uvms() {
116+
return new UVMSClient({ config: this.config, credential: this.credential });
117+
}
114118
vpc() {
115119
return new VPCClient({ config: this.config, credential: this.credential });
116120
}
117121
}
118122
exports.Client = Client;
123+
module.exports = {
124+
Client: Client,
125+
};

lib/services/ipsecvpn/index.d.ts

+13-5
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ export interface CreateVPNTunnelRequest {
196196
* vpcId
197197
*/
198198
VPCId: string;
199+
/**
200+
* ike版本,枚举值: "IKE V1","IKE V2",默认v1
201+
*/
202+
IKEVersion: string;
199203
/**
200204
* 指定VPN连接的本地子网的资源ID,最多可填写10个。
201205
*/
@@ -204,10 +208,6 @@ export interface CreateVPNTunnelRequest {
204208
* 指定VPN连接的客户网段,最多可填写20个。
205209
*/
206210
IPSecRemoteSubnets: string[];
207-
/**
208-
* ike版本,枚举值: "IKE V1","IKE V2",默认v1
209-
*/
210-
IKEVersion: string;
211211
/**
212212
* 业务组,默认为“Default”
213213
*/
@@ -253,7 +253,7 @@ export interface CreateVPNTunnelRequest {
253253
*/
254254
IPSecEncryptionAlgorithm?: string;
255255
/**
256-
* IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1”
256+
* IPSec隧道中使用的认证算法,枚举值,"md5", "sha1","sha2-256"。默认值为“sha1”
257257
*/
258258
IPSecAuthenticationAlgorithm?: string;
259259
/**
@@ -268,6 +268,10 @@ export interface CreateVPNTunnelRequest {
268268
* IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。
269269
*/
270270
IPSecPFSDhGroup?: string;
271+
/**
272+
* IPSec隧道关闭后的处理动作,枚举值:“none”,流量触发;“restart”,自动重联,默认为none
273+
*/
274+
IPSecCloseAction?: string;
271275
}
272276
/**
273277
* CreateVPNTunnel - 创建VPN隧道
@@ -794,6 +798,10 @@ export interface UpdateVPNTunnelAttributeRequest {
794798
* 枚举值:"IKE V1","IKE V2"
795799
*/
796800
IKEVersion?: string;
801+
/**
802+
* IPSec隧道关闭后的处理动作,默认与原本一致,若原本为空,必传。枚举值:“none”,不处理(推荐为none,流量会自动触发隧道重建);“restart”重建
803+
*/
804+
IPSecCloseAction?: string;
797805
}
798806
/**
799807
* UpdateVPNTunnelAttribute - 更新VPN隧道属性

0 commit comments

Comments
 (0)