@azure/keyvault-admin 4.6.1-alpha.20250225.1 → 4.7.0-alpha.20250227.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 (137) hide show
  1. package/dist/commonjs/backupClient.d.ts +130 -3
  2. package/dist/commonjs/backupClient.d.ts.map +1 -1
  3. package/dist/commonjs/backupClient.js +123 -30
  4. package/dist/commonjs/backupClient.js.map +1 -1
  5. package/dist/commonjs/backupClientModels.d.ts +15 -3
  6. package/dist/commonjs/backupClientModels.d.ts.map +1 -1
  7. package/dist/commonjs/backupClientModels.js.map +1 -1
  8. package/dist/commonjs/constants.d.ts +2 -2
  9. package/dist/commonjs/constants.d.ts.map +1 -1
  10. package/dist/commonjs/constants.js +2 -2
  11. package/dist/commonjs/constants.js.map +1 -1
  12. package/dist/commonjs/generated/api/index.d.ts +2 -2
  13. package/dist/commonjs/generated/api/index.d.ts.map +1 -1
  14. package/dist/commonjs/generated/api/index.js +11 -10
  15. package/dist/commonjs/generated/api/index.js.map +1 -1
  16. package/dist/commonjs/generated/api/keyVaultContext.d.ts +4 -1
  17. package/dist/commonjs/generated/api/keyVaultContext.d.ts.map +1 -1
  18. package/dist/commonjs/generated/api/keyVaultContext.js +4 -4
  19. package/dist/commonjs/generated/api/keyVaultContext.js.map +1 -1
  20. package/dist/commonjs/generated/api/operations.d.ts +42 -38
  21. package/dist/commonjs/generated/api/operations.d.ts.map +1 -1
  22. package/dist/commonjs/generated/api/operations.js +188 -145
  23. package/dist/commonjs/generated/api/operations.js.map +1 -1
  24. package/dist/commonjs/generated/api/options.d.ts +34 -42
  25. package/dist/commonjs/generated/api/options.d.ts.map +1 -1
  26. package/dist/commonjs/generated/api/options.js.map +1 -1
  27. package/dist/commonjs/generated/api/roleAssignments/index.d.ts +12 -12
  28. package/dist/commonjs/generated/api/roleAssignments/index.d.ts.map +1 -1
  29. package/dist/commonjs/generated/api/roleAssignments/index.js +66 -51
  30. package/dist/commonjs/generated/api/roleAssignments/index.js.map +1 -1
  31. package/dist/commonjs/generated/api/roleDefinitions/index.d.ts +12 -12
  32. package/dist/commonjs/generated/api/roleDefinitions/index.d.ts.map +1 -1
  33. package/dist/commonjs/generated/api/roleDefinitions/index.js +66 -51
  34. package/dist/commonjs/generated/api/roleDefinitions/index.js.map +1 -1
  35. package/dist/commonjs/generated/classic/roleAssignments/index.d.ts +8 -14
  36. package/dist/commonjs/generated/classic/roleAssignments/index.d.ts.map +1 -1
  37. package/dist/commonjs/generated/classic/roleAssignments/index.js +7 -8
  38. package/dist/commonjs/generated/classic/roleAssignments/index.js.map +1 -1
  39. package/dist/commonjs/generated/classic/roleDefinitions/index.d.ts +8 -14
  40. package/dist/commonjs/generated/classic/roleDefinitions/index.d.ts.map +1 -1
  41. package/dist/commonjs/generated/classic/roleDefinitions/index.js +7 -8
  42. package/dist/commonjs/generated/classic/roleDefinitions/index.js.map +1 -1
  43. package/dist/commonjs/generated/index.d.ts +2 -2
  44. package/dist/commonjs/generated/index.d.ts.map +1 -1
  45. package/dist/commonjs/generated/index.js +2 -2
  46. package/dist/commonjs/generated/index.js.map +1 -1
  47. package/dist/commonjs/generated/keyVaultClient.d.ts +27 -25
  48. package/dist/commonjs/generated/keyVaultClient.d.ts.map +1 -1
  49. package/dist/commonjs/generated/keyVaultClient.js +39 -35
  50. package/dist/commonjs/generated/keyVaultClient.js.map +1 -1
  51. package/dist/commonjs/generated/models/index.d.ts +1 -1
  52. package/dist/commonjs/generated/models/index.d.ts.map +1 -1
  53. package/dist/commonjs/generated/models/index.js +2 -2
  54. package/dist/commonjs/generated/models/index.js.map +1 -1
  55. package/dist/commonjs/generated/models/models.d.ts +90 -78
  56. package/dist/commonjs/generated/models/models.d.ts.map +1 -1
  57. package/dist/commonjs/generated/models/models.js +78 -70
  58. package/dist/commonjs/generated/models/models.js.map +1 -1
  59. package/dist/commonjs/generated/restorePollerHelpers.js +8 -8
  60. package/dist/commonjs/generated/restorePollerHelpers.js.map +1 -1
  61. package/dist/commonjs/lro/shim.d.ts +7 -0
  62. package/dist/commonjs/lro/shim.d.ts.map +1 -1
  63. package/dist/commonjs/lro/shim.js +17 -1
  64. package/dist/commonjs/lro/shim.js.map +1 -1
  65. package/dist/esm/backupClient.d.ts +130 -3
  66. package/dist/esm/backupClient.d.ts.map +1 -1
  67. package/dist/esm/backupClient.js +124 -31
  68. package/dist/esm/backupClient.js.map +1 -1
  69. package/dist/esm/backupClientModels.d.ts +15 -3
  70. package/dist/esm/backupClientModels.d.ts.map +1 -1
  71. package/dist/esm/backupClientModels.js.map +1 -1
  72. package/dist/esm/constants.d.ts +2 -2
  73. package/dist/esm/constants.d.ts.map +1 -1
  74. package/dist/esm/constants.js +2 -2
  75. package/dist/esm/constants.js.map +1 -1
  76. package/dist/esm/generated/api/index.d.ts +2 -2
  77. package/dist/esm/generated/api/index.d.ts.map +1 -1
  78. package/dist/esm/generated/api/index.js +1 -1
  79. package/dist/esm/generated/api/index.js.map +1 -1
  80. package/dist/esm/generated/api/keyVaultContext.d.ts +4 -1
  81. package/dist/esm/generated/api/keyVaultContext.d.ts.map +1 -1
  82. package/dist/esm/generated/api/keyVaultContext.js +4 -4
  83. package/dist/esm/generated/api/keyVaultContext.js.map +1 -1
  84. package/dist/esm/generated/api/operations.d.ts +42 -38
  85. package/dist/esm/generated/api/operations.d.ts.map +1 -1
  86. package/dist/esm/generated/api/operations.js +159 -119
  87. package/dist/esm/generated/api/operations.js.map +1 -1
  88. package/dist/esm/generated/api/options.d.ts +34 -42
  89. package/dist/esm/generated/api/options.d.ts.map +1 -1
  90. package/dist/esm/generated/api/options.js.map +1 -1
  91. package/dist/esm/generated/api/roleAssignments/index.d.ts +12 -12
  92. package/dist/esm/generated/api/roleAssignments/index.d.ts.map +1 -1
  93. package/dist/esm/generated/api/roleAssignments/index.js +58 -43
  94. package/dist/esm/generated/api/roleAssignments/index.js.map +1 -1
  95. package/dist/esm/generated/api/roleDefinitions/index.d.ts +12 -12
  96. package/dist/esm/generated/api/roleDefinitions/index.d.ts.map +1 -1
  97. package/dist/esm/generated/api/roleDefinitions/index.js +58 -43
  98. package/dist/esm/generated/api/roleDefinitions/index.js.map +1 -1
  99. package/dist/esm/generated/classic/roleAssignments/index.d.ts +8 -14
  100. package/dist/esm/generated/classic/roleAssignments/index.d.ts.map +1 -1
  101. package/dist/esm/generated/classic/roleAssignments/index.js +7 -7
  102. package/dist/esm/generated/classic/roleAssignments/index.js.map +1 -1
  103. package/dist/esm/generated/classic/roleDefinitions/index.d.ts +8 -14
  104. package/dist/esm/generated/classic/roleDefinitions/index.d.ts.map +1 -1
  105. package/dist/esm/generated/classic/roleDefinitions/index.js +7 -7
  106. package/dist/esm/generated/classic/roleDefinitions/index.js.map +1 -1
  107. package/dist/esm/generated/index.d.ts +2 -2
  108. package/dist/esm/generated/index.d.ts.map +1 -1
  109. package/dist/esm/generated/index.js +1 -1
  110. package/dist/esm/generated/index.js.map +1 -1
  111. package/dist/esm/generated/keyVaultClient.d.ts +27 -25
  112. package/dist/esm/generated/keyVaultClient.d.ts.map +1 -1
  113. package/dist/esm/generated/keyVaultClient.js +42 -38
  114. package/dist/esm/generated/keyVaultClient.js.map +1 -1
  115. package/dist/esm/generated/models/index.d.ts +1 -1
  116. package/dist/esm/generated/models/index.d.ts.map +1 -1
  117. package/dist/esm/generated/models/index.js +1 -1
  118. package/dist/esm/generated/models/index.js.map +1 -1
  119. package/dist/esm/generated/models/models.d.ts +90 -78
  120. package/dist/esm/generated/models/models.d.ts.map +1 -1
  121. package/dist/esm/generated/models/models.js +69 -61
  122. package/dist/esm/generated/models/models.js.map +1 -1
  123. package/dist/esm/generated/restorePollerHelpers.js +9 -9
  124. package/dist/esm/generated/restorePollerHelpers.js.map +1 -1
  125. package/dist/esm/lro/shim.d.ts +7 -0
  126. package/dist/esm/lro/shim.d.ts.map +1 -1
  127. package/dist/esm/lro/shim.js +16 -1
  128. package/dist/esm/lro/shim.js.map +1 -1
  129. package/package.json +1 -1
  130. package/dist/commonjs/generated/helpers/serializerHelpers.d.ts +0 -3
  131. package/dist/commonjs/generated/helpers/serializerHelpers.d.ts.map +0 -1
  132. package/dist/commonjs/generated/helpers/serializerHelpers.js +0 -28
  133. package/dist/commonjs/generated/helpers/serializerHelpers.js.map +0 -1
  134. package/dist/esm/generated/helpers/serializerHelpers.d.ts +0 -3
  135. package/dist/esm/generated/helpers/serializerHelpers.d.ts.map +0 -1
  136. package/dist/esm/generated/helpers/serializerHelpers.js +0 -25
  137. package/dist/esm/generated/helpers/serializerHelpers.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import type { KeyVaultBackupClientOptions, KeyVaultBackupResult, KeyVaultBeginBackupOptions, KeyVaultBeginRestoreOptions, KeyVaultBeginSelectiveKeyRestoreOptions, KeyVaultRestoreResult, KeyVaultSelectiveKeyRestoreResult } from "./backupClientModels.js";
