@cloudbase/manager-node 4.11.0-alpha.2 → 4.11.0-alpha.4

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.
@@ -0,0 +1,261 @@
1
+ import { Environment } from '../environment';
2
+ import { IResponseInfo } from '../interfaces';
3
+ import { ICreateMySQLOptions, ICreateMySQLResult, IDescribeCreateMySQLResult, IMySQLClusterDetail, IDestroyMySQLResult, IMySQLTaskStatus, IRunSqlOptions, IRunSqlResult, ICreateAccountsOptions, IDeleteAccountsOptions, IDescribeAccountsOptions, IDescribeAccountsResult, IModifyAccountDescriptionOptions, IModifyAccountHostOptions, IModifyAccountParamsOptions, IModifyAccountPrivilegesOptions, IDescribeAccountPrivilegesOptions, IDescribeAccountPrivilegesResult, IDescribeAccountAllGrantPrivilegesResult, IResetAccountPasswordOptions, IInputAccount, IWanOptions, IWanResult, ICreateBackupOptions, ICreateBackupResult, IDeleteBackupOptions, IModifyBackupConfigOptions, IDescribeBackupListOptions, IDescribeBackupListResult, IDescribeBackupDownloadUrlOptions, IDescribeBackupDownloadUrlResult, IRollBackClusterOptions, IRollBackClusterResult, IDescribeTasksOptions, IDescribeTasksResult, IDescribeClusterDatabasesOptions, IDescribeClusterDatabasesResult, IDescribeClusterDatabaseTablesOptions, IDescribeClusterDatabaseTablesResult, IDescribeClusterInstanceGroupsResult, IDescribeInstancesOptions, IDescribeInstancesResult, IRestartInstanceOptions, IRestartInstanceResult, IDescribeInstanceDetailOptions, IDescribeInstanceDetailResult, IUpgradeInstanceOptions, IUpgradeInstanceResult, IDescribeInstanceSlowQueriesOptions, IDescribeInstanceSlowQueriesResult, IDescribeInstanceErrorLogsOptions, IDescribeInstanceErrorLogsResult } from './types/index';
4
+ export * from './types/index';
5
+ export declare class MysqlService {
6
+ static tcbServiceVersion: {
7
+ service: string;
8
+ version: string;
9
+ };
10
+ static cynosdbServiceVersion: {
11
+ service: string;
12
+ version: string;
13
+ };
14
+ private environment;
15
+ private envId;
16
+ private cynosdbService;
17
+ private tcbService;
18
+ private _clusterId;
19
+ private _instanceGroupId;
20
+ constructor(environment: Environment);
21
+ /**
22
+ * 获取集群 ID(如未手动设置,则自动通过 describeClusterDetail 获取并缓存)
23
+ */
24
+ get clusterId(): string;
25
+ /**
26
+ * 手动设置集群 ID(适用于已知 clusterId 的场景,避免额外 API 调用)
27
+ */
28
+ set clusterId(id: string);
29
+ /**
30
+ * 开通 MySQL
31
+ * 开通后可通过 describeCreateResult 查询开通结果
32
+ * @param options 开通参数
33
+ * @returns 返回包含 TaskId 的结果
34
+ */
35
+ createMySQL(options: ICreateMySQLOptions): Promise<{
36
+ Data: ICreateMySQLResult;
37
+ } & IResponseInfo>;
38
+ /**
39
+ * 开通 MySQL 结果查询
40
+ * @param taskId OpenMySQL 返回的任务 ID(可选)
41
+ * @returns 开通结果状态
42
+ */
43
+ describeCreateResult(taskId?: string): Promise<{
44
+ Data: IDescribeCreateMySQLResult;
45
+ } & IResponseInfo>;
46
+ /**
47
+ * 查询 MySQL 集群信息
48
+ * @returns MySQL 集群详情
49
+ */
50
+ describeClusterDetail(): Promise<{
51
+ Data: IMySQLClusterDetail;
52
+ } & IResponseInfo>;
53
+ /**
54
+ * 销毁 MySQL
55
+ * 销毁后可通过 describeTaskStatus 查询销毁结果
56
+ * @returns 销毁结果(包含 TaskId、TaskName)
57
+ */
58
+ destroyMySQL(): Promise<{
59
+ Data: IDestroyMySQLResult;
60
+ } & IResponseInfo>;
61
+ /**
62
+ * 查询 MySQL 任务状态(销毁等异步任务的结果查询)
63
+ * @param options 查询参数
64
+ * @param options.taskId 任务 ID
65
+ * @param options.taskName 任务名称
66
+ * @returns 任务状态
67
+ */
68
+ describeTaskStatus(options?: {
69
+ taskId?: string;
70
+ taskName?: string;
71
+ }): Promise<{
72
+ Data: IMySQLTaskStatus;
73
+ } & IResponseInfo>;
74
+ /**
75
+ * 执行 SQL 语句
76
+ * @param options SQL 执行参数
77
+ * @returns 查询结果(Items、Infos、RowsAffected)
78
+ */
79
+ runSql(options: IRunSqlOptions): Promise<IRunSqlResult>;
80
+ /**
81
+ * 查询集群实例组信息
82
+ * 通过 CynosDB 原生接口获取真实的 InstanceGroupId 等信息
83
+ * @returns 实例组列表
84
+ */
85
+ describeClusterInstanceGroups(): Promise<IDescribeClusterInstanceGroupsResult & IResponseInfo>;
86
+ /**
87
+ * 关闭外网访问
88
+ * @param options 实例 ID 或实例组 ID(二选一);均不传时自动获取实例组 ID
89
+ * @returns 任务流 ID
90
+ */
91
+ closeWan(options?: IWanOptions): Promise<IWanResult & IResponseInfo>;
92
+ /**
93
+ * 开启外网访问
94
+ * @param options 实例 ID 或实例组 ID(二选一);均不传时自动获取实例组 ID
95
+ * @returns 任务流 ID
96
+ */
97
+ openWan(options?: IWanOptions): Promise<IWanResult & IResponseInfo>;
98
+ /**
99
+ * 查询任务列表
100
+ * @param options 查询参数
101
+ * @returns 任务列表
102
+ */
103
+ describeTasks(options?: IDescribeTasksOptions): Promise<IDescribeTasksResult & IResponseInfo>;
104
+ /**
105
+ * 查询实例列表
106
+ * @param options 查询参数(分页、排序、过滤条件等)
107
+ * @returns 实例列表和总数
108
+ */
109
+ describeInstances(options?: IDescribeInstancesOptions): Promise<IDescribeInstancesResult & IResponseInfo>;
110
+ /**
111
+ * 查询实例详情
112
+ * @param options 包含实例 ID
113
+ * @returns 实例详细信息
114
+ */
115
+ describeInstanceDetail(options: IDescribeInstanceDetailOptions): Promise<IDescribeInstanceDetailResult & IResponseInfo>;
116
+ /**
117
+ * 重启实例
118
+ * @param options 包含实例 ID
119
+ * @returns 异步任务 FlowId
120
+ */
121
+ restartInstance(options: IRestartInstanceOptions): Promise<IRestartInstanceResult & IResponseInfo>;
122
+ /**
123
+ * 实例变配(升级/降级实例规格)
124
+ * @param options 变配参数(实例 ID、CPU、内存、升级类型等)
125
+ * @returns 订单号和冻结流水 ID
126
+ */
127
+ upgradeInstance(options: IUpgradeInstanceOptions): Promise<IUpgradeInstanceResult & IResponseInfo>;
128
+ /**
129
+ * 查询实例慢查询日志
130
+ * @param options 查询参数(实例 ID、时间范围、分页、排序等)
131
+ * @returns 慢查询日志列表和总数
132
+ */
133
+ describeInstanceSlowQueries(options: IDescribeInstanceSlowQueriesOptions): Promise<IDescribeInstanceSlowQueriesResult & IResponseInfo>;
134
+ /**
135
+ * 查询实例错误日志
136
+ * @param options 查询参数(实例 ID、时间范围、分页、排序、日志等级等)
137
+ * @returns 错误日志列表和总数
138
+ */
139
+ describeInstanceErrorLogs(options: IDescribeInstanceErrorLogsOptions): Promise<IDescribeInstanceErrorLogsResult & IResponseInfo>;
140
+ /**
141
+ * 查询集群数据库列表
142
+ * @param options 分页参数
143
+ * @returns 数据库名称列表
144
+ */
145
+ describeClusterDatabases(options?: IDescribeClusterDatabasesOptions): Promise<IDescribeClusterDatabasesResult & IResponseInfo>;
146
+ /**
147
+ * 查询集群数据库表列表
148
+ * @param options 查询参数(包含数据库名)
149
+ * @returns 数据库表列表
150
+ */
151
+ describeClusterDatabaseTables(options: IDescribeClusterDatabaseTablesOptions): Promise<IDescribeClusterDatabaseTablesResult & IResponseInfo>;
152
+ /**
153
+ * 创建用户账号
154
+ * @param options 账号信息
155
+ * @returns RequestId
156
+ */
157
+ createAccounts(options: ICreateAccountsOptions): Promise<IResponseInfo>;
158
+ /**
159
+ * 删除用户账号
160
+ * @param options 要删除的账号列表
161
+ * @returns RequestId
162
+ */
163
+ deleteAccounts(options: IDeleteAccountsOptions): Promise<IResponseInfo>;
164
+ /**
165
+ * 查询账号所有可授予权限
166
+ * @param account 账号信息
167
+ * @returns 全局权限、数据库权限、表权限等
168
+ */
169
+ describeAccountAllGrantPrivileges(account: IInputAccount): Promise<IDescribeAccountAllGrantPrivilegesResult & IResponseInfo>;
170
+ /**
171
+ * 查询数据库账号列表
172
+ * @param options 查询参数
173
+ * @returns 账号列表和总数
174
+ */
175
+ describeAccounts(options?: IDescribeAccountsOptions): Promise<IDescribeAccountsResult & IResponseInfo>;
176
+ /**
177
+ * 查询账号已有权限
178
+ * @param options 查询参数
179
+ * @returns 权限列表
180
+ */
181
+ describeAccountPrivileges(options: IDescribeAccountPrivilegesOptions): Promise<IDescribeAccountPrivilegesResult & IResponseInfo>;
182
+ /**
183
+ * 修改数据库账号描述信息
184
+ * @param options 修改参数
185
+ * @returns RequestId
186
+ */
187
+ modifyAccountDescription(options: IModifyAccountDescriptionOptions): Promise<IResponseInfo>;
188
+ /**
189
+ * 修改账号主机
190
+ * @param options 修改参数
191
+ * @returns RequestId
192
+ */
193
+ modifyAccountHost(options: IModifyAccountHostOptions): Promise<IResponseInfo>;
194
+ /**
195
+ * 修改账号配置
196
+ * @param options 修改参数
197
+ * @returns RequestId
198
+ */
199
+ modifyAccountParams(options: IModifyAccountParamsOptions): Promise<IResponseInfo>;
200
+ /**
201
+ * 修改账号库表权限
202
+ * @param options 修改参数
203
+ * @returns RequestId
204
+ */
205
+ modifyAccountPrivileges(options: IModifyAccountPrivilegesOptions): Promise<IResponseInfo>;
206
+ /**
207
+ * 重置数据库账号密码
208
+ * @param options 重置参数
209
+ * @returns RequestId
210
+ */
211
+ resetAccountPassword(options: IResetAccountPasswordOptions): Promise<IResponseInfo>;
212
+ /**
213
+ * 创建手动备份
214
+ * @param options 备份参数
215
+ * @returns 异步任务流 ID
216
+ */
217
+ createBackup(options?: ICreateBackupOptions): Promise<ICreateBackupResult & IResponseInfo>;
218
+ /**
219
+ * 删除手动备份(无法删除自动备份)
220
+ * @param options 要删除的备份 ID
221
+ * @returns RequestId
222
+ */
223
+ deleteBackup(options: IDeleteBackupOptions): Promise<IResponseInfo>;
224
+ /**
225
+ * 修改备份配置
226
+ * @param options 备份配置参数
227
+ * @returns RequestId
228
+ */
229
+ modifyBackupConfig(options: IModifyBackupConfigOptions): Promise<IResponseInfo>;
230
+ /**
231
+ * 查询备份文件列表
232
+ * @param options 查询参数
233
+ * @returns 备份文件列表
234
+ */
235
+ describeBackupList(options?: IDescribeBackupListOptions): Promise<IDescribeBackupListResult & IResponseInfo>;
236
+ /**
237
+ * 查询备份下载地址
238
+ * @param options 备份 ID
239
+ * @returns 备份下载地址
240
+ */
241
+ describeBackupDownloadUrl(options: IDescribeBackupDownloadUrlOptions): Promise<IDescribeBackupDownloadUrlResult & IResponseInfo>;
242
+ /**
243
+ * 集群回档
244
+ * @param options 回档参数
245
+ * @returns 任务流 ID
246
+ */
247
+ rollBackCluster(options: IRollBackClusterOptions): Promise<IRollBackClusterResult & IResponseInfo>;
248
+ /**
249
+ * 确保 clusterId 已获取(内部使用,自动从集群信息中获取并缓存)
250
+ */
251
+ private ensureClusterId;
252
+ /**
253
+ * 确保 instanceGroupId 已获取(内部使用,通过 CynosDB 原生接口获取真实值并缓存)
254
+ */
255
+ private ensureInstanceGroupId;
256
+ /**
257
+ * 解析 Wan 操作的请求参数
258
+ * 若用户未显式传入 InstanceId / InstanceGroupId,则自动获取实例组 ID
259
+ */
260
+ private resolveWanParams;
261
+ }
@@ -0,0 +1,160 @@
1
+ /** 账号输入信息(用于删除、查询权限等操作) */
2
+ export interface IInputAccount {
3
+ /** 账号名称 */
4
+ AccountName: string;
5
+ /** 主机,默认 '%' */
6
+ Host?: string;
7
+ }
8
+ /** 新建账号信息 */
9
+ export interface INewAccount {
10
+ /** 账号名称 */
11
+ AccountName: string;
12
+ /** 账号密码(8-64个字符,包含大小写英文字母、数字和符号) */
13
+ AccountPassword: string;
14
+ /** 允许访问的主机,可以是 IP 或 '%' */
15
+ Host: string;
16
+ /** 账号描述 */
17
+ Description?: string;
18
+ /** 用户最大连接数限制 */
19
+ MaxUserConnections?: number;
20
+ }
21
+ /** 创建账号请求参数 */
22
+ export interface ICreateAccountsOptions {
23
+ /** 新账户列表 */
24
+ Accounts: INewAccount[];
25
+ }
26
+ /** 删除账号请求参数 */
27
+ export interface IDeleteAccountsOptions {
28
+ /** 账号数组 */
29
+ Accounts?: IInputAccount[];
30
+ }
31
+ /** 查询账号列表请求参数 */
32
+ export interface IDescribeAccountsOptions {
33
+ /** 需要过滤的账户列表 */
34
+ AccountNames?: string[];
35
+ /** 需要过滤的主机列表 */
36
+ Hosts?: string[];
37
+ /** 限制量 */
38
+ Limit?: number;
39
+ /** 偏移量 */
40
+ Offset?: number;
41
+ /** 模糊匹配关键字(同时匹配 AccountName 和 Host,支持正则) */
42
+ AccountRegular?: string;
43
+ }
44
+ /** 账号信息 */
45
+ export interface IAccountInfo {
46
+ /** 账号名称 */
47
+ AccountName: string;
48
+ /** 账号描述 */
49
+ Description: string;
50
+ /** 创建时间 */
51
+ CreateTime: string;
52
+ /** 更新时间 */
53
+ UpdateTime: string;
54
+ /** 主机 */
55
+ Host: string;
56
+ /** 最大用户连接数 */
57
+ MaxUserConnections: number;
58
+ }
59
+ /** 查询账号列表返回结果 */
60
+ export interface IDescribeAccountsResult {
61
+ /** 账号列表 */
62
+ AccountSet: IAccountInfo[];
63
+ /** 账号总数 */
64
+ TotalCount: number;
65
+ }
66
+ /** 修改账号描述请求参数 */
67
+ export interface IModifyAccountDescriptionOptions {
68
+ /** 账号名称 */
69
+ AccountName: string;
70
+ /** 新的描述信息 */
71
+ Description: string;
72
+ /** 主机,默认 '%' */
73
+ Host?: string;
74
+ }
75
+ /** 修改账号主机请求参数 */
76
+ export interface IModifyAccountHostOptions {
77
+ /** 账号信息 */
78
+ Account: IInputAccount;
79
+ /** 新主机 */
80
+ NewHost: string;
81
+ }
82
+ /** 账号参数项 */
83
+ export interface IAccountParamItem {
84
+ /** 参数名称 */
85
+ ParamName: string;
86
+ /** 参数值 */
87
+ ParamValue: string;
88
+ }
89
+ /** 修改账号配置请求参数 */
90
+ export interface IModifyAccountParamsOptions {
91
+ /** 账号信息 */
92
+ Account: IInputAccount;
93
+ /** 账号参数列表 */
94
+ AccountParams: IAccountParamItem[];
95
+ }
96
+ /** 数据库权限 */
97
+ export interface IDatabasePrivilege {
98
+ /** 数据库名 */
99
+ Db: string;
100
+ /** 权限列表 */
101
+ Privileges: string[];
102
+ }
103
+ /** 表权限 */
104
+ export interface ITablePrivilege {
105
+ /** 数据库名 */
106
+ Db: string;
107
+ /** 表名 */
108
+ TableName: string;
109
+ /** 权限列表 */
110
+ Privileges: string[];
111
+ }
112
+ /** 修改账号权限请求参数 */
113
+ export interface IModifyAccountPrivilegesOptions {
114
+ /** 账号信息 */
115
+ Account: IInputAccount;
116
+ /** 全局权限 */
117
+ GlobalPrivileges?: string[];
118
+ /** 数据库权限 */
119
+ DatabasePrivileges?: IDatabasePrivilege[];
120
+ /** 表权限 */
121
+ TablePrivileges?: ITablePrivilege[];
122
+ }
123
+ /** 查询账号已有权限请求参数 */
124
+ export interface IDescribeAccountPrivilegesOptions {
125
+ /** 账号名 */
126
+ AccountName: string;
127
+ /** 主机 */
128
+ Host: string;
129
+ /** 数据库名,为 '*' 时忽略 Type/TableName,表示修改用户全局权限 */
130
+ Db: string;
131
+ /** 指定数据库下的对象类型,可选 'table' 或 '*' */
132
+ Type: string;
133
+ /** 当 Type='table' 时,用来指定表名 */
134
+ TableName?: string;
135
+ }
136
+ /** 查询账号已有权限返回结果 */
137
+ export interface IDescribeAccountPrivilegesResult {
138
+ /** 权限列表 */
139
+ Privileges: string[];
140
+ }
141
+ /** 查询账号所有可授予权限返回结果 */
142
+ export interface IDescribeAccountAllGrantPrivilegesResult {
143
+ /** 权限语句 */
144
+ PrivilegeStatements: string[];
145
+ /** 全局权限 */
146
+ GlobalPrivileges: string[];
147
+ /** 数据库权限 */
148
+ DatabasePrivileges: IDatabasePrivilege[];
149
+ /** 表权限 */
150
+ TablePrivileges: ITablePrivilege[];
151
+ }
152
+ /** 重置账号密码请求参数 */
153
+ export interface IResetAccountPasswordOptions {
154
+ /** 账号名称 */
155
+ AccountName: string;
156
+ /** 新密码 */
157
+ AccountPassword: string;
158
+ /** 主机,默认 '%' */
159
+ Host?: string;
160
+ }
@@ -0,0 +1,161 @@
1
+ /** 数据库表信息(用于备份) */
2
+ export interface IDatabaseTables {
3
+ /** 数据库名 */
4
+ Database?: string;
5
+ /** 表名称列表 */
6
+ Tables?: string[];
7
+ }
8
+ /** 创建备份请求参数 */
9
+ export interface ICreateBackupOptions {
10
+ /** 备份类型:logic(逻辑备份)、snapshot(物理备份) */
11
+ BackupType?: string;
12
+ /** 备份的库,只在 BackupType 为 logic 时有效 */
13
+ BackupDatabases?: string[];
14
+ /** 备份的表,只在 BackupType 为 logic 时有效 */
15
+ BackupTables?: IDatabaseTables[];
16
+ /** 备注名 */
17
+ BackupName?: string;
18
+ }
19
+ /** 创建备份返回结果 */
20
+ export interface ICreateBackupResult {
21
+ /** 异步任务流 ID */
22
+ FlowId: number;
23
+ }
24
+ /** 删除备份请求参数 */
25
+ export interface IDeleteBackupOptions {
26
+ /** 备份文件 ID(推荐使用) */
27
+ BackupIds?: number[];
28
+ /** 备份文件 ID(旧版本,不推荐) */
29
+ SnapshotIdList?: number[];
30
+ }
31
+ /** 修改备份配置请求参数 */
32
+ export interface IModifyBackupConfigOptions {
33
+ /** 全备开始时间,范围 [0-24*3600],如 0:00=0, 1:00=3600, 2:00=7200 */
34
+ BackupTimeBeg?: number;
35
+ /** 全备结束时间,范围 [0-24*3600] */
36
+ BackupTimeEnd?: number;
37
+ /** 保留备份时长(秒),超过该时间将被清理,如七天=604800 */
38
+ ReserveDuration?: number;
39
+ /** 备份频率,长度为7的数组,对应周一到周日,full-全量,increment-增量 */
40
+ BackupFreq?: string[];
41
+ /** 备份类型 */
42
+ BackupType?: string;
43
+ }
44
+ /** 查询备份列表请求参数 */
45
+ export interface IDescribeBackupListOptions {
46
+ /** 返回数量,取值范围 (0,100] */
47
+ Limit?: number;
48
+ /** 记录偏移量 */
49
+ Offset?: number;
50
+ /** 数据库类型,取值 MYSQL */
51
+ DbType?: string;
52
+ /** 备份 ID 列表 */
53
+ BackupIds?: number[];
54
+ /** 备份类型:snapshot(快照备份)、logic(逻辑备份) */
55
+ BackupType?: string;
56
+ /** 备份方式:auto(自动备份)、manual(手动备份) */
57
+ BackupMethod?: string;
58
+ /** 快照类型:full(全量)、increment(增量) */
59
+ SnapShotType?: string;
60
+ /** 备份开始时间 */
61
+ StartTime?: string;
62
+ /** 备份结束时间 */
63
+ EndTime?: string;
64
+ /** 备份文件名,支持模糊查询 */
65
+ FileNames?: string[];
66
+ /** 备份备注名,支持模糊查询 */
67
+ BackupNames?: string[];
68
+ /** 快照备份 ID 列表 */
69
+ SnapshotIdList?: number[];
70
+ /** 备份地域 */
71
+ BackupRegion?: string;
72
+ /** 是否跨地域备份 */
73
+ IsCrossRegionsBackup?: string;
74
+ }
75
+ /** 备份文件信息 */
76
+ export interface IBackupFileInfo {
77
+ /** 快照文件ID(已废弃,请使用 BackupId) */
78
+ SnapshotId: number;
79
+ /** 备份文件名 */
80
+ FileName: string;
81
+ /** 备份文件大小 */
82
+ FileSize: number;
83
+ /** 备份开始时间 */
84
+ StartTime: string;
85
+ /** 备份完成时间 */
86
+ FinishTime: string;
87
+ /** 备份类型:snapshot / logic */
88
+ BackupType: string;
89
+ /** 备份方式:auto / manual */
90
+ BackupMethod: string;
91
+ /** 备份文件状态:success / fail / creating / deleting */
92
+ BackupStatus: string;
93
+ /** 备份文件时间 */
94
+ SnapshotTime: string;
95
+ /** 备份ID */
96
+ BackupId: number;
97
+ /** 快照类型:full / increment */
98
+ SnapShotType: string;
99
+ /** 备份文件备注 */
100
+ BackupName: string;
101
+ }
102
+ /** 查询备份列表返回结果 */
103
+ export interface IDescribeBackupListResult {
104
+ /** 总共备份文件个数 */
105
+ TotalCount: number;
106
+ /** 备份文件列表 */
107
+ BackupList: IBackupFileInfo[];
108
+ }
109
+ /** 查询备份下载地址请求参数 */
110
+ export interface IDescribeBackupDownloadUrlOptions {
111
+ /** 备份 ID */
112
+ BackupId: number;
113
+ }
114
+ /** 查询备份下载地址返回结果 */
115
+ export interface IDescribeBackupDownloadUrlResult {
116
+ /** 备份下载地址 */
117
+ DownloadUrl: string;
118
+ }
119
+ /** 回档数据库信息 */
120
+ export interface IRollbackDatabase {
121
+ /** 旧数据库名称 */
122
+ OldDatabase: string;
123
+ /** 新数据库名称 */
124
+ NewDatabase: string;
125
+ }
126
+ /** 回档表信息 */
127
+ export interface IRollbackTableInfo {
128
+ /** 旧表名称 */
129
+ OldTable: string;
130
+ /** 新表名称 */
131
+ NewTable: string;
132
+ }
133
+ /** 回档数据库及表 */
134
+ export interface IRollbackTable {
135
+ /** 数据库名称 */
136
+ Database: string;
137
+ /** 数据库表 */
138
+ Tables: IRollbackTableInfo[];
139
+ }
140
+ /** 集群回档请求参数 */
141
+ export interface IRollBackClusterOptions {
142
+ /** 回档策略:timeRollback(按时间点)、snapRollback(按备份文件) */
143
+ RollbackStrategy: string;
144
+ /** 备份文件ID,snapRollback 时必填 */
145
+ RollbackId?: number;
146
+ /** 期望回档时间,timeRollback 时必填 */
147
+ ExpectTime?: string;
148
+ /** 期望阈值(已废弃) */
149
+ ExpectTimeThresh?: number;
150
+ /** 回档数据库列表 */
151
+ RollbackDatabases?: IRollbackDatabase[];
152
+ /** 回档数据库表列表 */
153
+ RollbackTables?: IRollbackTable[];
154
+ /** 按时间点回档模式:full(普通,默认)、db(快速)、table(极速) */
155
+ RollbackMode?: string;
156
+ }
157
+ /** 回档返回结果 */
158
+ export interface IRollBackClusterResult {
159
+ /** 任务流 ID */
160
+ FlowId: number;
161
+ }