mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Link Database Earliest and Latest Point in time with DryRun (#17506)
This commit is contained in:
committed by
GitHub
parent
b48f392ab2
commit
08d3803453
@@ -140,6 +140,7 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
||||
managedInstance?: string,
|
||||
time?: string,
|
||||
noWait?: boolean,
|
||||
dryRun?: boolean
|
||||
},
|
||||
namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||
await localAzDiscovered;
|
||||
|
||||
@@ -185,16 +185,18 @@ export class AzTool implements azExt.IAzApi {
|
||||
managedInstance?: string,
|
||||
time?: string,
|
||||
noWait?: boolean,
|
||||
dryRun?: boolean
|
||||
},
|
||||
namespace: string,
|
||||
additionalEnvVars?: azExt.AdditionalEnvVars
|
||||
): Promise<azExt.AzOutput<void>> => {
|
||||
): Promise<azExt.AzOutput<azExt.SqlMiDbRestoreResult>> => {
|
||||
const argsArray = ['sql', 'midb-arc', 'restore', '--name', name, '--k8s-namespace', namespace, '--use-k8s'];
|
||||
if (args.destName) { argsArray.push('--dest-name', args.destName); }
|
||||
if (args.managedInstance) { argsArray.push('--managed-instance', args.managedInstance); }
|
||||
if (args.time) { argsArray.push('--time', args.time); }
|
||||
if (args.noWait) { argsArray.push('--no-wait'); }
|
||||
return this.executeCommand<void>(argsArray, additionalEnvVars);
|
||||
if (args.dryRun) { argsArray.push('--dry-run'); }
|
||||
return this.executeCommand<azExt.SqlMiDbRestoreResult>(argsArray, additionalEnvVars);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
14
extensions/azcli/src/typings/az-ext.d.ts
vendored
14
extensions/azcli/src/typings/az-ext.d.ts
vendored
@@ -173,6 +173,17 @@ declare module 'az-ext' {
|
||||
}
|
||||
}
|
||||
|
||||
export interface SqlMiDbRestoreResult {
|
||||
destDatabase: string, //testDbToRestore
|
||||
earliestRestoreTime: string, // "2020-08-19T20:25:11Z"
|
||||
latestRestoreTime: string, //"2020-08-19T20:25:11Z"
|
||||
message: string, //Dry run for restore operation succeeded.
|
||||
observedGeneration: number, //1
|
||||
restorePoint: string, // "2020-08-19T20:25:11Z"
|
||||
sourceDatabase: string, //testDb
|
||||
state: string //Completed
|
||||
}
|
||||
|
||||
export interface PostgresServerShowResult {
|
||||
apiVersion: string, // "arcdata.microsoft.com/v1alpha1"
|
||||
kind: string, // "postgresql"
|
||||
@@ -336,10 +347,11 @@ declare module 'az-ext' {
|
||||
managedInstance?: string, //sqlmi1
|
||||
time?: string, //2021-10-12T11:16:30.000Z
|
||||
noWait?: boolean, //true
|
||||
dryRun?: boolean, //true
|
||||
},
|
||||
namespace?: string,
|
||||
additionalEnvVars?: AdditionalEnvVars
|
||||
): Promise<AzOutput<void>>
|
||||
): Promise<AzOutput<SqlMiDbRestoreResult>>
|
||||
}
|
||||
},
|
||||
getPath(): Promise<string>,
|
||||
|
||||
Reference in New Issue
Block a user