1
+ import type { KeyVaultBackupClientOptions, KeyVaultBackupResult, KeyVaultBeginBackupOptions, KeyVaultBeginPreBackupOptions, KeyVaultBeginPreRestoreOptions, KeyVaultBeginRestoreOptions, KeyVaultBeginSelectiveKeyRestoreOptions, KeyVaultRestoreResult, KeyVaultSelectiveKeyRestoreResult } from "./backupClientModels.js";
2
2
  import type { TokenCredential } from "@azure/core-auth";
3
3
  import type { PollerLike } from "./lro/shim.js";
4
4
  import { KeyVaultAdminPollOperationState, KeyVaultBackupOperationState, KeyVaultRestoreOperationState, KeyVaultSelectiveKeyRestoreOperationState } from "./lro/models.js";
@@ -35,6 +35,134 @@ export declare class KeyVaultBackupClient {
35
35
  * @param options - options used to configure Key Vault API requests.
36
36
  */
37
37
  constructor(vaultUrl: string, credential: TokenCredential, options?: KeyVaultBackupClientOptions);
38
+ /**
39
+ * Starts a pre-backup operation which can be used to check whether the customer can perform a {@link beginBackup} operation using the provided SAS token.
40
+ *
41
+ * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.
42
+ *
43
+ * Example usage:
44
+ * ```ts snippet:ReadmeSampleBeginPreBackup_SAS
45
+ * import { DefaultAzureCredential } from "@azure/identity";
46
+ * import { KeyVaultBackupClient } from "@azure/keyvault-admin";
47
+ *
48
+ * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
49
+ * const credentials = new DefaultAzureCredential();
50
+ * const client = new KeyVaultBackupClient(vaultUrl, credentials);
51
+ *
52
+ * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
53
+ * const sasToken = "<sas-token>";
54
+ * const poller = await client.beginPreBackup(blobStorageUri, sasToken);
55
+ *
56
+ * // Serializing the poller
57
+ * const serialized = poller.toString();
58
+ *
59
+ * // A new poller can be created with:
60
+ * await client.beginPreBackup(blobStorageUri, sasToken, { resumeFrom: serialized });
61
+ *
62
+ * // Waiting until it's done
63
+ * const result = await poller.pollUntilDone();
64
+ * console.log(result);
65
+ * ```
66
+ * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.
67
+ * @param sasToken - The SAS token used to access the blob storage resource.
68
+ * @param options - The optional parameters.
69
+ */
70
+ beginPreBackup(blobStorageUri: string, sasToken: string, options?: KeyVaultBeginPreBackupOptions): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;
71
+ /**
72
+ * Starts a pre-backup operation which can be used to check whether the customer can perform a {@link beginBackup} operation using the Managed HSM's configured user-assigned managed identity to authenticate with Azure Storage.
73
+ *
74
+ * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.
75
+ *
76
+ * Example usage:
77
+ * ```ts snippet:ReadmeSampleBeginPreBackup_NonSAS
78
+ * import { DefaultAzureCredential } from "@azure/identity";
79
+ * import { KeyVaultBackupClient } from "@azure/keyvault-admin";
80
+ *
81
+ * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
82
+ * const credentials = new DefaultAzureCredential();
83
+ * const client = new KeyVaultBackupClient(vaultUrl, credentials);
84
+ *
85
+ * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
86
+ * const poller = await client.beginPreBackup(blobStorageUri);
87
+ *
88
+ * // Serializing the poller
89
+ * const serialized = poller.toString();
90
+ *
91
+ * // A new poller can be created with:
92
+ * await client.beginPreBackup(blobStorageUri, { resumeFrom: serialized });
93
+ *
94
+ * // Waiting until it's done
95
+ * const result = await poller.pollUntilDone();
96
+ * console.log(result);
97
+ * ```
98
+ * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.
99
+ * @param options - The optional parameters.
100
+ */
101
+ beginPreBackup(blobStorageUri: string, options?: KeyVaultBeginPreBackupOptions): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;
102
+ /**
103
+ * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the provided SAS token.
104
+ *
105
+ * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.
106
+ *
107
+ * Example usage:
108
+ * ```ts snippet:ReadmeSampleBeginPreRestore_SAS
109
+ * import { DefaultAzureCredential } from "@azure/identity";
110
+ * import { KeyVaultBackupClient } from "@azure/keyvault-admin";
111
+ *
112
+ * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
113
+ * const credentials = new DefaultAzureCredential();
114
+ * const client = new KeyVaultBackupClient(vaultUrl, credentials);
115
+ *
116
+ * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
117
+ * const sasToken = "<sas-token>";
118
+ * const poller = await client.beginPreRestore(blobStorageUri, sasToken);
119
+ *
120
+ * // The poller can be serialized with:
121
+ * const serialized = poller.toString();
122
+ *
123
+ * // A new poller can be created with:
124
+ * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });
125
+ *
126
+ * // Waiting until it's done
127
+ * await poller.pollUntilDone();
128
+ * ```
129
+ * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
130
+ * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
131
+ * @param options - The optional parameters.
132
+ */
133
+ beginPreRestore(folderUri: string, sasToken: string, options?: KeyVaultBeginPreRestoreOptions): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;
134
+ /**
135
+ * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the provided SAS token.
136
+ *
137
+ * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.
138
+ *
139
+ * Example usage:
140
+ * ```ts snippet:ReadmeSampleBeginPreRestore_SAS
141
+ * import { DefaultAzureCredential } from "@azure/identity";
142
+ * import { KeyVaultBackupClient } from "@azure/keyvault-admin";
143
+ *
144
+ * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
145
+ * const credentials = new DefaultAzureCredential();
146
+ * const client = new KeyVaultBackupClient(vaultUrl, credentials);
147
+ *
148
+ * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
149
+ * const sasToken = "<sas-token>";
150
+ * const poller = await client.beginPreRestore(blobStorageUri, sasToken);
151
+ *
152
+ * // The poller can be serialized with:
153
+ * const serialized = poller.toString();
154
+ *
155
+ * // A new poller can be created with:
156
+ * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });
157
+ *
158
+ * // Waiting until it's done
159
+ * await poller.pollUntilDone();
160
+ * ```
161
+ * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
162
+ * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
163
+ * @param options - The optional parameters.
164
+ */
165
+ beginPreRestore(folderUri: string, options?: KeyVaultBeginPreRestoreOptions): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;
38
166
  /**
39
167
  * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account.
40
168
  *
@@ -162,8 +290,7 @@ export declare class KeyVaultBackupClient {
162
290
  * await client.beginRestore(blobStorageUri, { resumeFrom: serialized });
163
291
  *
164
292
  * // Waiting until it's done
165
- * const backupUri = await poller.pollUntilDone();
166
- * console.log(backupUri);
293
+ * await poller.pollUntilDone();
167
294
  * ```
168
295
  * Starts a full restore operation.
169
296
  * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
@@ -1 +1 @@
1
- {"version":3,"file":"backupClient.d.ts","sourceRoot":"","sources":["../../src/backupClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,uCAAuC,EACvC,qBAAqB,EACrB,iCAAiC,EAClC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,6BAA6B,EAC7B,yCAAyC,EAC1C,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,yCAAyC,EACzC,+BAA+B,GAChC,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IAExC;;;;;;;;;;;;;;;OAeG;gBAED,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,2BAAgC;IAO3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACU,WAAW,CACtB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,UAAU,CAAC,4BAA4B,EAAE,oBAAoB,CAAC,CAAC;IAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACU,WAAW,CACtB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC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E,iCAAiC,CAAC,CACzF;CAgDF"}
@@ -34,70 +34,163 @@ class KeyVaultBackupClient {
34
34
  this.vaultUrl = vaultUrl;
35
35
  this.client = (0, createKeyVaultClient_js_1.createKeyVaultClient)(vaultUrl, credential, options);
36
36
  }
37
+ async beginPreBackup(blobStorageUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
38
+ const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
39
+ const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
40
+ let poller;
41
+ if (options.resumeFrom) {
42
+ poller = (0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.preFullBackup, options);
43
+ }
44
+ else {
45
+ poller = this.client.preFullBackup({
46
+ storageResourceUri: blobStorageUri,
47
+ token: sasToken,
48
+ useManagedIdentity: sasToken === undefined,
49
+ }, {
50
+ abortSignal: options.abortSignal,
51
+ requestOptions: options.requestOptions,
52
+ onResponse: options.onResponse,
53
+ tracingOptions: options.tracingOptions,
54
+ updateIntervalInMs: options.intervalInMs,
55
+ });
56
+ }
57
+ poller.onProgress(shim_js_1.updateState);
58
+ return (0, shim_js_1.wrapPoller)(poller);
59
+ }
60
+ /**
61
+ * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the Managed HSM's configured user-assigned managed identity to authenticate with Azure Storage.
62
+ *
63
+ * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.
64
+ *
65
+ * Example usage:
66
+ * ```ts snippet:ReadmeSampleBeginPreRestore_SAS
67
+ * import { DefaultAzureCredential } from "@azure/identity";
68
+ * import { KeyVaultBackupClient } from "@azure/keyvault-admin";
69
+ *
70
+ * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
71
+ * const credentials = new DefaultAzureCredential();
72
+ * const client = new KeyVaultBackupClient(vaultUrl, credentials);
73
+ *
74
+ * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
75
+ * const sasToken = "<sas-token>";
76
+ * const poller = await client.beginPreRestore(blobStorageUri, sasToken);
77
+ *
78
+ * // The poller can be serialized with:
79
+ * const serialized = poller.toString();
80
+ *
81
+ * // A new poller can be created with:
82
+ * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });
83
+ *
84
+ * // Waiting until it's done
85
+ * await poller.pollUntilDone();
86
+ * ```
87
+ * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
88
+ * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
89
+ * @param options - The optional parameters.
90
+ */
91
+ async beginPreRestore(folderUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
92
+ const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
93
+ const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
94
+ const folderUriParts = mappings_js_1.mappings.folderUriParts(folderUri);
95
+ let poller;
96
+ if (options.resumeFrom) {
97
+ poller = (0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.preFullRestoreOperation, options);
98
+ }
99
+ else {
100
+ poller = this.client.preFullRestoreOperation({
101
+ folderToRestore: folderUriParts.folderName,
102
+ sasTokenParameters: {
103
+ storageResourceUri: folderUriParts.folderUri,
104
+ token: sasToken,
105
+ useManagedIdentity: sasToken === undefined,
106
+ },
107
+ }, {
108
+ abortSignal: options.abortSignal,
109
+ requestOptions: options.requestOptions,
110
+ onResponse: options.onResponse,
111
+ tracingOptions: options.tracingOptions,
112
+ updateIntervalInMs: options.intervalInMs,
113
+ });
114
+ }
115
+ poller.onProgress(shim_js_1.updateState);
116
+ return (0, shim_js_1.wrapPoller)(poller);
117
+ }
37
118
  async beginBackup(blobStorageUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
38
119
  const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
39
120
  const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
121
+ let poller;
40
122
  if (options.resumeFrom) {
41
- return (0, shim_js_1.wrapPoller)((0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.fullBackup, options));
123
+ poller = (0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.fullBackup, options);
42
124
  }
43
- return (0, shim_js_1.wrapPoller)(this.client.fullBackup({
44
- abortSignal: options.abortSignal,
45
- requestOptions: options.requestOptions,
46
- azureStorageBlobContainerUri: {
125
+ else {
126
+ poller = this.client.fullBackup({
47
127
  storageResourceUri: blobStorageUri,
48
128
  token: sasToken,
49
129
  useManagedIdentity: sasToken === undefined,
50
- },
51
- onResponse: options.onResponse,
52
- tracingOptions: options.tracingOptions,
53
- updateIntervalInMs: options.intervalInMs,
54
- }));
130
+ }, {
131
+ abortSignal: options.abortSignal,
132
+ requestOptions: options.requestOptions,
133
+ onResponse: options.onResponse,
134
+ tracingOptions: options.tracingOptions,
135
+ updateIntervalInMs: options.intervalInMs,
136
+ });
137
+ }
138
+ poller.onProgress(shim_js_1.updateState);
139
+ return (0, shim_js_1.wrapPoller)(poller);
55
140
  }
56
141
  async beginRestore(folderUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
57
142
  const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
58
143
  const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
59
144
  const folderUriParts = mappings_js_1.mappings.folderUriParts(folderUri);
145
+ let poller;
60
146
  if (options.resumeFrom) {
61
- return (0, shim_js_1.wrapPoller)((0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.fullRestoreOperation, options));
147
+ poller = (0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.fullRestoreOperation, options);
62
148
  }
63
- return (0, shim_js_1.wrapPoller)(this.client.fullRestoreOperation({
64
- abortSignal: options.abortSignal,
65
- requestOptions: options.requestOptions,
66
- restoreBlobDetails: {
149
+ else {
150
+ poller = this.client.fullRestoreOperation({
67
151
  folderToRestore: folderUriParts.folderName,
68
152
  sasTokenParameters: {
69
153
  storageResourceUri: folderUriParts.folderUri,
70
154
  token: sasToken,
71
155
  useManagedIdentity: sasToken === undefined,
72
156
  },
73
- },
74
- onResponse: options.onResponse,
75
- tracingOptions: options.tracingOptions,
76
- updateIntervalInMs: options.intervalInMs,
77
- }));
157
+ }, {
158
+ abortSignal: options.abortSignal,
159
+ requestOptions: options.requestOptions,
160
+ onResponse: options.onResponse,
161
+ tracingOptions: options.tracingOptions,
162
+ updateIntervalInMs: options.intervalInMs,
163
+ });
164
+ }
165
+ poller.onProgress(shim_js_1.updateState);
166
+ return (0, shim_js_1.wrapPoller)(poller);
78
167
  }
79
168
  async beginSelectiveKeyRestore(keyName, folderUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
80
169
  const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
81
170
  const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
82
171
  const folderUriParts = mappings_js_1.mappings.folderUriParts(folderUri);
172
+ let poller;
83
173
  if (options.resumeFrom) {
84
- return (0, shim_js_1.wrapPoller)((0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.selectiveKeyRestoreOperation, options));
174
+ poller = (0, restorePollerHelpers_js_1.restorePoller)(this.client, options.resumeFrom, this.client.selectiveKeyRestoreOperation, options);
85
175
  }
86
- return (0, shim_js_1.wrapPoller)(this.client.selectiveKeyRestoreOperation(keyName, {
87
- abortSignal: options.abortSignal,
88
- requestOptions: options.requestOptions,
89
- onResponse: options.onResponse,
90
- restoreBlobDetails: {
176
+ else {
177
+ poller = this.client.selectiveKeyRestoreOperation(keyName, {
91
178
  folder: folderUriParts.folderName,
92
179
  sasTokenParameters: {
93
180
  storageResourceUri: folderUriParts.folderUri,
94
181
  token: sasToken,
95
182
  useManagedIdentity: sasToken === undefined,
96
183
  },
97
- },
98
- tracingOptions: options.tracingOptions,
99
- updateIntervalInMs: options.intervalInMs,
100
- }));
184
+ }, {
185
+ abortSignal: options.abortSignal,
186
+ requestOptions: options.requestOptions,
187
+ onResponse: options.onResponse,
188
+ tracingOptions: options.tracingOptions,
189
+ updateIntervalInMs: options.intervalInMs,
190
+ });
191
+ }
192
+ poller.onProgress(shim_js_1.updateState);
193
+ return (0, shim_js_1.wrapPoller)(poller);
101
194
  }
102
195
  }
