@azure/keyvault-admin 4.5.0-beta.1 → 4.5.0

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.
package/dist/index.js CHANGED
@@ -1328,7 +1328,7 @@ class KeyVaultClientContext extends coreClient__namespace.ServiceClient {
1328
1328
  const defaults = {
1329
1329
  requestContentType: "application/json; charset=utf-8"
1330
1330
  };
1331
- const packageDetails = `azsdk-js-keyvault-admin/4.5.0-beta.1`;
1331
+ const packageDetails = `azsdk-js-keyvault-admin/4.5.0`;
1332
1332
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1333
1333
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1334
1334
  : `${packageDetails}`;
@@ -1582,11 +1582,11 @@ const getSettingsOperationSpec = {
1582
1582
  /**
1583
1583
  * Current version of the Key Vault Admin SDK.
1584
1584
  */
1585
- const SDK_VERSION = "4.5.0-beta.1";
1585
+ const SDK_VERSION = "4.5.0";
1586
1586
  /**
1587
1587
  * The latest supported Key Vault service API version.
1588
1588
  */
1589
- const LATEST_API_VERSION = "7.5-preview.1";
1589
+ const LATEST_API_VERSION = "7.5";
1590
1590
 
1591
1591
  // Copyright (c) Microsoft Corporation.
1592
1592
  // Licensed under the MIT license.
@@ -2001,12 +2001,12 @@ class KeyVaultAccessControlClient {
2001
2001
  * Code generated by Microsoft (R) AutoRest Code Generator.
2002
2002
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2003
2003
  */
2004
- /** Known values of {@link ApiVersion75Preview1} that the service accepts. */
2005
- var KnownApiVersion75Preview1;
2006
- (function (KnownApiVersion75Preview1) {
2007
- /** Api Version '7.5-preview.1' */
2008
- KnownApiVersion75Preview1["Seven5Preview1"] = "7.5-preview.1";
2009
- })(KnownApiVersion75Preview1 || (KnownApiVersion75Preview1 = {}));
2004
+ /** Known values of {@link ApiVersion75} that the service accepts. */
2005
+ var KnownApiVersion75;
2006
+ (function (KnownApiVersion75) {
2007
+ /** Api Version '7.5' */
2008
+ KnownApiVersion75["Seven5"] = "7.5";
2009
+ })(KnownApiVersion75 || (KnownApiVersion75 = {}));
2010
2010
  /** Known values of {@link RoleType} that the service accepts. */
2011
2011
  var KnownRoleType;
2012
2012
  (function (KnownRoleType) {
@@ -2520,38 +2520,9 @@ class KeyVaultBackupClient {
2520
2520
  challengeCallbacks: keyvaultCommon.createKeyVaultChallengeCallbacks(options),
2521
2521
  }));
2522
2522
  }
2523
- /**
2524
- * Starts generating a backup of an Azure Key Vault on the specified Storage Blob account.
2525
- *
2526
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.
2527
- *
2528
- * Example usage:
2529
- * ```ts
2530
- * const client = new KeyVaultBackupClient(url, credentials);
2531
- *
2532
- * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
2533
- * const sasToken = "<sas-token>";
2534
- * const poller = await client.beginBackup(blobStorageUri, sasToken);
2535
- *
2536
- * // Serializing the poller
2537
- * //
2538
- * // const serialized = poller.toString();
2539
- * //
2540
- * // A new poller can be created with:
2541
- * //
2542
- * // await client.beginBackup(blobStorageUri, sasToken, { resumeFrom: serialized });
2543
- * //
2544
- *
2545
- * // Waiting until it's done
2546
- * const backupUri = await poller.pollUntilDone();
2547
- * console.log(backupUri);
2548
- * ```
2549
- * Starts a full backup operation.
2550
- * @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.
2551
- * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
2552
- * @param options - The optional parameters.
2553
- */
2554
- async beginBackup(blobStorageUri, sasToken, options = {}) {
2523
+ async beginBackup(blobStorageUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
2524
+ const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
2525
+ const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
2555
2526
  const poller = new KeyVaultBackupPoller({
2556
2527
  blobStorageUri,
2557
2528
  sasToken,
@@ -2565,78 +2536,17 @@ class KeyVaultBackupClient {
2565
2536
  await poller.poll();
2566
2537
  return poller;
2567
2538
  }
2568
- /**
2569
- * Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage
2570
- * backup folder.
2571
- *
2572
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.
2573
- *
2574
- * Example usage:
2575
- * ```ts
2576
- * const client = new KeyVaultBackupClient(url, credentials);
2577
- *
2578
- * const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
2579
- * const sasToken = "<sas-token>";
2580
- * const poller = await client.beginRestore(blobStorageUri, sasToken);
2581
- *
2582
- * // The poller can be serialized with:
2583
- * //
2584
- * // const serialized = poller.toString();
2585
- * //
2586
- * // A new poller can be created with:
2587
- * //
2588
- * // await client.beginRestore(blobStorageUri, sasToken, { resumeFrom: serialized });
2589
- * //
2590
- *
2591
- * // Waiting until it's done
2592
- * const backupUri = await poller.pollUntilDone();
2593
- * console.log(backupUri);
2594
- * ```
2595
- * Starts a full restore operation.
2596
- * @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
2597
- * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
2598
- * @param options - The optional parameters.
2599
- */
2600
- async beginRestore(folderUri, sasToken, options = {}) {
2539
+ async beginRestore(folderUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
2540
+ const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
2541
+ const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
2601
2542
  const poller = new KeyVaultRestorePoller(Object.assign(Object.assign({}, mappings.folderUriParts(folderUri)), { sasToken, client: this.client, vaultUrl: this.vaultUrl, intervalInMs: options.intervalInMs, resumeFrom: options.resumeFrom, requestOptions: options }));
2602
2543
  // This will initialize the poller's operation (the generation of the backup).
2603
2544
  await poller.poll();
2604
2545
  return poller;
2605
2546
  }
2606
- /**
2607
- * Starts restoring all key versions of a given key using user supplied SAS token pointing to a previously
2608
- * stored Azure Blob storage backup folder.
2609
- *
2610
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.
2611
- *
2612
- * Example usage:
2613
- * ```ts
2614
- * const client = new KeyVaultBackupClient(url, credentials);
2615
- *
2616
- * const blobStorageUri = "<blob-storage-uri>";
2617
- * const sasToken = "<sas-token>";
2618
- * const keyName = "<key-name>";
2619
- * const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken);
2620
- *
2621
- * // Serializing the poller
2622
- * //
2623
- * // const serialized = poller.toString();
2624
- * //
2625
- * // A new poller can be created with:
2626
- * //
2627
- * // await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken, { resumeFrom: serialized });
2628
- * //
2629
- *
2630
- * // Waiting until it's done
2631
- * await poller.pollUntilDone();
2632
- * ```
2633
- * Creates a new role assignment.
2634
- * @param keyName - The name of the key that wants to be restored.
2635
- * @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.
2636
- * @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
2637
- * @param options - The optional parameters.
2638
- */
2639
- async beginSelectiveKeyRestore(keyName, folderUri, sasToken, options = {}) {
2547
+ async beginSelectiveKeyRestore(keyName, folderUri, sasTokenOrOptions = {}, optionsWhenSasTokenSpecified = {}) {
2548
+ const sasToken = typeof sasTokenOrOptions === "string" ? sasTokenOrOptions : undefined;
2549
+ const options = typeof sasTokenOrOptions === "string" ? optionsWhenSasTokenSpecified : sasTokenOrOptions;
2640
2550
  const poller = new KeyVaultSelectiveKeyRestorePoller(Object.assign(Object.assign({}, mappings.folderUriParts(folderUri)), { keyName,
2641
2551
  sasToken, client: this.client, vaultUrl: this.vaultUrl, intervalInMs: options.intervalInMs, resumeFrom: options.resumeFrom, requestOptions: options }));
2642
2552
  // This will initialize the poller's operation (the generation of the backup).