Skip to content

Commit 6c6ce54

Browse files
authored
[Key Vault] Full LRO refactoring (Azure#12630)
* Secrets changes * some of the work, up to certificates * formatting * formatting on secrets * certificate changes * starting with keyvault admin * wip admin * builds and the review changes seem reasonable * formatting * formating on certificates * certificates fix * final touches * Simple changelog entries. * lint fix * Key Vault Secrets fix * secret fixes and better span titles
1 parent caf3261 commit 6c6ce54

Some content is hidden

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

43 files changed

+2335
-2658
lines changed

sdk/keyvault/keyvault-admin/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 4.0.0-beta.2 (Unreleased)
44

5+
- Updated the Key Vault Admin Long Running Operation Pollers to follow a more compact and meaningful approach moving forward.
56

67
## 4.0.0-beta.1 (2020-09-11)
78

sdk/keyvault/keyvault-admin/review/keyvault-admin.api.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ export interface BackupClientOptions extends coreHttp.PipelineOptions {
2121
}
2222

2323
// @public
24-
export interface BackupOperationState extends PollOperationState<string> {
25-
endTime?: Date;
26-
jobId?: string;
27-
startTime?: Date;
28-
status?: string;
29-
statusDetails?: string;
30-
}
24+
export type BackupOperationState = KeyVaultAdminPollOperationState<string>;
3125

3226
// @public
3327
export interface BackupPollerOptions extends coreHttp.OperationOptions {
@@ -70,6 +64,15 @@ export class KeyVaultAccessControlClient {
7064
readonly vaultUrl: string;
7165
}
7266

67+
// @public
68+
export interface KeyVaultAdminPollOperationState<TResult> extends PollOperationState<TResult> {
69+
endTime?: Date;
70+
jobId?: string;
71+
startTime?: Date;
72+
status?: string;
73+
statusDetails?: string;
74+
}
75+
7376
// @public
7477
export class KeyVaultBackupClient {
7578
constructor(vaultUrl: string, credential: TokenCredential, pipelineOptions?: BackupClientOptions);
@@ -142,12 +145,7 @@ export interface ListRoleDefinitionsPageSettings {
142145
}
143146

144147
// @public
145-
export interface RestoreOperationState extends PollOperationState<undefined> {
146-
endTime?: Date;
147-
jobId?: string;
148-
startTime?: Date;
149-
status?: string;
150-
statusDetails?: string;
148+
export interface RestoreOperationState extends KeyVaultAdminPollOperationState<undefined> {
151149
}
152150

153151
// @public
@@ -157,12 +155,7 @@ export type RoleAssignmentScope = "/" | "/keys" | string;
157155
export const SDK_VERSION: string;
158156

159157
// @public
160-
export interface SelectiveRestoreOperationState extends PollOperationState<undefined> {
161-
endTime?: Date;
162-
jobId?: string;
163-
startTime?: Date;
164-
status?: string;
165-
statusDetails?: string;
158+
export interface SelectiveRestoreOperationState extends KeyVaultAdminPollOperationState<undefined> {
166159
}
167160

168161
// @public

sdk/keyvault/keyvault-admin/src/accessControlClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
} from "./accessControlModels";
3434

3535
import { SDK_VERSION, LATEST_API_VERSION } from "./constants";
36-
import { createSpan, setParentSpan } from "./tracing";
36+
import { createSpan, setParentSpan } from "../../keyvault-common/src";
3737
import { mappings } from "./mappings";
3838
import { logger } from "./log";
3939

sdk/keyvault/keyvault-admin/src/backupClient.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ import { RestorePoller } from "./lro/restore/poller";
1919
import { SelectiveRestorePoller } from "./lro/selectiveRestore/poller";
2020
import { BackupOperationState } from "./lro/backup/operation";
2121
import { RestoreOperationState } from "./lro/restore/operation";
22+
import { KeyVaultAdminPollOperationState } from "./lro/keyVaultAdminPoller";
2223
import { SelectiveRestoreOperationState } from "./lro/selectiveRestore/operation";
2324

24-
export { BackupOperationState, RestoreOperationState, SelectiveRestoreOperationState };
25+
export {
26+
BackupOperationState,
27+
RestoreOperationState,
28+
SelectiveRestoreOperationState,
29+
KeyVaultAdminPollOperationState
30+
};
2531

2632
/**
2733
* The KeyVaultBackupClient provides methods to generate backups

0 commit comments

Comments
 (0)