103
196
  exports.KeyVaultBackupClient = KeyVaultBackupClient;
@@ -1 +1 @@
1
- {"version":3,"file":"backupClient.js","sourceRoot":"","sources":["../../src/backupClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAalC,+CAAyC;AACzC,uEAAiE;AAEjE,2CAA2C;AAO3C,iFAAoE;AASpE;;;;;GAKG;AACH,MAAa,oBAAoB;IAW/B;;;;;;;;;;;;;;;OAeG;IACH,YACE,QAAgB,EAChB,UAA2B,EAC3B,UAAuC,EAAE;QAEzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,CAAC,MAAM,GAAG,IAAA,8CAAoB,EAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IA8EM,KAAK,CAAC,WAAW,CACtB,cAAsB,EACtB,oBAAyD,EAAE,EAC3D,+BAA2D,EAAE;QAE7D,MAAM,QAAQ,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;QACvF,MAAM,OAAO,GACX,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,iBAAiB,CAAC;QAE3F,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO,IAAA,oBAAU,EACf,IAAA,u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kB,EAAE;oBAClB,kBAAkB,EAAE,cAAc,CAAC,SAAS;oBAC5C,KAAK,EAAE,QAAQ;oBACf,kBAAkB,EAAE,QAAQ,KAAK,SAAS;iBAC3C;aACF;YACD,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,kBAAkB,EAAE,OAAO,CAAC,YAAY;SACzC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AArYD,oDAqYC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeyVaultBackupClientOptions,\n KeyVaultBackupResult,\n KeyVaultBeginBackupOptions,\n KeyVaultBeginRestoreOptions,\n KeyVaultBeginSelectiveKeyRestoreOptions,\n KeyVaultRestoreResult,\n KeyVaultSelectiveKeyRestoreResult,\n} from \"./backupClientModels.js\";\nimport type { KeyVaultClient } from \"./generated/keyVaultClient.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { mappings } from \"./mappings.js\";\nimport { createKeyVaultClient } from \"./createKeyVaultClient.js\";\nimport type { PollerLike } from \"./lro/shim.js\";\nimport { wrapPoller } from \"./lro/shim.js\";\nimport {\n KeyVaultAdminPollOperationState,\n KeyVaultBackupOperationState,\n KeyVaultRestoreOperationState,\n KeyVaultSelectiveKeyRestoreOperationState,\n} from \"./lro/models.js\";\nimport { restorePoller } from \"./generated/restorePollerHelpers.js\";\n\nexport {\n KeyVaultBackupOperationState,\n KeyVaultRestoreOperationState,\n KeyVaultSelectiveKeyRestoreOperationState,\n KeyVaultAdminPollOperationState,\n};\n\n/**\n * The KeyVaultBackupClient provides methods to generate backups\n * and restore backups of any given Azure Key Vault instance.\n * This client supports generating full backups, selective restores of specific keys\n * and full restores of Key Vault instances.\n */\nexport class KeyVaultBackupClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated Key Vault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of the KeyVaultBackupClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateBackupClient\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n * ```\n * @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - options used to configure Key Vault API requests.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n options: KeyVaultBackupClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n this.client = createKeyVaultClient(vaultUrl, credential, options);\n }\n\n /**\n * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginBackup_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginBackup(blobStorageUri, sasToken);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginBackup(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full backup operation.\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param sasToken - The SAS token used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginBackup(\n blobStorageUri: string,\n sasToken: string,\n options?: KeyVaultBeginBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n\n /**\n * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account, using a user-assigned Managed Identity\n * to access the Storage account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginBackup_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const poller = await client.beginBackup(blobStorageUri);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginBackup(blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full backup operation.\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param options - The optional parameters.\n */\n public async beginBackup(\n blobStorageUri: string,\n options?: KeyVaultBeginBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n\n public async beginBackup(\n blobStorageUri: string,\n sasTokenOrOptions: string | KeyVaultBeginBackupOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginBackupOptions = {},\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n if (options.resumeFrom) {\n return wrapPoller(\n restorePoller(this.client, options.resumeFrom, this.client.fullBackup, options),\n );\n }\n\n return wrapPoller(\n this.client.fullBackup({\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n azureStorageBlobContainerUri: {\n storageResourceUri: blobStorageUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n }),\n );\n }\n\n /**\n * Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage\n * backup folder.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginRestore(blobStorageUri, sasToken);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginRestore(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full restore operation.\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginRestore(\n folderUri: string,\n sasToken: string,\n options?: KeyVaultBeginRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n\n /**\n * Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage\n * backup folder, using a user-assigned Managed Identity to access the storage account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginRestore_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const poller = await client.beginRestore(blobStorageUri);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginRestore(blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full restore operation.\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginRestore(\n folderUri: string,\n options?: KeyVaultBeginRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n\n public async beginRestore(\n folderUri: string,\n sasTokenOrOptions: string | KeyVaultBeginRestoreOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginRestoreOptions = {},\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n const folderUriParts = mappings.folderUriParts(folderUri);\n\n if (options.resumeFrom) {\n return wrapPoller(\n restorePoller(this.client, options.resumeFrom, this.client.fullRestoreOperation, options),\n );\n }\n\n return wrapPoller(\n this.client.fullRestoreOperation({\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n restoreBlobDetails: {\n folderToRestore: folderUriParts.folderName,\n sasTokenParameters: {\n storageResourceUri: folderUriParts.folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n }),\n );\n }\n\n /**\n * Starts restoring all key versions of a given key using user supplied SAS token pointing to a previously\n * stored Azure Blob storage backup folder.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginSelectiveKeyRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\";\n * const sasToken = \"<sas-token>\";\n * const keyName = \"<key-name>\";\n * const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken, {\n * resumeFrom: serialized,\n * });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * Creates a new role assignment.\n * @param keyName - The name of the key that wants to be restored.\n * @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n sasToken: string,\n options?: KeyVaultBeginSelectiveKeyRestoreOptions,\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n >;\n\n /**\n * Starts restoring all key versions of a given key using to a previously\n * stored Azure Blob storage backup folder. The Blob storage backup folder will be accessed using user-assigned Managed Identity.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginSelectiveKeyRestore_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\";\n * const keyName = \"<key-name>\";\n * const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginSelectiveKeyRestore(keyName, blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * Creates a new role assignment.\n * @param keyName - The name of the key that wants to be restored.\n * @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n options?: KeyVaultBeginSelectiveKeyRestoreOptions,\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n >;\n\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n sasTokenOrOptions: string | KeyVaultBeginSelectiveKeyRestoreOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginSelectiveKeyRestoreOptions = {},\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n > {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n const folderUriParts = mappings.folderUriParts(folderUri);\n\n if (options.resumeFrom) {\n return wrapPoller(\n restorePoller(\n this.client,\n options.resumeFrom,\n this.client.selectiveKeyRestoreOperation,\n options,\n ),\n );\n }\n\n return wrapPoller(\n this.client.selectiveKeyRestoreOperation(keyName, {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n restoreBlobDetails: {\n folder: folderUriParts.folderName,\n sasTokenParameters: {\n storageResourceUri: folderUriParts.folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n }),\n );\n }\n}\n"]}
1
+ {"version":3,"file":"backupClient.js","sourceRoot":"","sources":["../../src/backupClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAelC,+CAAyC;AACzC,uEAAiE;AAEjE,2CAAwD;AAOxD,iFAAoE;AASpE;;;;;GAKG;AACH,MAAa,oBAAoB;IAW/B;;;;;;;;;;;;;;;OAeG;IACH,YACE,QAAgB,EAChB,UAA2B,EAC3B,UAAuC,EAAE;QAEzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,CAAC,MAAM,GAAG,IAAA,8CAAoB,EAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAyEM,KAAK,CAAC,cAAc,CACzB,cAAsB,EACtB,oBAA4D,EAAE,EAC9D,+BAA8D,EAAE;QAEhE,MAAM,QAAQ,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;QACvF,MAAM,OAAO,GACX,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,C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C,KAAK,EAAE,QAAQ;oBACf,kBAAkB,EAAE,QAAQ,KAAK,SAAS;iBAC3C;aACF,EACD;gBACE,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,kBAAkB,EAAE,OAAO,CAAC,YAAY;aACzC,CACF,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,UAAU,CAAC,qBAAW,CAAC,CAAC;QAE/B,OAAO,IAAA,oBAAU,EAAC,MAAM,CAAqD,CAAC;IAChF,CAAC;CACF;AA3oBD,oDA2oBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeyVaultBackupClientOptions,\n KeyVaultBackupResult,\n KeyVaultBeginBackupOptions,\n KeyVaultBeginPreBackupOptions,\n KeyVaultBeginPreRestoreOptions,\n KeyVaultBeginRestoreOptions,\n KeyVaultBeginSelectiveKeyRestoreOptions,\n KeyVaultRestoreResult,\n KeyVaultSelectiveKeyRestoreResult,\n} from \"./backupClientModels.js\";\nimport type { KeyVaultClient } from \"./generated/keyVaultClient.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { mappings } from \"./mappings.js\";\nimport { createKeyVaultClient } from \"./createKeyVaultClient.js\";\nimport type { PollerLike } from \"./lro/shim.js\";\nimport { wrapPoller, updateState } from \"./lro/shim.js\";\nimport {\n KeyVaultAdminPollOperationState,\n KeyVaultBackupOperationState,\n KeyVaultRestoreOperationState,\n KeyVaultSelectiveKeyRestoreOperationState,\n} from \"./lro/models.js\";\nimport { restorePoller } from \"./generated/restorePollerHelpers.js\";\n\nexport {\n KeyVaultBackupOperationState,\n KeyVaultRestoreOperationState,\n KeyVaultSelectiveKeyRestoreOperationState,\n KeyVaultAdminPollOperationState,\n};\n\n/**\n * The KeyVaultBackupClient provides methods to generate backups\n * and restore backups of any given Azure Key Vault instance.\n * This client supports generating full backups, selective restores of specific keys\n * and full restores of Key Vault instances.\n */\nexport class KeyVaultBackupClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated Key Vault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of the KeyVaultBackupClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateBackupClient\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n * ```\n * @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - options used to configure Key Vault API requests.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n options: KeyVaultBackupClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n this.client = createKeyVaultClient(vaultUrl, credential, options);\n }\n\n /**\n * Starts a pre-backup operation which can be used to check whether the customer can perform a {@link beginBackup} operation using the provided SAS token.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginPreBackup_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginPreBackup(blobStorageUri, sasToken);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginPreBackup(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const result = await poller.pollUntilDone();\n * console.log(result);\n * ```\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param sasToken - The SAS token used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginPreBackup(\n blobStorageUri: string,\n sasToken: string,\n options?: KeyVaultBeginPreBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n /**\n * Starts a pre-backup operation which can be used to check whether the customer can perform a {@link beginBackup} operation using the Managed HSM's configured user-assigned managed identity to authenticate with Azure Storage.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginPreBackup_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const poller = await client.beginPreBackup(blobStorageUri);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginPreBackup(blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const result = await poller.pollUntilDone();\n * console.log(result);\n * ```\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param options - The optional parameters.\n */\n public async beginPreBackup(\n blobStorageUri: string,\n options?: KeyVaultBeginPreBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n public async beginPreBackup(\n blobStorageUri: string,\n sasTokenOrOptions: string | KeyVaultBeginPreBackupOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginPreBackupOptions = {},\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n let poller;\n if (options.resumeFrom) {\n poller = restorePoller(this.client, options.resumeFrom, this.client.preFullBackup, options);\n } else {\n poller = this.client.preFullBackup(\n {\n storageResourceUri: blobStorageUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n },\n );\n }\n\n poller.onProgress(updateState);\n\n return wrapPoller(poller) as ReturnType<typeof this.beginPreBackup>;\n }\n\n /**\n * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the provided SAS token.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginPreRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginPreRestore(blobStorageUri, sasToken);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginPreRestore(\n folderUri: string,\n sasToken: string,\n options?: KeyVaultBeginPreRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n /**\n * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the provided SAS token.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginPreRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginPreRestore(blobStorageUri, sasToken);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginPreRestore(\n folderUri: string,\n options?: KeyVaultBeginPreRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n /**\n * Starts a pre-restore operation which can be used to check whether the customer can perform a {@link beginRestore} operation using the Managed HSM's configured user-assigned managed identity to authenticate with Azure Storage.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation completes.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginPreRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginPreRestore(blobStorageUri, sasToken);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginPreRestore(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginPreRestore(\n folderUri: string,\n sasTokenOrOptions: string | KeyVaultBeginPreRestoreOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginPreRestoreOptions = {},\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n const folderUriParts = mappings.folderUriParts(folderUri);\n\n let poller;\n if (options.resumeFrom) {\n poller = restorePoller(\n this.client,\n options.resumeFrom,\n this.client.preFullRestoreOperation,\n options,\n );\n } else {\n poller = this.client.preFullRestoreOperation(\n {\n folderToRestore: folderUriParts.folderName,\n sasTokenParameters: {\n storageResourceUri: folderUriParts.folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n },\n );\n }\n poller.onProgress(updateState);\n\n return wrapPoller(poller) as ReturnType<typeof this.beginPreRestore>;\n }\n\n /**\n * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginBackup_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginBackup(blobStorageUri, sasToken);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginBackup(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full backup operation.\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param sasToken - The SAS token used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginBackup(\n blobStorageUri: string,\n sasToken: string,\n options?: KeyVaultBeginBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n\n /**\n * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account, using a user-assigned Managed Identity\n * to access the Storage account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginBackup_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const poller = await client.beginBackup(blobStorageUri);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginBackup(blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full backup operation.\n * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.\n * @param options - The optional parameters.\n */\n public async beginBackup(\n blobStorageUri: string,\n options?: KeyVaultBeginBackupOptions,\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;\n\n public async beginBackup(\n blobStorageUri: string,\n sasTokenOrOptions: string | KeyVaultBeginBackupOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginBackupOptions = {},\n ): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n let poller;\n if (options.resumeFrom) {\n poller = restorePoller(this.client, options.resumeFrom, this.client.fullBackup, options);\n } else {\n poller = this.client.fullBackup(\n {\n storageResourceUri: blobStorageUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n },\n );\n }\n\n poller.onProgress(updateState);\n\n return wrapPoller(poller) as ReturnType<typeof this.beginBackup>;\n }\n\n /**\n * Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage\n * backup folder.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const sasToken = \"<sas-token>\";\n * const poller = await client.beginRestore(blobStorageUri, sasToken);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginRestore(blobStorageUri, sasToken, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const backupUri = await poller.pollUntilDone();\n * console.log(backupUri);\n * ```\n * Starts a full restore operation.\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginRestore(\n folderUri: string,\n sasToken: string,\n options?: KeyVaultBeginRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n\n /**\n * Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage\n * backup folder, using a user-assigned Managed Identity to access the storage account.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginRestore_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\"; // <Blob storage URL>/<folder name>\n * const poller = await client.beginRestore(blobStorageUri);\n *\n * // The poller can be serialized with:\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginRestore(blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * Starts a full restore operation.\n * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginRestore(\n folderUri: string,\n options?: KeyVaultBeginRestoreOptions,\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;\n\n public async beginRestore(\n folderUri: string,\n sasTokenOrOptions: string | KeyVaultBeginRestoreOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginRestoreOptions = {},\n ): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>> {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n const folderUriParts = mappings.folderUriParts(folderUri);\n\n let poller;\n if (options.resumeFrom) {\n poller = restorePoller(\n this.client,\n options.resumeFrom,\n this.client.fullRestoreOperation,\n options,\n );\n } else {\n poller = this.client.fullRestoreOperation(\n {\n folderToRestore: folderUriParts.folderName,\n sasTokenParameters: {\n storageResourceUri: folderUriParts.folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n },\n );\n }\n poller.onProgress(updateState);\n\n return wrapPoller(poller) as ReturnType<typeof this.beginRestore>;\n }\n\n /**\n * Starts restoring all key versions of a given key using user supplied SAS token pointing to a previously\n * stored Azure Blob storage backup folder.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginSelectiveKeyRestore_SAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\";\n * const sasToken = \"<sas-token>\";\n * const keyName = \"<key-name>\";\n * const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken, {\n * resumeFrom: serialized,\n * });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * Creates a new role assignment.\n * @param keyName - The name of the key that wants to be restored.\n * @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n sasToken: string,\n options?: KeyVaultBeginSelectiveKeyRestoreOptions,\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n >;\n\n /**\n * Starts restoring all key versions of a given key using to a previously\n * stored Azure Blob storage backup folder. The Blob storage backup folder will be accessed using user-assigned Managed Identity.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBeginSelectiveKeyRestore_NonSAS\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { KeyVaultBackupClient } from \"@azure/keyvault-admin\";\n *\n * const vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * const credentials = new DefaultAzureCredential();\n * const client = new KeyVaultBackupClient(vaultUrl, credentials);\n *\n * const blobStorageUri = \"<blob-storage-uri>\";\n * const keyName = \"<key-name>\";\n * const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri);\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n *\n * // A new poller can be created with:\n * await client.beginSelectiveKeyRestore(keyName, blobStorageUri, { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * await poller.pollUntilDone();\n * ```\n * Creates a new role assignment.\n * @param keyName - The name of the key that wants to be restored.\n * @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.\n * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.\n * @param options - The optional parameters.\n */\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n options?: KeyVaultBeginSelectiveKeyRestoreOptions,\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n >;\n\n public async beginSelectiveKeyRestore(\n keyName: string,\n folderUri: string,\n sasTokenOrOptions: string | KeyVaultBeginSelectiveKeyRestoreOptions = {},\n optionsWhenSasTokenSpecified: KeyVaultBeginSelectiveKeyRestoreOptions = {},\n ): Promise<\n PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>\n > {\n const sasToken = typeof sasTokenOrOptions === \"string\" ? sasTokenOrOptions : undefined;\n const options =\n typeof sasTokenOrOptions === \"string\" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;\n\n const folderUriParts = mappings.folderUriParts(folderUri);\n\n let poller;\n if (options.resumeFrom) {\n poller = restorePoller(\n this.client,\n options.resumeFrom,\n this.client.selectiveKeyRestoreOperation,\n options,\n );\n } else {\n poller = this.client.selectiveKeyRestoreOperation(\n keyName,\n {\n folder: folderUriParts.folderName,\n sasTokenParameters: {\n storageResourceUri: folderUriParts.folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n {\n abortSignal: options.abortSignal,\n requestOptions: options.requestOptions,\n onResponse: options.onResponse,\n tracingOptions: options.tracingOptions,\n updateIntervalInMs: options.intervalInMs,\n },\n );\n }\n poller.onProgress(updateState);\n\n return wrapPoller(poller) as ReturnType<typeof this.beginSelectiveKeyRestore>;\n }\n}\n"]}
@@ -32,19 +32,31 @@ export interface KeyVaultBackupPollerOptions extends OperationOptions {
32
32
  }
33
33
  /**
34
34
  * An interface representing the optional parameters that can be
35
- * passed to {@link beginBackup}
35
+ * passed to {@link KeyVaultBackupClient.beginPreBackup}
36
+ */
37
+ export interface KeyVaultBeginPreBackupOptions extends KeyVaultBackupPollerOptions {
38
+ }
39
+ /**
40
+ * An interface representing the optional parameters that can be
41
+ * passed to {@link KeyVaultBackupClient.beginBackup}
36
42
  */
37
43
  export interface KeyVaultBeginBackupOptions extends KeyVaultBackupPollerOptions {
38
44
  }
39
45
  /**
40
46
  * An interface representing the optional parameters that can be
41
- * passed to {@link beginRestore}
47
+ * passed to {@link KeyVaultBackupClient.beginRestore}
42
48
  */
43
49
  export interface KeyVaultBeginRestoreOptions extends KeyVaultBackupPollerOptions {
44
50
  }
45
51
  /**
46
52
  * An interface representing the optional parameters that can be
47
- * passed to {@link beginSelectiveKeyRestore}
53
+ * passed to {@link KeyVaultBackupClient.beginPreRestore}
54
+ */
55
+ export interface KeyVaultBeginPreRestoreOptions extends KeyVaultBackupPollerOptions {
56
+ }
57
+ /**
58
+ * An interface representing the optional parameters that can be
59
+ * passed to {@link KeyVaultBackupClient.beginSelectiveKeyRestore}
48
60
  */
49
61
  export interface KeyVaultBeginSelectiveKeyRestoreOptions extends KeyVaultBackupPollerOptions {
50
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"backupClientModels.d.ts","sourceRoot":"","sources":["../../src/backupClientModels.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe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- {"version":3,"file":"backupClientModels.js","sourceRoot":"","sources":["../../src/backupClientModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport type { SUPPORTED_API_VERSIONS } from \"./constants.js\";\n\nexport type { PollerLike } from \"./lro/shim.js\";\nexport type { OperationStatus } from \"./generated/index.js\";\n\n/**\n * The optional parameters accepted by the KeyVaultBackupClient\n */\nexport interface KeyVaultBackupClientOptions extends ClientOptions {\n /**\n * The accepted versions of the Key Vault's service API.\n */\n serviceVersion?: SUPPORTED_API_VERSIONS;\n\n /**\n * Whether to disable verification that the authentication challenge resource matches the Key Vault or Managed HSM domain.\n * Defaults to false.\n */\n disableChallengeResourceVerification?: boolean;\n}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link beginBackup}\n */\nexport interface KeyVaultBackupPollerOptions extends OperationOptions {\n /**\n * Time between each polling\n */\n intervalInMs?: number;\n /**\n * A serialized poller, used to resume an existing operation\n */\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link beginBackup}\n */\nexport interface KeyVaultBeginBackupOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link beginRestore}\n */\nexport interface KeyVaultBeginRestoreOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link beginSelectiveKeyRestore}\n */\nexport interface KeyVaultBeginSelectiveKeyRestoreOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the result of a backup operation.\n */\nexport interface KeyVaultBackupResult {\n /**\n * The location of the full backup.\n */\n folderUri?: string;\n\n /**\n * The start time of the backup operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the backup operation.\n */\n endTime?: Date;\n}\n\n/**\n * An interface representing the result of a restore operation.\n */\nexport interface KeyVaultRestoreResult {\n /**\n * The start time of the restore operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the restore operation.\n */\n endTime?: Date;\n}\n\n/**\n * An interface representing the result of a selective key restore operation.\n */\nexport interface KeyVaultSelectiveKeyRestoreResult {\n /**\n * The start time of the selective key restore operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the selective key restore operation.\n */\n endTime?: Date;\n}\n"]}
1
+ {"version":3,"file":"backupClientModels.js","sourceRoot":"","sources":["../../src/backupClientModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport type { SUPPORTED_API_VERSIONS } from \"./constants.js\";\nimport { KeyVaultBackupClient } from \"./backupClient.js\";\n\nexport type { PollerLike } from \"./lro/shim.js\";\nexport type { OperationStatus } from \"./generated/index.js\";\n\n/**\n * The optional parameters accepted by the KeyVaultBackupClient\n */\nexport interface KeyVaultBackupClientOptions extends ClientOptions {\n /**\n * The accepted versions of the Key Vault's service API.\n */\n serviceVersion?: SUPPORTED_API_VERSIONS;\n\n /**\n * Whether to disable verification that the authentication challenge resource matches the Key Vault or Managed HSM domain.\n * Defaults to false.\n */\n disableChallengeResourceVerification?: boolean;\n}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link beginBackup}\n */\nexport interface KeyVaultBackupPollerOptions extends OperationOptions {\n /**\n * Time between each polling\n */\n intervalInMs?: number;\n /**\n * A serialized poller, used to resume an existing operation\n */\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link KeyVaultBackupClient.beginPreBackup}\n */\nexport interface KeyVaultBeginPreBackupOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link KeyVaultBackupClient.beginBackup}\n */\nexport interface KeyVaultBeginBackupOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link KeyVaultBackupClient.beginRestore}\n */\nexport interface KeyVaultBeginRestoreOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link KeyVaultBackupClient.beginPreRestore}\n */\nexport interface KeyVaultBeginPreRestoreOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the optional parameters that can be\n * passed to {@link KeyVaultBackupClient.beginSelectiveKeyRestore}\n */\nexport interface KeyVaultBeginSelectiveKeyRestoreOptions extends KeyVaultBackupPollerOptions {}\n\n/**\n * An interface representing the result of a backup operation.\n */\nexport interface KeyVaultBackupResult {\n /**\n * The location of the full backup.\n */\n folderUri?: string;\n\n /**\n * The start time of the backup operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the backup operation.\n */\n endTime?: Date;\n}\n\n/**\n * An interface representing the result of a restore operation.\n */\nexport interface KeyVaultRestoreResult {\n /**\n * The start time of the restore operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the restore operation.\n */\n endTime?: Date;\n}\n\n/**\n * An interface representing the result of a selective key restore operation.\n */\nexport interface KeyVaultSelectiveKeyRestoreResult {\n /**\n * The start time of the selective key restore operation.\n */\n startTime?: Date;\n\n /**\n * The end time of the selective key restore operation.\n */\n endTime?: Date;\n}\n"]}
@@ -5,9 +5,9 @@ export declare const SDK_VERSION: string;
5
5
  /**
6
6
  * The latest supported Key Vault service API version.
7
7
  */
8
- export declare const LATEST_API_VERSION = "7.5";
8
+ export declare const LATEST_API_VERSION = "7.6-preview.2";
9
9
  /**
10
10
  * Supported API versions
11
11
  */
12
- export type SUPPORTED_API_VERSIONS = "7.2" | "7.3" | "7.4" | "7.5";
12
+ export type SUPPORTED_API_VERSIONS = "7.2" | "7.3" | "7.4" | "7.5" | "7.6-preview.2";
13
13
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAgB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,eAAe,CAAC"}
@@ -6,9 +6,9 @@ exports.LATEST_API_VERSION = exports.SDK_VERSION = void 0;
6
6
  /**
7
7
  * Current version of the Key Vault Admin SDK.
8
8
  */
9
- exports.SDK_VERSION = "4.6.1";
9
+ exports.SDK_VERSION = "4.7.0-beta.1";
10
10
  /**
11
11
  * The latest supported Key Vault service API version.
12
12
  */
13
- exports.LATEST_API_VERSION = "7.5";
13
+ exports.LATEST_API_VERSION = "7.6-preview.2";
14
14
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;GAEG;AACU,QAAA,WAAW,GAAW,OAAO,CAAC;AAE3C;;GAEG;AACU,QAAA,kBAAkB,GAAG,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the Key Vault Admin SDK.\n */\nexport const SDK_VERSION: string = \"4.6.1\";\n\n/**\n * The latest supported Key Vault service API version.\n */\nexport const LATEST_API_VERSION = \"7.5\";\n\n/**\n * Supported API versions\n */\nexport type SUPPORTED_API_VERSIONS = \"7.2\" | \"7.3\" | \"7.4\" | \"7.5\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;GAEG;AACU,QAAA,WAAW,GAAW,cAAc,CAAC;AAElD;;GAEG;AACU,QAAA,kBAAkB,GAAG,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the Key Vault Admin SDK.\n */\nexport const SDK_VERSION: string = \"4.7.0-beta.1\";\n\n/**\n * The latest supported Key Vault service API version.\n */\nexport const LATEST_API_VERSION = \"7.6-preview.2\";\n\n/**\n * Supported API versions\n */\nexport type SUPPORTED_API_VERSIONS = \"7.2\" | \"7.3\" | \"7.4\" | \"7.5\" | \"7.6-preview.2\";\n"]}
@@ -1,4 +1,4 @@
1
1
  export { createKeyVault, KeyVaultContext, KeyVaultClientOptionalParams, } from "./keyVaultContext.js";
2
- export { fullBackupStatus, fullBackup, preFullBackup, restoreStatus, preFullRestoreOperation, fullRestoreOperation, selectiveKeyRestoreOperation, updateSetting, getSetting, getSettings, } from "./operations.js";
3
- export { FullBackupStatusOptionalParams, FullBackupOptionalParams, PreFullBackupOptionalParams, RestoreStatusOptionalParams, PreFullRestoreOperationOptionalParams, FullRestoreOperationOptionalParams, SelectiveKeyRestoreOperationOptionalParams, UpdateSettingOptionalParams, GetSettingOptionalParams, GetSettingsOptionalParams, RoleAssignmentsDeleteOptionalParams, RoleAssignmentsCreateOptionalParams, RoleAssignmentsGetOptionalParams, RoleAssignmentsListForScopeOptionalParams, RoleDefinitionsDeleteOptionalParams, RoleDefinitionsCreateOrUpdateOptionalParams, RoleDefinitionsGetOptionalParams, RoleDefinitionsListOptionalParams, } from "./options.js";
2
+ export { getSettings, getSetting, updateSetting, selectiveKeyRestoreOperation, selectiveKeyRestoreStatus, fullRestoreOperation, preFullRestoreOperation, restoreStatus, preFullBackup, fullBackup, fullBackupStatus, } from "./operations.js";
3
+ export { RoleAssignmentsListForScopeOptionalParams, RoleAssignmentsGetOptionalParams, RoleAssignmentsCreateOptionalParams, RoleAssignmentsDeleteOptionalParams, RoleDefinitionsListOptionalParams, RoleDefinitionsGetOptionalParams, RoleDefinitionsCreateOrUpdateOptionalParams, RoleDefinitionsDeleteOptionalParams, GetSettingsOptionalParams, GetSettingOptionalParams, UpdateSettingOptionalParams, SelectiveKeyRestoreOperationOptionalParams, SelectiveKeyRestoreStatusOptionalParams, FullRestoreOperationOptionalParams, PreFullRestoreOperationOptionalParams, RestoreStatusOptionalParams, PreFullBackupOptionalParams, FullBackupOptionalParams, FullBackupStatusOptionalParams, } from "./options.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/api/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,eAAe,EACf,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,qCAAqC,EACrC,kCAAkC,EAClC,0CAA0C,EAC1C,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,mCAAmC,EACnC,mCAAmC,EACnC,gCAAgC,EAChC,yCAAyC,EACzC,mCAAmC,EACnC,2CAA2C,EAC3C,gCAAgC,EAChC,iCAAiC,GAClC,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/api/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,eAAe,EACf,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yCAAyC,EACzC,gCAAgC,EAChC,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,2CAA2C,EAC3C,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,0CAA0C,EAC1C,uCAAuC,EACvC,kCAAkC,EAClC,qCAAqC,EACrC,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,cAAc,CAAC"}