From 49c31de31011ed60cd7a77ed7c597c0640458355 Mon Sep 17 00:00:00 2001 From: David Desberg Date: Mon, 12 Mar 2018 11:35:31 -0700 Subject: [PATCH 1/2] update keyvault SDK against latest REST spec --- codegen_mappings.json | 3 +- lib/services/keyVault/lib/keyVaultClient.d.ts | 1834 +++- lib/services/keyVault/lib/keyVaultClient.js | 9406 +++++++++++------ .../lib/models/backupStorageResult.js | 54 + .../lib/models/deletedSasDefinitionBundle.js | 142 + .../lib/models/deletedSasDefinitionItem.js | 118 + .../models/deletedSasDefinitionListResult.js | 70 + .../lib/models/deletedStorageAccountItem.js | 118 + .../lib/models/deletedStorageBundle.js | 142 + .../lib/models/deletedStorageListResult.js | 70 + lib/services/keyVault/lib/models/index.d.ts | 237 +- lib/services/keyVault/lib/models/index.js | 8 + .../lib/models/sasDefinitionAttributes.js | 15 + .../lib/models/sasDefinitionBundle.js | 45 +- .../models/sasDefinitionCreateParameters.js | 43 +- .../keyVault/lib/models/sasDefinitionItem.js | 7 + .../models/sasDefinitionUpdateParameters.js | 43 +- .../lib/models/storageAccountAttributes.js | 15 + .../models/storageAccountCreateParameters.js | 7 + .../keyVault/lib/models/storageAccountItem.js | 7 + .../models/storageAccountUpdateParameters.js | 7 + .../keyVault/lib/models/storageBundle.js | 7 + .../lib/models/storageRestoreParameters.js | 53 + .../lib/keyVaultManagementClient.d.ts | 3 +- .../lib/keyVaultManagementClient.js | 3 +- .../lib/models/checkNameAvailabilityResult.js | 77 + .../keyVaultManagement/lib/models/index.d.ts | 301 +- .../keyVaultManagement/lib/models/index.js | 11 + .../lib/models/logSpecification.js | 68 + .../lib/models/operation.js | 89 + .../lib/models/operationDisplay.js | 77 + .../lib/models/operationListResult.js | 68 + .../keyVaultManagement/lib/models/resource.js | 5 +- .../lib/models/resourceListResult.js | 2 +- .../lib/models/serviceSpecification.js | 62 + .../keyVaultManagement/lib/models/vault.js | 19 +- .../lib/models/vaultAccessPolicyParameters.js | 96 + .../lib/models/vaultAccessPolicyProperties.js | 64 + .../vaultCheckNameAvailabilityParameters.js | 61 + .../models/vaultCreateOrUpdateParameters.js | 16 +- .../lib/models/vaultListResult.js | 3 +- .../lib/models/vaultPatchParameters.js | 100 + .../lib/models/vaultPatchProperties.js | 147 + .../lib/models/vaultProperties.js | 25 +- .../lib/operations/index.d.ts | 562 +- .../lib/operations/index.js | 1 + .../lib/operations/operations.js | 449 + .../lib/operations/vaults.js | 2218 +++- runtime/ms-rest-azure/package-lock.json | 2 +- runtime/ms-rest-azure/package.json | 2 +- .../keyVault-certificate-tests.nock.js | 216 +- test/recordings/keyVault-key-tests.nock.js | 160 +- test/recordings/keyVault-secret-tests.nock.js | 88 +- 53 files changed, 13198 insertions(+), 4248 deletions(-) create mode 100644 lib/services/keyVault/lib/models/backupStorageResult.js create mode 100644 lib/services/keyVault/lib/models/deletedSasDefinitionBundle.js create mode 100644 lib/services/keyVault/lib/models/deletedSasDefinitionItem.js create mode 100644 lib/services/keyVault/lib/models/deletedSasDefinitionListResult.js create mode 100644 lib/services/keyVault/lib/models/deletedStorageAccountItem.js create mode 100644 lib/services/keyVault/lib/models/deletedStorageBundle.js create mode 100644 lib/services/keyVault/lib/models/deletedStorageListResult.js create mode 100644 lib/services/keyVault/lib/models/storageRestoreParameters.js create mode 100644 lib/services/keyVaultManagement/lib/models/checkNameAvailabilityResult.js create mode 100644 lib/services/keyVaultManagement/lib/models/logSpecification.js create mode 100644 lib/services/keyVaultManagement/lib/models/operation.js create mode 100644 lib/services/keyVaultManagement/lib/models/operationDisplay.js create mode 100644 lib/services/keyVaultManagement/lib/models/operationListResult.js create mode 100644 lib/services/keyVaultManagement/lib/models/serviceSpecification.js create mode 100644 lib/services/keyVaultManagement/lib/models/vaultAccessPolicyParameters.js create mode 100644 lib/services/keyVaultManagement/lib/models/vaultAccessPolicyProperties.js create mode 100644 lib/services/keyVaultManagement/lib/models/vaultCheckNameAvailabilityParameters.js create mode 100644 lib/services/keyVaultManagement/lib/models/vaultPatchParameters.js create mode 100644 lib/services/keyVaultManagement/lib/models/vaultPatchProperties.js create mode 100644 lib/services/keyVaultManagement/lib/operations/operations.js diff --git a/codegen_mappings.json b/codegen_mappings.json index 3a43715f4d..9a1d06b10f 100644 --- a/codegen_mappings.json +++ b/codegen_mappings.json @@ -326,7 +326,8 @@ "data-plane": { "packageName": "azure-keyvault", "dir": "keyvault/lib", - "source": "keyvault/data-plane/readme.md" + "source": "keyvault/data-plane/readme.md", + "tag": "package-7.0-preview" }, "resource-manager": { "packageName": "azure-arm-keyvault", diff --git a/lib/services/keyVault/lib/keyVaultClient.d.ts b/lib/services/keyVault/lib/keyVaultClient.d.ts index 25fd9821b5..6db73ea05f 100755 --- a/lib/services/keyVault/lib/keyVaultClient.d.ts +++ b/lib/services/keyVault/lib/keyVaultClient.d.ts @@ -56,7 +56,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The create key operation can be used to create any key type in Azure Key * Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. It requires the keys/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -108,7 +108,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The create key operation can be used to create any key type in Azure Key * Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. It requires the keys/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -179,7 +179,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The import key operation may be used to import any key type into an Azure * Key Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. This operation requires the keys/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -258,7 +258,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The import key operation may be used to import any key type into an Azure * Key Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. This operation requires the keys/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -356,7 +356,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The delete key operation cannot be used to remove individual versions of a * key. This operation removes the cryptographic material associated with the * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or - * Encrypt/Decrypt operations. + * Encrypt/Decrypt operations. This operation requires the keys/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -382,7 +383,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The delete key operation cannot be used to remove individual versions of a * key. This operation removes the cryptographic material associated with the * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or - * Encrypt/Decrypt operations. + * Encrypt/Decrypt operations. This operation requires the keys/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -428,6 +430,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * In order to perform this operation, the key must already exist in the Key * Vault. Note: The cryptographic material of a key itself cannot be changed. + * This operation requires the keys/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -471,6 +474,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * In order to perform this operation, the key must already exist in the Key * Vault. Note: The cryptographic material of a key itself cannot be changed. + * This operation requires the keys/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -530,7 +534,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Gets the public part of a stored key. * * The get key operation is applicable to all key types. If the requested key - * is symmetric, then no key material is released in the response. + * is symmetric, then no key material is released in the response. This + * operation requires the keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -557,7 +562,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Gets the public part of a stored key. * * The get key operation is applicable to all key types. If the requested key - * is symmetric, then no key material is released in the response. + * is symmetric, then no key material is released in the response. This + * operation requires the keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -603,6 +609,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -629,6 +636,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -675,10 +683,10 @@ declare class KeyVaultClient extends AzureServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -704,10 +712,10 @@ declare class KeyVaultClient extends AzureServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -762,7 +770,8 @@ declare class KeyVaultClient extends AzureServiceClient { * be backed up. BACKUP / RESTORE can be performed within geographical * boundaries only; meaning that a BACKUP from one geographical area cannot be * restored to another geographical area. For example, a backup from the US - * geographical area cannot be restored in an EU geographical area. + * geographical area cannot be restored in an EU geographical area. This + * operation requires the key/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -797,7 +806,8 @@ declare class KeyVaultClient extends AzureServiceClient { * be backed up. BACKUP / RESTORE can be performed within geographical * boundaries only; meaning that a BACKUP from one geographical area cannot be * restored to another geographical area. For example, a backup from the US - * geographical area cannot be restored in an EU geographical area. + * geographical area cannot be restored in an EU geographical area. This + * operation requires the key/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -850,7 +860,8 @@ declare class KeyVaultClient extends AzureServiceClient { * will restore all versions and preserve version identifiers. The RESTORE * operation is subject to security constraints: The target Key Vault must be * owned by the same Microsoft Azure Subscription as the source Key Vault The - * user must have RESTORE permission in the target Key Vault. + * user must have RESTORE permission in the target Key Vault. This operation + * requires the keys/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -885,7 +896,8 @@ declare class KeyVaultClient extends AzureServiceClient { * will restore all versions and preserve version identifiers. The RESTORE * operation is subject to security constraints: The target Key Vault must be * owned by the same Microsoft Azure Subscription as the source Key Vault The - * user must have RESTORE permission in the target Key Vault. + * user must have RESTORE permission in the target Key Vault. This operation + * requires the keys/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -937,7 +949,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Azure Key Vault since protection with an asymmetric key can be performed * using public portion of the key. This operation is supported for asymmetric * keys as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/encypt + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -976,7 +989,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Azure Key Vault since protection with an asymmetric key can be performed * using public portion of the key. This operation is supported for asymmetric * keys as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/encypt + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1030,7 +1044,8 @@ declare class KeyVaultClient extends AzureServiceClient { * of the ENCRYPT operation; only a single block of data may be decrypted, the * size of this block is dependent on the target key and the algorithm to be * used. The DECRYPT operation applies to asymmetric and symmetric keys stored - * in Azure Key Vault since it uses the private portion of the key. + * in Azure Key Vault since it uses the private portion of the key. This + * operation requires the keys/decrypt permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1065,7 +1080,8 @@ declare class KeyVaultClient extends AzureServiceClient { * of the ENCRYPT operation; only a single block of data may be decrypted, the * size of this block is dependent on the target key and the algorithm to be * used. The DECRYPT operation applies to asymmetric and symmetric keys stored - * in Azure Key Vault since it uses the private portion of the key. + * in Azure Key Vault since it uses the private portion of the key. This + * operation requires the keys/decrypt permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1116,6 +1132,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The SIGN operation is applicable to asymmetric and symmetric keys stored in * Azure Key Vault since this operation uses the private portion of the key. + * This operation requires the keys/sign permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1150,6 +1167,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * The SIGN operation is applicable to asymmetric and symmetric keys stored in * Azure Key Vault since this operation uses the private portion of the key. + * This operation requires the keys/sign permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1206,7 +1224,7 @@ declare class KeyVaultClient extends AzureServiceClient { * Key Vault since signature verification can be performed using the public * portion of the key but this operation is supported as a convenience for * callers that only have a key-reference and not the public portion of the - * key. + * key. This operation requires the keys/verify permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1245,7 +1263,7 @@ declare class KeyVaultClient extends AzureServiceClient { * Key Vault since signature verification can be performed using the public * portion of the key but this operation is supported as a convenience for * callers that only have a key-reference and not the public portion of the - * key. + * key. This operation requires the keys/verify permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1304,7 +1322,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Key Vault since protection with an asymmetric key can be performed using the * public portion of the key. This operation is supported for asymmetric keys * as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/wrapKey + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1340,7 +1359,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Key Vault since protection with an asymmetric key can be performed using the * public portion of the key. This operation is supported for asymmetric keys * as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/wrapKey + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1393,7 +1413,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The UNWRAP operation supports decryption of a symmetric key using the target * key encryption key. This operation is the reverse of the WRAP operation. The * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure - * Key Vault since it uses the private portion of the key. + * Key Vault since it uses the private portion of the key. This operation + * requires the keys/unwrapKey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1427,7 +1448,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The UNWRAP operation supports decryption of a symmetric key using the target * key encryption key. This operation is the reverse of the WRAP operation. The * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure - * Key Vault since it uses the private portion of the key. + * Key Vault since it uses the private portion of the key. This operation + * requires the keys/unwrapKey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1474,8 +1496,14 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1497,8 +1525,14 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedKeysWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1539,13 +1573,17 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Retrieves the deleted key information plus its attributes. Authorization: - * Requires the keys/get permission. + * @summary Gets the public part of a deleted key. + * + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key + * @param {string} keyName The name of the key. * * @param {object} [options] Optional Parameters. * @@ -1561,13 +1599,17 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedKeyWithHttpOperationResponse(vaultBaseUrl: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves the deleted key information plus its attributes. Authorization: - * Requires the keys/get permission. + * @summary Gets the public part of a deleted key. + * + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key + * @param {string} keyName The name of the key. * * @param {object} [options] Optional Parameters. * @@ -1602,8 +1644,12 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Permanently deletes the specified key. aka purges the key. Authorization: - * Requires the keys/purge permission. + * @summary Permanently deletes the specified key. + * + * The Purge Deleted Key operation is applicable for soft-delete enabled + * vaults. While the operation can be invoked on any vault, it will return an + * error if invoked on a non soft-delete enabled vault. This operation requires + * the keys/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1624,8 +1670,12 @@ declare class KeyVaultClient extends AzureServiceClient { purgeDeletedKeyWithHttpOperationResponse(vaultBaseUrl: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Permanently deletes the specified key. aka purges the key. Authorization: - * Requires the keys/purge permission. + * @summary Permanently deletes the specified key. + * + * The Purge Deleted Key operation is applicable for soft-delete enabled + * vaults. While the operation can be invoked on any vault, it will return an + * error if invoked on a non soft-delete enabled vault. This operation requires + * the keys/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1664,13 +1714,18 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Recovers the deleted key back to its current version under /keys. - * Authorization: Requires the keys/recover permission. + * @summary Recovers the deleted key to its latest version. + * + * The Recover Deleted Key operation is applicable for deleted keys in + * soft-delete enabled vaults. It recovers the deleted key back to its latest + * version under /keys. An attempt to recover an non-deleted key will return an + * error. Consider this the inverse of the delete operation on soft-delete + * enabled vaults. This operation requires the keys/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the deleted key + * @param {string} keyName The name of the deleted key. * * @param {object} [options] Optional Parameters. * @@ -1686,13 +1741,18 @@ declare class KeyVaultClient extends AzureServiceClient { recoverDeletedKeyWithHttpOperationResponse(vaultBaseUrl: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Recovers the deleted key back to its current version under /keys. - * Authorization: Requires the keys/recover permission. + * @summary Recovers the deleted key to its latest version. + * + * The Recover Deleted Key operation is applicable for deleted keys in + * soft-delete enabled vaults. It recovers the deleted key back to its latest + * version under /keys. An attempt to recover an non-deleted key will return an + * error. Consider this the inverse of the delete operation on soft-delete + * enabled vaults. This operation requires the keys/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the deleted key + * @param {string} keyName The name of the deleted key. * * @param {object} [options] Optional Parameters. * @@ -1730,7 +1790,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Sets a secret in a specified key vault. * * The SET operation adds a secret to the Azure Key Vault. If the named secret - * already exists, Azure Key Vault creates a new version of that secret. + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1771,7 +1832,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Sets a secret in a specified key vault. * * The SET operation adds a secret to the Azure Key Vault. If the named secret - * already exists, Azure Key Vault creates a new version of that secret. + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1831,7 +1893,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Deletes a secret from a specified key vault. * * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE - * cannot be applied to an individual version of a secret. + * cannot be applied to an individual version of a secret. This operation + * requires the secrets/delete permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1855,7 +1918,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Deletes a secret from a specified key vault. * * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE - * cannot be applied to an individual version of a secret. + * cannot be applied to an individual version of a secret. This operation + * requires the secrets/delete permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1900,7 +1964,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The UPDATE operation changes specified attributes of an existing stored * secret. Attributes that are not specified in the request are left unchanged. - * The value of a secret itself cannot be changed. + * The value of a secret itself cannot be changed. This operation requires the + * secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1943,7 +2008,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The UPDATE operation changes specified attributes of an existing stored * secret. Attributes that are not specified in the request are left unchanged. - * The value of a secret itself cannot be changed. + * The value of a secret itself cannot be changed. This operation requires the + * secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2003,6 +2069,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Get a specified secret from a given key vault. * * The GET operation is applicable to any secret stored in Azure Key Vault. + * This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2028,6 +2095,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Get a specified secret from a given key vault. * * The GET operation is applicable to any secret stored in Azure Key Vault. + * This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2069,11 +2137,12 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2081,7 +2150,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2095,11 +2164,12 @@ declare class KeyVaultClient extends AzureServiceClient { getSecretsWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2107,7 +2177,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2140,12 +2210,11 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2155,7 +2224,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2169,12 +2238,11 @@ declare class KeyVaultClient extends AzureServiceClient { getSecretVersionsWithHttpOperationResponse(vaultBaseUrl: string, secretName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2184,7 +2252,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2217,7 +2285,10 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -2240,7 +2311,10 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedSecretsWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -2283,13 +2357,15 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Retrieves the deleted secret information plus its attributes. Authorization: - * requires the secrets/get permission. + * @summary Gets the specified deleted secret. + * + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -2305,13 +2381,15 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedSecretWithHttpOperationResponse(vaultBaseUrl: string, secretName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves the deleted secret information plus its attributes. Authorization: - * requires the secrets/get permission. + * @summary Gets the specified deleted secret. + * + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -2346,13 +2424,17 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Permanently deletes the specified secret. aka purges the secret. - * Authorization: requires the secrets/purge permission. + * @summary Permanently deletes the specified secret. + * + * The purge deleted secret operation removes the secret permanently, without + * the possibility of recovery. This operation can only be enabled on a + * soft-delete enabled vault. This operation requires the secrets/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -2368,13 +2450,17 @@ declare class KeyVaultClient extends AzureServiceClient { purgeDeletedSecretWithHttpOperationResponse(vaultBaseUrl: string, secretName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Permanently deletes the specified secret. aka purges the secret. - * Authorization: requires the secrets/purge permission. + * @summary Permanently deletes the specified secret. + * + * The purge deleted secret operation removes the secret permanently, without + * the possibility of recovery. This operation can only be enabled on a + * soft-delete enabled vault. This operation requires the secrets/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -2408,13 +2494,16 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Recovers the deleted secret back to its current version under /secrets. - * Authorization: requires the secrets/recover permission. + * @summary Recovers the deleted secret to the latest version. + * + * Recovers the deleted secret in the specified vault. This operation can only + * be performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the deleted secret + * @param {string} secretName The name of the deleted secret. * * @param {object} [options] Optional Parameters. * @@ -2430,13 +2519,16 @@ declare class KeyVaultClient extends AzureServiceClient { recoverDeletedSecretWithHttpOperationResponse(vaultBaseUrl: string, secretName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Recovers the deleted secret back to its current version under /secrets. - * Authorization: requires the secrets/recover permission. + * @summary Recovers the deleted secret to the latest version. + * + * Recovers the deleted secret in the specified vault. This operation can only + * be performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the deleted secret + * @param {string} secretName The name of the deleted secret. * * @param {object} [options] Optional Parameters. * @@ -2471,8 +2563,11 @@ declare class KeyVaultClient extends AzureServiceClient { /** + * @summary Backs up the specified secret. + * * Requests that a backup of the specified secret be downloaded to the client. - * Authorization: requires the secrets/backup permission. + * All versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2493,8 +2588,11 @@ declare class KeyVaultClient extends AzureServiceClient { backupSecretWithHttpOperationResponse(vaultBaseUrl: string, secretName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** + * @summary Backs up the specified secret. + * * Requests that a backup of the specified secret be downloaded to the client. - * Authorization: requires the secrets/backup permission. + * All versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2534,8 +2632,10 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Restores a backed up secret to a vault. Authorization: requires the - * secrets/restore permission. + * @summary Restores a backed up secret to a vault. + * + * Restores a backed up secret, and all its versions, to a vault. This + * operation requires the secrets/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2557,8 +2657,10 @@ declare class KeyVaultClient extends AzureServiceClient { restoreSecretWithHttpOperationResponse(vaultBaseUrl: string, secretBundleBackup: Buffer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Restores a backed up secret to a vault. Authorization: requires the - * secrets/restore permission. + * @summary Restores a backed up secret to a vault. + * + * Restores a backed up secret, and all its versions, to a vault. This + * operation requires the secrets/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2602,7 +2704,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2627,7 +2730,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2672,7 +2776,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * Deletes all versions of a certificate object along with its associated * policy. Delete certificate cannot be used to remove individual versions of a - * certificate object. + * certificate object. This operation requires the certificates/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2697,7 +2802,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * Deletes all versions of a certificate object along with its associated * policy. Delete certificate cannot be used to remove individual versions of a - * certificate object. + * certificate object. This operation requires the certificates/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2740,7 +2846,7 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Sets the certificate contacts for the specified key vault. * - * Sets the certificate contacts for the specified key vault. Authorization: + * Sets the certificate contacts for the specified key vault. This operation * requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -2767,7 +2873,7 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Sets the certificate contacts for the specified key vault. * - * Sets the certificate contacts for the specified key vault. Authorization: + * Sets the certificate contacts for the specified key vault. This operation * requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -2814,7 +2920,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the certificate contacts for a specified key vault. * * The GetCertificateContacts operation returns the set of certificate contact - * resources in the specified key vault. + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2836,7 +2943,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the certificate contacts for a specified key vault. * * The GetCertificateContacts operation returns the set of certificate contact - * resources in the specified key vault. + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2876,8 +2984,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Deletes the certificate contacts for a specified key vault. * - * Deletes the certificate contacts for a specified key vault certificate. - * Authorization: requires the certificates/managecontacts permission. + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2898,8 +3006,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Deletes the certificate contacts for a specified key vault. * - * Deletes the certificate contacts for a specified key vault certificate. - * Authorization: requires the certificates/managecontacts permission. + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2940,7 +3048,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2965,7 +3074,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3010,7 +3120,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Sets the specified certificate issuer. * * The SetCertificateIssuer operation adds or updates the specified certificate - * issuer. + * issuer. This operation requires the certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3058,7 +3168,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Sets the specified certificate issuer. * * The SetCertificateIssuer operation adds or updates the specified certificate - * issuer. + * issuer. This operation requires the certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3125,7 +3235,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Updates the specified certificate issuer. * * The UpdateCertificateIssuer operation performs an update on the specified - * certificate issuer entity. + * certificate issuer entity. This operation requires the + * certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3173,7 +3284,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Updates the specified certificate issuer. * * The UpdateCertificateIssuer operation performs an update on the specified - * certificate issuer entity. + * certificate issuer entity. This operation requires the + * certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3240,7 +3352,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the specified certificate issuer. * * The GetCertificateIssuer operation returns the specified certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3264,7 +3377,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the specified certificate issuer. * * The GetCertificateIssuer operation returns the specified certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3307,7 +3421,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Deletes the specified certificate issuer. * * The DeleteCertificateIssuer operation permanently removes the specified - * certificate issuer from the vault. + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3331,7 +3446,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Deletes the specified certificate issuer. * * The DeleteCertificateIssuer operation permanently removes the specified - * certificate issuer from the vault. + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3373,7 +3489,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Creates a new certificate. * - * If this is the first version, the certificate resource is created. + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3484,7 +3601,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Creates a new certificate. * - * If this is the first version, the certificate resource is created. + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3617,7 +3735,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Imports an existing valid certificate, containing a private key, into Azure * Key Vault. The certificate to be imported can be in either PFX or PEM * format. If the certificate is in PEM format the PEM file must contain the - * key as well as x509 certificates. + * key as well as x509 certificates. This operation requires the + * certificates/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3738,7 +3857,8 @@ declare class KeyVaultClient extends AzureServiceClient { * Imports an existing valid certificate, containing a private key, into Azure * Key Vault. The certificate to be imported can be in either PFX or PEM * format. If the certificate is in PEM format the PEM file must contain the - * key as well as x509 certificates. + * key as well as x509 certificates. This operation requires the + * certificates/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3876,7 +3996,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3903,7 +4024,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3949,7 +4071,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the policy for a certificate. * * The GetCertificatePolicy operation returns the specified certificate policy - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3974,7 +4097,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Lists the policy for a certificate. * * The GetCertificatePolicy operation returns the specified certificate policy - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4017,7 +4141,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Updates the policy for a certificate. * - * Set specified members in the certificate policy. Leave others as null. + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4118,7 +4243,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** * @summary Updates the policy for a certificate. * - * Set specified members in the certificate policy. Leave others as null. + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4240,8 +4366,8 @@ declare class KeyVaultClient extends AzureServiceClient { * certificate. * * The UpdateCertificate operation applies the specified update on the given - * certificate; note the only elements being updated are the certificate's - * attributes. + * certificate; the only elements updated are the certificate's attributes. + * This operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4357,8 +4483,8 @@ declare class KeyVaultClient extends AzureServiceClient { * certificate. * * The UpdateCertificate operation applies the specified update on the given - * certificate; note the only elements being updated are the certificate's - * attributes. + * certificate; the only elements updated are the certificate's attributes. + * This operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4489,7 +4615,9 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Gets information about a specified certificate. Authorization: requires the + * @summary Gets information about a certificate. + * + * Gets information about a specific certificate. This operation requires the * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -4514,7 +4642,9 @@ declare class KeyVaultClient extends AzureServiceClient { getCertificateWithHttpOperationResponse(vaultBaseUrl: string, certificateName: string, certificateVersion: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about a specified certificate. Authorization: requires the + * @summary Gets information about a certificate. + * + * Gets information about a specific certificate. This operation requires the * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -4558,8 +4688,10 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Updates a certificate operation. Authorization: requires the - * certificates/update permission. + * @summary Updates a certificate operation. + * + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4583,8 +4715,10 @@ declare class KeyVaultClient extends AzureServiceClient { updateCertificateOperationWithHttpOperationResponse(vaultBaseUrl: string, certificateName: string, cancellationRequested: boolean, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a certificate operation. Authorization: requires the - * certificates/update permission. + * @summary Updates a certificate operation. + * + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4627,8 +4761,10 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Gets the operation associated with a specified certificate. Authorization: - * requires the certificates/get permission. + * @summary Gets the creation operation of a certificate. + * + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4649,8 +4785,10 @@ declare class KeyVaultClient extends AzureServiceClient { getCertificateOperationWithHttpOperationResponse(vaultBaseUrl: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the operation associated with a specified certificate. Authorization: - * requires the certificates/get permission. + * @summary Gets the creation operation of a certificate. + * + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4690,8 +4828,11 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Deletes the operation for a specified certificate. Authorization: requires - * the certificates/update permission. + * @summary Deletes the creation operation for a specific certificate. + * + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4712,8 +4853,11 @@ declare class KeyVaultClient extends AzureServiceClient { deleteCertificateOperationWithHttpOperationResponse(vaultBaseUrl: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the operation for a specified certificate. Authorization: requires - * the certificates/update permission. + * @summary Deletes the creation operation for a specific certificate. + * + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4757,8 +4901,8 @@ declare class KeyVaultClient extends AzureServiceClient { * existing on the server. * * The MergeCertificate operation performs the merging of a certificate or - * certificate chain with a key pair currently available in the service. - * Authorization: requires the certificates/update permission. + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4800,8 +4944,8 @@ declare class KeyVaultClient extends AzureServiceClient { * existing on the server. * * The MergeCertificate operation performs the merging of a certificate or - * certificate chain with a key pair currently available in the service. - * Authorization: requires the certificates/update permission. + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4858,12 +5002,14 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4885,12 +5031,14 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedCertificatesWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4936,7 +5084,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The GetDeletedCertificate operation retrieves the deleted certificate * information plus its attributes, such as retention interval, scheduled - * permanent deletion and the current deletion recovery level. + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4961,7 +5110,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The GetDeletedCertificate operation retrieves the deleted certificate * information plus its attributes, such as retention interval, scheduled - * permanent deletion and the current deletion recovery level. + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5006,8 +5156,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The PurgeDeletedCertificate operation performs an irreversible deletion of * the specified certificate, without possibility for recovery. The operation - * is not available if the recovery level does not specify 'Purgeable'. - * Requires the explicit granting of the 'purge' permission. + * is not available if the recovery level does not specify 'Purgeable'. This + * operation requires the certificate/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5032,8 +5182,8 @@ declare class KeyVaultClient extends AzureServiceClient { * * The PurgeDeletedCertificate operation performs an irreversible deletion of * the specified certificate, without possibility for recovery. The operation - * is not available if the recovery level does not specify 'Purgeable'. - * Requires the explicit granting of the 'purge' permission. + * is not available if the recovery level does not specify 'Purgeable'. This + * operation requires the certificate/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5078,7 +5228,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The RecoverDeletedCertificate operation performs the reversal of the Delete * operation. The operation is applicable in vaults enabled for soft-delete, * and must be issued during the retention interval (available in the deleted - * certificate's attributes). + * certificate's attributes). This operation requires the certificates/recover + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5105,7 +5256,8 @@ declare class KeyVaultClient extends AzureServiceClient { * The RecoverDeletedCertificate operation performs the reversal of the Delete * operation. The operation is applicable in vaults enabled for soft-delete, * and must be issued during the retention interval (available in the deleted - * certificate's attributes). + * certificate's attributes). This operation requires the certificates/recover + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5145,7 +5297,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5167,7 +5320,8 @@ declare class KeyVaultClient extends AzureServiceClient { getStorageAccountsWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5208,36 +5362,46 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * Deletes a storage account. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getDeletedStorageAccountsWithHttpOperationResponse(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a storage account. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5248,7 +5412,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {DeletedStorageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5256,20 +5420,25 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageBundle} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * {DeletedStorageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; - deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getDeletedStorageAccounts(vaultBaseUrl: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedStorageAccounts(vaultBaseUrl: string, callback: ServiceCallback): void; + getDeletedStorageAccounts(vaultBaseUrl: string, options: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about a specified storage account. + * @summary Gets the specified deleted storage account. + * + * The Get Deleted Storage Account operation returns the specified deleted + * storage account along with its attributes. This operation requires the + * storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5283,14 +5452,18 @@ declare class KeyVaultClient extends AzureServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getDeletedStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about a specified storage account. + * @summary Gets the specified deleted storage account. + * + * The Get Deleted Storage Account operation returns the specified deleted + * storage account along with its attributes. This operation requires the + * storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5309,7 +5482,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {DeletedStorageBundle} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5317,87 +5490,59 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageBundle} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * {DeletedStorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageBundle} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; - getStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + getDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a new storage account. + * @summary Permanently deletes the specified storage account. + * + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on + * a soft-delete enabled vault. This operation requires the storage/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} resourceId Storage account resource id. - * - * @param {string} activeKeyName Current active storage account key name. - * - * @param {boolean} autoRegenerateKey whether keyvault should manage the - * storage account for the user. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - setStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options?: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + purgeDeletedStorgeAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a new storage account. + * @summary Permanently deletes the specified storage account. + * + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on + * a soft-delete enabled vault. This operation requires the storage/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} resourceId Storage account resource id. - * - * @param {string} activeKeyName Current active storage account key name. - * - * @param {boolean} autoRegenerateKey whether keyvault should manage the - * storage account for the user. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5408,7 +5553,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5416,20 +5561,23 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageBundle} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options?: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; - setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, callback: ServiceCallback): void; - setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + purgeDeletedStorgeAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + purgeDeletedStorgeAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + purgeDeletedStorgeAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the specified attributes associated with the given storage account. + * @summary Recovers the deleted storage account. + * + * Recovers the deleted storage account in the specified vault. This operation + * can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5438,24 +5586,6 @@ declare class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.activeKeyName] The current active storage account - * key name. - * - * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage - * the storage account for the user. - * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5465,10 +5595,14 @@ declare class KeyVaultClient extends AzureServiceClient { * * @reject {Error|ServiceError} - The error object. */ - updateStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + recoverDeletedStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the specified attributes associated with the given storage account. + * @summary Recovers the deleted storage account. + * + * Recovers the deleted storage account in the specified vault. This operation + * can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5477,24 +5611,6 @@ declare class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.activeKeyName] The current active storage account - * key name. - * - * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage - * the storage account for the user. - * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5520,21 +5636,22 @@ declare class KeyVaultClient extends AzureServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; - updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; - updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + recoverDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + recoverDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + recoverDeletedStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Regenerates the specified key value for the given storage account. + * @summary Backs up the specified storage account. + * + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} keyName The storage account key name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5542,22 +5659,23 @@ declare class KeyVaultClient extends AzureServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - regenerateStorageAccountKeyWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + backupStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Regenerates the specified key value for the given storage account. + * @summary Backs up the specified storage account. + * + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} keyName The storage account key name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5570,7 +5688,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {BackupStorageResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5578,55 +5696,57 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageBundle} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * {BackupStorageResult} [result] - The deserialized result object if an error did not occur. + * See {@link BackupStorageResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, callback: ServiceCallback): void; - regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + backupStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + backupStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + backupStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List storage SAS definitions for the given storage account. + * @summary Restores a backed up storage account to a vault. + * + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. + * @param {buffer} storageBundleBackup The backup blob associated with a + * storage account. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getSasDefinitionsWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + restoreStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageBundleBackup: Buffer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List storage SAS definitions for the given storage account. + * @summary Restores a backed up storage account to a vault. + * + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. + * @param {buffer} storageBundleBackup The backup blob associated with a + * storage account. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5637,7 +5757,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {SasDefinitionListResult} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5645,29 +5765,27 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SasDefinitionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionListResult} for more - * information. + * {StorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link StorageBundle} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; - getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restoreStorageAccount(vaultBaseUrl: string, storageBundleBackup: Buffer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restoreStorageAccount(vaultBaseUrl: string, storageBundleBackup: Buffer, callback: ServiceCallback): void; + restoreStorageAccount(vaultBaseUrl: string, storageBundleBackup: Buffer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a SAS definition from a specified storage account. + * Deletes a storage account. This operation requires the storage/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5675,22 +5793,21 @@ declare class KeyVaultClient extends AzureServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a SAS definition from a specified storage account. + * Deletes a storage account. This operation requires the storage/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5703,7 +5820,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {SasDefinitionBundle} - The deserialized result object. + * @resolve {DeletedStorageBundle} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5711,28 +5828,27 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SasDefinitionBundle} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * {DeletedStorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageBundle} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; - deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + deleteStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about a SAS definition for the specified storage account. + * Gets information about a specified storage account. This operation requires + * the storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5740,22 +5856,21 @@ declare class KeyVaultClient extends AzureServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about a SAS definition for the specified storage account. + * Gets information about a specified storage account. This operation requires + * the storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5768,7 +5883,7 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Promise} A promise is returned. * - * @resolve {SasDefinitionBundle} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5776,34 +5891,739 @@ declare class KeyVaultClient extends AzureServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SasDefinitionBundle} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * {StorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link StorageBundle} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; - getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + getStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a new SAS definition for the specified storage account. + * Creates or updates a new storage account. This operation requires the + * storage/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. + * @param {string} resourceId Storage account resource id. * - * @param {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @param {string} activeKeyName Current active storage account key name. + * + * @param {boolean} autoRegenerateKey whether keyvault should manage the + * storage account for the user. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + setStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options?: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a new storage account. This operation requires the + * storage/set permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} resourceId Storage account resource id. + * + * @param {string} activeKeyName Current active storage account key name. + * + * @param {boolean} autoRegenerateKey whether keyvault should manage the + * storage account for the user. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {StorageBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {StorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link StorageBundle} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options?: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; + setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, callback: ServiceCallback): void; + setStorageAccount(vaultBaseUrl: string, storageAccountName: string, resourceId: string, activeKeyName: string, autoRegenerateKey: boolean, options: { regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.activeKeyName] The current active storage account + * key name. + * + * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage + * the storage account for the user. + * + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateStorageAccountWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.activeKeyName] The current active storage account + * key name. + * + * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage + * the storage account for the user. + * + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {StorageBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {StorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link StorageBundle} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, options?: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; + updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + updateStorageAccount(vaultBaseUrl: string, storageAccountName: string, options: { activeKeyName? : string, autoRegenerateKey? : boolean, regenerationPeriod? : string, storageAccountAttributes? : models.StorageAccountAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} keyName The storage account key name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + regenerateStorageAccountKeyWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} keyName The storage account key name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {StorageBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {StorageBundle} [result] - The deserialized result object if an error did not occur. + * See {@link StorageBundle} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, callback: ServiceCallback): void; + regenerateStorageAccountKey(vaultBaseUrl: string, storageAccountName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getSasDefinitionsWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SasDefinitionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SasDefinitionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SasDefinitionListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + getSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDeletedSasDefinitionsWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DeletedSasDefinitionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DeletedSasDefinitionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedSasDefinitions(vaultBaseUrl: string, storageAccountName: string, callback: ServiceCallback): void; + getDeletedSasDefinitions(vaultBaseUrl: string, storageAccountName: string, options: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the specified deleted sas definition. + * + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDeletedSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the specified deleted sas definition. + * + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DeletedSasDefinitionBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DeletedSasDefinitionBundle} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionBundle} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; + getDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Recovers the deleted SAS definition. + * + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This + * operation requires the storage/recover permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + recoverDeletedSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Recovers the deleted SAS definition. + * + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This + * operation requires the storage/recover permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SasDefinitionBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SasDefinitionBundle} [result] - The deserialized result object if an error did not occur. + * See {@link SasDefinitionBundle} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + recoverDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + recoverDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; + recoverDeletedSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DeletedSasDefinitionBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DeletedSasDefinitionBundle} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionBundle} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; + deleteSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets information about a SAS definition for the specified storage account. + * This operation requires the storage/getsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets information about a SAS definition for the specified storage account. + * This operation requires the storage/getsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SasDefinitionBundle} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SasDefinitionBundle} [result] - The deserialized result object if an error did not occur. + * See {@link SasDefinitionBundle} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; + getSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a new SAS definition for the specified storage account. + * This operation requires the storage/setsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {string} templateUri The SAS definition token template signed with an + * arbitrary key. Tokens created according to the SAS definition will have the + * same properties as the template. + * + * @param {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * + * @param {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS * definition. * * @param {boolean} [options.sasDefinitionAttributes.enabled] the enabled state @@ -5821,10 +6641,11 @@ declare class KeyVaultClient extends AzureServiceClient { * * @reject {Error|ServiceError} - The error object. */ - setSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, parameters: { [propertyName: string]: string }, options?: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + setSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, templateUri: string, sasType: string, validityPeriod: string, options?: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates or updates a new SAS definition for the specified storage account. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5833,8 +6654,15 @@ declare class KeyVaultClient extends AzureServiceClient { * * @param {string} sasDefinitionName The name of the SAS definition. * - * @param {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @param {string} templateUri The SAS definition token template signed with an + * arbitrary key. Tokens created according to the SAS definition will have the + * same properties as the template. + * + * @param {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * + * @param {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -5872,13 +6700,14 @@ declare class KeyVaultClient extends AzureServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, parameters: { [propertyName: string]: string }, options?: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; - setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, parameters: { [propertyName: string]: string }, callback: ServiceCallback): void; - setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, parameters: { [propertyName: string]: string }, options: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, templateUri: string, sasType: string, validityPeriod: string, options?: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; + setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, templateUri: string, sasType: string, validityPeriod: string, callback: ServiceCallback): void; + setSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, templateUri: string, sasType: string, validityPeriod: string, options: { sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates the specified attributes associated with the given SAS definition. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5889,8 +6718,15 @@ declare class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Sas definition update metadata in the - * form of key-value pairs. + * @param {string} [options.templateUri] The SAS definition token template + * signed with an arbitrary key. Tokens created according to the SAS + * definition will have the same properties as the template. + * + * @param {string} [options.sasType] The type of SAS token the SAS definition + * will create. Possible values include: 'account', 'service' + * + * @param {string} [options.validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS * definition. @@ -5910,10 +6746,11 @@ declare class KeyVaultClient extends AzureServiceClient { * * @reject {Error|ServiceError} - The error object. */ - updateSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { parameters? : { [propertyName: string]: string }, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; + updateSasDefinitionWithHttpOperationResponse(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { templateUri? : string, sasType? : string, validityPeriod? : string, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates the specified attributes associated with the given SAS definition. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5924,8 +6761,15 @@ declare class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Sas definition update metadata in the - * form of key-value pairs. + * @param {string} [options.templateUri] The SAS definition token template + * signed with an arbitrary key. Tokens created according to the SAS + * definition will have the same properties as the template. + * + * @param {string} [options.sasType] The type of SAS token the SAS definition + * will create. Possible values include: 'account', 'service' + * + * @param {string} [options.validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS * definition. @@ -5961,15 +6805,16 @@ declare class KeyVaultClient extends AzureServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { parameters? : { [propertyName: string]: string }, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; + updateSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options?: { templateUri? : string, sasType? : string, validityPeriod? : string, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }): Promise; updateSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, callback: ServiceCallback): void; - updateSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { parameters? : { [propertyName: string]: string }, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateSasDefinition(vaultBaseUrl: string, storageAccountName: string, sasDefinitionName: string, options: { templateUri? : string, sasType? : string, validityPeriod? : string, sasDefinitionAttributes? : models.SasDefinitionAttributes, tags? : { [propertyName: string]: string }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5991,6 +6836,7 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6032,10 +6878,10 @@ declare class KeyVaultClient extends AzureServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6058,10 +6904,10 @@ declare class KeyVaultClient extends AzureServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6099,8 +6945,14 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6119,8 +6971,14 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedKeysNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6158,11 +7016,12 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6181,11 +7040,12 @@ declare class KeyVaultClient extends AzureServiceClient { getSecretsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6223,12 +7083,11 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6247,12 +7106,11 @@ declare class KeyVaultClient extends AzureServiceClient { getSecretVersionsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6290,7 +7148,10 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call @@ -6310,7 +7171,10 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedSecretsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call @@ -6353,7 +7217,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6375,7 +7240,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6416,7 +7282,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6438,7 +7305,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6480,7 +7348,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6502,7 +7371,8 @@ declare class KeyVaultClient extends AzureServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6540,12 +7410,14 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6564,12 +7436,14 @@ declare class KeyVaultClient extends AzureServiceClient { getDeletedCertificatesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6608,7 +7482,8 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6627,7 +7502,8 @@ declare class KeyVaultClient extends AzureServiceClient { getStorageAccountsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6665,7 +7541,74 @@ declare class KeyVaultClient extends AzureServiceClient { /** - * List storage SAS definitions for the given storage account. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDeletedStorageAccountsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DeletedStorageListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DeletedStorageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedStorageAccountsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedStorageAccountsNext(nextPageLink: string, callback: ServiceCallback): void; + getDeletedStorageAccountsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6684,7 +7627,8 @@ declare class KeyVaultClient extends AzureServiceClient { getSasDefinitionsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List storage SAS definitions for the given storage account. + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6720,6 +7664,74 @@ declare class KeyVaultClient extends AzureServiceClient { getSasDefinitionsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; getSasDefinitionsNext(nextPageLink: string, callback: ServiceCallback): void; getSasDefinitionsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDeletedSasDefinitionsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DeletedSasDefinitionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DeletedSasDefinitionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedSasDefinitionsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDeletedSasDefinitionsNext(nextPageLink: string, callback: ServiceCallback): void; + getDeletedSasDefinitionsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export = KeyVaultClient; diff --git a/lib/services/keyVault/lib/keyVaultClient.js b/lib/services/keyVault/lib/keyVaultClient.js index 83bafa3d4b..6204efc45f 100755 --- a/lib/services/keyVault/lib/keyVaultClient.js +++ b/lib/services/keyVault/lib/keyVaultClient.js @@ -28,7 +28,7 @@ const models = require('./models'); * * The create key operation can be used to create any key type in Azure Key * Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. It requires the keys/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -266,7 +266,7 @@ function _createKey(vaultBaseUrl, keyName, kty, options, callback) { * * The import key operation may be used to import any key type into an Azure * Key Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * version of the key. This operation requires the keys/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -511,7 +511,8 @@ function _importKey(vaultBaseUrl, keyName, key, options, callback) { * The delete key operation cannot be used to remove individual versions of a * key. This operation removes the cryptographic material associated with the * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or - * Encrypt/Decrypt operations. + * Encrypt/Decrypt operations. This operation requires the keys/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -660,6 +661,7 @@ function _deleteKey(vaultBaseUrl, keyName, options, callback) { * * In order to perform this operation, the key must already exist in the Key * Vault. Note: The cryptographic material of a key itself cannot be changed. + * This operation requires the keys/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -864,7 +866,8 @@ function _updateKey(vaultBaseUrl, keyName, keyVersion, options, callback) { * @summary Gets the public part of a stored key. * * The get key operation is applicable to all key types. If the requested key - * is symmetric, then no key material is released in the response. + * is symmetric, then no key material is released in the response. This + * operation requires the keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1017,6 +1020,7 @@ function _getKey(vaultBaseUrl, keyName, keyVersion, options, callback) { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1183,10 +1187,10 @@ function _getKeyVersions(vaultBaseUrl, keyName, options, callback) { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1357,7 +1361,8 @@ function _getKeys(vaultBaseUrl, options, callback) { * be backed up. BACKUP / RESTORE can be performed within geographical * boundaries only; meaning that a BACKUP from one geographical area cannot be * restored to another geographical area. For example, a backup from the US - * geographical area cannot be restored in an EU geographical area. + * geographical area cannot be restored in an EU geographical area. This + * operation requires the key/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1513,7 +1518,8 @@ function _backupKey(vaultBaseUrl, keyName, options, callback) { * will restore all versions and preserve version identifiers. The RESTORE * operation is subject to security constraints: The target Key Vault must be * owned by the same Microsoft Azure Subscription as the source Key Vault The - * user must have RESTORE permission in the target Key Vault. + * user must have RESTORE permission in the target Key Vault. This operation + * requires the keys/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1686,7 +1692,8 @@ function _restoreKey(vaultBaseUrl, keyBundleBackup, options, callback) { * Azure Key Vault since protection with an asymmetric key can be performed * using public portion of the key. This operation is supported for asymmetric * keys as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/encypt + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -1879,7 +1886,8 @@ function _encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, * of the ENCRYPT operation; only a single block of data may be decrypted, the * size of this block is dependent on the target key and the algorithm to be * used. The DECRYPT operation applies to asymmetric and symmetric keys stored - * in Azure Key Vault since it uses the private portion of the key. + * in Azure Key Vault since it uses the private portion of the key. This + * operation requires the keys/decrypt permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2069,6 +2077,7 @@ function _decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, * * The SIGN operation is applicable to asymmetric and symmetric keys stored in * Azure Key Vault since this operation uses the private portion of the key. + * This operation requires the keys/sign permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2264,7 +2273,7 @@ function _sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, cal * Key Vault since signature verification can be performed using the public * portion of the key but this operation is supported as a convenience for * callers that only have a key-reference and not the public portion of the - * key. + * key. This operation requires the keys/verify permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2466,7 +2475,8 @@ function _verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature * Key Vault since protection with an asymmetric key can be performed using the * public portion of the key. This operation is supported for asymmetric keys * as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * access to the public key material. This operation requires the keys/wrapKey + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2658,7 +2668,8 @@ function _wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, * The UNWRAP operation supports decryption of a symmetric key using the target * key encryption key. This operation is the reverse of the WRAP operation. The * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure - * Key Vault since it uses the private portion of the key. + * Key Vault since it uses the private portion of the key. This operation + * requires the keys/unwrapKey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -2844,8 +2855,14 @@ function _unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3002,13 +3019,17 @@ function _getDeletedKeys(vaultBaseUrl, options, callback) { } /** - * Retrieves the deleted key information plus its attributes. Authorization: - * Requires the keys/get permission. + * @summary Gets the public part of a deleted key. + * + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key + * @param {string} keyName The name of the key. * * @param {object} [options] Optional Parameters. * @@ -3146,8 +3167,12 @@ function _getDeletedKey(vaultBaseUrl, keyName, options, callback) { } /** - * Permanently deletes the specified key. aka purges the key. Authorization: - * Requires the keys/purge permission. + * @summary Permanently deletes the specified key. + * + * The Purge Deleted Key operation is applicable for soft-delete enabled + * vaults. While the operation can be invoked on any vault, it will return an + * error if invoked on a non soft-delete enabled vault. This operation requires + * the keys/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3272,13 +3297,18 @@ function _purgeDeletedKey(vaultBaseUrl, keyName, options, callback) { } /** - * Recovers the deleted key back to its current version under /keys. - * Authorization: Requires the keys/recover permission. + * @summary Recovers the deleted key to its latest version. + * + * The Recover Deleted Key operation is applicable for deleted keys in + * soft-delete enabled vaults. It recovers the deleted key back to its latest + * version under /keys. An attempt to recover an non-deleted key will return an + * error. Consider this the inverse of the delete operation on soft-delete + * enabled vaults. This operation requires the keys/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the deleted key + * @param {string} keyName The name of the deleted key. * * @param {object} [options] Optional Parameters. * @@ -3419,7 +3449,8 @@ function _recoverDeletedKey(vaultBaseUrl, keyName, options, callback) { * @summary Sets a secret in a specified key vault. * * The SET operation adds a secret to the Azure Key Vault. If the named secret - * already exists, Azure Key Vault creates a new version of that secret. + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3626,7 +3657,8 @@ function _setSecret(vaultBaseUrl, secretName, value, options, callback) { * @summary Deletes a secret from a specified key vault. * * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE - * cannot be applied to an individual version of a secret. + * cannot be applied to an individual version of a secret. This operation + * requires the secrets/delete permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3774,7 +3806,8 @@ function _deleteSecret(vaultBaseUrl, secretName, options, callback) { * * The UPDATE operation changes specified attributes of an existing stored * secret. Attributes that are not specified in the request are left unchanged. - * The value of a secret itself cannot be changed. + * The value of a secret itself cannot be changed. This operation requires the + * secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -3975,6 +4008,7 @@ function _updateSecret(vaultBaseUrl, secretName, secretVersion, options, callbac * @summary Get a specified secret from a given key vault. * * The GET operation is applicable to any secret stored in Azure Key Vault. + * This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4123,11 +4157,12 @@ function _getSecret(vaultBaseUrl, secretName, secretVersion, options, callback) } /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4135,7 +4170,7 @@ function _getSecret(vaultBaseUrl, secretName, secretVersion, options, callback) * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4284,12 +4319,11 @@ function _getSecrets(vaultBaseUrl, options, callback) { } /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -4299,7 +4333,7 @@ function _getSecrets(vaultBaseUrl, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4452,7 +4486,10 @@ function _getSecretVersions(vaultBaseUrl, secretName, options, callback) { } /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -4611,13 +4648,15 @@ function _getDeletedSecrets(vaultBaseUrl, options, callback) { } /** - * Retrieves the deleted secret information plus its attributes. Authorization: - * requires the secrets/get permission. + * @summary Gets the specified deleted secret. + * + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -4755,13 +4794,17 @@ function _getDeletedSecret(vaultBaseUrl, secretName, options, callback) { } /** - * Permanently deletes the specified secret. aka purges the secret. - * Authorization: requires the secrets/purge permission. + * @summary Permanently deletes the specified secret. + * + * The purge deleted secret operation removes the secret permanently, without + * the possibility of recovery. This operation can only be enabled on a + * soft-delete enabled vault. This operation requires the secrets/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -4881,13 +4924,16 @@ function _purgeDeletedSecret(vaultBaseUrl, secretName, options, callback) { } /** - * Recovers the deleted secret back to its current version under /secrets. - * Authorization: requires the secrets/recover permission. + * @summary Recovers the deleted secret to the latest version. + * + * Recovers the deleted secret in the specified vault. This operation can only + * be performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the deleted secret + * @param {string} secretName The name of the deleted secret. * * @param {object} [options] Optional Parameters. * @@ -5025,8 +5071,11 @@ function _recoverDeletedSecret(vaultBaseUrl, secretName, options, callback) { } /** + * @summary Backs up the specified secret. + * * Requests that a backup of the specified secret be downloaded to the client. - * Authorization: requires the secrets/backup permission. + * All versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5169,8 +5218,10 @@ function _backupSecret(vaultBaseUrl, secretName, options, callback) { } /** - * Restores a backed up secret to a vault. Authorization: requires the - * secrets/restore permission. + * @summary Restores a backed up secret to a vault. + * + * Restores a backed up secret, and all its versions, to a vault. This + * operation requires the secrets/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5335,7 +5386,8 @@ function _restoreSecret(vaultBaseUrl, secretBundleBackup, options, callback) { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5496,7 +5548,8 @@ function _getCertificates(vaultBaseUrl, options, callback) { * * Deletes all versions of a certificate object along with its associated * policy. Delete certificate cannot be used to remove individual versions of a - * certificate object. + * certificate object. This operation requires the certificates/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5642,7 +5695,7 @@ function _deleteCertificate(vaultBaseUrl, certificateName, options, callback) { /** * @summary Sets the certificate contacts for the specified key vault. * - * Sets the certificate contacts for the specified key vault. Authorization: + * Sets the certificate contacts for the specified key vault. This operation * requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -5805,7 +5858,8 @@ function _setCertificateContacts(vaultBaseUrl, contacts, options, callback) { * @summary Lists the certificate contacts for a specified key vault. * * The GetCertificateContacts operation returns the set of certificate contact - * resources in the specified key vault. + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -5944,8 +5998,8 @@ function _getCertificateContacts(vaultBaseUrl, options, callback) { /** * @summary Deletes the certificate contacts for a specified key vault. * - * Deletes the certificate contacts for a specified key vault certificate. - * Authorization: requires the certificates/managecontacts permission. + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6085,7 +6139,8 @@ function _deleteCertificateContacts(vaultBaseUrl, options, callback) { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6246,7 +6301,7 @@ function _getCertificateIssuers(vaultBaseUrl, options, callback) { * @summary Sets the specified certificate issuer. * * The SetCertificateIssuer operation adds or updates the specified certificate - * issuer. + * issuer. This operation requires the certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6444,7 +6499,8 @@ function _setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, call * @summary Updates the specified certificate issuer. * * The UpdateCertificateIssuer operation performs an update on the specified - * certificate issuer entity. + * certificate issuer entity. This operation requires the + * certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6643,7 +6699,8 @@ function _updateCertificateIssuer(vaultBaseUrl, issuerName, options, callback) { * @summary Lists the specified certificate issuer. * * The GetCertificateIssuer operation returns the specified certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6789,7 +6846,8 @@ function _getCertificateIssuer(vaultBaseUrl, issuerName, options, callback) { * @summary Deletes the specified certificate issuer. * * The DeleteCertificateIssuer operation permanently removes the specified - * certificate issuer from the vault. + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -6934,7 +6992,8 @@ function _deleteCertificateIssuer(vaultBaseUrl, issuerName, options, callback) { /** * @summary Creates a new certificate. * - * If this is the first version, the certificate resource is created. + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -7207,7 +7266,8 @@ function _createCertificate(vaultBaseUrl, certificateName, options, callback) { * Imports an existing valid certificate, containing a private key, into Azure * Key Vault. The certificate to be imported can be in either PFX or PEM * format. If the certificate is in PEM format the PEM file must contain the - * key as well as x509 certificates. + * key as well as x509 certificates. This operation requires the + * certificates/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -7494,7 +7554,8 @@ function _importCertificate(vaultBaseUrl, certificateName, base64EncodedCertific * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -7660,7 +7721,8 @@ function _getCertificateVersions(vaultBaseUrl, certificateName, options, callbac * @summary Lists the policy for a certificate. * * The GetCertificatePolicy operation returns the specified certificate policy - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -7806,7 +7868,8 @@ function _getCertificatePolicy(vaultBaseUrl, certificateName, options, callback) /** * @summary Updates the policy for a certificate. * - * Set specified members in the certificate policy. Leave others as null. + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -8048,8 +8111,8 @@ function _updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePoli * certificate. * * The UpdateCertificate operation applies the specified update on the given - * certificate; note the only elements being updated are the certificate's - * attributes. + * certificate; the only elements updated are the certificate's attributes. + * This operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -8318,7 +8381,9 @@ function _updateCertificate(vaultBaseUrl, certificateName, certificateVersion, o } /** - * Gets information about a specified certificate. Authorization: requires the + * @summary Gets information about a certificate. + * + * Gets information about a specific certificate. This operation requires the * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example @@ -8469,8 +8534,10 @@ function _getCertificate(vaultBaseUrl, certificateName, certificateVersion, opti } /** - * Updates a certificate operation. Authorization: requires the - * certificates/update permission. + * @summary Updates a certificate operation. + * + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -8638,8 +8705,10 @@ function _updateCertificateOperation(vaultBaseUrl, certificateName, cancellation } /** - * Gets the operation associated with a specified certificate. Authorization: - * requires the certificates/get permission. + * @summary Gets the creation operation of a certificate. + * + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -8782,8 +8851,11 @@ function _getCertificateOperation(vaultBaseUrl, certificateName, options, callba } /** - * Deletes the operation for a specified certificate. Authorization: requires - * the certificates/update permission. + * @summary Deletes the creation operation for a specific certificate. + * + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -8930,8 +9002,8 @@ function _deleteCertificateOperation(vaultBaseUrl, certificateName, options, cal * existing on the server. * * The MergeCertificate operation performs the merging of a certificate or - * certificate chain with a key pair currently available in the service. - * Authorization: requires the certificates/update permission. + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9129,12 +9201,14 @@ function _mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, opti } /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9296,7 +9370,8 @@ function _getDeletedCertificates(vaultBaseUrl, options, callback) { * * The GetDeletedCertificate operation retrieves the deleted certificate * information plus its attributes, such as retention interval, scheduled - * permanent deletion and the current deletion recovery level. + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9444,8 +9519,8 @@ function _getDeletedCertificate(vaultBaseUrl, certificateName, options, callback * * The PurgeDeletedCertificate operation performs an irreversible deletion of * the specified certificate, without possibility for recovery. The operation - * is not available if the recovery level does not specify 'Purgeable'. - * Requires the explicit granting of the 'purge' permission. + * is not available if the recovery level does not specify 'Purgeable'. This + * operation requires the certificate/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9576,7 +9651,8 @@ function _purgeDeletedCertificate(vaultBaseUrl, certificateName, options, callba * The RecoverDeletedCertificate operation performs the reversal of the Delete * operation. The operation is applicable in vaults enabled for soft-delete, * and must be issued during the retention interval (available in the deleted - * certificate's attributes). + * certificate's attributes). This operation requires the certificates/recover + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9719,7 +9795,8 @@ function _recoverDeletedCertificate(vaultBaseUrl, certificateName, options, call } /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -9876,15 +9953,20 @@ function _getStorageAccounts(vaultBaseUrl, options, callback) { } /** - * Deletes a storage account. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9895,13 +9977,14 @@ function _getStorageAccounts(vaultBaseUrl, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link DeletedStorageListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { +function _getDeletedStorageAccounts(vaultBaseUrl, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -9911,18 +9994,23 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } + let maxresults = (options && options.maxresults !== undefined) ? options.maxresults : undefined; // Validate try { if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); } - if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { - throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + if (maxresults !== null && maxresults !== undefined && typeof maxresults !== 'number') { + throw new Error('maxresults must be of type number.'); } - if (storageAccountName !== null && storageAccountName !== undefined) { - if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + if (maxresults !== null && maxresults !== undefined) { + if (maxresults > 25) { - throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMaximum": 25'); + } + if (maxresults < 1) + { + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMinimum": 1'); } } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { @@ -9937,10 +10025,12 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); - requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; + if (maxresults !== null && maxresults !== undefined) { + queryParameters.push('maxresults=' + encodeURIComponent(maxresults.toString())); + } queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -9948,7 +10038,7 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -10009,7 +10099,7 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StorageBundle']().mapper(); + let resultMapper = new client.models['DeletedStorageListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -10025,7 +10115,11 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba } /** - * Gets information about a specified storage account. + * @summary Gets the specified deleted storage account. + * + * The Get Deleted Storage Account operation returns the specified deleted + * storage account along with its attributes. This operation requires the + * storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -10044,13 +10138,13 @@ function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callba * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link DeletedStorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { +function _getDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10086,7 +10180,7 @@ function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; @@ -10158,7 +10252,7 @@ function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StorageBundle']().mapper(); + let resultMapper = new client.models['DeletedStorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -10174,34 +10268,20 @@ function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) } /** - * Creates or updates a new storage account. + * @summary Permanently deletes the specified storage account. + * + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on + * a soft-delete enabled vault. This operation requires the storage/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} resourceId Storage account resource id. - * - * @param {string} activeKeyName Current active storage account key name. - * - * @param {boolean} autoRegenerateKey whether keyvault should manage the - * storage account for the user. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10211,14 +10291,13 @@ function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, callback) { +function _purgeDeletedStorgeAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10228,9 +10307,6 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active if (!callback) { throw new Error('callback cannot be null.'); } - let regenerationPeriod = (options && options.regenerationPeriod !== undefined) ? options.regenerationPeriod : undefined; - let storageAccountAttributes = (options && options.storageAccountAttributes !== undefined) ? options.storageAccountAttributes : undefined; - let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { @@ -10248,45 +10324,16 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } - if (resourceId === null || resourceId === undefined || typeof resourceId.valueOf() !== 'string') { - throw new Error('resourceId cannot be null or undefined and it must be of type string.'); - } - if (activeKeyName === null || activeKeyName === undefined || typeof activeKeyName.valueOf() !== 'string') { - throw new Error('activeKeyName cannot be null or undefined and it must be of type string.'); - } - if (autoRegenerateKey === null || autoRegenerateKey === undefined || typeof autoRegenerateKey !== 'boolean') { - throw new Error('autoRegenerateKey cannot be null or undefined and it must be of type boolean.'); - } - if (regenerationPeriod !== null && regenerationPeriod !== undefined && typeof regenerationPeriod.valueOf() !== 'string') { - throw new Error('regenerationPeriod must be of type string.'); - } - if (tags && typeof tags === 'object') { - for(let valueElement in tags) { - if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { - throw new Error('tags[valueElement] must be of type string.'); - } - } - } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } - let parameters; - if ((resourceId !== null && resourceId !== undefined) || (activeKeyName !== null && activeKeyName !== undefined) || (autoRegenerateKey !== null && autoRegenerateKey !== undefined) || (regenerationPeriod !== null && regenerationPeriod !== undefined) || (storageAccountAttributes !== null && storageAccountAttributes !== undefined) || (tags !== null && tags !== undefined)) { - parameters = new client.models['StorageAccountCreateParameters'](); - parameters.resourceId = resourceId; - parameters.activeKeyName = activeKeyName; - parameters.autoRegenerateKey = autoRegenerateKey; - parameters.regenerationPeriod = regenerationPeriod; - parameters.storageAccountAttributes = storageAccountAttributes; - parameters.tags = tags; - } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; @@ -10297,7 +10344,7 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -10315,28 +10362,14 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['StorageAccountCreateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -10365,30 +10398,17 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StorageBundle']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * Updates the specified attributes associated with the given storage account. + * @summary Recovers the deleted storage account. + * + * Recovers the deleted storage account in the specified vault. This operation + * can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -10397,24 +10417,6 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active * * @param {object} [options] Optional Parameters. * - * @param {string} [options.activeKeyName] The current active storage account - * key name. - * - * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage - * the storage account for the user. - * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10431,7 +10433,7 @@ function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, active * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { +function _recoverDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10441,11 +10443,6 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let activeKeyName = (options && options.activeKeyName !== undefined) ? options.activeKeyName : undefined; - let autoRegenerateKey = (options && options.autoRegenerateKey !== undefined) ? options.autoRegenerateKey : undefined; - let regenerationPeriod = (options && options.regenerationPeriod !== undefined) ? options.regenerationPeriod : undefined; - let storageAccountAttributes = (options && options.storageAccountAttributes !== undefined) ? options.storageAccountAttributes : undefined; - let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { @@ -10463,41 +10460,16 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } - if (activeKeyName !== null && activeKeyName !== undefined && typeof activeKeyName.valueOf() !== 'string') { - throw new Error('activeKeyName must be of type string.'); - } - if (autoRegenerateKey !== null && autoRegenerateKey !== undefined && typeof autoRegenerateKey !== 'boolean') { - throw new Error('autoRegenerateKey must be of type boolean.'); - } - if (regenerationPeriod !== null && regenerationPeriod !== undefined && typeof regenerationPeriod.valueOf() !== 'string') { - throw new Error('regenerationPeriod must be of type string.'); - } - if (tags && typeof tags === 'object') { - for(let valueElement in tags) { - if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { - throw new Error('tags[valueElement] must be of type string.'); - } - } - } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } - let parameters; - if ((activeKeyName !== null && activeKeyName !== undefined) || (autoRegenerateKey !== null && autoRegenerateKey !== undefined) || (regenerationPeriod !== null && regenerationPeriod !== undefined) || (storageAccountAttributes !== null && storageAccountAttributes !== undefined) || (tags !== null && tags !== undefined)) { - parameters = new client.models['StorageAccountUpdateParameters'](); - parameters.activeKeyName = activeKeyName; - parameters.autoRegenerateKey = autoRegenerateKey; - parameters.regenerationPeriod = regenerationPeriod; - parameters.storageAccountAttributes = storageAccountAttributes; - parameters.tags = tags; - } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}/recover'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; @@ -10508,7 +10480,7 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -10526,21 +10498,7 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['StorageAccountUpdateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -10599,15 +10557,16 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba } /** - * Regenerates the specified key value for the given storage account. + * @summary Backs up the specified storage account. + * + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} keyName The storage account key name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10620,13 +10579,13 @@ function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callba * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link BackupStorageResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, callback) { +function _backupStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10644,33 +10603,19 @@ function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); } - if (storageAccountName !== null && storageAccountName !== undefined) { - if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } - if (keyName === null || keyName === undefined || typeof keyName.valueOf() !== 'string') { - throw new Error('keyName cannot be null or undefined and it must be of type string.'); - } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } - let parameters; - if (keyName !== null && keyName !== undefined) { - parameters = new client.models['StorageAccountRegenerteKeyParameters'](); - parameters.keyName = keyName; - } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/regeneratekey'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/backup'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; @@ -10699,21 +10644,7 @@ function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['StorageAccountRegenerteKeyParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -10756,7 +10687,7 @@ function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StorageBundle']().mapper(); + let resultMapper = new client.models['BackupStorageResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -10772,18 +10703,19 @@ function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, } /** - * List storage SAS definitions for the given storage account. + * @summary Restores a backed up storage account to a vault. + * + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} storageAccountName The name of the storage account. + * @param {buffer} storageBundleBackup The backup blob associated with a + * storage account. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10794,14 +10726,13 @@ function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionListResult} for more - * information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) { +function _restoreStorageAccount(vaultBaseUrl, storageBundleBackup, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10811,53 +10742,34 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let maxresults = (options && options.maxresults !== undefined) ? options.maxresults : undefined; // Validate try { if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); } - if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { - throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); - } - if (storageAccountName !== null && storageAccountName !== undefined) { - if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } - if (maxresults !== null && maxresults !== undefined && typeof maxresults !== 'number') { - throw new Error('maxresults must be of type number.'); - } - if (maxresults !== null && maxresults !== undefined) { - if (maxresults > 25) - { - throw new Error('"maxresults" should satisfy the constraint - "InclusiveMaximum": 25'); - } - if (maxresults < 1) - { - throw new Error('"maxresults" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } + if (!Buffer.isBuffer(storageBundleBackup)) { + throw new Error('storageBundleBackup cannot be null or undefined and it must be of type buffer.'); + } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } + let parameters; + if (storageBundleBackup !== null && storageBundleBackup !== undefined) { + parameters = new client.models['StorageRestoreParameters'](); + parameters.storageBundleBackup = storageBundleBackup; + } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/restore'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); - requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); let queryParameters = []; - if (maxresults !== null && maxresults !== undefined) { - queryParameters.push('maxresults=' + encodeURIComponent(maxresults.toString())); - } queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -10865,7 +10777,7 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -10883,7 +10795,21 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['StorageRestoreParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -10926,7 +10852,7 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionListResult']().mapper(); + let resultMapper = new client.models['StorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -10942,15 +10868,14 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) } /** - * Deletes a SAS definition from a specified storage account. + * Deletes a storage account. This operation requires the storage/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10963,13 +10888,13 @@ function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * See {@link DeletedStorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { +function _deleteStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -10993,15 +10918,6 @@ function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); } } - if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { - throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); - } - if (sasDefinitionName !== null && sasDefinitionName !== undefined) { - if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -11014,10 +10930,9 @@ function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { @@ -11087,7 +11002,7 @@ function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionBundle']().mapper(); + let resultMapper = new client.models['DeletedStorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11103,15 +11018,14 @@ function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam } /** - * Gets information about a SAS definition for the specified storage account. + * Gets information about a specified storage account. This operation requires + * the storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -11124,13 +11038,13 @@ function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { +function _getStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11154,15 +11068,6 @@ function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); } } - if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { - throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); - } - if (sasDefinitionName !== null && sasDefinitionName !== undefined) { - if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -11175,10 +11080,9 @@ function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { @@ -11248,7 +11152,7 @@ function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionBundle']().mapper(); + let resultMapper = new client.models['StorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11264,25 +11168,31 @@ function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, } /** - * Creates or updates a new SAS definition for the specified storage account. + * Creates or updates a new storage account. This operation requires the + * storage/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. + * @param {string} resourceId Storage account resource id. * - * @param {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @param {string} activeKeyName Current active storage account key name. + * + * @param {boolean} autoRegenerateKey whether keyvault should manage the + * storage account for the user. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS - * definition. + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. * - * @param {boolean} [options.sasDefinitionAttributes.enabled] the enabled state - * of the object. + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. * * @param {object} [options.tags] Application specific metadata in the form of * key-value pairs. @@ -11297,13 +11207,13 @@ function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options, callback) { +function _setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11313,7 +11223,8 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, if (!callback) { throw new Error('callback cannot be null.'); } - let sasDefinitionAttributes = (options && options.sasDefinitionAttributes !== undefined) ? options.sasDefinitionAttributes : undefined; + let regenerationPeriod = (options && options.regenerationPeriod !== undefined) ? options.regenerationPeriod : undefined; + let storageAccountAttributes = (options && options.storageAccountAttributes !== undefined) ? options.storageAccountAttributes : undefined; let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { @@ -11329,30 +11240,25 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); } } - if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { - throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); - } - if (sasDefinitionName !== null && sasDefinitionName !== undefined) { - if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } - if (parameters === null || parameters === undefined || typeof parameters !== 'object') { - throw new Error('parameters cannot be null or undefined and it must be of type object.'); + if (resourceId === null || resourceId === undefined || typeof resourceId.valueOf() !== 'string') { + throw new Error('resourceId cannot be null or undefined and it must be of type string.'); + } + if (activeKeyName === null || activeKeyName === undefined || typeof activeKeyName.valueOf() !== 'string') { + throw new Error('activeKeyName cannot be null or undefined and it must be of type string.'); + } + if (autoRegenerateKey === null || autoRegenerateKey === undefined || typeof autoRegenerateKey !== 'boolean') { + throw new Error('autoRegenerateKey cannot be null or undefined and it must be of type boolean.'); } - for(let valueElement in parameters) { - if (parameters[valueElement] !== null && parameters[valueElement] !== undefined && typeof parameters[valueElement].valueOf() !== 'string') { - throw new Error('parameters[valueElement] must be of type string.'); - } + if (regenerationPeriod !== null && regenerationPeriod !== undefined && typeof regenerationPeriod.valueOf() !== 'string') { + throw new Error('regenerationPeriod must be of type string.'); } if (tags && typeof tags === 'object') { - for(let valueElement1 in tags) { - if (tags[valueElement1] !== null && tags[valueElement1] !== undefined && typeof tags[valueElement1].valueOf() !== 'string') { - throw new Error('tags[valueElement1] must be of type string.'); + for(let valueElement in tags) { + if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { + throw new Error('tags[valueElement] must be of type string.'); } } } @@ -11362,20 +11268,22 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, } catch (error) { return callback(error); } - let parameters1; - if ((parameters !== null && parameters !== undefined) || (sasDefinitionAttributes !== null && sasDefinitionAttributes !== undefined) || (tags !== null && tags !== undefined)) { - parameters1 = new client.models['SasDefinitionCreateParameters'](); - parameters1.parameters = parameters; - parameters1.sasDefinitionAttributes = sasDefinitionAttributes; - parameters1.tags = tags; + let parameters; + if ((resourceId !== null && resourceId !== undefined) || (activeKeyName !== null && activeKeyName !== undefined) || (autoRegenerateKey !== null && autoRegenerateKey !== undefined) || (regenerationPeriod !== null && regenerationPeriod !== undefined) || (storageAccountAttributes !== null && storageAccountAttributes !== undefined) || (tags !== null && tags !== undefined)) { + parameters = new client.models['StorageAccountCreateParameters'](); + parameters.resourceId = resourceId; + parameters.activeKeyName = activeKeyName; + parameters.autoRegenerateKey = autoRegenerateKey; + parameters.regenerationPeriod = regenerationPeriod; + parameters.storageAccountAttributes = storageAccountAttributes; + parameters.tags = tags; } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { @@ -11406,14 +11314,14 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, let requestContent = null; let requestModel = null; try { - if (parameters1 !== null && parameters1 !== undefined) { - let requestModelMapper = new client.models['SasDefinitionCreateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters1, 'parameters1'); + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['StorageAccountCreateParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters1, null, 2)}.`); + `payload - ${JSON.stringify(parameters, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -11459,7 +11367,7 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionBundle']().mapper(); + let resultMapper = new client.models['StorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11475,25 +11383,30 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, } /** - * Updates the specified attributes associated with the given SAS definition. + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} sasDefinitionName The name of the SAS definition. - * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Sas definition update metadata in the - * form of key-value pairs. + * @param {string} [options.activeKeyName] The current active storage account + * key name. * - * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS - * definition. + * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage + * the storage account for the user. * - * @param {boolean} [options.sasDefinitionAttributes.enabled] the enabled state - * of the object. + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. * * @param {object} [options.tags] Application specific metadata in the form of * key-value pairs. @@ -11508,13 +11421,13 @@ function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { +function _updateStorageAccount(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11524,8 +11437,10 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; - let sasDefinitionAttributes = (options && options.sasDefinitionAttributes !== undefined) ? options.sasDefinitionAttributes : undefined; + let activeKeyName = (options && options.activeKeyName !== undefined) ? options.activeKeyName : undefined; + let autoRegenerateKey = (options && options.autoRegenerateKey !== undefined) ? options.autoRegenerateKey : undefined; + let regenerationPeriod = (options && options.regenerationPeriod !== undefined) ? options.regenerationPeriod : undefined; + let storageAccountAttributes = (options && options.storageAccountAttributes !== undefined) ? options.storageAccountAttributes : undefined; let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { @@ -11541,29 +11456,22 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); } } - if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { - throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); - } - if (sasDefinitionName !== null && sasDefinitionName !== undefined) { - if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) - { - throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); - } - } if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } - if (parameters && typeof parameters === 'object') { - for(let valueElement in parameters) { - if (parameters[valueElement] !== null && parameters[valueElement] !== undefined && typeof parameters[valueElement].valueOf() !== 'string') { - throw new Error('parameters[valueElement] must be of type string.'); - } - } + if (activeKeyName !== null && activeKeyName !== undefined && typeof activeKeyName.valueOf() !== 'string') { + throw new Error('activeKeyName must be of type string.'); + } + if (autoRegenerateKey !== null && autoRegenerateKey !== undefined && typeof autoRegenerateKey !== 'boolean') { + throw new Error('autoRegenerateKey must be of type boolean.'); + } + if (regenerationPeriod !== null && regenerationPeriod !== undefined && typeof regenerationPeriod.valueOf() !== 'string') { + throw new Error('regenerationPeriod must be of type string.'); } if (tags && typeof tags === 'object') { - for(let valueElement1 in tags) { - if (tags[valueElement1] !== null && tags[valueElement1] !== undefined && typeof tags[valueElement1].valueOf() !== 'string') { - throw new Error('tags[valueElement1] must be of type string.'); + for(let valueElement in tags) { + if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { + throw new Error('tags[valueElement] must be of type string.'); } } } @@ -11573,20 +11481,21 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam } catch (error) { return callback(error); } - let parameters1; - if ((parameters !== null && parameters !== undefined) || (sasDefinitionAttributes !== null && sasDefinitionAttributes !== undefined) || (tags !== null && tags !== undefined)) { - parameters1 = new client.models['SasDefinitionUpdateParameters'](); - parameters1.parameters = parameters; - parameters1.sasDefinitionAttributes = sasDefinitionAttributes; - parameters1.tags = tags; + let parameters; + if ((activeKeyName !== null && activeKeyName !== undefined) || (autoRegenerateKey !== null && autoRegenerateKey !== undefined) || (regenerationPeriod !== null && regenerationPeriod !== undefined) || (storageAccountAttributes !== null && storageAccountAttributes !== undefined) || (tags !== null && tags !== undefined)) { + parameters = new client.models['StorageAccountUpdateParameters'](); + parameters.activeKeyName = activeKeyName; + parameters.autoRegenerateKey = autoRegenerateKey; + parameters.regenerationPeriod = regenerationPeriod; + parameters.storageAccountAttributes = storageAccountAttributes; + parameters.tags = tags; } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}'; requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); if (queryParameters.length > 0) { @@ -11617,14 +11526,14 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam let requestContent = null; let requestModel = null; try { - if (parameters1 !== null && parameters1 !== undefined) { - let requestModelMapper = new client.models['SasDefinitionUpdateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters1, 'parameters1'); + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['StorageAccountUpdateParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters1, null, 2)}.`); + `payload - ${JSON.stringify(parameters, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -11670,7 +11579,7 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionBundle']().mapper(); + let resultMapper = new client.models['StorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11686,12 +11595,15 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam } /** - * @summary Retrieves a list of individual key versions with the same key name. + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. * - * The full key identifier, attributes, and tags are provided in the response. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} keyName The storage account key name. * * @param {object} [options] Optional Parameters. * @@ -11705,13 +11617,13 @@ function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionNam * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyListResult} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getKeyVersionsNext(nextPageLink, options, callback) { +function _regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11723,8 +11635,23 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (keyName === null || keyName === undefined || typeof keyName.valueOf() !== 'string') { + throw new Error('keyName cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -11732,14 +11659,26 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { } catch (error) { return callback(error); } + let parameters; + if (keyName !== null && keyName !== undefined) { + parameters = new client.models['StorageAccountRegenerteKeyParameters'](); + parameters.keyName = keyName; + } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/regeneratekey'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -11757,7 +11696,21 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['StorageAccountRegenerteKeyParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -11800,7 +11753,7 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['KeyListResult']().mapper(); + let resultMapper = new client.models['StorageBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11816,20 +11769,19 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { } /** - * @summary List keys in the specified vault. + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * - * Retrieves a list of the keys in the Key Vault as JSON Web Key structures - * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -11840,13 +11792,14 @@ function _getKeyVersionsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyListResult} for more information. + * See {@link SasDefinitionListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getKeysNext(nextPageLink, options, callback) { +function _getSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11856,10 +11809,36 @@ function _getKeysNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let maxresults = (options && options.maxresults !== undefined) ? options.maxresults : undefined; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (maxresults !== null && maxresults !== undefined && typeof maxresults !== 'number') { + throw new Error('maxresults must be of type number.'); + } + if (maxresults !== null && maxresults !== undefined) { + if (maxresults > 25) + { + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMaximum": 25'); + } + if (maxresults < 1) + { + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -11869,8 +11848,18 @@ function _getKeysNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + let queryParameters = []; + if (maxresults !== null && maxresults !== undefined) { + queryParameters.push('maxresults=' + encodeURIComponent(maxresults.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -11935,7 +11924,7 @@ function _getKeysNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['KeyListResult']().mapper(); + let resultMapper = new client.models['SasDefinitionListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -11951,14 +11940,23 @@ function _getKeysNext(nextPageLink, options, callback) { } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -11969,13 +11967,14 @@ function _getKeysNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedKeyListResult} for more information. + * See {@link DeletedSasDefinitionListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDeletedKeysNext(nextPageLink, options, callback) { +function _getDeletedSasDefinitions(vaultBaseUrl, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -11985,10 +11984,36 @@ function _getDeletedKeysNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let maxresults = (options && options.maxresults !== undefined) ? options.maxresults : undefined; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (maxresults !== null && maxresults !== undefined && typeof maxresults !== 'number') { + throw new Error('maxresults must be of type number.'); + } + if (maxresults !== null && maxresults !== undefined) { + if (maxresults > 25) + { + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMaximum": 25'); + } + if (maxresults < 1) + { + throw new Error('"maxresults" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -11998,8 +12023,18 @@ function _getDeletedKeysNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}/sas'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + let queryParameters = []; + if (maxresults !== null && maxresults !== undefined) { + queryParameters.push('maxresults=' + encodeURIComponent(maxresults.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -12064,7 +12099,7 @@ function _getDeletedKeysNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedKeyListResult']().mapper(); + let resultMapper = new client.models['DeletedSasDefinitionListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12080,14 +12115,18 @@ function _getDeletedKeysNext(nextPageLink, options, callback) { } /** - * @summary List secrets in a specified key vault + * @summary Gets the specified deleted sas definition. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -12101,13 +12140,14 @@ function _getDeletedKeysNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretListResult} for more information. + * See {@link DeletedSasDefinitionBundle} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSecretsNext(nextPageLink, options, callback) { +function _getDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12119,8 +12159,29 @@ function _getSecretsNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -12130,8 +12191,16 @@ function _getSecretsNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}/sas/{sas-definition-name}'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -12196,7 +12265,7 @@ function _getSecretsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SecretListResult']().mapper(); + let resultMapper = new client.models['DeletedSasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12212,15 +12281,18 @@ function _getSecretsNext(nextPageLink, options, callback) { } /** - * @summary List the versions of the specified secret. + * @summary Recovers the deleted SAS definition. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This + * operation requires the storage/recover permission. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -12234,13 +12306,13 @@ function _getSecretsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretListResult} for more information. + * See {@link SasDefinitionBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSecretVersionsNext(nextPageLink, options, callback) { +function _recoverDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12252,25 +12324,54 @@ function _getSecretVersionsNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); } - if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.acceptLanguage must be of type string.'); + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); } - } catch (error) { - return callback(error); - } - - // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'deletedstorage/{storage-account-name}/sas/{sas-definition-name}/recover'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.generateClientRequestId) { @@ -12329,7 +12430,7 @@ function _getSecretVersionsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SecretListResult']().mapper(); + let resultMapper = new client.models['SasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12345,11 +12446,15 @@ function _getSecretVersionsNext(nextPageLink, options, callback) { } /** - * List deleted secrets in the specified vault. Authorization: requires the - * secrets/list permission. + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -12363,14 +12468,14 @@ function _getSecretVersionsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedSecretListResult} for more + * See {@link DeletedSasDefinitionBundle} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDeletedSecretsNext(nextPageLink, options, callback) { +function _deleteSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12382,8 +12487,29 @@ function _getDeletedSecretsNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -12393,12 +12519,20 @@ function _getDeletedSecretsNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -12459,7 +12593,7 @@ function _getDeletedSecretsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedSecretListResult']().mapper(); + let resultMapper = new client.models['DeletedSasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12475,13 +12609,15 @@ function _getDeletedSecretsNext(nextPageLink, options, callback) { } /** - * @summary List certificates in a specified key vault + * Gets information about a SAS definition for the specified storage account. + * This operation requires the storage/getsas permission. * - * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -12495,13 +12631,13 @@ function _getDeletedSecretsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateListResult} for more information. + * See {@link SasDefinitionBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getCertificatesNext(nextPageLink, options, callback) { +function _getSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12513,8 +12649,29 @@ function _getCertificatesNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -12524,8 +12681,16 @@ function _getCertificatesNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -12590,7 +12755,7 @@ function _getCertificatesNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['CertificateListResult']().mapper(); + let resultMapper = new client.models['SasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12606,16 +12771,37 @@ function _getCertificatesNext(nextPageLink, options, callback) { } /** - * @summary List certificate issuers for a specified key vault. + * Creates or updates a new SAS definition for the specified storage account. + * This operation requires the storage/setsas permission. * - * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. + * + * @param {string} templateUri The SAS definition token template signed with an + * arbitrary key. Tokens created according to the SAS definition will have the + * same properties as the template. + * + * @param {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * + * @param {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS + * definition. + * + * @param {boolean} [options.sasDefinitionAttributes.enabled] the enabled state + * of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -12626,14 +12812,13 @@ function _getCertificatesNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateIssuerListResult} for more - * information. + * See {@link SasDefinitionBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getCertificateIssuersNext(nextPageLink, options, callback) { +function _setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12643,10 +12828,49 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let sasDefinitionAttributes = (options && options.sasDefinitionAttributes !== undefined) ? options.sasDefinitionAttributes : undefined; + let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (templateUri === null || templateUri === undefined || typeof templateUri.valueOf() !== 'string') { + throw new Error('templateUri cannot be null or undefined and it must be of type string.'); + } + if (sasType === null || sasType === undefined || typeof sasType.valueOf() !== 'string') { + throw new Error('sasType cannot be null or undefined and it must be of type string.'); + } + if (validityPeriod === null || validityPeriod === undefined || typeof validityPeriod.valueOf() !== 'string') { + throw new Error('validityPeriod cannot be null or undefined and it must be of type string.'); + } + if (tags && typeof tags === 'object') { + for(let valueElement in tags) { + if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { + throw new Error('tags[valueElement] must be of type string.'); + } + } } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -12654,14 +12878,31 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { } catch (error) { return callback(error); } + let parameters; + if ((templateUri !== null && templateUri !== undefined) || (sasType !== null && sasType !== undefined) || (validityPeriod !== null && validityPeriod !== undefined) || (sasDefinitionAttributes !== null && sasDefinitionAttributes !== undefined) || (tags !== null && tags !== undefined)) { + parameters = new client.models['SasDefinitionCreateParameters'](); + parameters.templateUri = templateUri; + parameters.sasType = sasType; + parameters.validityPeriod = validityPeriod; + parameters.sasDefinitionAttributes = sasDefinitionAttributes; + parameters.tags = tags; + } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -12679,7 +12920,21 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SasDefinitionCreateParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -12722,7 +12977,7 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['CertificateIssuerListResult']().mapper(); + let resultMapper = new client.models['SasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12738,16 +12993,37 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { } /** - * @summary List the versions of a certificate. + * Updates the specified attributes associated with the given SAS definition. + * This operation requires the storage/setsas permission. * - * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.templateUri] The SAS definition token template + * signed with an arbitrary key. Tokens created according to the SAS + * definition will have the same properties as the template. + * + * @param {string} [options.sasType] The type of SAS token the SAS definition + * will create. Possible values include: 'account', 'service' + * + * @param {string} [options.validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. + * + * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS + * definition. + * + * @param {boolean} [options.sasDefinitionAttributes.enabled] the enabled state + * of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -12758,13 +13034,13 @@ function _getCertificateIssuersNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateListResult} for more information. + * See {@link SasDefinitionBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getCertificateVersionsNext(nextPageLink, options, callback) { +function _updateSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12774,10 +13050,52 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let templateUri = (options && options.templateUri !== undefined) ? options.templateUri : undefined; + let sasType = (options && options.sasType !== undefined) ? options.sasType : undefined; + let validityPeriod = (options && options.validityPeriod !== undefined) ? options.validityPeriod : undefined; + let sasDefinitionAttributes = (options && options.sasDefinitionAttributes !== undefined) ? options.sasDefinitionAttributes : undefined; + let tags = (options && options.tags !== undefined) ? options.tags : undefined; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultBaseUrl === null || vaultBaseUrl === undefined || typeof vaultBaseUrl.valueOf() !== 'string') { + throw new Error('vaultBaseUrl cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); + } + if (storageAccountName !== null && storageAccountName !== undefined) { + if (storageAccountName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"storageAccountName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (sasDefinitionName === null || sasDefinitionName === undefined || typeof sasDefinitionName.valueOf() !== 'string') { + throw new Error('sasDefinitionName cannot be null or undefined and it must be of type string.'); + } + if (sasDefinitionName !== null && sasDefinitionName !== undefined) { + if (sasDefinitionName.match(/^[0-9a-zA-Z]+$/) === null) + { + throw new Error('"sasDefinitionName" should satisfy the constraint - "Pattern": /^[0-9a-zA-Z]+$/'); + } + } + if (this.apiVersion === null || this.apiVersion === undefined || typeof this.apiVersion.valueOf() !== 'string') { + throw new Error('this.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (templateUri !== null && templateUri !== undefined && typeof templateUri.valueOf() !== 'string') { + throw new Error('templateUri must be of type string.'); + } + if (sasType !== null && sasType !== undefined && typeof sasType.valueOf() !== 'string') { + throw new Error('sasType must be of type string.'); + } + if (validityPeriod !== null && validityPeriod !== undefined && typeof validityPeriod.valueOf() !== 'string') { + throw new Error('validityPeriod must be of type string.'); + } + if (tags && typeof tags === 'object') { + for(let valueElement in tags) { + if (tags[valueElement] !== null && tags[valueElement] !== undefined && typeof tags[valueElement].valueOf() !== 'string') { + throw new Error('tags[valueElement] must be of type string.'); + } + } } if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { throw new Error('this.acceptLanguage must be of type string.'); @@ -12785,14 +13103,31 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { } catch (error) { return callback(error); } + let parameters; + if ((templateUri !== null && templateUri !== undefined) || (sasType !== null && sasType !== undefined) || (validityPeriod !== null && validityPeriod !== undefined) || (sasDefinitionAttributes !== null && sasDefinitionAttributes !== undefined) || (tags !== null && tags !== undefined)) { + parameters = new client.models['SasDefinitionUpdateParameters'](); + parameters.templateUri = templateUri; + parameters.sasType = sasType; + parameters.validityPeriod = validityPeriod; + parameters.sasDefinitionAttributes = sasDefinitionAttributes; + parameters.tags = tags; + } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'storage/{storage-account-name}/sas/{sas-definition-name}'; + requestUrl = requestUrl.replace('{vaultBaseUrl}', vaultBaseUrl); + requestUrl = requestUrl.replace('{storage-account-name}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{sas-definition-name}', encodeURIComponent(sasDefinitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -12810,7 +13145,21 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SasDefinitionUpdateParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -12853,7 +13202,7 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['CertificateListResult']().mapper(); + let resultMapper = new client.models['SasDefinitionBundle']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -12869,12 +13218,10 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { } /** - * @summary Lists the deleted certificates in the specified vault, currently - * available for recovery. + * @summary Retrieves a list of individual key versions with the same key name. * - * The GetDeletedCertificates operation retrieves the certificates in the - * current vault which are in a deleted state and ready for recovery or - * purging. + * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -12891,14 +13238,13 @@ function _getCertificateVersionsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedCertificateListResult} for more - * information. + * See {@link KeyListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDeletedCertificatesNext(nextPageLink, options, callback) { +function _getKeyVersionsNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -12987,7 +13333,7 @@ function _getDeletedCertificatesNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedCertificateListResult']().mapper(); + let resultMapper = new client.models['KeyListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -13003,7 +13349,14 @@ function _getDeletedCertificatesNext(nextPageLink, options, callback) { } /** - * List storage accounts managed by specified key vault + * @summary List keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a stored key. The LIST operation is + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -13020,13 +13373,13 @@ function _getDeletedCertificatesNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageListResult} for more information. + * See {@link KeyListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStorageAccountsNext(nextPageLink, options, callback) { +function _getKeysNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -13115,7 +13468,7 @@ function _getStorageAccountsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StorageListResult']().mapper(); + let resultMapper = new client.models['KeyListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -13131,7 +13484,14 @@ function _getStorageAccountsNext(nextPageLink, options, callback) { } /** - * List storage SAS definitions for the given storage account. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -13148,14 +13508,13 @@ function _getStorageAccountsNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionListResult} for more - * information. + * See {@link DeletedKeyListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSasDefinitionsNext(nextPageLink, options, callback) { +function _getDeletedKeysNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -13244,7 +13603,7 @@ function _getSasDefinitionsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SasDefinitionListResult']().mapper(); + let resultMapper = new client.models['DeletedKeyListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -13259,53 +13618,1510 @@ function _getSasDefinitionsNext(nextPageLink, options, callback) { }); } -/** Class representing a KeyVaultClient. */ -class KeyVaultClient extends ServiceClient { - /** - * Create a KeyVaultClient. - * @param {credentials} credentials - Credentials needed for the client to connect to Azure. - * @param {object} [options] - The parameter options - * @param {Array} [options.filters] - Filters to be added to the request pipeline - * @param {object} [options.requestOptions] - Options for the underlying request object - * {@link https://github.com/request/request#requestoptions-callback Options doc} - * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - */ - constructor(credentials, options) { - if (credentials === null || credentials === undefined) { - throw new Error('\'credentials\' cannot be null.'); +/** + * @summary List secrets in a specified key vault. + * + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSecretsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } - if (!options) options = {}; - - super(credentials, options); - - this.apiVersion = '2016-10-01'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.baseUri = '{vaultBaseUrl}'; - this.credentials = credentials; + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - let packageInfo = this.getPackageJsonInfo(__dirname); - this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); } - if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { - this.generateClientRequestId = options.generateClientRequestId; + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); } - this.models = models; - this._createKey = _createKey; - this._importKey = _importKey; - this._deleteKey = _deleteKey; - this._updateKey = _updateKey; - this._getKey = _getKey; + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all versions of the specified secret. + * + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSecretVersionsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the + * secrets/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSecretListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeletedSecretsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedSecretListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List certificates in a specified key vault + * + * The GetCertificates operation returns the set of certificates resources in + * the specified key vault. This operation requires the certificates/list + * permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link CertificateListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getCertificatesNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['CertificateListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List certificate issuers for a specified key vault. + * + * The GetCertificateIssuers operation returns the set of certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link CertificateIssuerListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getCertificateIssuersNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['CertificateIssuerListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List the versions of a certificate. + * + * The GetCertificateVersions operation returns the versions of a certificate + * in the specified key vault. This operation requires the certificates/list + * permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link CertificateListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getCertificateVersionsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['CertificateListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists the deleted certificates in the specified vault currently + * available for recovery. + * + * The GetDeletedCertificates operation retrieves the certificates in the + * current vault which are in a deleted state and ready for recovery or + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedCertificateListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeletedCertificatesNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedCertificateListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link StorageListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getStorageAccountsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['StorageListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeletedStorageAccountsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedStorageListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SasDefinitionListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSasDefinitionsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SasDefinitionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeletedSasDefinitionsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['KeyVaultError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedSasDefinitionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a KeyVaultClient. */ +class KeyVaultClient extends ServiceClient { + /** + * Create a KeyVaultClient. + * @param {credentials} credentials - Credentials needed for the client to connect to Azure. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + */ + constructor(credentials, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.apiVersion = '7.0-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.baseUri = '{vaultBaseUrl}'; + this.credentials = credentials; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { + this.generateClientRequestId = options.generateClientRequestId; + } + this.models = models; + this._createKey = _createKey; + this._importKey = _importKey; + this._deleteKey = _deleteKey; + this._updateKey = _updateKey; + this._getKey = _getKey; this._getKeyVersions = _getKeyVersions; this._getKeys = _getKeys; this._backupKey = _backupKey; @@ -13358,12 +15174,21 @@ class KeyVaultClient extends ServiceClient { this._purgeDeletedCertificate = _purgeDeletedCertificate; this._recoverDeletedCertificate = _recoverDeletedCertificate; this._getStorageAccounts = _getStorageAccounts; + this._getDeletedStorageAccounts = _getDeletedStorageAccounts; + this._getDeletedStorageAccount = _getDeletedStorageAccount; + this._purgeDeletedStorgeAccount = _purgeDeletedStorgeAccount; + this._recoverDeletedStorageAccount = _recoverDeletedStorageAccount; + this._backupStorageAccount = _backupStorageAccount; + this._restoreStorageAccount = _restoreStorageAccount; this._deleteStorageAccount = _deleteStorageAccount; this._getStorageAccount = _getStorageAccount; this._setStorageAccount = _setStorageAccount; this._updateStorageAccount = _updateStorageAccount; this._regenerateStorageAccountKey = _regenerateStorageAccountKey; this._getSasDefinitions = _getSasDefinitions; + this._getDeletedSasDefinitions = _getDeletedSasDefinitions; + this._getDeletedSasDefinition = _getDeletedSasDefinition; + this._recoverDeletedSasDefinition = _recoverDeletedSasDefinition; this._deleteSasDefinition = _deleteSasDefinition; this._getSasDefinition = _getSasDefinition; this._setSasDefinition = _setSasDefinition; @@ -13379,65 +15204,1185 @@ class KeyVaultClient extends ServiceClient { this._getCertificateVersionsNext = _getCertificateVersionsNext; this._getDeletedCertificatesNext = _getDeletedCertificatesNext; this._getStorageAccountsNext = _getStorageAccountsNext; + this._getDeletedStorageAccountsNext = _getDeletedStorageAccountsNext; this._getSasDefinitionsNext = _getSasDefinitionsNext; + this._getDeletedSasDefinitionsNext = _getDeletedSasDefinitionsNext; msRest.addSerializationMixin(this); } /** - * @summary Creates a new key, stores it, then returns key parameters and - * attributes to the client. + * @summary Creates a new key, stores it, then returns key parameters and + * attributes to the client. + * + * The create key operation can be used to create any key type in Azure Key + * Vault. If the named key already exists, Azure Key Vault creates a new + * version of the key. It requires the keys/create permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name for the new key. The system will generate + * the version name for the new key. + * + * @param {string} kty The type of key to create. For valid values, see + * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', + * 'oct' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.keySize] The key size in bytes. For example, 1024 + * or 2048. + * + * @param {array} [options.keyOps] + * + * @param {object} [options.keyAttributes] + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {string} [options.curve] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'SECP256K1' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createKeyWithHttpOperationResponse(vaultBaseUrl, keyName, kty, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createKey(vaultBaseUrl, keyName, kty, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates a new key, stores it, then returns key parameters and + * attributes to the client. + * + * The create key operation can be used to create any key type in Azure Key + * Vault. If the named key already exists, Azure Key Vault creates a new + * version of the key. It requires the keys/create permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name for the new key. The system will generate + * the version name for the new key. + * + * @param {string} kty The type of key to create. For valid values, see + * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', + * 'oct' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.keySize] The key size in bytes. For example, 1024 + * or 2048. + * + * @param {array} [options.keyOps] + * + * @param {object} [options.keyAttributes] + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {string} [options.curve] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'SECP256K1' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createKey(vaultBaseUrl, keyName, kty, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createKey(vaultBaseUrl, keyName, kty, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createKey(vaultBaseUrl, keyName, kty, options, optionalCallback); + } + } + + /** + * @summary Imports an externally created key, stores it, and returns key + * parameters and attributes to the client. + * + * The import key operation may be used to import any key type into an Azure + * Key Vault. If the named key already exists, Azure Key Vault creates a new + * version of the key. This operation requires the keys/import permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName Name for the imported key. + * + * @param {object} key The Json web key + * + * @param {string} [key.kid] Key identifier. + * + * @param {string} [key.kty] JsonWebKey key type (kty). Possible values + * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * + * @param {array} [key.keyOps] + * + * @param {buffer} [key.n] RSA modulus. + * + * @param {buffer} [key.e] RSA public exponent. + * + * @param {buffer} [key.d] RSA private exponent, or the D component of an EC + * private key. + * + * @param {buffer} [key.dp] RSA private key parameter. + * + * @param {buffer} [key.dq] RSA private key parameter. + * + * @param {buffer} [key.qi] RSA private key parameter. + * + * @param {buffer} [key.p] RSA secret prime. + * + * @param {buffer} [key.q] RSA secret prime, with p < q. + * + * @param {buffer} [key.k] Symmetric key. + * + * @param {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. + * + * @param {string} [key.crv] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'SECP256K1' + * + * @param {buffer} [key.x] X component of an EC public key. + * + * @param {buffer} [key.y] Y component of an EC public key. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.hsm] Whether to import as a hardware key (HSM) or + * software key. + * + * @param {object} [options.keyAttributes] The key management attributes. + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + importKeyWithHttpOperationResponse(vaultBaseUrl, keyName, key, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._importKey(vaultBaseUrl, keyName, key, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Imports an externally created key, stores it, and returns key + * parameters and attributes to the client. + * + * The import key operation may be used to import any key type into an Azure + * Key Vault. If the named key already exists, Azure Key Vault creates a new + * version of the key. This operation requires the keys/import permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName Name for the imported key. + * + * @param {object} key The Json web key + * + * @param {string} [key.kid] Key identifier. + * + * @param {string} [key.kty] JsonWebKey key type (kty). Possible values + * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * + * @param {array} [key.keyOps] + * + * @param {buffer} [key.n] RSA modulus. + * + * @param {buffer} [key.e] RSA public exponent. + * + * @param {buffer} [key.d] RSA private exponent, or the D component of an EC + * private key. + * + * @param {buffer} [key.dp] RSA private key parameter. + * + * @param {buffer} [key.dq] RSA private key parameter. + * + * @param {buffer} [key.qi] RSA private key parameter. + * + * @param {buffer} [key.p] RSA secret prime. + * + * @param {buffer} [key.q] RSA secret prime, with p < q. + * + * @param {buffer} [key.k] Symmetric key. + * + * @param {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. + * + * @param {string} [key.crv] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'SECP256K1' + * + * @param {buffer} [key.x] X component of an EC public key. + * + * @param {buffer} [key.y] Y component of an EC public key. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.hsm] Whether to import as a hardware key (HSM) or + * software key. + * + * @param {object} [options.keyAttributes] The key management attributes. + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + importKey(vaultBaseUrl, keyName, key, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._importKey(vaultBaseUrl, keyName, key, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._importKey(vaultBaseUrl, keyName, key, options, optionalCallback); + } + } + + /** + * @summary Deletes a key of any type from storage in Azure Key Vault. + * + * The delete key operation cannot be used to remove individual versions of a + * key. This operation removes the cryptographic material associated with the + * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or + * Encrypt/Decrypt operations. This operation requires the keys/delete + * permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key to delete. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._deleteKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes a key of any type from storage in Azure Key Vault. + * + * The delete key operation cannot be used to remove individual versions of a + * key. This operation removes the cryptographic material associated with the + * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or + * Encrypt/Decrypt operations. This operation requires the keys/delete + * permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key to delete. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DeletedKeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedKeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteKey(vaultBaseUrl, keyName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteKey(vaultBaseUrl, keyName, options, optionalCallback); + } + } + + /** + * @summary The update key operation changes specified attributes of a stored + * key and can be applied to any key type and key version stored in Azure Key + * Vault. + * + * In order to perform this operation, the key must already exist in the Key + * Vault. Note: The cryptographic material of a key itself cannot be changed. + * This operation requires the keys/update permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of key to update. + * + * @param {string} keyVersion The version of the key to update. + * + * @param {object} [options] Optional Parameters. + * + * @param {array} [options.keyOps] Json web key operations. For more + * information on possible key operations, see JsonWebKeyOperation. + * + * @param {object} [options.keyAttributes] + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._updateKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary The update key operation changes specified attributes of a stored + * key and can be applied to any key type and key version stored in Azure Key + * Vault. + * + * In order to perform this operation, the key must already exist in the Key + * Vault. Note: The cryptographic material of a key itself cannot be changed. + * This operation requires the keys/update permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of key to update. + * + * @param {string} keyVersion The version of the key to update. + * + * @param {object} [options] Optional Parameters. + * + * @param {array} [options.keyOps] Json web key operations. For more + * information on possible key operations, see JsonWebKeyOperation. + * + * @param {object} [options.keyAttributes] + * + * @param {boolean} [options.keyAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback); + } + } + + /** + * @summary Gets the public part of a stored key. + * + * The get key operation is applicable to all key types. If the requested key + * is symmetric, then no key material is released in the response. This + * operation requires the keys/get permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key to get. + * + * @param {string} keyVersion Adding the version parameter retrieves a specific + * version of a key. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the public part of a stored key. + * + * The get key operation is applicable to all key types. If the requested key + * is symmetric, then no key material is released in the response. This + * operation requires the keys/get permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key to get. + * + * @param {string} keyVersion Adding the version parameter retrieves a specific + * version of a key. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback); + } + } + + /** + * @summary Retrieves a list of individual key versions with the same key name. + * + * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getKeyVersionsWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getKeyVersions(vaultBaseUrl, keyName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Retrieves a list of individual key versions with the same key name. + * + * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getKeyVersions(vaultBaseUrl, keyName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getKeyVersions(vaultBaseUrl, keyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getKeyVersions(vaultBaseUrl, keyName, options, optionalCallback); + } + } + + /** + * @summary List keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a stored key. The LIST operation is + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getKeysWithHttpOperationResponse(vaultBaseUrl, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getKeys(vaultBaseUrl, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a stored key. The LIST operation is + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getKeys(vaultBaseUrl, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getKeys(vaultBaseUrl, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getKeys(vaultBaseUrl, options, optionalCallback); + } + } + + /** + * @summary Requests that a backup of the specified key be downloaded to the + * client. * - * The create key operation can be used to create any key type in Azure Key - * Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * The Key Backup operation exports a key from Azure Key Vault in a protected + * form. Note that this operation does NOT return key material in a form that + * can be used outside the Azure Key Vault system, the returned key material is + * either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The + * intent of this operation is to allow a client to GENERATE a key in one Azure + * Key Vault instance, BACKUP the key, and then RESTORE it into another Azure + * Key Vault instance. The BACKUP operation may be used to export, in protected + * form, any key type from Azure Key Vault. Individual versions of a key cannot + * be backed up. BACKUP / RESTORE can be performed within geographical + * boundaries only; meaning that a BACKUP from one geographical area cannot be + * restored to another geographical area. For example, a backup from the US + * geographical area cannot be restored in an EU geographical area. This + * operation requires the key/backup permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + backupKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._backupKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Requests that a backup of the specified key be downloaded to the + * client. + * + * The Key Backup operation exports a key from Azure Key Vault in a protected + * form. Note that this operation does NOT return key material in a form that + * can be used outside the Azure Key Vault system, the returned key material is + * either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The + * intent of this operation is to allow a client to GENERATE a key in one Azure + * Key Vault instance, BACKUP the key, and then RESTORE it into another Azure + * Key Vault instance. The BACKUP operation may be used to export, in protected + * form, any key type from Azure Key Vault. Individual versions of a key cannot + * be backed up. BACKUP / RESTORE can be performed within geographical + * boundaries only; meaning that a BACKUP from one geographical area cannot be + * restored to another geographical area. For example, a backup from the US + * geographical area cannot be restored in an EU geographical area. This + * operation requires the key/backup permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {string} keyName The name of the key. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {BackupKeyResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link BackupKeyResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + backupKey(vaultBaseUrl, keyName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._backupKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._backupKey(vaultBaseUrl, keyName, options, optionalCallback); + } + } + + /** + * @summary Restores a backed up key to a vault. + * + * Imports a previously backed up key into Azure Key Vault, restoring the key, + * its key identifier, attributes and access control policies. The RESTORE + * operation may be used to import a previously backed up key. Individual + * versions of a key cannot be restored. The key is restored in its entirety + * with the same key name as it had when it was backed up. If the key name is + * not available in the target Key Vault, the RESTORE operation will be + * rejected. While the key name is retained during restore, the final key + * identifier will change if the key is restored to a different vault. Restore + * will restore all versions and preserve version identifiers. The RESTORE + * operation is subject to security constraints: The target Key Vault must be + * owned by the same Microsoft Azure Subscription as the source Key Vault The + * user must have RESTORE permission in the target Key Vault. This operation + * requires the keys/restore permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {buffer} keyBundleBackup The backup blob associated with a key + * bundle. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + restoreKeyWithHttpOperationResponse(vaultBaseUrl, keyBundleBackup, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._restoreKey(vaultBaseUrl, keyBundleBackup, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Restores a backed up key to a vault. + * + * Imports a previously backed up key into Azure Key Vault, restoring the key, + * its key identifier, attributes and access control policies. The RESTORE + * operation may be used to import a previously backed up key. Individual + * versions of a key cannot be restored. The key is restored in its entirety + * with the same key name as it had when it was backed up. If the key name is + * not available in the target Key Vault, the RESTORE operation will be + * rejected. While the key name is retained during restore, the final key + * identifier will change if the key is restored to a different vault. Restore + * will restore all versions and preserve version identifiers. The RESTORE + * operation is subject to security constraints: The target Key Vault must be + * owned by the same Microsoft Azure Subscription as the source Key Vault The + * user must have RESTORE permission in the target Key Vault. This operation + * requires the keys/restore permission. + * + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. + * + * @param {buffer} keyBundleBackup The backup blob associated with a key + * bundle. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KeyBundle} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyBundle} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + restoreKey(vaultBaseUrl, keyBundleBackup, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._restoreKey(vaultBaseUrl, keyBundleBackup, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._restoreKey(vaultBaseUrl, keyBundleBackup, options, optionalCallback); + } + } + + /** + * @summary Encrypts an arbitrary sequence of bytes using an encryption key + * that is stored in a key vault. + * + * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an + * encryption key that is stored in Azure Key Vault. Note that the ENCRYPT + * operation only supports a single block of data, the size of which is + * dependent on the target key and the encryption algorithm to be used. The + * ENCRYPT operation is only strictly necessary for symmetric keys stored in + * Azure Key Vault since protection with an asymmetric key can be performed + * using public portion of the key. This operation is supported for asymmetric + * keys as a convenience for callers that have a key-reference but do not have + * access to the public key material. This operation requires the keys/encypt + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name for the new key. The system will generate - * the version name for the new key. - * - * @param {string} kty The type of key to create. For valid values, see - * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', - * 'oct' - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. - * - * @param {array} [options.keyOps] - * - * @param {object} [options.keyAttributes] - * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. + * @param {string} keyName The name of the key. * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * @param {string} keyVersion The version of the key. * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {buffer} value * - * @param {string} [options.curve] Elliptic curve name. For valid values, see - * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createKeyWithHttpOperationResponse(vaultBaseUrl, keyName, kty, options) { + encryptWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createKey(vaultBaseUrl, keyName, kty, options, (err, result, request, response) => { + self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -13448,45 +16393,33 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Creates a new key, stores it, then returns key parameters and - * attributes to the client. + * @summary Encrypts an arbitrary sequence of bytes using an encryption key + * that is stored in a key vault. * - * The create key operation can be used to create any key type in Azure Key - * Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an + * encryption key that is stored in Azure Key Vault. Note that the ENCRYPT + * operation only supports a single block of data, the size of which is + * dependent on the target key and the encryption algorithm to be used. The + * ENCRYPT operation is only strictly necessary for symmetric keys stored in + * Azure Key Vault since protection with an asymmetric key can be performed + * using public portion of the key. This operation is supported for asymmetric + * keys as a convenience for callers that have a key-reference but do not have + * access to the public key material. This operation requires the keys/encypt + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name for the new key. The system will generate - * the version name for the new key. - * - * @param {string} kty The type of key to create. For valid values, see - * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', - * 'oct' - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. - * - * @param {array} [options.keyOps] - * - * @param {object} [options.keyAttributes] - * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. + * @param {string} keyName The name of the key. * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * @param {string} keyVersion The version of the key. * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {buffer} value * - * @param {string} [options.curve] Elliptic curve name. For valid values, see - * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13498,7 +16431,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {KeyOperationResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -13507,13 +16440,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * See {@link KeyOperationResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createKey(vaultBaseUrl, keyName, kty, options, optionalCallback) { + encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -13522,99 +16455,56 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createKey(vaultBaseUrl, keyName, kty, options, (err, result, request, response) => { + self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createKey(vaultBaseUrl, keyName, kty, options, optionalCallback); + return self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); } } /** - * @summary Imports an externally created key, stores it, and returns key - * parameters and attributes to the client. + * @summary Decrypts a single block of encrypted data. * - * The import key operation may be used to import any key type into an Azure - * Key Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * The DECRYPT operation decrypts a well-formed block of ciphertext using the + * target encryption key and specified algorithm. This operation is the reverse + * of the ENCRYPT operation; only a single block of data may be decrypted, the + * size of this block is dependent on the target key and the algorithm to be + * used. The DECRYPT operation applies to asymmetric and symmetric keys stored + * in Azure Key Vault since it uses the private portion of the key. This + * operation requires the keys/decrypt permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName Name for the imported key. - * - * @param {object} key The Json web key - * - * @param {string} [key.kid] Key identifier. - * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - * - * @param {array} [key.keyOps] - * - * @param {buffer} [key.n] RSA modulus. - * - * @param {buffer} [key.e] RSA public exponent. - * - * @param {buffer} [key.d] RSA private exponent, or the D component of an EC - * private key. - * - * @param {buffer} [key.dp] RSA private key parameter. - * - * @param {buffer} [key.dq] RSA private key parameter. - * - * @param {buffer} [key.qi] RSA private key parameter. - * - * @param {buffer} [key.p] RSA secret prime. - * - * @param {buffer} [key.q] RSA secret prime, with p < q. - * - * @param {buffer} [key.k] Symmetric key. - * - * @param {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. + * @param {string} keyName The name of the key. * - * @param {string} [key.crv] Elliptic curve name. For valid values, see - * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * @param {string} keyVersion The version of the key. * - * @param {buffer} [key.x] X component of an EC public key. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' * - * @param {buffer} [key.y] Y component of an EC public key. + * @param {buffer} value * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.hsm] Whether to import as a hardware key (HSM) or - * software key. - * - * @param {object} [options.keyAttributes] The key management attributes. - * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - importKeyWithHttpOperationResponse(vaultBaseUrl, keyName, key, options) { + decryptWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._importKey(vaultBaseUrl, keyName, key, options, (err, result, request, response) => { + self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -13625,73 +16515,30 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Imports an externally created key, stores it, and returns key - * parameters and attributes to the client. + * @summary Decrypts a single block of encrypted data. * - * The import key operation may be used to import any key type into an Azure - * Key Vault. If the named key already exists, Azure Key Vault creates a new - * version of the key. + * The DECRYPT operation decrypts a well-formed block of ciphertext using the + * target encryption key and specified algorithm. This operation is the reverse + * of the ENCRYPT operation; only a single block of data may be decrypted, the + * size of this block is dependent on the target key and the algorithm to be + * used. The DECRYPT operation applies to asymmetric and symmetric keys stored + * in Azure Key Vault since it uses the private portion of the key. This + * operation requires the keys/decrypt permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName Name for the imported key. - * - * @param {object} key The Json web key - * - * @param {string} [key.kid] Key identifier. - * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - * - * @param {array} [key.keyOps] - * - * @param {buffer} [key.n] RSA modulus. - * - * @param {buffer} [key.e] RSA public exponent. - * - * @param {buffer} [key.d] RSA private exponent, or the D component of an EC - * private key. - * - * @param {buffer} [key.dp] RSA private key parameter. - * - * @param {buffer} [key.dq] RSA private key parameter. - * - * @param {buffer} [key.qi] RSA private key parameter. - * - * @param {buffer} [key.p] RSA secret prime. - * - * @param {buffer} [key.q] RSA secret prime, with p < q. - * - * @param {buffer} [key.k] Symmetric key. - * - * @param {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. + * @param {string} keyName The name of the key. * - * @param {string} [key.crv] Elliptic curve name. For valid values, see - * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * @param {string} keyVersion The version of the key. * - * @param {buffer} [key.x] X component of an EC public key. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' * - * @param {buffer} [key.y] Y component of an EC public key. + * @param {buffer} value * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.hsm] Whether to import as a hardware key (HSM) or - * software key. - * - * @param {object} [options.keyAttributes] The key management attributes. - * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -13702,7 +16549,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {KeyOperationResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -13711,13 +16558,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * See {@link KeyOperationResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - importKey(vaultBaseUrl, keyName, key, options, optionalCallback) { + decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -13726,29 +16573,38 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._importKey(vaultBaseUrl, keyName, key, options, (err, result, request, response) => { + self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._importKey(vaultBaseUrl, keyName, key, options, optionalCallback); + return self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); } } /** - * @summary Deletes a key of any type from storage in Azure Key Vault. + * @summary Creates a signature from a digest using the specified key. * - * The delete key operation cannot be used to remove individual versions of a - * key. This operation removes the cryptographic material associated with the - * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or - * Encrypt/Decrypt operations. + * The SIGN operation is applicable to asymmetric and symmetric keys stored in + * Azure Key Vault since this operation uses the private portion of the key. + * This operation requires the keys/sign permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key to delete. + * @param {string} keyName The name of the key. + * + * @param {string} keyVersion The version of the key. + * + * @param {string} algorithm The signing/verification algorithm identifier. For + * more information on possible algorithm types, see + * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', + * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', + * 'ECDSA256' + * + * @param {buffer} value * * @param {object} [options] Optional Parameters. * @@ -13757,15 +16613,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + signWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -13776,17 +16632,26 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Deletes a key of any type from storage in Azure Key Vault. + * @summary Creates a signature from a digest using the specified key. * - * The delete key operation cannot be used to remove individual versions of a - * key. This operation removes the cryptographic material associated with the - * key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or - * Encrypt/Decrypt operations. + * The SIGN operation is applicable to asymmetric and symmetric keys stored in + * Azure Key Vault since this operation uses the private portion of the key. + * This operation requires the keys/sign permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key to delete. + * @param {string} keyName The name of the key. + * + * @param {string} keyVersion The version of the key. + * + * @param {string} algorithm The signing/verification algorithm identifier. For + * more information on possible algorithm types, see + * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', + * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', + * 'ECDSA256' + * + * @param {buffer} value * * @param {object} [options] Optional Parameters. * @@ -13800,7 +16665,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedKeyBundle} - The deserialized result object. + * @resolve {KeyOperationResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -13809,13 +16674,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedKeyBundle} for more information. + * See {@link KeyOperationResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteKey(vaultBaseUrl, keyName, options, optionalCallback) { + sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -13824,63 +16689,59 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteKey(vaultBaseUrl, keyName, options, optionalCallback); + return self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); } } /** - * @summary The update key operation changes specified attributes of a stored - * key and can be applied to any key type and key version stored in Azure Key - * Vault. + * @summary Verifies a signature using a specified key. * - * In order to perform this operation, the key must already exist in the Key - * Vault. Note: The cryptographic material of a key itself cannot be changed. + * The VERIFY operation is applicable to symmetric keys stored in Azure Key + * Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure + * Key Vault since signature verification can be performed using the public + * portion of the key but this operation is supported as a convenience for + * callers that only have a key-reference and not the public portion of the + * key. This operation requires the keys/verify permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of key to update. - * - * @param {string} keyVersion The version of the key to update. - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.keyOps] Json web key operations. For more - * information on possible key operations, see JsonWebKeyOperation. + * @param {string} keyName The name of the key. * - * @param {object} [options.keyAttributes] + * @param {string} keyVersion The version of the key. * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. + * @param {string} algorithm The signing/verification algorithm. For more + * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. + * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * @param {buffer} digest The digest used for signing. * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * @param {buffer} signature The signature to be verified. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, options) { + verifyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -13891,36 +16752,32 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary The update key operation changes specified attributes of a stored - * key and can be applied to any key type and key version stored in Azure Key - * Vault. + * @summary Verifies a signature using a specified key. * - * In order to perform this operation, the key must already exist in the Key - * Vault. Note: The cryptographic material of a key itself cannot be changed. + * The VERIFY operation is applicable to symmetric keys stored in Azure Key + * Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure + * Key Vault since signature verification can be performed using the public + * portion of the key but this operation is supported as a convenience for + * callers that only have a key-reference and not the public portion of the + * key. This operation requires the keys/verify permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of key to update. - * - * @param {string} keyVersion The version of the key to update. - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.keyOps] Json web key operations. For more - * information on possible key operations, see JsonWebKeyOperation. + * @param {string} keyName The name of the key. * - * @param {object} [options.keyAttributes] + * @param {string} keyVersion The version of the key. * - * @param {boolean} [options.keyAttributes.enabled] Determines whether the - * object is enabled. + * @param {string} algorithm The signing/verification algorithm. For more + * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. + * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' * - * @param {date} [options.keyAttributes.notBefore] Not before date in UTC. + * @param {buffer} digest The digest used for signing. * - * @param {date} [options.keyAttributes.expires] Expiry date in UTC. + * @param {buffer} signature The signature to be verified. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13932,7 +16789,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {KeyVerifyResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -13941,13 +16798,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * See {@link KeyVerifyResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback) { + verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -13956,30 +16813,40 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback); + return self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, optionalCallback); } } /** - * @summary Gets the public part of a stored key. + * @summary Wraps a symmetric key using a specified key. * - * The get key operation is applicable to all key types. If the requested key - * is symmetric, then no key material is released in the response. + * The WRAP operation supports encryption of a symmetric key using a key + * encryption key that has previously been stored in an Azure Key Vault. The + * WRAP operation is only strictly necessary for symmetric keys stored in Azure + * Key Vault since protection with an asymmetric key can be performed using the + * public portion of the key. This operation is supported for asymmetric keys + * as a convenience for callers that have a key-reference but do not have + * access to the public key material. This operation requires the keys/wrapKey + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key to get. + * @param {string} keyName The name of the key. * - * @param {string} keyVersion Adding the version parameter retrieves a specific - * version of a key. + * @param {string} keyVersion The version of the key. + * + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {buffer} value * * @param {object} [options] Optional Parameters. * @@ -13988,15 +16855,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, options) { + wrapKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14007,18 +16874,28 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Gets the public part of a stored key. + * @summary Wraps a symmetric key using a specified key. * - * The get key operation is applicable to all key types. If the requested key - * is symmetric, then no key material is released in the response. + * The WRAP operation supports encryption of a symmetric key using a key + * encryption key that has previously been stored in an Azure Key Vault. The + * WRAP operation is only strictly necessary for symmetric keys stored in Azure + * Key Vault since protection with an asymmetric key can be performed using the + * public portion of the key. This operation is supported for asymmetric keys + * as a convenience for callers that have a key-reference but do not have + * access to the public key material. This operation requires the keys/wrapKey + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key to get. + * @param {string} keyName The name of the key. * - * @param {string} keyVersion Adding the version parameter retrieves a specific - * version of a key. + * @param {string} keyVersion The version of the key. + * + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {buffer} value * * @param {object} [options] Optional Parameters. * @@ -14032,7 +16909,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {KeyOperationResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14041,13 +16918,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * See {@link KeyOperationResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback) { + wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14056,46 +16933,55 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getKey(vaultBaseUrl, keyName, keyVersion, options, (err, result, request, response) => { + self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getKey(vaultBaseUrl, keyName, keyVersion, options, optionalCallback); + return self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); } } /** - * @summary Retrieves a list of individual key versions with the same key name. + * @summary Unwraps a symmetric key using the specified key that was initially + * used for wrapping that key. * - * The full key identifier, attributes, and tags are provided in the response. + * The UNWRAP operation supports decryption of a symmetric key using the target + * key encryption key. This operation is the reverse of the WRAP operation. The + * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure + * Key Vault since it uses the private portion of the key. This operation + * requires the keys/unwrapKey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} keyName The name of the key. * - * @param {object} [options] Optional Parameters. + * @param {string} keyVersion The version of the key. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {buffer} value + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getKeyVersionsWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + unwrapKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getKeyVersions(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14106,19 +16992,28 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Retrieves a list of individual key versions with the same key name. + * @summary Unwraps a symmetric key using the specified key that was initially + * used for wrapping that key. * - * The full key identifier, attributes, and tags are provided in the response. + * The UNWRAP operation supports decryption of a symmetric key using the target + * key encryption key. This operation is the reverse of the WRAP operation. The + * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure + * Key Vault since it uses the private portion of the key. This operation + * requires the keys/unwrapKey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} keyName The name of the key. * - * @param {object} [options] Optional Parameters. + * @param {string} keyVersion The version of the key. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {string} algorithm algorithm identifier. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {buffer} value + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14130,7 +17025,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyListResult} - The deserialized result object. + * @resolve {KeyOperationResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14139,13 +17034,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyListResult} for more information. + * See {@link KeyOperationResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getKeyVersions(vaultBaseUrl, keyName, options, optionalCallback) { + unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14154,26 +17049,26 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getKeyVersions(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getKeyVersions(vaultBaseUrl, keyName, options, optionalCallback); + return self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); } } /** - * @summary List keys in the specified vault. + * @summary Lists the deleted keys in the specified vault. * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures - * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -14188,15 +17083,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getKeysWithHttpOperationResponse(vaultBaseUrl, options) { + getDeletedKeysWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getKeys(vaultBaseUrl, options, (err, result, request, response) => { + self._getDeletedKeys(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14207,14 +17102,14 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List keys in the specified vault. + * @summary Lists the deleted keys in the specified vault. * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures - * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -14234,7 +17129,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyListResult} - The deserialized result object. + * @resolve {DeletedKeyListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14243,13 +17138,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyListResult} for more information. + * See {@link DeletedKeyListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getKeys(vaultBaseUrl, options, optionalCallback) { + getDeletedKeys(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14258,33 +17153,24 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getKeys(vaultBaseUrl, options, (err, result, request, response) => { + self._getDeletedKeys(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getKeys(vaultBaseUrl, options, optionalCallback); + return self._getDeletedKeys(vaultBaseUrl, options, optionalCallback); } } - /** - * @summary Requests that a backup of the specified key be downloaded to the - * client. + /** + * @summary Gets the public part of a deleted key. * - * The Key Backup operation exports a key from Azure Key Vault in a protected - * form. Note that this operation does NOT return key material in a form that - * can be used outside the Azure Key Vault system, the returned key material is - * either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The - * intent of this operation is to allow a client to GENERATE a key in one Azure - * Key Vault instance, BACKUP the key, and then RESTORE it into another Azure - * Key Vault instance. The BACKUP operation may be used to export, in protected - * form, any key type from Azure Key Vault. Individual versions of a key cannot - * be backed up. BACKUP / RESTORE can be performed within geographical - * boundaries only; meaning that a BACKUP from one geographical area cannot be - * restored to another geographical area. For example, a backup from the US - * geographical area cannot be restored in an EU geographical area. + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -14298,15 +17184,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - backupKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + getDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._backupKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14317,21 +17203,12 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Requests that a backup of the specified key be downloaded to the - * client. + * @summary Gets the public part of a deleted key. * - * The Key Backup operation exports a key from Azure Key Vault in a protected - * form. Note that this operation does NOT return key material in a form that - * can be used outside the Azure Key Vault system, the returned key material is - * either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The - * intent of this operation is to allow a client to GENERATE a key in one Azure - * Key Vault instance, BACKUP the key, and then RESTORE it into another Azure - * Key Vault instance. The BACKUP operation may be used to export, in protected - * form, any key type from Azure Key Vault. Individual versions of a key cannot - * be backed up. BACKUP / RESTORE can be performed within geographical - * boundaries only; meaning that a BACKUP from one geographical area cannot be - * restored to another geographical area. For example, a backup from the US - * geographical area cannot be restored in an EU geographical area. + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -14350,7 +17227,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {BackupKeyResult} - The deserialized result object. + * @resolve {DeletedKeyBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14359,13 +17236,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link BackupKeyResult} for more information. + * See {@link DeletedKeyBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - backupKey(vaultBaseUrl, keyName, options, optionalCallback) { + getDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14374,38 +17251,29 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._backupKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._backupKey(vaultBaseUrl, keyName, options, optionalCallback); + return self._getDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); } } /** - * @summary Restores a backed up key to a vault. + * @summary Permanently deletes the specified key. * - * Imports a previously backed up key into Azure Key Vault, restoring the key, - * its key identifier, attributes and access control policies. The RESTORE - * operation may be used to import a previously backed up key. Individual - * versions of a key cannot be restored. The key is restored in its entirety - * with the same key name as it had when it was backed up. If the key name is - * not available in the target Key Vault, the RESTORE operation will be - * rejected. While the key name is retained during restore, the final key - * identifier will change if the key is restored to a different vault. Restore - * will restore all versions and preserve version identifiers. The RESTORE - * operation is subject to security constraints: The target Key Vault must be - * owned by the same Microsoft Azure Subscription as the source Key Vault The - * user must have RESTORE permission in the target Key Vault. + * The Purge Deleted Key operation is applicable for soft-delete enabled + * vaults. While the operation can be invoked on any vault, it will return an + * error if invoked on a non soft-delete enabled vault. This operation requires + * the keys/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {buffer} keyBundleBackup The backup blob associated with a key - * bundle. + * @param {string} keyName The name of the key * * @param {object} [options] Optional Parameters. * @@ -14414,15 +17282,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restoreKeyWithHttpOperationResponse(vaultBaseUrl, keyBundleBackup, options) { + purgeDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restoreKey(vaultBaseUrl, keyBundleBackup, options, (err, result, request, response) => { + self._purgeDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14433,26 +17301,17 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Restores a backed up key to a vault. + * @summary Permanently deletes the specified key. * - * Imports a previously backed up key into Azure Key Vault, restoring the key, - * its key identifier, attributes and access control policies. The RESTORE - * operation may be used to import a previously backed up key. Individual - * versions of a key cannot be restored. The key is restored in its entirety - * with the same key name as it had when it was backed up. If the key name is - * not available in the target Key Vault, the RESTORE operation will be - * rejected. While the key name is retained during restore, the final key - * identifier will change if the key is restored to a different vault. Restore - * will restore all versions and preserve version identifiers. The RESTORE - * operation is subject to security constraints: The target Key Vault must be - * owned by the same Microsoft Azure Subscription as the source Key Vault The - * user must have RESTORE permission in the target Key Vault. + * The Purge Deleted Key operation is applicable for soft-delete enabled + * vaults. While the operation can be invoked on any vault, it will return an + * error if invoked on a non soft-delete enabled vault. This operation requires + * the keys/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {buffer} keyBundleBackup The backup blob associated with a key - * bundle. + * @param {string} keyName The name of the key * * @param {object} [options] Optional Parameters. * @@ -14466,7 +17325,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14474,14 +17333,13 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restoreKey(vaultBaseUrl, keyBundleBackup, options, optionalCallback) { + purgeDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14490,42 +17348,30 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restoreKey(vaultBaseUrl, keyBundleBackup, options, (err, result, request, response) => { + self._purgeDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restoreKey(vaultBaseUrl, keyBundleBackup, options, optionalCallback); + return self._purgeDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); } } /** - * @summary Encrypts an arbitrary sequence of bytes using an encryption key - * that is stored in a key vault. + * @summary Recovers the deleted key to its latest version. * - * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an - * encryption key that is stored in Azure Key Vault. Note that the ENCRYPT - * operation only supports a single block of data, the size of which is - * dependent on the target key and the encryption algorithm to be used. The - * ENCRYPT operation is only strictly necessary for symmetric keys stored in - * Azure Key Vault since protection with an asymmetric key can be performed - * using public portion of the key. This operation is supported for asymmetric - * keys as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * The Recover Deleted Key operation is applicable for deleted keys in + * soft-delete enabled vaults. It recovers the deleted key back to its latest + * version under /keys. An attempt to recover an non-deleted key will return an + * error. Consider this the inverse of the delete operation on soft-delete + * enabled vaults. This operation requires the keys/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * - * @param {buffer} value + * @param {string} keyName The name of the deleted key. * * @param {object} [options] Optional Parameters. * @@ -14534,15 +17380,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - encryptWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { + recoverDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._recoverDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14553,30 +17399,18 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Encrypts an arbitrary sequence of bytes using an encryption key - * that is stored in a key vault. + * @summary Recovers the deleted key to its latest version. * - * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an - * encryption key that is stored in Azure Key Vault. Note that the ENCRYPT - * operation only supports a single block of data, the size of which is - * dependent on the target key and the encryption algorithm to be used. The - * ENCRYPT operation is only strictly necessary for symmetric keys stored in - * Azure Key Vault since protection with an asymmetric key can be performed - * using public portion of the key. This operation is supported for asymmetric - * keys as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * The Recover Deleted Key operation is applicable for deleted keys in + * soft-delete enabled vaults. It recovers the deleted key back to its latest + * version under /keys. An attempt to recover an non-deleted key will return an + * error. Consider this the inverse of the delete operation on soft-delete + * enabled vaults. This operation requires the keys/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * - * @param {buffer} value + * @param {string} keyName The name of the deleted key. * * @param {object} [options] Optional Parameters. * @@ -14590,7 +17424,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyOperationResult} - The deserialized result object. + * @resolve {KeyBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14599,13 +17433,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyOperationResult} for more information. + * See {@link KeyBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { + recoverDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14614,55 +17448,62 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._recoverDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._encrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); + return self._recoverDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); } } /** - * @summary Decrypts a single block of encrypted data. + * @summary Sets a secret in a specified key vault. * - * The DECRYPT operation decrypts a well-formed block of ciphertext using the - * target encryption key and specified algorithm. This operation is the reverse - * of the ENCRYPT operation; only a single block of data may be decrypted, the - * size of this block is dependent on the target key and the algorithm to be - * used. The DECRYPT operation applies to asymmetric and symmetric keys stored - * in Azure Key Vault since it uses the private portion of the key. + * The SET operation adds a secret to the Azure Key Vault. If the named secret + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. + * @param {string} secretName The name of the secret. * - * @param {string} keyVersion The version of the key. + * @param {string} value The value of the secret. * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @param {object} [options] Optional Parameters. * - * @param {buffer} value + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.contentType] Type of the secret value such as a + * password. + * + * @param {object} [options.secretAttributes] The secret management attributes. + * + * @param {boolean} [options.secretAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.secretAttributes.expires] Expiry date in UTC. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - decryptWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { + setSecretWithHttpOperationResponse(vaultBaseUrl, secretName, value, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._setSecret(vaultBaseUrl, secretName, value, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14673,28 +17514,35 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Decrypts a single block of encrypted data. + * @summary Sets a secret in a specified key vault. * - * The DECRYPT operation decrypts a well-formed block of ciphertext using the - * target encryption key and specified algorithm. This operation is the reverse - * of the ENCRYPT operation; only a single block of data may be decrypted, the - * size of this block is dependent on the target key and the algorithm to be - * used. The DECRYPT operation applies to asymmetric and symmetric keys stored - * in Azure Key Vault since it uses the private portion of the key. + * The SET operation adds a secret to the Azure Key Vault. If the named secret + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. + * @param {string} secretName The name of the secret. * - * @param {string} keyVersion The version of the key. + * @param {string} value The value of the secret. * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @param {object} [options] Optional Parameters. * - * @param {buffer} value + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.contentType] Type of the secret value such as a + * password. + * + * @param {object} [options.secretAttributes] The secret management attributes. + * + * @param {boolean} [options.secretAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.secretAttributes.expires] Expiry date in UTC. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14706,7 +17554,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyOperationResult} - The deserialized result object. + * @resolve {SecretBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14715,13 +17563,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyOperationResult} for more information. + * See {@link SecretBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { + setSecret(vaultBaseUrl, secretName, value, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14730,37 +17578,28 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._setSecret(vaultBaseUrl, secretName, value, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); + return self._setSecret(vaultBaseUrl, secretName, value, options, optionalCallback); } } /** - * @summary Creates a signature from a digest using the specified key. + * @summary Deletes a secret from a specified key vault. * - * The SIGN operation is applicable to asymmetric and symmetric keys stored in - * Azure Key Vault since this operation uses the private portion of the key. + * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE + * cannot be applied to an individual version of a secret. This operation + * requires the secrets/delete permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm The signing/verification algorithm identifier. For - * more information on possible algorithm types, see - * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', - * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' - * - * @param {buffer} value + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -14769,15 +17608,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - signWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { + deleteSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._deleteSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14788,25 +17627,16 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Creates a signature from a digest using the specified key. - * - * The SIGN operation is applicable to asymmetric and symmetric keys stored in - * Azure Key Vault since this operation uses the private portion of the key. - * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. - * - * @param {string} keyName The name of the key. + * @summary Deletes a secret from a specified key vault. * - * @param {string} keyVersion The version of the key. + * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE + * cannot be applied to an individual version of a secret. This operation + * requires the secrets/delete permission. * - * @param {string} algorithm The signing/verification algorithm identifier. For - * more information on possible algorithm types, see - * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', - * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {buffer} value + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -14820,7 +17650,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyOperationResult} - The deserialized result object. + * @resolve {DeletedSecretBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14829,13 +17659,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyOperationResult} for more information. + * See {@link DeletedSecretBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { + deleteSecret(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14844,59 +17674,64 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._deleteSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); + return self._deleteSecret(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * @summary Verifies a signature using a specified key. + * @summary Updates the attributes associated with a specified secret in a + * given key vault. * - * The VERIFY operation is applicable to symmetric keys stored in Azure Key - * Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure - * Key Vault since signature verification can be performed using the public - * portion of the key but this operation is supported as a convenience for - * callers that only have a key-reference and not the public portion of the - * key. + * The UPDATE operation changes specified attributes of an existing stored + * secret. Attributes that are not specified in the request are left unchanged. + * The value of a secret itself cannot be changed. This operation requires the + * secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. + * @param {string} secretName The name of the secret. * - * @param {string} keyVersion The version of the key. + * @param {string} secretVersion The version of the secret. * - * @param {string} algorithm The signing/verification algorithm. For more - * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. - * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * @param {object} [options] Optional Parameters. * - * @param {buffer} digest The digest used for signing. + * @param {string} [options.contentType] Type of the secret value such as a + * password. * - * @param {buffer} signature The signature to be verified. + * @param {object} [options.secretAttributes] The secret management attributes. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.secretAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.secretAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - verifyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options) { + updateSecretWithHttpOperationResponse(vaultBaseUrl, secretName, secretVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, (err, result, request, response) => { + self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -14907,32 +17742,37 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Verifies a signature using a specified key. + * @summary Updates the attributes associated with a specified secret in a + * given key vault. * - * The VERIFY operation is applicable to symmetric keys stored in Azure Key - * Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure - * Key Vault since signature verification can be performed using the public - * portion of the key but this operation is supported as a convenience for - * callers that only have a key-reference and not the public portion of the - * key. + * The UPDATE operation changes specified attributes of an existing stored + * secret. Attributes that are not specified in the request are left unchanged. + * The value of a secret itself cannot be changed. This operation requires the + * secrets/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. + * @param {string} secretName The name of the secret. * - * @param {string} keyVersion The version of the key. + * @param {string} secretVersion The version of the secret. * - * @param {string} algorithm The signing/verification algorithm. For more - * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. - * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * @param {object} [options] Optional Parameters. * - * @param {buffer} digest The digest used for signing. + * @param {string} [options.contentType] Type of the secret value such as a + * password. * - * @param {buffer} signature The signature to be verified. + * @param {object} [options.secretAttributes] The secret management attributes. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.secretAttributes.enabled] Determines whether the + * object is enabled. + * + * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. + * + * @param {date} [options.secretAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14944,7 +17784,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyVerifyResult} - The deserialized result object. + * @resolve {SecretBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -14953,13 +17793,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyVerifyResult} for more information. + * See {@link SecretBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, optionalCallback) { + updateSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -14968,39 +17808,29 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, (err, result, request, response) => { + self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._verify(vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature, options, optionalCallback); + return self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback); } } /** - * @summary Wraps a symmetric key using a specified key. + * @summary Get a specified secret from a given key vault. * - * The WRAP operation supports encryption of a symmetric key using a key - * encryption key that has previously been stored in an Azure Key Vault. The - * WRAP operation is only strictly necessary for symmetric keys stored in Azure - * Key Vault since protection with an asymmetric key can be performed using the - * public portion of the key. This operation is supported for asymmetric keys - * as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * The GET operation is applicable to any secret stored in Azure Key Vault. + * This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @param {string} secretName The name of the secret. * - * @param {buffer} value + * @param {string} secretVersion The version of the secret. * * @param {object} [options] Optional Parameters. * @@ -15009,15 +17839,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - wrapKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { + getSecretWithHttpOperationResponse(vaultBaseUrl, secretName, secretVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._getSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15028,27 +17858,17 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Wraps a symmetric key using a specified key. + * @summary Get a specified secret from a given key vault. * - * The WRAP operation supports encryption of a symmetric key using a key - * encryption key that has previously been stored in an Azure Key Vault. The - * WRAP operation is only strictly necessary for symmetric keys stored in Azure - * Key Vault since protection with an asymmetric key can be performed using the - * public portion of the key. This operation is supported for asymmetric keys - * as a convenience for callers that have a key-reference but do not have - * access to the public key material. + * The GET operation is applicable to any secret stored in Azure Key Vault. + * This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @param {string} secretName The name of the secret. * - * @param {buffer} value + * @param {string} secretVersion The version of the secret. * * @param {object} [options] Optional Parameters. * @@ -15062,7 +17882,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyOperationResult} - The deserialized result object. + * @resolve {SecretBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15071,13 +17891,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyOperationResult} for more information. + * See {@link SecretBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { + getSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15086,54 +17906,47 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._getSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._wrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); + return self._getSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback); } } /** - * @summary Unwraps a symmetric key using the specified key that was initially - * used for wrapping that key. + * @summary List secrets in a specified key vault. * - * The UNWRAP operation supports decryption of a symmetric key using the target - * key encryption key. This operation is the reverse of the WRAP operation. The - * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure - * Key Vault since it uses the private portion of the key. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * - * @param {buffer} value - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified, the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - unwrapKeyWithHttpOperationResponse(vaultBaseUrl, keyName, keyVersion, algorithm, value, options) { + getSecretsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._getSecrets(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15144,28 +17957,21 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Unwraps a symmetric key using the specified key that was initially - * used for wrapping that key. + * @summary List secrets in a specified key vault. * - * The UNWRAP operation supports decryption of a symmetric key using the target - * key encryption key. This operation is the reverse of the WRAP operation. The - * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure - * Key Vault since it uses the private portion of the key. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key. - * - * @param {string} keyVersion The version of the key. - * - * @param {string} algorithm algorithm identifier. Possible values include: - * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * - * @param {buffer} value - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified, the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15176,7 +17982,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyOperationResult} - The deserialized result object. + * @resolve {SecretListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15185,13 +17991,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyOperationResult} for more information. + * See {@link SecretListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback) { + getSecrets(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15200,43 +18006,48 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, (err, result, request, response) => { + self._getSecrets(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._unwrapKey(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, optionalCallback); + return self._getSecrets(vaultBaseUrl, options, optionalCallback); } } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary List all versions of the specified secret. + * + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} secretName The name of the secret. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedKeysWithHttpOperationResponse(vaultBaseUrl, options) { + getSecretVersionsWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedKeys(vaultBaseUrl, options, (err, result, request, response) => { + self._getSecretVersions(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15247,16 +18058,21 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary List all versions of the specified secret. + * + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} secretName The name of the secret. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * a page. If not specified, the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15268,7 +18084,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedKeyListResult} - The deserialized result object. + * @resolve {SecretListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15277,13 +18093,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedKeyListResult} for more information. + * See {@link SecretListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedKeys(vaultBaseUrl, options, optionalCallback) { + getSecretVersions(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15292,42 +18108,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedKeys(vaultBaseUrl, options, (err, result, request, response) => { + self._getSecretVersions(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedKeys(vaultBaseUrl, options, optionalCallback); + return self._getSecretVersions(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * Retrieves the deleted key information plus its attributes. Authorization: - * Requires the keys/get permission. + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + getDeletedSecretsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedSecrets(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15338,16 +18158,20 @@ class KeyVaultClient extends ServiceClient { } /** - * Retrieves the deleted key information plus its attributes. Authorization: - * Requires the keys/get permission. + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the + * secrets/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15358,7 +18182,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedKeyBundle} - The deserialized result object. + * @resolve {DeletedSecretListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15367,13 +18191,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedKeyBundle} for more information. + * See {@link DeletedSecretListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { + getDeletedSecrets(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15382,25 +18207,27 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedSecrets(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); + return self._getDeletedSecrets(vaultBaseUrl, options, optionalCallback); } } /** - * Permanently deletes the specified key. aka purges the key. Authorization: - * Requires the keys/purge permission. + * @summary Gets the specified deleted secret. + * + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -15409,15 +18236,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - purgeDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + getDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._purgeDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15428,13 +18255,15 @@ class KeyVaultClient extends ServiceClient { } /** - * Permanently deletes the specified key. aka purges the key. Authorization: - * Requires the keys/purge permission. + * @summary Gets the specified deleted secret. + * + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the key + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -15448,7 +18277,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeletedSecretBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15456,13 +18285,14 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSecretBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - purgeDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { + getDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15471,25 +18301,29 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._purgeDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._getDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._purgeDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); + return self._getDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * Recovers the deleted key back to its current version under /keys. - * Authorization: Requires the keys/recover permission. + * @summary Permanently deletes the specified secret. + * + * The purge deleted secret operation removes the secret permanently, without + * the possibility of recovery. This operation can only be enabled on a + * soft-delete enabled vault. This operation requires the secrets/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the deleted key + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -15498,15 +18332,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverDeletedKeyWithHttpOperationResponse(vaultBaseUrl, keyName, options) { + purgeDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._purgeDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15517,13 +18351,17 @@ class KeyVaultClient extends ServiceClient { } /** - * Recovers the deleted key back to its current version under /keys. - * Authorization: Requires the keys/recover permission. + * @summary Permanently deletes the specified secret. + * + * The purge deleted secret operation removes the secret permanently, without + * the possibility of recovery. This operation can only be enabled on a + * soft-delete enabled vault. This operation requires the secrets/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} keyName The name of the deleted key + * @param {string} secretName The name of the secret. * * @param {object} [options] Optional Parameters. * @@ -15537,7 +18375,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {KeyBundle} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15545,14 +18383,13 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link KeyBundle} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverDeletedKey(vaultBaseUrl, keyName, options, optionalCallback) { + purgeDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15561,47 +18398,31 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverDeletedKey(vaultBaseUrl, keyName, options, (err, result, request, response) => { + self._purgeDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverDeletedKey(vaultBaseUrl, keyName, options, optionalCallback); + return self._purgeDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * @summary Sets a secret in a specified key vault. + * @summary Recovers the deleted secret to the latest version. * - * The SET operation adds a secret to the Azure Key Vault. If the named secret - * already exists, Azure Key Vault creates a new version of that secret. + * Recovers the deleted secret in the specified vault. This operation can only + * be performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} value The value of the secret. + * @param {string} secretName The name of the deleted secret. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * - * @param {string} [options.contentType] Type of the secret value such as a - * password. - * - * @param {object} [options.secretAttributes] The secret management attributes. - * - * @param {boolean} [options.secretAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.secretAttributes.expires] Expiry date in UTC. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15611,11 +18432,11 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - setSecretWithHttpOperationResponse(vaultBaseUrl, secretName, value, options) { + recoverDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._setSecret(vaultBaseUrl, secretName, value, options, (err, result, request, response) => { + self._recoverDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15626,35 +18447,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Sets a secret in a specified key vault. + * @summary Recovers the deleted secret to the latest version. * - * The SET operation adds a secret to the Azure Key Vault. If the named secret - * already exists, Azure Key Vault creates a new version of that secret. + * Recovers the deleted secret in the specified vault. This operation can only + * be performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} value The value of the secret. + * @param {string} secretName The name of the deleted secret. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * - * @param {string} [options.contentType] Type of the secret value such as a - * password. - * - * @param {object} [options.secretAttributes] The secret management attributes. - * - * @param {boolean} [options.secretAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.secretAttributes.expires] Expiry date in UTC. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15680,7 +18485,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - setSecret(vaultBaseUrl, secretName, value, options, optionalCallback) { + recoverDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15689,22 +18494,23 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._setSecret(vaultBaseUrl, secretName, value, options, (err, result, request, response) => { + self._recoverDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._setSecret(vaultBaseUrl, secretName, value, options, optionalCallback); + return self._recoverDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * @summary Deletes a secret from a specified key vault. + * @summary Backs up the specified secret. * - * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE - * cannot be applied to an individual version of a secret. + * Requests that a backup of the specified secret be downloaded to the client. + * All versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -15718,15 +18524,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + backupSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._backupSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15737,10 +18543,11 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Deletes a secret from a specified key vault. + * @summary Backs up the specified secret. * - * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE - * cannot be applied to an individual version of a secret. + * Requests that a backup of the specified secret be downloaded to the client. + * All versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -15759,7 +18566,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedSecretBundle} - The deserialized result object. + * @resolve {BackupSecretResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15768,13 +18575,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedSecretBundle} for more information. + * See {@link BackupSecretResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteSecret(vaultBaseUrl, secretName, options, optionalCallback) { + backupSecret(vaultBaseUrl, secretName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15783,49 +18590,31 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._backupSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteSecret(vaultBaseUrl, secretName, options, optionalCallback); + return self._backupSecret(vaultBaseUrl, secretName, options, optionalCallback); } } /** - * @summary Updates the attributes associated with a specified secret in a - * given key vault. + * @summary Restores a backed up secret to a vault. * - * The UPDATE operation changes specified attributes of an existing stored - * secret. Attributes that are not specified in the request are left unchanged. - * The value of a secret itself cannot be changed. + * Restores a backed up secret, and all its versions, to a vault. This + * operation requires the secrets/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} secretVersion The version of the secret. + * @param {buffer} secretBundleBackup The backup blob associated with a secret + * bundle. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.contentType] Type of the secret value such as a - * password. - * - * @param {object} [options.secretAttributes] The secret management attributes. - * - * @param {boolean} [options.secretAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.secretAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15835,11 +18624,11 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - updateSecretWithHttpOperationResponse(vaultBaseUrl, secretName, secretVersion, options) { + restoreSecretWithHttpOperationResponse(vaultBaseUrl, secretBundleBackup, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { + self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15850,37 +18639,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Updates the attributes associated with a specified secret in a - * given key vault. + * @summary Restores a backed up secret to a vault. * - * The UPDATE operation changes specified attributes of an existing stored - * secret. Attributes that are not specified in the request are left unchanged. - * The value of a secret itself cannot be changed. + * Restores a backed up secret, and all its versions, to a vault. This + * operation requires the secrets/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} secretVersion The version of the secret. + * @param {buffer} secretBundleBackup The backup blob associated with a secret + * bundle. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.contentType] Type of the secret value such as a - * password. - * - * @param {object} [options.secretAttributes] The secret management attributes. - * - * @param {boolean} [options.secretAttributes.enabled] Determines whether the - * object is enabled. - * - * @param {date} [options.secretAttributes.notBefore] Not before date in UTC. - * - * @param {date} [options.secretAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15906,7 +18677,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback) { + restoreSecret(vaultBaseUrl, secretBundleBackup, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -15915,45 +18686,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { + self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback); + return self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, optionalCallback); } } /** - * @summary Get a specified secret from a given key vault. + * @summary List certificates in a specified key vault * - * The GET operation is applicable to any secret stored in Azure Key Vault. + * The GetCertificates operation returns the set of certificates resources in + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} secretVersion The version of the secret. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getSecretWithHttpOperationResponse(vaultBaseUrl, secretName, secretVersion, options) { + getCertificatesWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { + self._getCertificates(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -15964,19 +18736,20 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Get a specified secret from a given key vault. + * @summary List certificates in a specified key vault * - * The GET operation is applicable to any secret stored in Azure Key Vault. + * The GetCertificates operation returns the set of certificates resources in + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {string} secretVersion The version of the secret. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -15987,7 +18760,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SecretBundle} - The deserialized result object. + * @resolve {CertificateListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -15996,13 +18769,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretBundle} for more information. + * See {@link CertificateListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback) { + getCertificates(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16011,46 +18784,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSecret(vaultBaseUrl, secretName, secretVersion, options, (err, result, request, response) => { + self._getCertificates(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSecret(vaultBaseUrl, secretName, secretVersion, options, optionalCallback); + return self._getCertificates(vaultBaseUrl, options, optionalCallback); } } /** - * @summary List secrets in a specified key vault + * @summary Deletes a certificate from a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * Deletes all versions of a certificate object along with its associated + * policy. Delete certificate cannot be used to remove individual versions of a + * certificate object. This operation requires the certificates/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} certificateName The name of the certificate. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getSecretsWithHttpOperationResponse(vaultBaseUrl, options) { + deleteCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getSecrets(vaultBaseUrl, options, (err, result, request, response) => { + self._deleteCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16061,19 +18834,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List secrets in a specified key vault + * @summary Deletes a certificate from a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * Deletes all versions of a certificate object along with its associated + * policy. Delete certificate cannot be used to remove individual versions of a + * certificate object. This operation requires the certificates/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} certificateName The name of the certificate. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16085,7 +18858,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SecretListResult} - The deserialized result object. + * @resolve {DeletedCertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16094,13 +18867,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretListResult} for more information. + * See {@link DeletedCertificateBundle} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSecrets(vaultBaseUrl, options, optionalCallback) { + deleteCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16109,49 +18883,47 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSecrets(vaultBaseUrl, options, (err, result, request, response) => { + self._deleteCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSecrets(vaultBaseUrl, options, optionalCallback); + return self._deleteCertificate(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary List the versions of the specified secret. + * @summary Sets the certificate contacts for the specified key vault. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * Sets the certificate contacts for the specified key vault. This operation + * requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. - * - * @param {object} [options] Optional Parameters. + * @param {object} contacts The contacts for the key vault certificate. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {array} [contacts.contactList] The contact list for the vault + * certificates. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getSecretVersionsWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + setCertificateContactsWithHttpOperationResponse(vaultBaseUrl, contacts, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getSecretVersions(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._setCertificateContacts(vaultBaseUrl, contacts, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16162,22 +18934,20 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List the versions of the specified secret. + * @summary Sets the certificate contacts for the specified key vault. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * Sets the certificate contacts for the specified key vault. This operation + * requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. + * @param {object} contacts The contacts for the key vault certificate. * - * @param {object} [options] Optional Parameters. + * @param {array} [contacts.contactList] The contact list for the vault + * certificates. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16189,7 +18959,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SecretListResult} - The deserialized result object. + * @resolve {Contacts} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16198,13 +18968,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretListResult} for more information. + * See {@link Contacts} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSecretVersions(vaultBaseUrl, secretName, options, optionalCallback) { + setCertificateContacts(vaultBaseUrl, contacts, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16213,43 +18983,43 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSecretVersions(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._setCertificateContacts(vaultBaseUrl, contacts, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSecretVersions(vaultBaseUrl, secretName, options, optionalCallback); + return self._setCertificateContacts(vaultBaseUrl, contacts, options, optionalCallback); } } /** - * List deleted secrets in the specified vault. Authorization: requires the - * secrets/list permission. + * @summary Lists the certificate contacts for a specified key vault. + * + * The GetCertificateContacts operation returns the set of certificate contact + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedSecretsWithHttpOperationResponse(vaultBaseUrl, options) { + getCertificateContactsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedSecrets(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16260,17 +19030,17 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted secrets in the specified vault. Authorization: requires the - * secrets/list permission. + * @summary Lists the certificate contacts for a specified key vault. + * + * The GetCertificateContacts operation returns the set of certificate contact + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -16281,7 +19051,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedSecretListResult} - The deserialized result object. + * @resolve {Contacts} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16290,14 +19060,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedSecretListResult} for more - * information. + * See {@link Contacts} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedSecrets(vaultBaseUrl, options, optionalCallback) { + getCertificateContacts(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16306,26 +19075,26 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedSecrets(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedSecrets(vaultBaseUrl, options, optionalCallback); + return self._getCertificateContacts(vaultBaseUrl, options, optionalCallback); } } /** - * Retrieves the deleted secret information plus its attributes. Authorization: - * requires the secrets/get permission. + * @summary Deletes the certificate contacts for a specified key vault. + * + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -16333,15 +19102,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + deleteCertificateContactsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._deleteCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16352,14 +19121,14 @@ class KeyVaultClient extends ServiceClient { } /** - * Retrieves the deleted secret information plus its attributes. Authorization: - * requires the secrets/get permission. + * @summary Deletes the certificate contacts for a specified key vault. + * + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -16372,7 +19141,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedSecretBundle} - The deserialized result object. + * @resolve {Contacts} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16381,13 +19150,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedSecretBundle} for more information. + * See {@link Contacts} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { + deleteCertificateContacts(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16396,42 +19165,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._deleteCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); + return self._deleteCertificateContacts(vaultBaseUrl, options, optionalCallback); } } /** - * Permanently deletes the specified secret. aka purges the secret. - * Authorization: requires the secrets/purge permission. + * @summary List certificate issuers for a specified key vault. + * + * The GetCertificateIssuers operation returns the set of certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - purgeDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + getCertificateIssuersWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._purgeDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._getCertificateIssuers(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16442,16 +19215,20 @@ class KeyVaultClient extends ServiceClient { } /** - * Permanently deletes the specified secret. aka purges the secret. - * Authorization: requires the secrets/purge permission. + * @summary List certificate issuers for a specified key vault. + * + * The GetCertificateIssuers operation returns the set of certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -16462,7 +19239,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {CertificateIssuerListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16470,13 +19247,15 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link CertificateIssuerListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - purgeDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { + getCertificateIssuers(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16485,42 +19264,68 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._purgeDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._getCertificateIssuers(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._purgeDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); + return self._getCertificateIssuers(vaultBaseUrl, options, optionalCallback); } } /** - * Recovers the deleted secret back to its current version under /secrets. - * Authorization: requires the secrets/recover permission. + * @summary Sets the specified certificate issuer. + * + * The SetCertificateIssuer operation adds or updates the specified certificate + * issuer. This operation requires the certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the deleted secret + * @param {string} issuerName The name of the issuer. + * + * @param {string} provider The issuer provider. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.credentials] The credentials to be used for the + * issuer. + * + * @param {string} [options.credentials.accountId] The user name/account + * name/account id. + * + * @param {string} [options.credentials.password] The password/secret/account + * key. + * + * @param {object} [options.organizationDetails] Details of the organization as + * provided to the issuer. + * + * @param {string} [options.organizationDetails.id] Id of the organization. + * + * @param {array} [options.organizationDetails.adminDetails] Details of the + * organization administrator. + * + * @param {object} [options.attributes] Attributes of the issuer object. + * + * @param {boolean} [options.attributes.enabled] Determines whether the issuer + * is enabled. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverDeletedSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + setCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, provider, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16531,16 +19336,42 @@ class KeyVaultClient extends ServiceClient { } /** - * Recovers the deleted secret back to its current version under /secrets. - * Authorization: requires the secrets/recover permission. + * @summary Sets the specified certificate issuer. + * + * The SetCertificateIssuer operation adds or updates the specified certificate + * issuer. This operation requires the certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the deleted secret + * @param {string} issuerName The name of the issuer. + * + * @param {string} provider The issuer provider. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.credentials] The credentials to be used for the + * issuer. + * + * @param {string} [options.credentials.accountId] The user name/account + * name/account id. + * + * @param {string} [options.credentials.password] The password/secret/account + * key. + * + * @param {object} [options.organizationDetails] Details of the organization as + * provided to the issuer. + * + * @param {string} [options.organizationDetails.id] Id of the organization. + * + * @param {array} [options.organizationDetails.adminDetails] Details of the + * organization administrator. + * + * @param {object} [options.attributes] Attributes of the issuer object. + * + * @param {boolean} [options.attributes.enabled] Determines whether the issuer + * is enabled. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -16551,7 +19382,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SecretBundle} - The deserialized result object. + * @resolve {IssuerBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16560,13 +19391,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretBundle} for more information. + * See {@link IssuerBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback) { + setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16575,42 +19406,69 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverDeletedSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverDeletedSecret(vaultBaseUrl, secretName, options, optionalCallback); + return self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, optionalCallback); } } /** - * Requests that a backup of the specified secret be downloaded to the client. - * Authorization: requires the secrets/backup permission. + * @summary Updates the specified certificate issuer. + * + * The UpdateCertificateIssuer operation performs an update on the specified + * certificate issuer entity. This operation requires the + * certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. + * @param {string} issuerName The name of the issuer. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.provider] The issuer provider. + * + * @param {object} [options.credentials] The credentials to be used for the + * issuer. + * + * @param {string} [options.credentials.accountId] The user name/account + * name/account id. + * + * @param {string} [options.credentials.password] The password/secret/account + * key. + * + * @param {object} [options.organizationDetails] Details of the organization as + * provided to the issuer. + * + * @param {string} [options.organizationDetails.id] Id of the organization. + * + * @param {array} [options.organizationDetails.adminDetails] Details of the + * organization administrator. + * + * @param {object} [options.attributes] Attributes of the issuer object. + * + * @param {boolean} [options.attributes.enabled] Determines whether the issuer + * is enabled. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - backupSecretWithHttpOperationResponse(vaultBaseUrl, secretName, options) { + updateCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._backupSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16621,16 +19479,43 @@ class KeyVaultClient extends ServiceClient { } /** - * Requests that a backup of the specified secret be downloaded to the client. - * Authorization: requires the secrets/backup permission. + * @summary Updates the specified certificate issuer. + * + * The UpdateCertificateIssuer operation performs an update on the specified + * certificate issuer entity. This operation requires the + * certificates/setissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} secretName The name of the secret. + * @param {string} issuerName The name of the issuer. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.provider] The issuer provider. + * + * @param {object} [options.credentials] The credentials to be used for the + * issuer. + * + * @param {string} [options.credentials.accountId] The user name/account + * name/account id. + * + * @param {string} [options.credentials.password] The password/secret/account + * key. + * + * @param {object} [options.organizationDetails] Details of the organization as + * provided to the issuer. + * + * @param {string} [options.organizationDetails.id] Id of the organization. + * + * @param {array} [options.organizationDetails.adminDetails] Details of the + * organization administrator. + * + * @param {object} [options.attributes] Attributes of the issuer object. + * + * @param {boolean} [options.attributes.enabled] Determines whether the issuer + * is enabled. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -16641,7 +19526,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {BackupSecretResult} - The deserialized result object. + * @resolve {IssuerBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16650,13 +19535,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link BackupSecretResult} for more information. + * See {@link IssuerBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - backupSecret(vaultBaseUrl, secretName, options, optionalCallback) { + updateCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16665,26 +19550,28 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._backupSecret(vaultBaseUrl, secretName, options, (err, result, request, response) => { + self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._backupSecret(vaultBaseUrl, secretName, options, optionalCallback); + return self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); } } /** - * Restores a backed up secret to a vault. Authorization: requires the - * secrets/restore permission. + * @summary Lists the specified certificate issuer. + * + * The GetCertificateIssuer operation returns the specified certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {buffer} secretBundleBackup The backup blob associated with a secret - * bundle. + * @param {string} issuerName The name of the issuer. * * @param {object} [options] Optional Parameters. * @@ -16693,15 +19580,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restoreSecretWithHttpOperationResponse(vaultBaseUrl, secretBundleBackup, options) { + getCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, (err, result, request, response) => { + self._getCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16712,14 +19599,16 @@ class KeyVaultClient extends ServiceClient { } /** - * Restores a backed up secret to a vault. Authorization: requires the - * secrets/restore permission. + * @summary Lists the specified certificate issuer. + * + * The GetCertificateIssuer operation returns the specified certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {buffer} secretBundleBackup The backup blob associated with a secret - * bundle. + * @param {string} issuerName The name of the issuer. * * @param {object} [options] Optional Parameters. * @@ -16733,7 +19622,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SecretBundle} - The deserialized result object. + * @resolve {IssuerBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16742,13 +19631,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SecretBundle} for more information. + * See {@link IssuerBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restoreSecret(vaultBaseUrl, secretBundleBackup, options, optionalCallback) { + getCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16757,45 +19646,45 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, (err, result, request, response) => { + self._getCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restoreSecret(vaultBaseUrl, secretBundleBackup, options, optionalCallback); + return self._getCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); } } /** - * @summary List certificates in a specified key vault + * @summary Deletes the specified certificate issuer. * - * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * The DeleteCertificateIssuer operation permanently removes the specified + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} issuerName The name of the issuer. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificatesWithHttpOperationResponse(vaultBaseUrl, options) { + deleteCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificates(vaultBaseUrl, options, (err, result, request, response) => { + self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16806,18 +19695,18 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List certificates in a specified key vault + * @summary Deletes the specified certificate issuer. * - * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * The DeleteCertificateIssuer operation permanently removes the specified + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} issuerName The name of the issuer. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16829,7 +19718,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateListResult} - The deserialized result object. + * @resolve {IssuerBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16838,13 +19727,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateListResult} for more information. + * See {@link IssuerBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificates(vaultBaseUrl, options, optionalCallback) { + deleteCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16853,23 +19742,22 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificates(vaultBaseUrl, options, (err, result, request, response) => { + self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificates(vaultBaseUrl, options, optionalCallback); + return self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); } } /** - * @summary Deletes a certificate from a specified key vault. + * @summary Creates a new certificate. * - * Deletes all versions of a certificate object along with its associated - * policy. Delete certificate cannot be used to remove individual versions of a - * certificate object. + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -16878,20 +19766,108 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. + * + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. + * + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. + * + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. + * + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. + * + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. + * + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. + * + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). + * + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. + * + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. + * + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. + * + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. + * + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. + * + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. + * + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + createCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._createCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -16902,18 +19878,105 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Deletes a certificate from a specified key vault. + * @summary Creates a new certificate. * - * Deletes all versions of a certificate object along with its associated - * policy. Delete certificate cannot be used to remove individual versions of a - * certificate object. + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} certificateName The name of the certificate. * - * @param {object} [options] Optional Parameters. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. + * + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. + * + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. + * + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. + * + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. + * + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. + * + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. + * + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). + * + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. + * + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. + * + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. + * + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. + * + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. + * + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. + * + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16925,7 +19988,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedCertificateBundle} - The deserialized result object. + * @resolve {CertificateOperation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -16934,14 +19997,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedCertificateBundle} for more - * information. + * See {@link CertificateOperation} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + createCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -16950,47 +20012,142 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._createCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + return self._createCertificate(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary Sets the certificate contacts for the specified key vault. + * @summary Imports a certificate into a specified key vault. * - * Sets the certificate contacts for the specified key vault. Authorization: - * requires the certificates/managecontacts permission. + * Imports an existing valid certificate, containing a private key, into Azure + * Key Vault. The certificate to be imported can be in either PFX or PEM + * format. If the certificate is in PEM format the PEM file must contain the + * key as well as x509 certificates. This operation requires the + * certificates/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} contacts The contacts for the key vault certificate. + * @param {string} certificateName The name of the certificate. * - * @param {array} [contacts.contactList] The contact list for the vault - * certificates. + * @param {string} base64EncodedCertificate Base64 encoded representation of + * the certificate object to import. This certificate needs to contain the + * private key. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.password] If the private key in + * base64EncodedCertificate is encrypted, the password used for encryption. + * + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. + * + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. + * + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. + * + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. + * + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. + * + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. + * + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. + * + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). + * + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. + * + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. + * + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. + * + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. + * + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. + * + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. + * + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - setCertificateContactsWithHttpOperationResponse(vaultBaseUrl, contacts, options) { + importCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, base64EncodedCertificate, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._setCertificateContacts(vaultBaseUrl, contacts, options, (err, result, request, response) => { + self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17001,110 +20158,115 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Sets the certificate contacts for the specified key vault. + * @summary Imports a certificate into a specified key vault. * - * Sets the certificate contacts for the specified key vault. Authorization: - * requires the certificates/managecontacts permission. + * Imports an existing valid certificate, containing a private key, into Azure + * Key Vault. The certificate to be imported can be in either PFX or PEM + * format. If the certificate is in PEM format the PEM file must contain the + * key as well as x509 certificates. This operation requires the + * certificates/import permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} contacts The contacts for the key vault certificate. + * @param {string} certificateName The name of the certificate. * - * @param {array} [contacts.contactList] The contact list for the vault - * certificates. + * @param {string} base64EncodedCertificate Base64 encoded representation of + * the certificate object to import. This certificate needs to contain the + * private key. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [options.password] If the private key in + * base64EncodedCertificate is encrypted, the password used for encryption. * - * @param {function} [optionalCallback] - The optional callback. + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. * - * {Promise} A promise is returned + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. * - * @resolve {Contacts} - The deserialized result object. + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. * - * @reject {Error} - The error object. + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. * - * {function} optionalCallback(err, result, request, response) + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Contacts} for more information. + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - setCertificateContacts(vaultBaseUrl, contacts, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._setCertificateContacts(vaultBaseUrl, contacts, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._setCertificateContacts(vaultBaseUrl, contacts, options, optionalCallback); - } - } - - /** - * @summary Lists the certificate contacts for a specified key vault. + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. * - * The GetCertificateContacts operation returns the set of certificate contact - * resources in the specified key vault. + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. * - * @param {object} [options] Optional Parameters. + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. * - * @returns {Promise} A promise is returned + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. * - * @reject {Error} - The error object. - */ - getCertificateContactsWithHttpOperationResponse(vaultBaseUrl, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Lists the certificate contacts for a specified key vault. + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. * - * The GetCertificateContacts operation returns the set of certificate contact - * resources in the specified key vault. + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17116,7 +20278,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Contacts} - The deserialized result object. + * @resolve {CertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17125,13 +20287,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Contacts} for more information. + * See {@link CertificateBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificateContacts(vaultBaseUrl, options, optionalCallback) { + importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17140,42 +20302,48 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { + self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificateContacts(vaultBaseUrl, options, optionalCallback); + return self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, optionalCallback); } } /** - * @summary Deletes the certificate contacts for a specified key vault. + * @summary List the versions of a certificate. * - * Deletes the certificate contacts for a specified key vault certificate. - * Authorization: requires the certificates/managecontacts permission. + * The GetCertificateVersions operation returns the versions of a certificate + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} certificateName The name of the certificate. + * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteCertificateContactsWithHttpOperationResponse(vaultBaseUrl, options) { + getCertificateVersionsWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificateVersions(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17186,16 +20354,22 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Deletes the certificate contacts for a specified key vault. + * @summary List the versions of a certificate. * - * Deletes the certificate contacts for a specified key vault certificate. - * Authorization: requires the certificates/managecontacts permission. + * The GetCertificateVersions operation returns the versions of a certificate + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} certificateName The name of the certificate. + * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -17206,7 +20380,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Contacts} - The deserialized result object. + * @resolve {CertificateListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17215,13 +20389,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Contacts} for more information. + * See {@link CertificateListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteCertificateContacts(vaultBaseUrl, options, optionalCallback) { + getCertificateVersions(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17230,45 +20404,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteCertificateContacts(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificateVersions(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteCertificateContacts(vaultBaseUrl, options, optionalCallback); + return self._getCertificateVersions(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary List certificate issuers for a specified key vault. + * @summary Lists the policy for a certificate. * - * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * The GetCertificatePolicy operation returns the specified certificate policy + * resources in the specified key vault. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} certificateName The name of the certificate in a given key + * vault. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificateIssuersWithHttpOperationResponse(vaultBaseUrl, options) { + getCertificatePolicyWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificateIssuers(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificatePolicy(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17279,18 +20454,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List certificate issuers for a specified key vault. + * @summary Lists the policy for a certificate. * - * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * The GetCertificatePolicy operation returns the specified certificate policy + * resources in the specified key vault. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} certificateName The name of the certificate in a given key + * vault. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17302,7 +20478,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateIssuerListResult} - The deserialized result object. + * @resolve {CertificatePolicy} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17311,14 +20487,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateIssuerListResult} for more - * information. + * See {@link CertificatePolicy} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificateIssuers(vaultBaseUrl, options, optionalCallback) { + getCertificatePolicy(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17327,68 +20502,122 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificateIssuers(vaultBaseUrl, options, (err, result, request, response) => { + self._getCertificatePolicy(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificateIssuers(vaultBaseUrl, options, optionalCallback); + return self._getCertificatePolicy(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary Sets the specified certificate issuer. + * @summary Updates the policy for a certificate. * - * The SetCertificateIssuer operation adds or updates the specified certificate - * issuer. + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given + * vault. * - * @param {string} provider The issuer provider. + * @param {object} certificatePolicy The policy for the certificate. * - * @param {object} [options] Optional Parameters. + * @param {object} [certificatePolicy.keyProperties] Properties of the key + * backing a certificate. * - * @param {object} [options.credentials] The credentials to be used for the - * issuer. + * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if + * the private key can be exported. * - * @param {string} [options.credentials.accountId] The user name/account - * name/account id. + * @param {string} [certificatePolicy.keyProperties.keyType] The key type. * - * @param {string} [options.credentials.password] The password/secret/account - * key. + * @param {number} [certificatePolicy.keyProperties.keySize] The key size in + * bytes. For example; 1024 or 2048. * - * @param {object} [options.organizationDetails] Details of the organization as - * provided to the issuer. + * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the + * same key pair will be used on certificate renewal. * - * @param {string} [options.organizationDetails.id] Id of the organization. + * @param {object} [certificatePolicy.secretProperties] Properties of the + * secret backing a certificate. * - * @param {array} [options.organizationDetails.adminDetails] Details of the - * organization administrator. + * @param {string} [certificatePolicy.secretProperties.contentType] The media + * type (MIME type). * - * @param {object} [options.attributes] Attributes of the issuer object. + * @param {object} [certificatePolicy.x509CertificateProperties] Properties of + * the X509 component of a certificate. * - * @param {boolean} [options.attributes.enabled] Determines whether the issuer - * is enabled. + * @param {string} [certificatePolicy.x509CertificateProperties.subject] The + * subject name. Should be a valid X509 distinguished Name. + * + * @param {array} [certificatePolicy.x509CertificateProperties.ekus] The + * enhanced key usage. + * + * @param {object} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames] The + * subject alternative names. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} [certificatePolicy.x509CertificateProperties.keyUsage] List + * of key usages. + * + * @param {number} + * [certificatePolicy.x509CertificateProperties.validityInMonths] The duration + * that the ceritifcate is valid in months. + * + * @param {array} [certificatePolicy.lifetimeActions] Actions that will be + * performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [certificatePolicy.issuerParameters] Parameters for the + * issuer of the X509 component of a certificate. + * + * @param {string} [certificatePolicy.issuerParameters.name] Name of the + * referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [certificatePolicy.issuerParameters.certificateType] Type of + * certificate to be requested from the issuer provider. + * + * @param {object} [certificatePolicy.attributes] The certificate attributes. + * + * @param {boolean} [certificatePolicy.attributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [certificatePolicy.attributes.notBefore] Not before date in + * UTC. + * + * @param {date} [certificatePolicy.attributes.expires] Expiry date in UTC. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - setCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, provider, options) { + updateCertificatePolicyWithHttpOperationResponse(vaultBaseUrl, certificateName, certificatePolicy, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, (err, result, request, response) => { + self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17399,41 +20628,95 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Sets the specified certificate issuer. + * @summary Updates the policy for a certificate. * - * The SetCertificateIssuer operation adds or updates the specified certificate - * issuer. + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given + * vault. * - * @param {string} provider The issuer provider. + * @param {object} certificatePolicy The policy for the certificate. + * + * @param {object} [certificatePolicy.keyProperties] Properties of the key + * backing a certificate. + * + * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if + * the private key can be exported. + * + * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * + * @param {number} [certificatePolicy.keyProperties.keySize] The key size in + * bytes. For example; 1024 or 2048. + * + * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the + * same key pair will be used on certificate renewal. + * + * @param {object} [certificatePolicy.secretProperties] Properties of the + * secret backing a certificate. + * + * @param {string} [certificatePolicy.secretProperties.contentType] The media + * type (MIME type). + * + * @param {object} [certificatePolicy.x509CertificateProperties] Properties of + * the X509 component of a certificate. + * + * @param {string} [certificatePolicy.x509CertificateProperties.subject] The + * subject name. Should be a valid X509 distinguished Name. + * + * @param {array} [certificatePolicy.x509CertificateProperties.ekus] The + * enhanced key usage. + * + * @param {object} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames] The + * subject alternative names. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} [certificatePolicy.x509CertificateProperties.keyUsage] List + * of key usages. + * + * @param {number} + * [certificatePolicy.x509CertificateProperties.validityInMonths] The duration + * that the ceritifcate is valid in months. * - * @param {object} [options] Optional Parameters. + * @param {array} [certificatePolicy.lifetimeActions] Actions that will be + * performed by Key Vault over the lifetime of a certificate. * - * @param {object} [options.credentials] The credentials to be used for the - * issuer. + * @param {object} [certificatePolicy.issuerParameters] Parameters for the + * issuer of the X509 component of a certificate. * - * @param {string} [options.credentials.accountId] The user name/account - * name/account id. + * @param {string} [certificatePolicy.issuerParameters.name] Name of the + * referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. * - * @param {string} [options.credentials.password] The password/secret/account - * key. + * @param {string} [certificatePolicy.issuerParameters.certificateType] Type of + * certificate to be requested from the issuer provider. * - * @param {object} [options.organizationDetails] Details of the organization as - * provided to the issuer. + * @param {object} [certificatePolicy.attributes] The certificate attributes. * - * @param {string} [options.organizationDetails.id] Id of the organization. + * @param {boolean} [certificatePolicy.attributes.enabled] Determines whether + * the object is enabled. * - * @param {array} [options.organizationDetails.adminDetails] Details of the - * organization administrator. + * @param {date} [certificatePolicy.attributes.notBefore] Not before date in + * UTC. * - * @param {object} [options.attributes] Attributes of the issuer object. + * @param {date} [certificatePolicy.attributes.expires] Expiry date in UTC. * - * @param {boolean} [options.attributes.enabled] Determines whether the issuer - * is enabled. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17445,7 +20728,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IssuerBundle} - The deserialized result object. + * @resolve {CertificatePolicy} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17454,13 +20737,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IssuerBundle} for more information. + * See {@link CertificatePolicy} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, optionalCallback) { + updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17469,68 +20752,137 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, (err, result, request, response) => { + self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._setCertificateIssuer(vaultBaseUrl, issuerName, provider, options, optionalCallback); + return self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, optionalCallback); } } /** - * @summary Updates the specified certificate issuer. + * @summary Updates the specified attributes associated with the given + * certificate. * - * The UpdateCertificateIssuer operation performs an update on the specified - * certificate issuer entity. + * The UpdateCertificate operation applies the specified update on the given + * certificate; the only elements updated are the certificate's attributes. + * This operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given key + * vault. + * + * @param {string} certificateVersion The version of the certificate. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.provider] The issuer provider. + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. * - * @param {object} [options.credentials] The credentials to be used for the - * issuer. + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. * - * @param {string} [options.credentials.accountId] The user name/account - * name/account id. + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. * - * @param {string} [options.credentials.password] The password/secret/account - * key. + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. * - * @param {object} [options.organizationDetails] Details of the organization as - * provided to the issuer. + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. * - * @param {string} [options.organizationDetails.id] Id of the organization. + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. * - * @param {array} [options.organizationDetails.adminDetails] Details of the - * organization administrator. + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. * - * @param {object} [options.attributes] Attributes of the issuer object. + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). * - * @param {boolean} [options.attributes.enabled] Determines whether the issuer - * is enabled. + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. + * + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. + * + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. + * + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. + * + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. + * + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. + * + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { + updateCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, certificateVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17541,41 +20893,110 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Updates the specified certificate issuer. + * @summary Updates the specified attributes associated with the given + * certificate. * - * The UpdateCertificateIssuer operation performs an update on the specified - * certificate issuer entity. + * The UpdateCertificate operation applies the specified update on the given + * certificate; the only elements updated are the certificate's attributes. + * This operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given key + * vault. + * + * @param {string} certificateVersion The version of the certificate. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.provider] The issuer provider. + * @param {object} [options.certificatePolicy] The management policy for the + * certificate. * - * @param {object} [options.credentials] The credentials to be used for the - * issuer. + * @param {object} [options.certificatePolicy.keyProperties] Properties of the + * key backing a certificate. * - * @param {string} [options.credentials.accountId] The user name/account - * name/account id. + * @param {boolean} [options.certificatePolicy.keyProperties.exportable] + * Indicates if the private key can be exported. * - * @param {string} [options.credentials.password] The password/secret/account - * key. + * @param {string} [options.certificatePolicy.keyProperties.keyType] The key + * type. * - * @param {object} [options.organizationDetails] Details of the organization as - * provided to the issuer. + * @param {number} [options.certificatePolicy.keyProperties.keySize] The key + * size in bytes. For example; 1024 or 2048. * - * @param {string} [options.organizationDetails.id] Id of the organization. + * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] + * Indicates if the same key pair will be used on certificate renewal. * - * @param {array} [options.organizationDetails.adminDetails] Details of the - * organization administrator. + * @param {object} [options.certificatePolicy.secretProperties] Properties of + * the secret backing a certificate. * - * @param {object} [options.attributes] Attributes of the issuer object. + * @param {string} [options.certificatePolicy.secretProperties.contentType] The + * media type (MIME type). * - * @param {boolean} [options.attributes.enabled] Determines whether the issuer - * is enabled. + * @param {object} [options.certificatePolicy.x509CertificateProperties] + * Properties of the X509 component of a certificate. + * + * @param {string} + * [options.certificatePolicy.x509CertificateProperties.subject] The subject + * name. Should be a valid X509 distinguished Name. + * + * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] + * The enhanced key usage. + * + * @param {object} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] + * The subject alternative names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] + * Email addresses. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] + * Domain names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] + * User principal names. + * + * @param {array} + * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key + * usages. + * + * @param {number} + * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The + * duration that the ceritifcate is valid in months. + * + * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will + * be performed by Key Vault over the lifetime of a certificate. + * + * @param {object} [options.certificatePolicy.issuerParameters] Parameters for + * the issuer of the X509 component of a certificate. + * + * @param {string} [options.certificatePolicy.issuerParameters.name] Name of + * the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + * + * @param {string} [options.certificatePolicy.issuerParameters.certificateType] + * Type of certificate to be requested from the issuer provider. + * + * @param {object} [options.certificatePolicy.attributes] The certificate + * attributes. + * + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17587,7 +21008,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IssuerBundle} - The deserialized result object. + * @resolve {CertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17596,13 +21017,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IssuerBundle} for more information. + * See {@link CertificateBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { + updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17611,27 +21032,30 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); + return self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback); } } /** - * @summary Lists the specified certificate issuer. + * @summary Gets information about a certificate. * - * The GetCertificateIssuer operation returns the specified certificate issuer - * resources in the specified key vault + * Gets information about a specific certificate. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given + * vault. + * + * @param {string} certificateVersion The version of the certificate. * * @param {object} [options] Optional Parameters. * @@ -17640,15 +21064,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { + getCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, certificateVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17659,15 +21083,18 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Lists the specified certificate issuer. + * @summary Gets information about a certificate. * - * The GetCertificateIssuer operation returns the specified certificate issuer - * resources in the specified key vault + * Gets information about a specific certificate. This operation requires the + * certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate in the given + * vault. + * + * @param {string} certificateVersion The version of the certificate. * * @param {object} [options] Optional Parameters. * @@ -17681,7 +21108,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IssuerBundle} - The deserialized result object. + * @resolve {CertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17690,13 +21117,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IssuerBundle} for more information. + * See {@link CertificateBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { + getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17705,27 +21132,30 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); + return self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback); } } /** - * @summary Deletes the specified certificate issuer. + * @summary Updates a certificate operation. * - * The DeleteCertificateIssuer operation permanently removes the specified - * certificate issuer from the vault. + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate. + * + * @param {boolean} cancellationRequested Indicates if cancellation was + * requested on the certificate operation. * * @param {object} [options] Optional Parameters. * @@ -17734,15 +21164,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteCertificateIssuerWithHttpOperationResponse(vaultBaseUrl, issuerName, options) { + updateCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, cancellationRequested, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -17753,15 +21183,18 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Deletes the specified certificate issuer. + * @summary Updates a certificate operation. * - * The DeleteCertificateIssuer operation permanently removes the specified - * certificate issuer from the vault. + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} issuerName The name of the issuer. + * @param {string} certificateName The name of the certificate. + * + * @param {boolean} cancellationRequested Indicates if cancellation was + * requested on the certificate operation. * * @param {object} [options] Optional Parameters. * @@ -17775,7 +21208,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IssuerBundle} - The deserialized result object. + * @resolve {CertificateOperation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -17784,13 +21217,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IssuerBundle} for more information. + * See {@link CertificateOperation} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback) { + updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -17799,21 +21232,22 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, (err, result, request, response) => { + self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteCertificateIssuer(vaultBaseUrl, issuerName, options, optionalCallback); + return self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, optionalCallback); } } /** - * @summary Creates a new certificate. + * @summary Gets the creation operation of a certificate. * - * If this is the first version, the certificate resource is created. + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -17822,94 +21256,6 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. - * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. - * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). - * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. - * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. - * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. - * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. - * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. - * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. - * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. - * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. - * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -17919,119 +21265,32 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - createCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + getCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); - }); - } - - /** - * @summary Creates a new certificate. - * - * If this is the first version, the certificate resource is created. - * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. - * - * @param {string} certificateName The name of the certificate. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. - * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. - * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). - * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. - * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. - * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. - * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. - * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. - * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. - * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. - * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. - * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). + }); + } + + /** + * @summary Gets the creation operation of a certificate. * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * @param {string} certificateName The name of the certificate. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18058,7 +21317,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + getCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -18067,141 +21326,45 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + return self._getCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary Imports a certificate into a specified key vault. + * @summary Deletes the creation operation for a specific certificate. * - * Imports an existing valid certificate, containing a private key, into Azure - * Key Vault. The certificate to be imported can be in either PFX or PEM - * format. If the certificate is in PEM format the PEM file must contain the - * key as well as x509 certificates. + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} certificateName The name of the certificate. * - * @param {string} base64EncodedCertificate Base64 encoded representation of - * the certificate object to import. This certificate needs to contain the - * private key. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.password] If the private key in - * base64EncodedCertificate is encrypted, the password used for encryption. - * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. - * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. - * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). - * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. - * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. - * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. - * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. - * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. - * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. - * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. - * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. - * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - importCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, base64EncodedCertificate, options) { + deleteCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, (err, result, request, response) => { + self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -18212,115 +21375,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Imports a certificate into a specified key vault. + * @summary Deletes the creation operation for a specific certificate. * - * Imports an existing valid certificate, containing a private key, into Azure - * Key Vault. The certificate to be imported can be in either PFX or PEM - * format. If the certificate is in PEM format the PEM file must contain the - * key as well as x509 certificates. + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This + * operation requires the certificates/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} certificateName The name of the certificate. * - * @param {string} base64EncodedCertificate Base64 encoded representation of - * the certificate object to import. This certificate needs to contain the - * private key. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.password] If the private key in - * base64EncodedCertificate is encrypted, the password used for encryption. - * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. - * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. - * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). - * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. - * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. - * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. - * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. - * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. - * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. - * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. - * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. - * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -18331,7 +21398,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateBundle} - The deserialized result object. + * @resolve {CertificateOperation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -18340,13 +21407,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateBundle} for more information. + * See {@link CertificateOperation} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, optionalCallback) { + deleteCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -18355,47 +21422,63 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, (err, result, request, response) => { + self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._importCertificate(vaultBaseUrl, certificateName, base64EncodedCertificate, options, optionalCallback); + return self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary List the versions of a certificate. + * @summary Merges a certificate or a certificate chain with a key pair + * existing on the server. * - * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * The MergeCertificate operation performs the merging of a certificate or + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} certificateName The name of the certificate. * + * @param {array} x509Certificates The certificate or the certificate chain to + * merge. + * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificateVersionsWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + mergeCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, x509Certificates, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificateVersions(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -18406,20 +21489,36 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List the versions of a certificate. + * @summary Merges a certificate or a certificate chain with a key pair + * existing on the server. * - * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * The MergeCertificate operation performs the merging of a certificate or + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} certificateName The name of the certificate. * + * @param {array} x509Certificates The certificate or the certificate chain to + * merge. + * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options.certificateAttributes] The attributes of the + * certificate (optional). + * + * @param {boolean} [options.certificateAttributes.enabled] Determines whether + * the object is enabled. + * + * @param {date} [options.certificateAttributes.notBefore] Not before date in + * UTC. + * + * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18431,7 +21530,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateListResult} - The deserialized result object. + * @resolve {CertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -18440,13 +21539,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateListResult} for more information. + * See {@link CertificateBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificateVersions(vaultBaseUrl, certificateName, options, optionalCallback) { + mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -18455,45 +21554,49 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificateVersions(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificateVersions(vaultBaseUrl, certificateName, options, optionalCallback); + return self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, optionalCallback); } } /** - * @summary Lists the policy for a certificate. + * @summary Lists the deleted certificates in the specified vault currently + * available for recovery. * - * The GetCertificatePolicy operation returns the specified certificate policy - * resources in the specified key vault + * The GetDeletedCertificates operation retrieves the certificates in the + * current vault which are in a deleted state and ready for recovery or + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in a given key - * vault. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificatePolicyWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + getDeletedCertificatesWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificatePolicy(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getDeletedCertificates(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -18504,19 +21607,23 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Lists the policy for a certificate. + * @summary Lists the deleted certificates in the specified vault currently + * available for recovery. * - * The GetCertificatePolicy operation returns the specified certificate policy - * resources in the specified key vault + * The GetDeletedCertificates operation retrieves the certificates in the + * current vault which are in a deleted state and ready for recovery or + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in a given key - * vault. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -18527,7 +21634,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificatePolicy} - The deserialized result object. + * @resolve {DeletedCertificateListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -18536,13 +21643,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificatePolicy} for more information. + * See {@link DeletedCertificateListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificatePolicy(vaultBaseUrl, certificateName, options, optionalCallback) { + getDeletedCertificates(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -18551,217 +21659,67 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificatePolicy(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getDeletedCertificates(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificatePolicy(vaultBaseUrl, certificateName, options, optionalCallback); + return self._getDeletedCertificates(vaultBaseUrl, options, optionalCallback); } } /** - * @summary Updates the policy for a certificate. - * - * Set specified members in the certificate policy. Leave others as null. - * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. - * - * @param {string} certificateName The name of the certificate in the given - * vault. - * - * @param {object} certificatePolicy The policy for the certificate. - * - * @param {object} [certificatePolicy.keyProperties] Properties of the key - * backing a certificate. - * - * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if - * the private key can be exported. - * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. - * - * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. - * - * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the - * same key pair will be used on certificate renewal. - * - * @param {object} [certificatePolicy.secretProperties] Properties of the - * secret backing a certificate. - * - * @param {string} [certificatePolicy.secretProperties.contentType] The media - * type (MIME type). - * - * @param {object} [certificatePolicy.x509CertificateProperties] Properties of - * the X509 component of a certificate. - * - * @param {string} [certificatePolicy.x509CertificateProperties.subject] The - * subject name. Should be a valid X509 distinguished Name. - * - * @param {array} [certificatePolicy.x509CertificateProperties.ekus] The - * enhanced key usage. - * - * @param {object} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames] The - * subject alternative names. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} [certificatePolicy.x509CertificateProperties.keyUsage] List - * of key usages. - * - * @param {number} - * [certificatePolicy.x509CertificateProperties.validityInMonths] The duration - * that the ceritifcate is valid in months. - * - * @param {array} [certificatePolicy.lifetimeActions] Actions that will be - * performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [certificatePolicy.issuerParameters] Parameters for the - * issuer of the X509 component of a certificate. - * - * @param {string} [certificatePolicy.issuerParameters.name] Name of the - * referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [certificatePolicy.issuerParameters.certificateType] Type of - * certificate to be requested from the issuer provider. - * - * @param {object} [certificatePolicy.attributes] The certificate attributes. - * - * @param {boolean} [certificatePolicy.attributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [certificatePolicy.attributes.notBefore] Not before date in - * UTC. - * - * @param {date} [certificatePolicy.attributes.expires] Expiry date in UTC. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - updateCertificatePolicyWithHttpOperationResponse(vaultBaseUrl, certificateName, certificatePolicy, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Updates the policy for a certificate. + * @summary Retrieves information about the specified deleted certificate. * - * Set specified members in the certificate policy. Leave others as null. + * The GetDeletedCertificate operation retrieves the deleted certificate + * information plus its attributes, such as retention interval, scheduled + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in the given - * vault. - * - * @param {object} certificatePolicy The policy for the certificate. - * - * @param {object} [certificatePolicy.keyProperties] Properties of the key - * backing a certificate. - * - * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if - * the private key can be exported. - * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. - * - * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. - * - * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the - * same key pair will be used on certificate renewal. - * - * @param {object} [certificatePolicy.secretProperties] Properties of the - * secret backing a certificate. - * - * @param {string} [certificatePolicy.secretProperties.contentType] The media - * type (MIME type). - * - * @param {object} [certificatePolicy.x509CertificateProperties] Properties of - * the X509 component of a certificate. - * - * @param {string} [certificatePolicy.x509CertificateProperties.subject] The - * subject name. Should be a valid X509 distinguished Name. - * - * @param {array} [certificatePolicy.x509CertificateProperties.ekus] The - * enhanced key usage. - * - * @param {object} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames] The - * subject alternative names. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} [certificatePolicy.x509CertificateProperties.keyUsage] List - * of key usages. - * - * @param {number} - * [certificatePolicy.x509CertificateProperties.validityInMonths] The duration - * that the ceritifcate is valid in months. + * @param {string} certificateName The name of the certificate * - * @param {array} [certificatePolicy.lifetimeActions] Actions that will be - * performed by Key Vault over the lifetime of a certificate. + * @param {object} [options] Optional Parameters. * - * @param {object} [certificatePolicy.issuerParameters] Parameters for the - * issuer of the X509 component of a certificate. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [certificatePolicy.issuerParameters.name] Name of the - * referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. + * @returns {Promise} A promise is returned * - * @param {string} [certificatePolicy.issuerParameters.certificateType] Type of - * certificate to be requested from the issuer provider. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [certificatePolicy.attributes] The certificate attributes. + * @reject {Error} - The error object. + */ + getDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Retrieves information about the specified deleted certificate. * - * @param {boolean} [certificatePolicy.attributes.enabled] Determines whether - * the object is enabled. + * The GetDeletedCertificate operation retrieves the deleted certificate + * information plus its attributes, such as retention interval, scheduled + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. * - * @param {date} [certificatePolicy.attributes.notBefore] Not before date in - * UTC. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {date} [certificatePolicy.attributes.expires] Expiry date in UTC. + * @param {string} certificateName The name of the certificate * * @param {object} [options] Optional Parameters. * @@ -18775,7 +21733,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificatePolicy} - The deserialized result object. + * @resolve {DeletedCertificateBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -18784,13 +21742,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificatePolicy} for more information. + * See {@link DeletedCertificateBundle} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, optionalCallback) { + getDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -18799,137 +21758,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, (err, result, request, response) => { + self._getDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePolicy, options, optionalCallback); + return self._getDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * @summary Updates the specified attributes associated with the given - * certificate. + * @summary Permanently deletes the specified deleted certificate. * - * The UpdateCertificate operation applies the specified update on the given - * certificate; note the only elements being updated are the certificate's - * attributes. + * The PurgeDeletedCertificate operation performs an irreversible deletion of + * the specified certificate, without possibility for recovery. The operation + * is not available if the recovery level does not specify 'Purgeable'. This + * operation requires the certificate/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in the given key - * vault. - * - * @param {string} certificateVersion The version of the certificate. + * @param {string} certificateName The name of the certificate * * @param {object} [options] Optional Parameters. * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. - * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. - * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). - * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. - * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. - * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. - * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. - * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. - * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. - * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. - * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. - * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. - * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. - * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. - * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, certificateVersion, options) { + purgeDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { + self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -18940,110 +21808,120 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Updates the specified attributes associated with the given - * certificate. + * @summary Permanently deletes the specified deleted certificate. * - * The UpdateCertificate operation applies the specified update on the given - * certificate; note the only elements being updated are the certificate's - * attributes. + * The PurgeDeletedCertificate operation performs an irreversible deletion of + * the specified certificate, without possibility for recovery. The operation + * is not available if the recovery level does not specify 'Purgeable'. This + * operation requires the certificate/purge permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in the given key - * vault. - * - * @param {string} certificateVersion The version of the certificate. + * @param {string} certificateName The name of the certificate * * @param {object} [options] Optional Parameters. * - * @param {object} [options.certificatePolicy] The management policy for the - * certificate. - * - * @param {object} [options.certificatePolicy.keyProperties] Properties of the - * key backing a certificate. - * - * @param {boolean} [options.certificatePolicy.keyProperties.exportable] - * Indicates if the private key can be exported. - * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. - * - * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. - * - * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] - * Indicates if the same key pair will be used on certificate renewal. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [options.certificatePolicy.secretProperties] Properties of - * the secret backing a certificate. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [options.certificatePolicy.secretProperties.contentType] The - * media type (MIME type). + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} [options.certificatePolicy.x509CertificateProperties] - * Properties of the X509 component of a certificate. + * {Promise} A promise is returned * - * @param {string} - * [options.certificatePolicy.x509CertificateProperties.subject] The subject - * name. Should be a valid X509 distinguished Name. + * @resolve {null} - The deserialized result object. * - * @param {array} [options.certificatePolicy.x509CertificateProperties.ekus] - * The enhanced key usage. + * @reject {Error} - The error object. * - * @param {object} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames] - * The subject alternative names. + * {function} optionalCallback(err, result, request, response) * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.emails] - * Email addresses. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.dnsNames] - * Domain names. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.subjectAlternativeNames.upns] - * User principal names. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {array} - * [options.certificatePolicy.x509CertificateProperties.keyUsage] List of key - * usages. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + purgeDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + } + } + + /** + * @summary Recovers the deleted certificate back to its current version under + * /certificates. * - * @param {number} - * [options.certificatePolicy.x509CertificateProperties.validityInMonths] The - * duration that the ceritifcate is valid in months. + * The RecoverDeletedCertificate operation performs the reversal of the Delete + * operation. The operation is applicable in vaults enabled for soft-delete, + * and must be issued during the retention interval (available in the deleted + * certificate's attributes). This operation requires the certificates/recover + * permission. * - * @param {array} [options.certificatePolicy.lifetimeActions] Actions that will - * be performed by Key Vault over the lifetime of a certificate. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {object} [options.certificatePolicy.issuerParameters] Parameters for - * the issuer of the X509 component of a certificate. + * @param {string} certificateName The name of the deleted certificate * - * @param {string} [options.certificatePolicy.issuerParameters.name] Name of - * the referenced issuer object or reserved names; for example, 'Self' or - * 'Unknown'. + * @param {object} [options] Optional Parameters. * - * @param {string} [options.certificatePolicy.issuerParameters.certificateType] - * Type of certificate to be requested from the issuer provider. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [options.certificatePolicy.attributes] The certificate - * attributes. + * @returns {Promise} A promise is returned * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. + * @reject {Error} - The error object. + */ + recoverDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Recovers the deleted certificate back to its current version under + * /certificates. * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. + * The RecoverDeletedCertificate operation performs the reversal of the Delete + * operation. The operation is applicable in vaults enabled for soft-delete, + * and must be issued during the retention interval (available in the deleted + * certificate's attributes). This operation requires the certificates/recover + * permission. * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {string} certificateName The name of the deleted certificate + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19070,7 +21948,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback) { + recoverDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19079,45 +21957,43 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { + self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback); + return self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); } } /** - * Gets information about a specified certificate. Authorization: requires the - * certificates/get permission. + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in the given - * vault. - * - * @param {string} certificateVersion The version of the certificate. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, certificateVersion, options) { + getStorageAccountsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { + self._getStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19128,19 +22004,17 @@ class KeyVaultClient extends ServiceClient { } /** - * Gets information about a specified certificate. Authorization: requires the - * certificates/get permission. + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate in the given - * vault. - * - * @param {string} certificateVersion The version of the certificate. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19151,7 +22025,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateBundle} - The deserialized result object. + * @resolve {StorageListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19160,13 +22034,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateBundle} for more information. + * See {@link StorageListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback) { + getStorageAccounts(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19175,45 +22049,46 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, (err, result, request, response) => { + self._getStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificate(vaultBaseUrl, certificateName, certificateVersion, options, optionalCallback); + return self._getStorageAccounts(vaultBaseUrl, options, optionalCallback); } } /** - * Updates a certificate operation. Authorization: requires the - * certificates/update permission. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. - * - * @param {boolean} cancellationRequested Indicates if cancellation was - * requested on the certificate operation. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, cancellationRequested, options) { + getDeletedStorageAccountsWithHttpOperationResponse(vaultBaseUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, (err, result, request, response) => { + self._getDeletedStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19224,19 +22099,20 @@ class KeyVaultClient extends ServiceClient { } /** - * Updates a certificate operation. Authorization: requires the - * certificates/update permission. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. - * - * @param {boolean} cancellationRequested Indicates if cancellation was - * requested on the certificate operation. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19247,7 +22123,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateOperation} - The deserialized result object. + * @resolve {DeletedStorageListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19256,13 +22132,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateOperation} for more information. + * See {@link DeletedStorageListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, optionalCallback) { + getDeletedStorageAccounts(vaultBaseUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19271,25 +22148,28 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, (err, result, request, response) => { + self._getDeletedStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateCertificateOperation(vaultBaseUrl, certificateName, cancellationRequested, options, optionalCallback); + return self._getDeletedStorageAccounts(vaultBaseUrl, options, optionalCallback); } } /** - * Gets the operation associated with a specified certificate. Authorization: - * requires the certificates/get permission. + * @summary Gets the specified deleted storage account. + * + * The Get Deleted Storage Account operation returns the specified deleted + * storage account along with its attributes. This operation requires the + * storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19298,15 +22178,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + getDeletedStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19317,13 +22197,16 @@ class KeyVaultClient extends ServiceClient { } /** - * Gets the operation associated with a specified certificate. Authorization: - * requires the certificates/get permission. + * @summary Gets the specified deleted storage account. + * + * The Get Deleted Storage Account operation returns the specified deleted + * storage account along with its attributes. This operation requires the + * storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19337,7 +22220,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateOperation} - The deserialized result object. + * @resolve {DeletedStorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19346,13 +22229,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateOperation} for more information. + * See {@link DeletedStorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback) { + getDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19361,25 +22244,29 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback); + return self._getDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * Deletes the operation for a specified certificate. Authorization: requires - * the certificates/update permission. + * @summary Permanently deletes the specified storage account. + * + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on + * a soft-delete enabled vault. This operation requires the storage/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19388,15 +22275,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteCertificateOperationWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + purgeDeletedStorgeAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._purgeDeletedStorgeAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19407,13 +22294,17 @@ class KeyVaultClient extends ServiceClient { } /** - * Deletes the operation for a specified certificate. Authorization: requires - * the certificates/update permission. + * @summary Permanently deletes the specified storage account. + * + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on + * a soft-delete enabled vault. This operation requires the storage/purge + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19427,7 +22318,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateOperation} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19435,14 +22326,13 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateOperation} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback) { + purgeDeletedStorgeAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19451,63 +22341,45 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._purgeDeletedStorgeAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteCertificateOperation(vaultBaseUrl, certificateName, options, optionalCallback); + return self._purgeDeletedStorgeAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * @summary Merges a certificate or a certificate chain with a key pair - * existing on the server. + * @summary Recovers the deleted storage account. * - * The MergeCertificate operation performs the merging of a certificate or - * certificate chain with a key pair currently available in the service. - * Authorization: requires the certificates/update permission. + * Recovers the deleted storage account in the specified vault. This operation + * can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. - * - * @param {array} x509Certificates The certificate or the certificate chain to - * merge. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - mergeCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, x509Certificates, options) { + recoverDeletedStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, (err, result, request, response) => { + self._recoverDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19518,37 +22390,19 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Merges a certificate or a certificate chain with a key pair - * existing on the server. + * @summary Recovers the deleted storage account. * - * The MergeCertificate operation performs the merging of a certificate or - * certificate chain with a key pair currently available in the service. - * Authorization: requires the certificates/update permission. + * Recovers the deleted storage account in the specified vault. This operation + * can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate. - * - * @param {array} x509Certificates The certificate or the certificate chain to - * merge. + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.certificateAttributes] The attributes of the - * certificate (optional). - * - * @param {boolean} [options.certificateAttributes.enabled] Determines whether - * the object is enabled. - * - * @param {date} [options.certificateAttributes.notBefore] Not before date in - * UTC. - * - * @param {date} [options.certificateAttributes.expires] Expiry date in UTC. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19559,7 +22413,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateBundle} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19568,13 +22422,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateBundle} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, optionalCallback) { + recoverDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19583,47 +22437,44 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, (err, result, request, response) => { + self._recoverDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._mergeCertificate(vaultBaseUrl, certificateName, x509Certificates, options, optionalCallback); + return self._recoverDeletedStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * @summary Lists the deleted certificates in the specified vault, currently - * available for recovery. + * @summary Backs up the specified storage account. * - * The GetDeletedCertificates operation retrieves the certificates in the - * current vault which are in a deleted state and ready for recovery or - * purging. + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} storageAccountName The name of the storage account. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedCertificatesWithHttpOperationResponse(vaultBaseUrl, options) { + backupStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedCertificates(vaultBaseUrl, options, (err, result, request, response) => { + self._backupStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19634,20 +22485,17 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Lists the deleted certificates in the specified vault, currently - * available for recovery. + * @summary Backs up the specified storage account. * - * The GetDeletedCertificates operation retrieves the certificates in the - * current vault which are in a deleted state and ready for recovery or - * purging. + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {object} [options] Optional Parameters. + * @param {string} storageAccountName The name of the storage account. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19659,7 +22507,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedCertificateListResult} - The deserialized result object. + * @resolve {BackupStorageResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19668,14 +22516,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedCertificateListResult} for more - * information. + * See {@link BackupStorageResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedCertificates(vaultBaseUrl, options, optionalCallback) { + backupStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19684,28 +22531,28 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedCertificates(vaultBaseUrl, options, (err, result, request, response) => { + self._backupStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedCertificates(vaultBaseUrl, options, optionalCallback); + return self._backupStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * @summary Retrieves information about the specified deleted certificate. + * @summary Restores a backed up storage account to a vault. * - * The GetDeletedCertificate operation retrieves the deleted certificate - * information plus its attributes, such as retention interval, scheduled - * permanent deletion and the current deletion recovery level. + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate + * @param {buffer} storageBundleBackup The backup blob associated with a + * storage account. * * @param {object} [options] Optional Parameters. * @@ -19714,15 +22561,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + restoreStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageBundleBackup, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._restoreStorageAccount(vaultBaseUrl, storageBundleBackup, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19733,16 +22580,16 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Retrieves information about the specified deleted certificate. + * @summary Restores a backed up storage account to a vault. * - * The GetDeletedCertificate operation retrieves the deleted certificate - * information plus its attributes, such as retention interval, scheduled - * permanent deletion and the current deletion recovery level. + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate + * @param {buffer} storageBundleBackup The backup blob associated with a + * storage account. * * @param {object} [options] Optional Parameters. * @@ -19756,7 +22603,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeletedCertificateBundle} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19765,14 +22612,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedCertificateBundle} for more - * information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + restoreStorageAccount(vaultBaseUrl, storageBundleBackup, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19781,29 +22627,25 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._restoreStorageAccount(vaultBaseUrl, storageBundleBackup, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + return self._restoreStorageAccount(vaultBaseUrl, storageBundleBackup, options, optionalCallback); } } /** - * @summary Permanently deletes the specified deleted certificate. - * - * The PurgeDeletedCertificate operation performs an irreversible deletion of - * the specified certificate, without possibility for recovery. The operation - * is not available if the recovery level does not specify 'Purgeable'. - * Requires the explicit granting of the 'purge' permission. + * Deletes a storage account. This operation requires the storage/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19812,15 +22654,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - purgeDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + deleteStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19831,17 +22673,13 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Permanently deletes the specified deleted certificate. - * - * The PurgeDeletedCertificate operation performs an irreversible deletion of - * the specified certificate, without possibility for recovery. The operation - * is not available if the recovery level does not specify 'Purgeable'. - * Requires the explicit granting of the 'purge' permission. + * Deletes a storage account. This operation requires the storage/delete + * permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the certificate + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19855,7 +22693,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeletedStorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19863,13 +22701,14 @@ class KeyVaultClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - purgeDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + deleteStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19878,30 +22717,25 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._purgeDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + return self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * @summary Recovers the deleted certificate back to its current version under - * /certificates. - * - * The RecoverDeletedCertificate operation performs the reversal of the Delete - * operation. The operation is applicable in vaults enabled for soft-delete, - * and must be issued during the retention interval (available in the deleted - * certificate's attributes). + * Gets information about a specified storage account. This operation requires + * the storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the deleted certificate + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19910,15 +22744,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverDeletedCertificateWithHttpOperationResponse(vaultBaseUrl, certificateName, options) { + getStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -19929,18 +22763,13 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Recovers the deleted certificate back to its current version under - * /certificates. - * - * The RecoverDeletedCertificate operation performs the reversal of the Delete - * operation. The operation is applicable in vaults enabled for soft-delete, - * and must be issued during the retention interval (available in the deleted - * certificate's attributes). + * Gets information about a specified storage account. This operation requires + * the storage/get permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * - * @param {string} certificateName The name of the deleted certificate + * @param {string} storageAccountName The name of the storage account. * * @param {object} [options] Optional Parameters. * @@ -19954,7 +22783,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {CertificateBundle} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -19963,13 +22792,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link CertificateBundle} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback) { + getStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -19978,42 +22807,61 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, (err, result, request, response) => { + self._getStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverDeletedCertificate(vaultBaseUrl, certificateName, options, optionalCallback); + return self._getStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * List storage accounts managed by specified key vault + * Creates or updates a new storage account. This operation requires the + * storage/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} resourceId Storage account resource id. + * + * @param {string} activeKeyName Current active storage account key name. + * + * @param {boolean} autoRegenerateKey whether keyvault should manage the + * storage account for the user. + * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getStorageAccountsWithHttpOperationResponse(vaultBaseUrl, options) { + setStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { + self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20024,15 +22872,34 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage accounts managed by specified key vault + * Creates or updates a new storage account. This operation requires the + * storage/set permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * + * @param {string} storageAccountName The name of the storage account. + * + * @param {string} resourceId Storage account resource id. + * + * @param {string} activeKeyName Current active storage account key name. + * + * @param {boolean} autoRegenerateKey whether keyvault should manage the + * storage account for the user. + * * @param {object} [options] Optional Parameters. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20044,7 +22911,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {StorageListResult} - The deserialized result object. + * @resolve {StorageBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20053,13 +22920,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageListResult} for more information. + * See {@link StorageBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStorageAccounts(vaultBaseUrl, options, optionalCallback) { + setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20068,19 +22935,20 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStorageAccounts(vaultBaseUrl, options, (err, result, request, response) => { + self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStorageAccounts(vaultBaseUrl, options, optionalCallback); + return self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, optionalCallback); } } /** - * Deletes a storage account. + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20089,6 +22957,24 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.activeKeyName] The current active storage account + * key name. + * + * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage + * the storage account for the user. + * + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -20098,11 +22984,11 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { + updateStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20113,7 +22999,8 @@ class KeyVaultClient extends ServiceClient { } /** - * Deletes a storage account. + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20122,6 +23009,24 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.activeKeyName] The current active storage account + * key name. + * + * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage + * the storage account for the user. + * + * @param {string} [options.regenerationPeriod] The key regeneration time + * duration specified in ISO-8601 format. + * + * @param {object} [options.storageAccountAttributes] The attributes of the + * storage account. + * + * @param {boolean} [options.storageAccountAttributes.enabled] the enabled + * state of the object. + * + * @param {object} [options.tags] Application specific metadata in the form of + * key-value pairs. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -20147,7 +23052,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { + updateStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20156,25 +23061,28 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); + return self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * Gets information about a specified storage account. + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * + * @param {string} keyName The storage account key name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -20186,11 +23094,11 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - getStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { + regenerateStorageAccountKeyWithHttpOperationResponse(vaultBaseUrl, storageAccountName, keyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20201,13 +23109,16 @@ class KeyVaultClient extends ServiceClient { } /** - * Gets information about a specified storage account. + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * + * @param {string} keyName The storage account key name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -20235,7 +23146,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { + regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20244,60 +23155,45 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); + return self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, optionalCallback); } } /** - * Creates or updates a new storage account. + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} resourceId Storage account resource id. - * - * @param {string} activeKeyName Current active storage account key name. - * - * @param {boolean} autoRegenerateKey whether keyvault should manage the - * storage account for the user. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - setStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options) { + getSasDefinitionsWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, (err, result, request, response) => { + self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20308,33 +23204,18 @@ class KeyVaultClient extends ServiceClient { } /** - * Creates or updates a new storage account. + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} resourceId Storage account resource id. - * - * @param {string} activeKeyName Current active storage account key name. - * - * @param {boolean} autoRegenerateKey whether keyvault should manage the - * storage account for the user. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20346,7 +23227,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {SasDefinitionListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20355,13 +23236,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link SasDefinitionListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, optionalCallback) { + getSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20370,59 +23252,49 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, (err, result, request, response) => { + self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._setStorageAccount(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey, options, optionalCallback); + return self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * Updates the specified attributes associated with the given storage account. - * - * @param {string} vaultBaseUrl The vault name, for example - * https://myvault.vault.azure.net. - * - * @param {string} storageAccountName The name of the storage account. - * - * @param {object} [options] Optional Parameters. + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. * - * @param {string} [options.activeKeyName] The current active storage account - * key name. - * - * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage - * the storage account for the user. + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. + * @param {string} vaultBaseUrl The vault name, for example + * https://myvault.vault.azure.net. * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. + * @param {string} storageAccountName The name of the storage account. * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. + * @param {object} [options] Optional Parameters. * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateStorageAccountWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { + getDeletedSasDefinitionsWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._getDeletedSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20433,7 +23305,12 @@ class KeyVaultClient extends ServiceClient { } /** - * Updates the specified attributes associated with the given storage account. + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20442,23 +23319,8 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.activeKeyName] The current active storage account - * key name. - * - * @param {boolean} [options.autoRegenerateKey] whether keyvault should manage - * the storage account for the user. - * - * @param {string} [options.regenerationPeriod] The key regeneration time - * duration specified in ISO-8601 format. - * - * @param {object} [options.storageAccountAttributes] The attributes of the - * storage account. - * - * @param {boolean} [options.storageAccountAttributes.enabled] the enabled - * state of the object. - * - * @param {object} [options.tags] Application specific metadata in the form of - * key-value pairs. + * @param {number} [options.maxresults] Maximum number of results to return in + * a page. If not specified the service will return up to 25 results. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20470,7 +23332,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {DeletedSasDefinitionListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20479,13 +23341,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link DeletedSasDefinitionListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback) { + getDeletedSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20494,26 +23357,30 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._getDeletedSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateStorageAccount(vaultBaseUrl, storageAccountName, options, optionalCallback); + return self._getDeletedSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback); } } /** - * Regenerates the specified key value for the given storage account. + * @summary Gets the specified deleted sas definition. + * + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} keyName The storage account key name. + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -20522,15 +23389,15 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - regenerateStorageAccountKeyWithHttpOperationResponse(vaultBaseUrl, storageAccountName, keyName, options) { + getDeletedSasDefinitionWithHttpOperationResponse(vaultBaseUrl, storageAccountName, sasDefinitionName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, (err, result, request, response) => { + self._getDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20541,14 +23408,18 @@ class KeyVaultClient extends ServiceClient { } /** - * Regenerates the specified key value for the given storage account. + * @summary Gets the specified deleted sas definition. + * + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {string} keyName The storage account key name. + * @param {string} sasDefinitionName The name of the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -20562,7 +23433,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {StorageBundle} - The deserialized result object. + * @resolve {DeletedSasDefinitionBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20571,13 +23442,14 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StorageBundle} for more information. + * See {@link DeletedSasDefinitionBundle} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, optionalCallback) { + getDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20586,44 +23458,47 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, (err, result, request, response) => { + self._getDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateStorageAccountKey(vaultBaseUrl, storageAccountName, keyName, options, optionalCallback); + return self._getDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, optionalCallback); } } /** - * List storage SAS definitions for the given storage account. + * @summary Recovers the deleted SAS definition. + * + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This + * operation requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {object} [options] Optional Parameters. + * @param {string} sasDefinitionName The name of the SAS definition. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getSasDefinitionsWithHttpOperationResponse(vaultBaseUrl, storageAccountName, options) { + recoverDeletedSasDefinitionWithHttpOperationResponse(vaultBaseUrl, storageAccountName, sasDefinitionName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._recoverDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20634,17 +23509,20 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage SAS definitions for the given storage account. + * @summary Recovers the deleted SAS definition. + * + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This + * operation requires the storage/recover permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. * * @param {string} storageAccountName The name of the storage account. * - * @param {object} [options] Optional Parameters. + * @param {string} sasDefinitionName The name of the SAS definition. * - * @param {number} [options.maxresults] Maximum number of results to return in - * a page. If not specified the service will return up to 25 results. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20656,7 +23534,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SasDefinitionListResult} - The deserialized result object. + * @resolve {SasDefinitionBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20665,14 +23543,13 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionListResult} for more - * information. + * See {@link SasDefinitionBundle} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback) { + recoverDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20681,19 +23558,20 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, (err, result, request, response) => { + self._recoverDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSasDefinitions(vaultBaseUrl, storageAccountName, options, optionalCallback); + return self._recoverDeletedSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, options, optionalCallback); } } /** - * Deletes a SAS definition from a specified storage account. + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20709,7 +23587,7 @@ class KeyVaultClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -20728,7 +23606,8 @@ class KeyVaultClient extends ServiceClient { } /** - * Deletes a SAS definition from a specified storage account. + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20749,7 +23628,7 @@ class KeyVaultClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {SasDefinitionBundle} - The deserialized result object. + * @resolve {DeletedSasDefinitionBundle} - The deserialized result object. * * @reject {Error} - The error object. * @@ -20758,7 +23637,8 @@ class KeyVaultClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SasDefinitionBundle} for more information. + * See {@link DeletedSasDefinitionBundle} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -20786,6 +23666,7 @@ class KeyVaultClient extends ServiceClient { /** * Gets information about a SAS definition for the specified storage account. + * This operation requires the storage/getsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20821,6 +23702,7 @@ class KeyVaultClient extends ServiceClient { /** * Gets information about a SAS definition for the specified storage account. + * This operation requires the storage/getsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20878,6 +23760,7 @@ class KeyVaultClient extends ServiceClient { /** * Creates or updates a new SAS definition for the specified storage account. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20886,8 +23769,15 @@ class KeyVaultClient extends ServiceClient { * * @param {string} sasDefinitionName The name of the SAS definition. * - * @param {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @param {string} templateUri The SAS definition token template signed with an + * arbitrary key. Tokens created according to the SAS definition will have the + * same properties as the template. + * + * @param {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * + * @param {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -20909,11 +23799,11 @@ class KeyVaultClient extends ServiceClient { * * @reject {Error} - The error object. */ - setSasDefinitionWithHttpOperationResponse(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options) { + setSasDefinitionWithHttpOperationResponse(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options, (err, result, request, response) => { + self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -20925,6 +23815,7 @@ class KeyVaultClient extends ServiceClient { /** * Creates or updates a new SAS definition for the specified storage account. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -20933,8 +23824,15 @@ class KeyVaultClient extends ServiceClient { * * @param {string} sasDefinitionName The name of the SAS definition. * - * @param {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @param {string} templateUri The SAS definition token template signed with an + * arbitrary key. Tokens created according to the SAS definition will have the + * same properties as the template. + * + * @param {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * + * @param {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * * @param {object} [options] Optional Parameters. * @@ -20972,7 +23870,7 @@ class KeyVaultClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options, optionalCallback) { + setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -20981,19 +23879,20 @@ class KeyVaultClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options, (err, result, request, response) => { + self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, parameters, options, optionalCallback); + return self._setSasDefinition(vaultBaseUrl, storageAccountName, sasDefinitionName, templateUri, sasType, validityPeriod, options, optionalCallback); } } /** * Updates the specified attributes associated with the given SAS definition. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -21004,8 +23903,15 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Sas definition update metadata in the - * form of key-value pairs. + * @param {string} [options.templateUri] The SAS definition token template + * signed with an arbitrary key. Tokens created according to the SAS + * definition will have the same properties as the template. + * + * @param {string} [options.sasType] The type of SAS token the SAS definition + * will create. Possible values include: 'account', 'service' + * + * @param {string} [options.validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS * definition. @@ -21041,6 +23947,7 @@ class KeyVaultClient extends ServiceClient { /** * Updates the specified attributes associated with the given SAS definition. + * This operation requires the storage/setsas permission. * * @param {string} vaultBaseUrl The vault name, for example * https://myvault.vault.azure.net. @@ -21051,8 +23958,15 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Sas definition update metadata in the - * form of key-value pairs. + * @param {string} [options.templateUri] The SAS definition token template + * signed with an arbitrary key. Tokens created according to the SAS + * definition will have the same properties as the template. + * + * @param {string} [options.sasType] The type of SAS token the SAS definition + * will create. Possible values include: 'account', 'service' + * + * @param {string} [options.validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * * @param {object} [options.sasDefinitionAttributes] The attributes of the SAS * definition. @@ -21112,6 +24026,7 @@ class KeyVaultClient extends ServiceClient { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21145,6 +24060,7 @@ class KeyVaultClient extends ServiceClient { * @summary Retrieves a list of individual key versions with the same key name. * * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21201,10 +24117,10 @@ class KeyVaultClient extends ServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21239,10 +24155,10 @@ class KeyVaultClient extends ServiceClient { * * Retrieves a list of the keys in the Key Vault as JSON Web Key structures * that contain the public part of a stored key. The LIST operation is - * applicable to all key types, however only the base key - * identifier,attributes, and tags are provided in the response. Individual - * versions of a key are not listed in the response. Authorization: Requires - * the keys/list permission. + * applicable to all key types, however only the base key identifier, + * attributes, and tags are provided in the response. Individual versions of a + * key are not listed in the response. This operation requires the keys/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21295,8 +24211,14 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21327,8 +24249,14 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted keys in the specified vault. Authorization: Requires the - * keys/list permission. + * @summary Lists the deleted keys in the specified vault. + * + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures + * that contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable + * for vaults enabled for soft-delete. While the operation can be invoked on + * any vault, it will return an error if invoked on a non soft-delete enabled + * vault. This operation requires the keys/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21381,11 +24309,12 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21416,11 +24345,12 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List secrets in a specified key vault + * @summary List secrets in a specified key vault. * - * The LIST operation is applicable to the entire vault, however only the base - * secret identifier and attributes are provided in the response. Individual - * secret versions are not listed in the response. + * The Get Secrets operation is applicable to the entire vault. However, only + * the base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21473,12 +24403,11 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21509,12 +24438,11 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary List the versions of the specified secret. + * @summary List all versions of the specified secret. * - * The LIST VERSIONS operation can be applied to all versions having the same - * secret name in the same key vault. The full secret identifier and attributes - * are provided in the response. No values are returned for the secrets and - * only current versions of a secret are listed. + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the + * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21567,7 +24495,10 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call @@ -21599,7 +24530,10 @@ class KeyVaultClient extends ServiceClient { } /** - * List deleted secrets in the specified vault. Authorization: requires the + * @summary Lists deleted secrets for the specified vault. + * + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the * secrets/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call @@ -21657,7 +24591,8 @@ class KeyVaultClient extends ServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21691,7 +24626,8 @@ class KeyVaultClient extends ServiceClient { * @summary List certificates in a specified key vault * * The GetCertificates operation returns the set of certificates resources in - * the specified key vault. + * the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21747,7 +24683,8 @@ class KeyVaultClient extends ServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21781,7 +24718,8 @@ class KeyVaultClient extends ServiceClient { * @summary List certificate issuers for a specified key vault. * * The GetCertificateIssuers operation returns the set of certificate issuer - * resources in the specified key vault + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21838,7 +24776,8 @@ class KeyVaultClient extends ServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21872,7 +24811,8 @@ class KeyVaultClient extends ServiceClient { * @summary List the versions of a certificate. * * The GetCertificateVersions operation returns the versions of a certificate - * in the specified key vault + * in the specified key vault. This operation requires the certificates/list + * permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21925,12 +24865,14 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21961,12 +24903,14 @@ class KeyVaultClient extends ServiceClient { } /** - * @summary Lists the deleted certificates in the specified vault, currently + * @summary Lists the deleted certificates in the specified vault currently * available for recovery. * * The GetDeletedCertificates operation retrieves the certificates in the * current vault which are in a deleted state and ready for recovery or - * purging. + * purging. This operation includes deletion-specific information. This + * operation requires the certificates/get/list permission. This operation can + * only be enabled on soft-delete enabled vaults. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -22020,7 +24964,8 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -22051,7 +24996,8 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage accounts managed by specified key vault + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -22104,7 +25050,101 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage SAS definitions for the given storage account. + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeletedStorageAccountsNextWithHttpOperationResponse(nextPageLink, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeletedStorageAccountsNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists deleted storage accounts for the specified vault. + * + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/list permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DeletedStorageListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedStorageListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedStorageAccountsNext(nextPageLink, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeletedStorageAccountsNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeletedStorageAccountsNext(nextPageLink, options, optionalCallback); + } + } + + /** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -22135,7 +25175,8 @@ class KeyVaultClient extends ServiceClient { } /** - * List storage SAS definitions for the given storage account. + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -22188,6 +25229,101 @@ class KeyVaultClient extends ServiceClient { } } + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeletedSasDefinitionsNextWithHttpOperationResponse(nextPageLink, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeletedSasDefinitionsNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists deleted SAS definitions for the specified vault and storage + * account. + * + * The Get Deleted Sas Definitions operation returns the SAS definitions that + * have been deleted for a vault enabled for soft-delete. This operation + * requires the storage/listsas permission. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DeletedSasDefinitionListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedSasDefinitionListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeletedSasDefinitionsNext(nextPageLink, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeletedSasDefinitionsNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeletedSasDefinitionsNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = KeyVaultClient; diff --git a/lib/services/keyVault/lib/models/backupStorageResult.js b/lib/services/keyVault/lib/models/backupStorageResult.js new file mode 100644 index 0000000000..c39af99c8c --- /dev/null +++ b/lib/services/keyVault/lib/models/backupStorageResult.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The backup storage result, containing the backup blob. + * + */ +class BackupStorageResult { + /** + * Create a BackupStorageResult. + * @member {buffer} [value] The backup blob containing the backed up storage + * account. + */ + constructor() { + } + + /** + * Defines the metadata of BackupStorageResult + * + * @returns {object} metadata of BackupStorageResult + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupStorageResult', + type: { + name: 'Composite', + className: 'BackupStorageResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: 'value', + type: { + name: 'Base64Url' + } + } + } + } + }; + } +} + +module.exports = BackupStorageResult; diff --git a/lib/services/keyVault/lib/models/deletedSasDefinitionBundle.js b/lib/services/keyVault/lib/models/deletedSasDefinitionBundle.js new file mode 100644 index 0000000000..1d179fa87c --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedSasDefinitionBundle.js @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A deleted SAS definition bundle consisting of its previous id, attributes + * and its tags, as well as information on when it will be purged. + * + * @extends models['SasDefinitionBundle'] + */ +class DeletedSasDefinitionBundle extends models['SasDefinitionBundle'] { + /** + * Create a DeletedSasDefinitionBundle. + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted SAS definition. + * @member {date} [scheduledPurgeDate] The time when the SAS definition is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the SAS definition was deleted, + * in UTC + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedSasDefinitionBundle + * + * @returns {object} metadata of DeletedSasDefinitionBundle + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedSasDefinitionBundle', + type: { + name: 'Composite', + className: 'DeletedSasDefinitionBundle', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + secretId: { + required: false, + readOnly: true, + serializedName: 'sid', + type: { + name: 'String' + } + }, + templateUri: { + required: false, + readOnly: true, + serializedName: 'templateUri', + type: { + name: 'String' + } + }, + sasType: { + required: false, + readOnly: true, + serializedName: 'sasType', + type: { + name: 'String' + } + }, + validityPeriod: { + required: false, + readOnly: true, + serializedName: 'validityPeriod', + type: { + name: 'String' + } + }, + attributes: { + required: false, + readOnly: true, + serializedName: 'attributes', + type: { + name: 'Composite', + className: 'SasDefinitionAttributes' + } + }, + tags: { + required: false, + readOnly: true, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + recoveryId: { + required: false, + serializedName: 'recoveryId', + type: { + name: 'String' + } + }, + scheduledPurgeDate: { + required: false, + readOnly: true, + serializedName: 'scheduledPurgeDate', + type: { + name: 'UnixTime' + } + }, + deletedDate: { + required: false, + readOnly: true, + serializedName: 'deletedDate', + type: { + name: 'UnixTime' + } + } + } + } + }; + } +} + +module.exports = DeletedSasDefinitionBundle; diff --git a/lib/services/keyVault/lib/models/deletedSasDefinitionItem.js b/lib/services/keyVault/lib/models/deletedSasDefinitionItem.js new file mode 100644 index 0000000000..67a6cec662 --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedSasDefinitionItem.js @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The deleted SAS definition item containing metadata about the deleted SAS + * definition. + * + * @extends models['SasDefinitionItem'] + */ +class DeletedSasDefinitionItem extends models['SasDefinitionItem'] { + /** + * Create a DeletedSasDefinitionItem. + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted SAS definition. + * @member {date} [scheduledPurgeDate] The time when the SAS definition is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the SAS definition was deleted, + * in UTC + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedSasDefinitionItem + * + * @returns {object} metadata of DeletedSasDefinitionItem + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedSasDefinitionItem', + type: { + name: 'Composite', + className: 'DeletedSasDefinitionItem', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + secretId: { + required: false, + readOnly: true, + serializedName: 'sid', + type: { + name: 'String' + } + }, + attributes: { + required: false, + readOnly: true, + serializedName: 'attributes', + type: { + name: 'Composite', + className: 'SasDefinitionAttributes' + } + }, + tags: { + required: false, + readOnly: true, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + recoveryId: { + required: false, + serializedName: 'recoveryId', + type: { + name: 'String' + } + }, + scheduledPurgeDate: { + required: false, + readOnly: true, + serializedName: 'scheduledPurgeDate', + type: { + name: 'UnixTime' + } + }, + deletedDate: { + required: false, + readOnly: true, + serializedName: 'deletedDate', + type: { + name: 'UnixTime' + } + } + } + } + }; + } +} + +module.exports = DeletedSasDefinitionItem; diff --git a/lib/services/keyVault/lib/models/deletedSasDefinitionListResult.js b/lib/services/keyVault/lib/models/deletedSasDefinitionListResult.js new file mode 100644 index 0000000000..ce7274df6b --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedSasDefinitionListResult.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The deleted SAS definition list result + */ +class DeletedSasDefinitionListResult extends Array { + /** + * Create a DeletedSasDefinitionListResult. + * @member {string} [nextLink] The URL to get the next set of deleted SAS + * definitions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedSasDefinitionListResult + * + * @returns {object} metadata of DeletedSasDefinitionListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedSasDefinitionListResult', + type: { + name: 'Composite', + className: 'DeletedSasDefinitionListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DeletedSasDefinitionItemElementType', + type: { + name: 'Composite', + className: 'DeletedSasDefinitionItem' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DeletedSasDefinitionListResult; diff --git a/lib/services/keyVault/lib/models/deletedStorageAccountItem.js b/lib/services/keyVault/lib/models/deletedStorageAccountItem.js new file mode 100644 index 0000000000..1dbc8e68c2 --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedStorageAccountItem.js @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The deleted storage account item containing metadata about the deleted + * storage account. + * + * @extends models['StorageAccountItem'] + */ +class DeletedStorageAccountItem extends models['StorageAccountItem'] { + /** + * Create a DeletedStorageAccountItem. + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted storage account. + * @member {date} [scheduledPurgeDate] The time when the storage account is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the storage account was + * deleted, in UTC + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedStorageAccountItem + * + * @returns {object} metadata of DeletedStorageAccountItem + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedStorageAccountItem', + type: { + name: 'Composite', + className: 'DeletedStorageAccountItem', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resourceId: { + required: false, + readOnly: true, + serializedName: 'resourceId', + type: { + name: 'String' + } + }, + attributes: { + required: false, + readOnly: true, + serializedName: 'attributes', + type: { + name: 'Composite', + className: 'StorageAccountAttributes' + } + }, + tags: { + required: false, + readOnly: true, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + recoveryId: { + required: false, + serializedName: 'recoveryId', + type: { + name: 'String' + } + }, + scheduledPurgeDate: { + required: false, + readOnly: true, + serializedName: 'scheduledPurgeDate', + type: { + name: 'UnixTime' + } + }, + deletedDate: { + required: false, + readOnly: true, + serializedName: 'deletedDate', + type: { + name: 'UnixTime' + } + } + } + } + }; + } +} + +module.exports = DeletedStorageAccountItem; diff --git a/lib/services/keyVault/lib/models/deletedStorageBundle.js b/lib/services/keyVault/lib/models/deletedStorageBundle.js new file mode 100644 index 0000000000..9c25a84c6c --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedStorageBundle.js @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A deleted storage account bundle consisting of its previous id, attributes + * and its tags, as well as information on when it will be purged. + * + * @extends models['StorageBundle'] + */ +class DeletedStorageBundle extends models['StorageBundle'] { + /** + * Create a DeletedStorageBundle. + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted storage account. + * @member {date} [scheduledPurgeDate] The time when the storage account is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the storage account was + * deleted, in UTC + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedStorageBundle + * + * @returns {object} metadata of DeletedStorageBundle + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedStorageBundle', + type: { + name: 'Composite', + className: 'DeletedStorageBundle', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resourceId: { + required: false, + readOnly: true, + serializedName: 'resourceId', + type: { + name: 'String' + } + }, + activeKeyName: { + required: false, + readOnly: true, + serializedName: 'activeKeyName', + type: { + name: 'String' + } + }, + autoRegenerateKey: { + required: false, + readOnly: true, + serializedName: 'autoRegenerateKey', + type: { + name: 'Boolean' + } + }, + regenerationPeriod: { + required: false, + readOnly: true, + serializedName: 'regenerationPeriod', + type: { + name: 'String' + } + }, + attributes: { + required: false, + readOnly: true, + serializedName: 'attributes', + type: { + name: 'Composite', + className: 'StorageAccountAttributes' + } + }, + tags: { + required: false, + readOnly: true, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + recoveryId: { + required: false, + serializedName: 'recoveryId', + type: { + name: 'String' + } + }, + scheduledPurgeDate: { + required: false, + readOnly: true, + serializedName: 'scheduledPurgeDate', + type: { + name: 'UnixTime' + } + }, + deletedDate: { + required: false, + readOnly: true, + serializedName: 'deletedDate', + type: { + name: 'UnixTime' + } + } + } + } + }; + } +} + +module.exports = DeletedStorageBundle; diff --git a/lib/services/keyVault/lib/models/deletedStorageListResult.js b/lib/services/keyVault/lib/models/deletedStorageListResult.js new file mode 100644 index 0000000000..1552959951 --- /dev/null +++ b/lib/services/keyVault/lib/models/deletedStorageListResult.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The deleted storage account list result + */ +class DeletedStorageListResult extends Array { + /** + * Create a DeletedStorageListResult. + * @member {string} [nextLink] The URL to get the next set of deleted storage + * accounts. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletedStorageListResult + * + * @returns {object} metadata of DeletedStorageListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'DeletedStorageListResult', + type: { + name: 'Composite', + className: 'DeletedStorageListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DeletedStorageAccountItemElementType', + type: { + name: 'Composite', + className: 'DeletedStorageAccountItem' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DeletedStorageListResult; diff --git a/lib/services/keyVault/lib/models/index.d.ts b/lib/services/keyVault/lib/models/index.d.ts index 39302e82cd..ab361e9672 100755 --- a/lib/services/keyVault/lib/models/index.d.ts +++ b/lib/services/keyVault/lib/models/index.d.ts @@ -337,6 +337,19 @@ export interface SecretRestoreParameters { secretBundleBackup: Buffer; } +/** + * @class + * Initializes a new instance of the StorageRestoreParameters class. + * @constructor + * The secret restore parameters. + * + * @member {buffer} storageBundleBackup The backup blob associated with a + * storage account. + */ +export interface StorageRestoreParameters { + storageBundleBackup: Buffer; +} + /** * @class * Initializes a new instance of the CertificateAttributes class. @@ -1508,6 +1521,19 @@ export interface BackupSecretResult { readonly value?: Buffer; } +/** + * @class + * Initializes a new instance of the BackupStorageResult class. + * @constructor + * The backup storage result, containing the backup blob. + * + * @member {buffer} [value] The backup blob containing the backed up storage + * account. + */ +export interface BackupStorageResult { + readonly value?: Buffer; +} + /** * @class * Initializes a new instance of the PendingCertificateSigningRequestResult class. @@ -1530,11 +1556,18 @@ export interface PendingCertificateSigningRequestResult { * @member {boolean} [enabled] the enabled state of the object. * @member {date} [created] Creation time in UTC. * @member {date} [updated] Last updated time in UTC. + * @member {string} [recoveryLevel] Reflects the deletion recovery level + * currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' */ export interface StorageAccountAttributes { enabled?: boolean; readonly created?: Date; readonly updated?: Date; + readonly recoveryLevel?: string; } /** @@ -1556,6 +1589,12 @@ export interface StorageAccountAttributes { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs */ @@ -1569,6 +1608,26 @@ export interface StorageBundle { readonly tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the DeletedStorageBundle class. + * @constructor + * A deleted storage account bundle consisting of its previous id, attributes + * and its tags, as well as information on when it will be purged. + * + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted storage account. + * @member {date} [scheduledPurgeDate] The time when the storage account is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the storage account was deleted, + * in UTC + */ +export interface DeletedStorageBundle extends StorageBundle { + recoveryId?: string; + readonly scheduledPurgeDate?: Date; + readonly deletedDate?: Date; +} + /** * @class * Initializes a new instance of the StorageAccountCreateParameters class. @@ -1587,6 +1646,13 @@ export interface StorageBundle { * the object. * @member {date} [storageAccountAttributes.created] Creation time in UTC. * @member {date} [storageAccountAttributes.updated] Last updated time in UTC. + * @member {string} [storageAccountAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for storage accounts in the + * current vault. If it contains 'Purgeable' the storage account can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the storage account, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -1617,6 +1683,13 @@ export interface StorageAccountCreateParameters { * the object. * @member {date} [storageAccountAttributes.created] Creation time in UTC. * @member {date} [storageAccountAttributes.updated] Last updated time in UTC. + * @member {string} [storageAccountAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for storage accounts in the + * current vault. If it contains 'Purgeable' the storage account can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the storage account, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -1652,6 +1725,12 @@ export interface StorageAccountRegenerteKeyParameters { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -1662,6 +1741,26 @@ export interface StorageAccountItem { readonly tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the DeletedStorageAccountItem class. + * @constructor + * The deleted storage account item containing metadata about the deleted + * storage account. + * + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted storage account. + * @member {date} [scheduledPurgeDate] The time when the storage account is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the storage account was deleted, + * in UTC + */ +export interface DeletedStorageAccountItem extends StorageAccountItem { + recoveryId?: string; + readonly scheduledPurgeDate?: Date; + readonly deletedDate?: Date; +} + /** * @class * Initializes a new instance of the SasDefinitionAttributes class. @@ -1671,11 +1770,18 @@ export interface StorageAccountItem { * @member {boolean} [enabled] the enabled state of the object. * @member {date} [created] Creation time in UTC. * @member {date} [updated] Last updated time in UTC. + * @member {string} [recoveryLevel] Reflects the deletion recovery level + * currently in effect for SAS definitions in the current vault. If it contains + * 'Purgeable' the SAS definition can be permanently deleted by a privileged + * user; otherwise, only the system can purge the SAS definition, at the end of + * the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' */ export interface SasDefinitionAttributes { enabled?: boolean; readonly created?: Date; readonly updated?: Date; + readonly recoveryLevel?: string; } /** @@ -1687,23 +1793,56 @@ export interface SasDefinitionAttributes { * * @member {string} [id] The SAS definition id. * @member {string} [secretId] Storage account SAS definition secret id. - * @member {object} [parameters] The SAS definition metadata in the form of - * key-value pairs. + * @member {string} [templateUri] The SAS definition token template signed with + * an arbitrary key. Tokens created according to the SAS definition will have + * the same properties as the template. + * @member {string} [sasType] The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} [validityPeriod] The validity period of SAS tokens created + * according to the SAS definition. * @member {object} [attributes] The SAS definition attributes. * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for SAS definitions in the current vault. If it + * contains 'Purgeable' the SAS definition can be permanently deleted by a + * privileged user; otherwise, only the system can purge the SAS definition, at + * the end of the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs */ export interface SasDefinitionBundle { readonly id?: string; readonly secretId?: string; - readonly parameters?: { [propertyName: string]: string }; + readonly templateUri?: string; + readonly sasType?: string; + readonly validityPeriod?: string; readonly attributes?: SasDefinitionAttributes; readonly tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the DeletedSasDefinitionBundle class. + * @constructor + * A deleted SAS definition bundle consisting of its previous id, attributes + * and its tags, as well as information on when it will be purged. + * + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted SAS definition. + * @member {date} [scheduledPurgeDate] The time when the SAS definition is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the SAS definition was deleted, + * in UTC + */ +export interface DeletedSasDefinitionBundle extends SasDefinitionBundle { + recoveryId?: string; + readonly scheduledPurgeDate?: Date; + readonly deletedDate?: Date; +} + /** * @class * Initializes a new instance of the SasDefinitionItem class. @@ -1716,6 +1855,12 @@ export interface SasDefinitionBundle { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for SAS definitions in the current vault. If it + * contains 'Purgeable' the SAS definition can be permanently deleted by a + * privileged user; otherwise, only the system can purge the SAS definition, at + * the end of the retention interval. Possible values include: 'Purgeable', + * 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -1726,25 +1871,59 @@ export interface SasDefinitionItem { readonly tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the DeletedSasDefinitionItem class. + * @constructor + * The deleted SAS definition item containing metadata about the deleted SAS + * definition. + * + * @member {string} [recoveryId] The url of the recovery object, used to + * identify and recover the deleted SAS definition. + * @member {date} [scheduledPurgeDate] The time when the SAS definition is + * scheduled to be purged, in UTC + * @member {date} [deletedDate] The time when the SAS definition was deleted, + * in UTC + */ +export interface DeletedSasDefinitionItem extends SasDefinitionItem { + recoveryId?: string; + readonly scheduledPurgeDate?: Date; + readonly deletedDate?: Date; +} + /** * @class * Initializes a new instance of the SasDefinitionCreateParameters class. * @constructor * The SAS definition create parameters. * - * @member {object} parameters Sas definition creation metadata in the form of - * key-value pairs. + * @member {string} templateUri The SAS definition token template signed with + * an arbitrary key. Tokens created according to the SAS definition will have + * the same properties as the template. + * @member {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * @member {object} [sasDefinitionAttributes] The attributes of the SAS * definition. * @member {boolean} [sasDefinitionAttributes.enabled] the enabled state of the * object. * @member {date} [sasDefinitionAttributes.created] Creation time in UTC. * @member {date} [sasDefinitionAttributes.updated] Last updated time in UTC. + * @member {string} [sasDefinitionAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for SAS definitions in the + * current vault. If it contains 'Purgeable' the SAS definition can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the SAS definition, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ export interface SasDefinitionCreateParameters { - parameters: { [propertyName: string]: string }; + templateUri: string; + sasType: string; + validityPeriod: string; sasDefinitionAttributes?: SasDefinitionAttributes; tags?: { [propertyName: string]: string }; } @@ -1755,19 +1934,33 @@ export interface SasDefinitionCreateParameters { * @constructor * The SAS definition update parameters. * - * @member {object} [parameters] Sas definition update metadata in the form of - * key-value pairs. + * @member {string} [templateUri] The SAS definition token template signed with + * an arbitrary key. Tokens created according to the SAS definition will have + * the same properties as the template. + * @member {string} [sasType] The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} [validityPeriod] The validity period of SAS tokens created + * according to the SAS definition. * @member {object} [sasDefinitionAttributes] The attributes of the SAS * definition. * @member {boolean} [sasDefinitionAttributes.enabled] the enabled state of the * object. * @member {date} [sasDefinitionAttributes.created] Creation time in UTC. * @member {date} [sasDefinitionAttributes.updated] Last updated time in UTC. + * @member {string} [sasDefinitionAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for SAS definitions in the + * current vault. If it contains 'Purgeable' the SAS definition can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the SAS definition, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ export interface SasDefinitionUpdateParameters { - parameters?: { [propertyName: string]: string }; + templateUri?: string; + sasType?: string; + validityPeriod?: string; sasDefinitionAttributes?: SasDefinitionAttributes; tags?: { [propertyName: string]: string }; } @@ -1886,6 +2079,19 @@ export interface StorageListResult extends Array { readonly nextLink?: string; } +/** + * @class + * Initializes a new instance of the DeletedStorageListResult class. + * @constructor + * The deleted storage account list result + * + * @member {string} [nextLink] The URL to get the next set of deleted storage + * accounts. + */ +export interface DeletedStorageListResult extends Array { + readonly nextLink?: string; +} + /** * @class * Initializes a new instance of the SasDefinitionListResult class. @@ -1897,3 +2103,16 @@ export interface StorageListResult extends Array { export interface SasDefinitionListResult extends Array { readonly nextLink?: string; } + +/** + * @class + * Initializes a new instance of the DeletedSasDefinitionListResult class. + * @constructor + * The deleted SAS definition list result + * + * @member {string} [nextLink] The URL to get the next set of deleted SAS + * definitions. + */ +export interface DeletedSasDefinitionListResult extends Array { + readonly nextLink?: string; +} diff --git a/lib/services/keyVault/lib/models/index.js b/lib/services/keyVault/lib/models/index.js index 4af7b4d642..e331bed8b2 100755 --- a/lib/services/keyVault/lib/models/index.js +++ b/lib/services/keyVault/lib/models/index.js @@ -31,6 +31,7 @@ exports.SecretItem = require('./secretItem'); exports.DeletedSecretBundle = require('./deletedSecretBundle'); exports.DeletedSecretItem = require('./deletedSecretItem'); exports.SecretRestoreParameters = require('./secretRestoreParameters'); +exports.StorageRestoreParameters = require('./storageRestoreParameters'); exports.CertificateAttributes = require('./certificateAttributes'); exports.CertificateItem = require('./certificateItem'); exports.CertificateIssuerItem = require('./certificateIssuerItem'); @@ -75,16 +76,21 @@ exports.KeyOperationResult = require('./keyOperationResult'); exports.KeyVerifyResult = require('./keyVerifyResult'); exports.BackupKeyResult = require('./backupKeyResult'); exports.BackupSecretResult = require('./backupSecretResult'); +exports.BackupStorageResult = require('./backupStorageResult'); exports.PendingCertificateSigningRequestResult = require('./pendingCertificateSigningRequestResult'); exports.StorageAccountAttributes = require('./storageAccountAttributes'); exports.StorageBundle = require('./storageBundle'); +exports.DeletedStorageBundle = require('./deletedStorageBundle'); exports.StorageAccountCreateParameters = require('./storageAccountCreateParameters'); exports.StorageAccountUpdateParameters = require('./storageAccountUpdateParameters'); exports.StorageAccountRegenerteKeyParameters = require('./storageAccountRegenerteKeyParameters'); exports.StorageAccountItem = require('./storageAccountItem'); +exports.DeletedStorageAccountItem = require('./deletedStorageAccountItem'); exports.SasDefinitionAttributes = require('./sasDefinitionAttributes'); exports.SasDefinitionBundle = require('./sasDefinitionBundle'); +exports.DeletedSasDefinitionBundle = require('./deletedSasDefinitionBundle'); exports.SasDefinitionItem = require('./sasDefinitionItem'); +exports.DeletedSasDefinitionItem = require('./deletedSasDefinitionItem'); exports.SasDefinitionCreateParameters = require('./sasDefinitionCreateParameters'); exports.SasDefinitionUpdateParameters = require('./sasDefinitionUpdateParameters'); exports.KeyVaultError = require('./keyVaultError'); @@ -96,4 +102,6 @@ exports.CertificateListResult = require('./certificateListResult'); exports.CertificateIssuerListResult = require('./certificateIssuerListResult'); exports.DeletedCertificateListResult = require('./deletedCertificateListResult'); exports.StorageListResult = require('./storageListResult'); +exports.DeletedStorageListResult = require('./deletedStorageListResult'); exports.SasDefinitionListResult = require('./sasDefinitionListResult'); +exports.DeletedSasDefinitionListResult = require('./deletedSasDefinitionListResult'); diff --git a/lib/services/keyVault/lib/models/sasDefinitionAttributes.js b/lib/services/keyVault/lib/models/sasDefinitionAttributes.js index fcb4f8d005..d9374687c5 100644 --- a/lib/services/keyVault/lib/models/sasDefinitionAttributes.js +++ b/lib/services/keyVault/lib/models/sasDefinitionAttributes.js @@ -20,6 +20,13 @@ class SasDefinitionAttributes { * @member {boolean} [enabled] the enabled state of the object. * @member {date} [created] Creation time in UTC. * @member {date} [updated] Last updated time in UTC. + * @member {string} [recoveryLevel] Reflects the deletion recovery level + * currently in effect for SAS definitions in the current vault. If it + * contains 'Purgeable' the SAS definition can be permanently deleted by a + * privileged user; otherwise, only the system can purge the SAS definition, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' */ constructor() { } @@ -60,6 +67,14 @@ class SasDefinitionAttributes { type: { name: 'UnixTime' } + }, + recoveryLevel: { + required: false, + readOnly: true, + serializedName: 'recoveryLevel', + type: { + name: 'String' + } } } } diff --git a/lib/services/keyVault/lib/models/sasDefinitionBundle.js b/lib/services/keyVault/lib/models/sasDefinitionBundle.js index 14e0e15585..d8525a923c 100644 --- a/lib/services/keyVault/lib/models/sasDefinitionBundle.js +++ b/lib/services/keyVault/lib/models/sasDefinitionBundle.js @@ -22,12 +22,24 @@ class SasDefinitionBundle { * Create a SasDefinitionBundle. * @member {string} [id] The SAS definition id. * @member {string} [secretId] Storage account SAS definition secret id. - * @member {object} [parameters] The SAS definition metadata in the form of - * key-value pairs. + * @member {string} [templateUri] The SAS definition token template signed + * with an arbitrary key. Tokens created according to the SAS definition + * will have the same properties as the template. + * @member {string} [sasType] The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} [validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * @member {object} [attributes] The SAS definition attributes. * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for SAS definitions in the current vault. If it + * contains 'Purgeable' the SAS definition can be permanently deleted by a + * privileged user; otherwise, only the system can purge the SAS definition, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs */ @@ -64,19 +76,28 @@ class SasDefinitionBundle { name: 'String' } }, - parameters: { + templateUri: { required: false, readOnly: true, - serializedName: 'parameters', + serializedName: 'templateUri', type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' + } + }, + sasType: { + required: false, + readOnly: true, + serializedName: 'sasType', + type: { + name: 'String' + } + }, + validityPeriod: { + required: false, + readOnly: true, + serializedName: 'validityPeriod', + type: { + name: 'String' } }, attributes: { diff --git a/lib/services/keyVault/lib/models/sasDefinitionCreateParameters.js b/lib/services/keyVault/lib/models/sasDefinitionCreateParameters.js index abc8530358..c0d1559aa1 100644 --- a/lib/services/keyVault/lib/models/sasDefinitionCreateParameters.js +++ b/lib/services/keyVault/lib/models/sasDefinitionCreateParameters.js @@ -19,14 +19,26 @@ const models = require('./index'); class SasDefinitionCreateParameters { /** * Create a SasDefinitionCreateParameters. - * @member {object} parameters Sas definition creation metadata in the form - * of key-value pairs. + * @member {string} templateUri The SAS definition token template signed with + * an arbitrary key. Tokens created according to the SAS definition will + * have the same properties as the template. + * @member {string} sasType The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} validityPeriod The validity period of SAS tokens created + * according to the SAS definition. * @member {object} [sasDefinitionAttributes] The attributes of the SAS * definition. * @member {boolean} [sasDefinitionAttributes.enabled] the enabled state of * the object. * @member {date} [sasDefinitionAttributes.created] Creation time in UTC. * @member {date} [sasDefinitionAttributes.updated] Last updated time in UTC. + * @member {string} [sasDefinitionAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for SAS definitions in the + * current vault. If it contains 'Purgeable' the SAS definition can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the SAS definition, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -47,18 +59,25 @@ class SasDefinitionCreateParameters { name: 'Composite', className: 'SasDefinitionCreateParameters', modelProperties: { - parameters: { + templateUri: { required: true, - serializedName: 'parameters', + serializedName: 'templateUri', type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' + } + }, + sasType: { + required: true, + serializedName: 'sasType', + type: { + name: 'String' + } + }, + validityPeriod: { + required: true, + serializedName: 'validityPeriod', + type: { + name: 'String' } }, sasDefinitionAttributes: { diff --git a/lib/services/keyVault/lib/models/sasDefinitionItem.js b/lib/services/keyVault/lib/models/sasDefinitionItem.js index 1517e5f4ea..ec8b815e0b 100644 --- a/lib/services/keyVault/lib/models/sasDefinitionItem.js +++ b/lib/services/keyVault/lib/models/sasDefinitionItem.js @@ -25,6 +25,13 @@ class SasDefinitionItem { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for SAS definitions in the current vault. If it + * contains 'Purgeable' the SAS definition can be permanently deleted by a + * privileged user; otherwise, only the system can purge the SAS definition, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ diff --git a/lib/services/keyVault/lib/models/sasDefinitionUpdateParameters.js b/lib/services/keyVault/lib/models/sasDefinitionUpdateParameters.js index e3c2927b7f..7e60046889 100644 --- a/lib/services/keyVault/lib/models/sasDefinitionUpdateParameters.js +++ b/lib/services/keyVault/lib/models/sasDefinitionUpdateParameters.js @@ -19,14 +19,26 @@ const models = require('./index'); class SasDefinitionUpdateParameters { /** * Create a SasDefinitionUpdateParameters. - * @member {object} [parameters] Sas definition update metadata in the form - * of key-value pairs. + * @member {string} [templateUri] The SAS definition token template signed + * with an arbitrary key. Tokens created according to the SAS definition + * will have the same properties as the template. + * @member {string} [sasType] The type of SAS token the SAS definition will + * create. Possible values include: 'account', 'service' + * @member {string} [validityPeriod] The validity period of SAS tokens + * created according to the SAS definition. * @member {object} [sasDefinitionAttributes] The attributes of the SAS * definition. * @member {boolean} [sasDefinitionAttributes.enabled] the enabled state of * the object. * @member {date} [sasDefinitionAttributes.created] Creation time in UTC. * @member {date} [sasDefinitionAttributes.updated] Last updated time in UTC. + * @member {string} [sasDefinitionAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for SAS definitions in the + * current vault. If it contains 'Purgeable' the SAS definition can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the SAS definition, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ @@ -47,18 +59,25 @@ class SasDefinitionUpdateParameters { name: 'Composite', className: 'SasDefinitionUpdateParameters', modelProperties: { - parameters: { + templateUri: { required: false, - serializedName: 'parameters', + serializedName: 'templateUri', type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' + } + }, + sasType: { + required: false, + serializedName: 'sasType', + type: { + name: 'String' + } + }, + validityPeriod: { + required: false, + serializedName: 'validityPeriod', + type: { + name: 'String' } }, sasDefinitionAttributes: { diff --git a/lib/services/keyVault/lib/models/storageAccountAttributes.js b/lib/services/keyVault/lib/models/storageAccountAttributes.js index b38f4d0095..d14cf61fac 100644 --- a/lib/services/keyVault/lib/models/storageAccountAttributes.js +++ b/lib/services/keyVault/lib/models/storageAccountAttributes.js @@ -20,6 +20,13 @@ class StorageAccountAttributes { * @member {boolean} [enabled] the enabled state of the object. * @member {date} [created] Creation time in UTC. * @member {date} [updated] Last updated time in UTC. + * @member {string} [recoveryLevel] Reflects the deletion recovery level + * currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' */ constructor() { } @@ -60,6 +67,14 @@ class StorageAccountAttributes { type: { name: 'UnixTime' } + }, + recoveryLevel: { + required: false, + readOnly: true, + serializedName: 'recoveryLevel', + type: { + name: 'String' + } } } } diff --git a/lib/services/keyVault/lib/models/storageAccountCreateParameters.js b/lib/services/keyVault/lib/models/storageAccountCreateParameters.js index c2f7b6014e..5372c593a7 100644 --- a/lib/services/keyVault/lib/models/storageAccountCreateParameters.js +++ b/lib/services/keyVault/lib/models/storageAccountCreateParameters.js @@ -32,6 +32,13 @@ class StorageAccountCreateParameters { * @member {date} [storageAccountAttributes.created] Creation time in UTC. * @member {date} [storageAccountAttributes.updated] Last updated time in * UTC. + * @member {string} [storageAccountAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for storage accounts in the + * current vault. If it contains 'Purgeable' the storage account can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the storage account, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ diff --git a/lib/services/keyVault/lib/models/storageAccountItem.js b/lib/services/keyVault/lib/models/storageAccountItem.js index b9b032f902..e0a0cec7eb 100644 --- a/lib/services/keyVault/lib/models/storageAccountItem.js +++ b/lib/services/keyVault/lib/models/storageAccountItem.js @@ -25,6 +25,13 @@ class StorageAccountItem { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ diff --git a/lib/services/keyVault/lib/models/storageAccountUpdateParameters.js b/lib/services/keyVault/lib/models/storageAccountUpdateParameters.js index 5c086ad2ec..24c317ba8b 100644 --- a/lib/services/keyVault/lib/models/storageAccountUpdateParameters.js +++ b/lib/services/keyVault/lib/models/storageAccountUpdateParameters.js @@ -32,6 +32,13 @@ class StorageAccountUpdateParameters { * @member {date} [storageAccountAttributes.created] Creation time in UTC. * @member {date} [storageAccountAttributes.updated] Last updated time in * UTC. + * @member {string} [storageAccountAttributes.recoveryLevel] Reflects the + * deletion recovery level currently in effect for storage accounts in the + * current vault. If it contains 'Purgeable' the storage account can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the storage account, at the end of the retention interval. Possible + * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs. */ diff --git a/lib/services/keyVault/lib/models/storageBundle.js b/lib/services/keyVault/lib/models/storageBundle.js index 8e2f898867..63a80715b5 100644 --- a/lib/services/keyVault/lib/models/storageBundle.js +++ b/lib/services/keyVault/lib/models/storageBundle.js @@ -32,6 +32,13 @@ class StorageBundle { * @member {boolean} [attributes.enabled] the enabled state of the object. * @member {date} [attributes.created] Creation time in UTC. * @member {date} [attributes.updated] Last updated time in UTC. + * @member {string} [attributes.recoveryLevel] Reflects the deletion recovery + * level currently in effect for storage accounts in the current vault. If it + * contains 'Purgeable' the storage account can be permanently deleted by a + * privileged user; otherwise, only the system can purge the storage account, + * at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' * @member {object} [tags] Application specific metadata in the form of * key-value pairs */ diff --git a/lib/services/keyVault/lib/models/storageRestoreParameters.js b/lib/services/keyVault/lib/models/storageRestoreParameters.js new file mode 100644 index 0000000000..aaa159104a --- /dev/null +++ b/lib/services/keyVault/lib/models/storageRestoreParameters.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The secret restore parameters. + * + */ +class StorageRestoreParameters { + /** + * Create a StorageRestoreParameters. + * @member {buffer} storageBundleBackup The backup blob associated with a + * storage account. + */ + constructor() { + } + + /** + * Defines the metadata of StorageRestoreParameters + * + * @returns {object} metadata of StorageRestoreParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageRestoreParameters', + type: { + name: 'Composite', + className: 'StorageRestoreParameters', + modelProperties: { + storageBundleBackup: { + required: true, + serializedName: 'value', + type: { + name: 'Base64Url' + } + } + } + } + }; + } +} + +module.exports = StorageRestoreParameters; diff --git a/lib/services/keyVaultManagement/lib/keyVaultManagementClient.d.ts b/lib/services/keyVaultManagement/lib/keyVaultManagementClient.d.ts index c3375aa9ff..bef5315536 100755 --- a/lib/services/keyVaultManagement/lib/keyVaultManagementClient.d.ts +++ b/lib/services/keyVaultManagement/lib/keyVaultManagementClient.d.ts @@ -20,7 +20,7 @@ declare class KeyVaultManagementClient extends AzureServiceClient { * @class * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * - * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * * @param {string} [baseUri] - The base URI of the service. * @@ -56,6 +56,7 @@ declare class KeyVaultManagementClient extends AzureServiceClient { // Operation groups vaults: operations.Vaults; + operations: operations.Operations; } export = KeyVaultManagementClient; diff --git a/lib/services/keyVaultManagement/lib/keyVaultManagementClient.js b/lib/services/keyVaultManagement/lib/keyVaultManagementClient.js index 648e8c0410..e889d497ea 100755 --- a/lib/services/keyVaultManagement/lib/keyVaultManagementClient.js +++ b/lib/services/keyVaultManagement/lib/keyVaultManagementClient.js @@ -27,7 +27,7 @@ class KeyVaultManagementClient extends ServiceClient { /** * Create a KeyVaultManagementClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. - * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -73,6 +73,7 @@ class KeyVaultManagementClient extends ServiceClient { this.generateClientRequestId = options.generateClientRequestId; } this.vaults = new operations.Vaults(this); + this.operations = new operations.Operations(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/keyVaultManagement/lib/models/checkNameAvailabilityResult.js b/lib/services/keyVaultManagement/lib/models/checkNameAvailabilityResult.js new file mode 100644 index 0000000000..f6b1d65f94 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/checkNameAvailabilityResult.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The CheckNameAvailability operation response. + * + */ +class CheckNameAvailabilityResult { + /** + * Create a CheckNameAvailabilityResult. + * @member {boolean} [nameAvailable] A boolean value that indicates whether + * the name is available for you to use. If true, the name is available. If + * false, the name has already been taken or is invalid and cannot be used. + * @member {string} [reason] The reason that a vault name could not be used. + * The Reason element is only returned if NameAvailable is false. Possible + * values include: 'AccountNameInvalid', 'AlreadyExists' + * @member {string} [message] An error message explaining the Reason value in + * more detail. + */ + constructor() { + } + + /** + * Defines the metadata of CheckNameAvailabilityResult + * + * @returns {object} metadata of CheckNameAvailabilityResult + * + */ + mapper() { + return { + required: false, + serializedName: 'CheckNameAvailabilityResult', + type: { + name: 'Composite', + className: 'CheckNameAvailabilityResult', + modelProperties: { + nameAvailable: { + required: false, + readOnly: true, + serializedName: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + readOnly: true, + serializedName: 'reason', + type: { + name: 'Enum', + allowedValues: [ 'AccountNameInvalid', 'AlreadyExists' ] + } + }, + message: { + required: false, + readOnly: true, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CheckNameAvailabilityResult; diff --git a/lib/services/keyVaultManagement/lib/models/index.d.ts b/lib/services/keyVaultManagement/lib/models/index.d.ts index 6324de8886..50281c0db7 100755 --- a/lib/services/keyVaultManagement/lib/models/index.d.ts +++ b/lib/services/keyVaultManagement/lib/models/index.d.ts @@ -101,12 +101,21 @@ export interface AccessPolicyEntry { * unwrap keys. * @member {boolean} [enabledForTemplateDeployment] Property to specify whether * Azure Resource Manager is permitted to retrieve secrets from the key vault. - * @member {boolean} [enableSoftDelete] Property to specify whether the 'soft - * delete' functionality is enabled for this key vault. It does not accept - * false value. + * @member {boolean} [enableSoftDelete] Property specifying whether recoverable + * deletion is enabled for this key vault. Setting this property to true + * activates the soft delete feature, whereby vaults or vault entities can be + * recovered after deletion. Enabling this functionality is irreversible - that + * is, the property does not accept false as its value. * @member {string} [createMode] The vault's create mode to indicate whether * the vault need to be recovered or not. Possible values include: 'recover', * 'default' + * @member {boolean} [enablePurgeProtection] Property specifying whether + * protection against purge is enabled for this vault. Setting this property to + * true activates protection against purge for this vault and its content - + * only the Key Vault service may initiate a hard, irrecoverable deletion. The + * setting is effective only if soft delete is also enabled. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. */ export interface VaultProperties { tenantId: string; @@ -118,6 +127,67 @@ export interface VaultProperties { enabledForTemplateDeployment?: boolean; enableSoftDelete?: boolean; createMode?: string; + enablePurgeProtection?: boolean; +} + +/** + * @class + * Initializes a new instance of the VaultPatchProperties class. + * @constructor + * Properties of the vault + * + * @member {uuid} [tenantId] The Azure Active Directory tenant ID that should + * be used for authenticating requests to the key vault. + * @member {object} [sku] SKU details + * @member {string} [sku.name] SKU name to specify whether the key vault is a + * standard vault or a premium vault. Possible values include: 'standard', + * 'premium' + * @member {array} [accessPolicies] An array of 0 to 16 identities that have + * access to the key vault. All identities in the array must use the same + * tenant ID as the key vault's tenant ID. + * @member {boolean} [enabledForDeployment] Property to specify whether Azure + * Virtual Machines are permitted to retrieve certificates stored as secrets + * from the key vault. + * @member {boolean} [enabledForDiskEncryption] Property to specify whether + * Azure Disk Encryption is permitted to retrieve secrets from the vault and + * unwrap keys. + * @member {boolean} [enabledForTemplateDeployment] Property to specify whether + * Azure Resource Manager is permitted to retrieve secrets from the key vault. + * @member {boolean} [enableSoftDelete] Property specifying whether recoverable + * deletion ('soft' delete) is enabled for this key vault. The property may not + * be set to false. + * @member {string} [createMode] The vault's create mode to indicate whether + * the vault need to be recovered or not. Possible values include: 'recover', + * 'default' + * @member {boolean} [enablePurgeProtection] Property specifying whether + * protection against purge is enabled for this vault; it is only effective if + * soft delete is also enabled. Once activated, the property may no longer be + * reset to false. + */ +export interface VaultPatchProperties { + tenantId?: string; + sku?: Sku; + accessPolicies?: AccessPolicyEntry[]; + enabledForDeployment?: boolean; + enabledForDiskEncryption?: boolean; + enabledForTemplateDeployment?: boolean; + enableSoftDelete?: boolean; + createMode?: string; + enablePurgeProtection?: boolean; +} + +/** + * @class + * Initializes a new instance of the VaultAccessPolicyProperties class. + * @constructor + * Properties of the vault access policy + * + * @member {array} accessPolicies An array of 0 to 16 identities that have + * access to the key vault. All identities in the array must use the same + * tenant ID as the key vault's tenant ID. + */ +export interface VaultAccessPolicyProperties { + accessPolicies: AccessPolicyEntry[]; } /** @@ -170,12 +240,21 @@ export interface DeletedVaultProperties { * @member {boolean} [properties.enabledForTemplateDeployment] Property to * specify whether Azure Resource Manager is permitted to retrieve secrets from * the key vault. - * @member {boolean} [properties.enableSoftDelete] Property to specify whether - * the 'soft delete' functionality is enabled for this key vault. It does not - * accept false value. + * @member {boolean} [properties.enableSoftDelete] Property specifying whether + * recoverable deletion is enabled for this key vault. Setting this property to + * true activates the soft delete feature, whereby vaults or vault entities can + * be recovered after deletion. Enabling this functionality is irreversible - + * that is, the property does not accept false as its value. * @member {string} [properties.createMode] The vault's create mode to indicate * whether the vault need to be recovered or not. Possible values include: * 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault. Setting this + * property to true activates protection against purge for this vault and its + * content - only the Key Vault service may initiate a hard, irrecoverable + * deletion. The setting is effective only if soft delete is also enabled. + * Enabling this functionality is irreversible - that is, the property does not + * accept false as its value. */ export interface VaultCreateOrUpdateParameters extends BaseResource { location: string; @@ -183,6 +262,71 @@ export interface VaultCreateOrUpdateParameters extends BaseResource { properties: VaultProperties; } +/** + * @class + * Initializes a new instance of the VaultPatchParameters class. + * @constructor + * Parameters for creating or updating a vault + * + * @member {object} [tags] The tags that will be assigned to the key vault. + * @member {object} [properties] Properties of the vault + * @member {uuid} [properties.tenantId] The Azure Active Directory tenant ID + * that should be used for authenticating requests to the key vault. + * @member {object} [properties.sku] SKU details + * @member {string} [properties.sku.name] SKU name to specify whether the key + * vault is a standard vault or a premium vault. Possible values include: + * 'standard', 'premium' + * @member {array} [properties.accessPolicies] An array of 0 to 16 identities + * that have access to the key vault. All identities in the array must use the + * same tenant ID as the key vault's tenant ID. + * @member {boolean} [properties.enabledForDeployment] Property to specify + * whether Azure Virtual Machines are permitted to retrieve certificates stored + * as secrets from the key vault. + * @member {boolean} [properties.enabledForDiskEncryption] Property to specify + * whether Azure Disk Encryption is permitted to retrieve secrets from the + * vault and unwrap keys. + * @member {boolean} [properties.enabledForTemplateDeployment] Property to + * specify whether Azure Resource Manager is permitted to retrieve secrets from + * the key vault. + * @member {boolean} [properties.enableSoftDelete] Property specifying whether + * recoverable deletion ('soft' delete) is enabled for this key vault. The + * property may not be set to false. + * @member {string} [properties.createMode] The vault's create mode to indicate + * whether the vault need to be recovered or not. Possible values include: + * 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault; it is only + * effective if soft delete is also enabled. Once activated, the property may + * no longer be reset to false. + */ +export interface VaultPatchParameters extends BaseResource { + tags?: { [propertyName: string]: string }; + properties?: VaultPatchProperties; +} + +/** + * @class + * Initializes a new instance of the VaultAccessPolicyParameters class. + * @constructor + * Parameters for updating the access policy in a vault + * + * @member {string} [id] The resource id of the access policy. + * @member {string} [name] The resource name of the access policy. + * @member {string} [type] The resource name of the access policy. + * @member {string} [location] The resource type of the the access policy. + * @member {object} properties Properties of the access policy + * @member {array} [properties.accessPolicies] An array of 0 to 16 identities + * that have access to the key vault. All identities in the array must use the + * same tenant ID as the key vault's tenant ID. + */ +export interface VaultAccessPolicyParameters extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; + readonly location?: string; + properties: VaultAccessPolicyProperties; +} + /** * @class * Initializes a new instance of the Resource class. @@ -191,7 +335,7 @@ export interface VaultCreateOrUpdateParameters extends BaseResource { * * @member {string} [id] The Azure Resource Manager resource ID for the key * vault. - * @member {string} name The name of the key vault. + * @member {string} [name] The name of the key vault. * @member {string} [type] The resource type of the key vault. * @member {string} location The supported Azure location where the key vault * should be created. @@ -199,7 +343,7 @@ export interface VaultCreateOrUpdateParameters extends BaseResource { */ export interface Resource extends BaseResource { readonly id?: string; - name: string; + readonly name?: string; readonly type?: string; location: string; tags?: { [propertyName: string]: string }; @@ -232,12 +376,21 @@ export interface Resource extends BaseResource { * @member {boolean} [properties.enabledForTemplateDeployment] Property to * specify whether Azure Resource Manager is permitted to retrieve secrets from * the key vault. - * @member {boolean} [properties.enableSoftDelete] Property to specify whether - * the 'soft delete' functionality is enabled for this key vault. It does not - * accept false value. + * @member {boolean} [properties.enableSoftDelete] Property specifying whether + * recoverable deletion is enabled for this key vault. Setting this property to + * true activates the soft delete feature, whereby vaults or vault entities can + * be recovered after deletion. Enabling this functionality is irreversible - + * that is, the property does not accept false as its value. * @member {string} [properties.createMode] The vault's create mode to indicate * whether the vault need to be recovered or not. Possible values include: * 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault. Setting this + * property to true activates protection against purge for this vault and its + * content - only the Key Vault service may initiate a hard, irrecoverable + * deletion. The setting is effective only if soft delete is also enabled. + * Enabling this functionality is irreversible - that is, the property does not + * accept false as its value. */ export interface Vault extends Resource { properties: VaultProperties; @@ -266,6 +419,113 @@ export interface DeletedVault { properties?: DeletedVaultProperties; } +/** + * @class + * Initializes a new instance of the VaultCheckNameAvailabilityParameters class. + * @constructor + * The parameters used to check the availabity of the vault name. + * + * @member {string} name The vault name. + */ +export interface VaultCheckNameAvailabilityParameters { + name: string; +} + +/** + * @class + * Initializes a new instance of the CheckNameAvailabilityResult class. + * @constructor + * The CheckNameAvailability operation response. + * + * @member {boolean} [nameAvailable] A boolean value that indicates whether the + * name is available for you to use. If true, the name is available. If false, + * the name has already been taken or is invalid and cannot be used. + * @member {string} [reason] The reason that a vault name could not be used. + * The Reason element is only returned if NameAvailable is false. Possible + * values include: 'AccountNameInvalid', 'AlreadyExists' + * @member {string} [message] An error message explaining the Reason value in + * more detail. + */ +export interface CheckNameAvailabilityResult { + readonly nameAvailable?: boolean; + readonly reason?: string; + readonly message?: string; +} + +/** + * @class + * Initializes a new instance of the OperationDisplay class. + * @constructor + * Display metadata associated with the operation. + * + * @member {string} [provider] Service provider: Microsoft Key Vault. + * @member {string} [resource] Resource on which the operation is performed + * etc. + * @member {string} [operation] Type of operation: get, read, delete, etc. + * @member {string} [description] Decription of operation. + */ +export interface OperationDisplay { + provider?: string; + resource?: string; + operation?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the LogSpecification class. + * @constructor + * Log specification of operation. + * + * @member {string} [name] Name of log specification. + * @member {string} [displayName] Display name of log specification. + * @member {string} [blobDuration] Blob duration of specification. + */ +export interface LogSpecification { + name?: string; + displayName?: string; + blobDuration?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceSpecification class. + * @constructor + * One property of operation, include log specifications. + * + * @member {array} [logSpecifications] Log specifications of operation. + */ +export interface ServiceSpecification { + logSpecifications?: LogSpecification[]; +} + +/** + * @class + * Initializes a new instance of the Operation class. + * @constructor + * Key Vault REST API operation definition. + * + * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * @member {object} [display] Display metadata associated with the operation. + * @member {string} [display.provider] Service provider: Microsoft Key Vault. + * @member {string} [display.resource] Resource on which the operation is + * performed etc. + * @member {string} [display.operation] Type of operation: get, read, delete, + * etc. + * @member {string} [display.description] Decription of operation. + * @member {string} [origin] The origin of operations. + * @member {object} [serviceSpecification] One property of operation, include + * metric specifications. + * @member {array} [serviceSpecification.logSpecifications] Log specifications + * of operation. + */ +export interface Operation { + name?: string; + display?: OperationDisplay; + origin?: string; + serviceSpecification?: ServiceSpecification; +} + /** * @class @@ -273,8 +533,7 @@ export interface DeletedVault { * @constructor * List of vaults * - * @member {string} [nextLink] Gets or sets the URL to get the next set of - * vaults. + * @member {string} [nextLink] The URL to get the next set of vaults. */ export interface VaultListResult extends Array { nextLink?: string; @@ -298,9 +557,21 @@ export interface DeletedVaultListResult extends Array { * @constructor * List of vault resources. * - * @member {string} [nextLink] Gets the URL to get the next set of vault - * resources. + * @member {string} [nextLink] The URL to get the next set of vault resources. */ export interface ResourceListResult extends Array { nextLink?: string; } + +/** + * @class + * Initializes a new instance of the OperationListResult class. + * @constructor + * Result of the request to list Storage operations. It contains a list of + * operations and a URL link to get the next set of results. + * + * @member {string} [nextLink] The URL to get the next set of operations. + */ +export interface OperationListResult extends Array { + nextLink?: string; +} diff --git a/lib/services/keyVaultManagement/lib/models/index.js b/lib/services/keyVaultManagement/lib/models/index.js index 3fd41a88f9..1973f9f005 100755 --- a/lib/services/keyVaultManagement/lib/models/index.js +++ b/lib/services/keyVaultManagement/lib/models/index.js @@ -22,11 +22,22 @@ exports.Sku = require('./sku'); exports.Permissions = require('./permissions'); exports.AccessPolicyEntry = require('./accessPolicyEntry'); exports.VaultProperties = require('./vaultProperties'); +exports.VaultPatchProperties = require('./vaultPatchProperties'); +exports.VaultAccessPolicyProperties = require('./vaultAccessPolicyProperties'); exports.DeletedVaultProperties = require('./deletedVaultProperties'); exports.VaultCreateOrUpdateParameters = require('./vaultCreateOrUpdateParameters'); +exports.VaultPatchParameters = require('./vaultPatchParameters'); +exports.VaultAccessPolicyParameters = require('./vaultAccessPolicyParameters'); exports.Resource = require('./resource'); exports.Vault = require('./vault'); exports.DeletedVault = require('./deletedVault'); +exports.VaultCheckNameAvailabilityParameters = require('./vaultCheckNameAvailabilityParameters'); +exports.CheckNameAvailabilityResult = require('./checkNameAvailabilityResult'); +exports.OperationDisplay = require('./operationDisplay'); +exports.LogSpecification = require('./logSpecification'); +exports.ServiceSpecification = require('./serviceSpecification'); +exports.Operation = require('./operation'); exports.VaultListResult = require('./vaultListResult'); exports.DeletedVaultListResult = require('./deletedVaultListResult'); exports.ResourceListResult = require('./resourceListResult'); +exports.OperationListResult = require('./operationListResult'); diff --git a/lib/services/keyVaultManagement/lib/models/logSpecification.js b/lib/services/keyVaultManagement/lib/models/logSpecification.js new file mode 100644 index 0000000000..fbf78a7c07 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/logSpecification.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Log specification of operation. + * + */ +class LogSpecification { + /** + * Create a LogSpecification. + * @member {string} [name] Name of log specification. + * @member {string} [displayName] Display name of log specification. + * @member {string} [blobDuration] Blob duration of specification. + */ + constructor() { + } + + /** + * Defines the metadata of LogSpecification + * + * @returns {object} metadata of LogSpecification + * + */ + mapper() { + return { + required: false, + serializedName: 'LogSpecification', + type: { + name: 'Composite', + className: 'LogSpecification', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + blobDuration: { + required: false, + serializedName: 'blobDuration', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LogSpecification; diff --git a/lib/services/keyVaultManagement/lib/models/operation.js b/lib/services/keyVaultManagement/lib/models/operation.js new file mode 100644 index 0000000000..7497ee110b --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/operation.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Key Vault REST API operation definition. + * + */ +class Operation { + /** + * Create a Operation. + * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * @member {object} [display] Display metadata associated with the operation. + * @member {string} [display.provider] Service provider: Microsoft Key Vault. + * @member {string} [display.resource] Resource on which the operation is + * performed etc. + * @member {string} [display.operation] Type of operation: get, read, delete, + * etc. + * @member {string} [display.description] Decription of operation. + * @member {string} [origin] The origin of operations. + * @member {object} [serviceSpecification] One property of operation, include + * metric specifications. + * @member {array} [serviceSpecification.logSpecifications] Log + * specifications of operation. + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serializedName: 'display', + type: { + name: 'Composite', + className: 'OperationDisplay' + } + }, + origin: { + required: false, + serializedName: 'origin', + type: { + name: 'String' + } + }, + serviceSpecification: { + required: false, + serializedName: 'properties.serviceSpecification', + type: { + name: 'Composite', + className: 'ServiceSpecification' + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/keyVaultManagement/lib/models/operationDisplay.js b/lib/services/keyVaultManagement/lib/models/operationDisplay.js new file mode 100644 index 0000000000..8cab4a170d --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/operationDisplay.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Display metadata associated with the operation. + * + */ +class OperationDisplay { + /** + * Create a OperationDisplay. + * @member {string} [provider] Service provider: Microsoft Key Vault. + * @member {string} [resource] Resource on which the operation is performed + * etc. + * @member {string} [operation] Type of operation: get, read, delete, etc. + * @member {string} [description] Decription of operation. + */ + constructor() { + } + + /** + * Defines the metadata of OperationDisplay + * + * @returns {object} metadata of OperationDisplay + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation_display', + type: { + name: 'Composite', + className: 'OperationDisplay', + modelProperties: { + provider: { + required: false, + serializedName: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serializedName: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serializedName: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationDisplay; diff --git a/lib/services/keyVaultManagement/lib/models/operationListResult.js b/lib/services/keyVaultManagement/lib/models/operationListResult.js new file mode 100644 index 0000000000..f6662b8f6a --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/operationListResult.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Result of the request to list Storage operations. It contains a list of + * operations and a URL link to get the next set of results. + */ +class OperationListResult extends Array { + /** + * Create a OperationListResult. + * @member {string} [nextLink] The URL to get the next set of operations. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of OperationListResult + * + * @returns {object} metadata of OperationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationListResult', + type: { + name: 'Composite', + className: 'OperationListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationElementType', + type: { + name: 'Composite', + className: 'Operation' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationListResult; diff --git a/lib/services/keyVaultManagement/lib/models/resource.js b/lib/services/keyVaultManagement/lib/models/resource.js index a52bd431b5..e23aafe21b 100755 --- a/lib/services/keyVaultManagement/lib/models/resource.js +++ b/lib/services/keyVaultManagement/lib/models/resource.js @@ -22,7 +22,7 @@ class Resource extends models['BaseResource'] { * Create a Resource. * @member {string} [id] The Azure Resource Manager resource ID for the key * vault. - * @member {string} name The name of the key vault. + * @member {string} [name] The name of the key vault. * @member {string} [type] The resource type of the key vault. * @member {string} location The supported Azure location where the key vault * should be created. @@ -55,7 +55,8 @@ class Resource extends models['BaseResource'] { } }, name: { - required: true, + required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/keyVaultManagement/lib/models/resourceListResult.js b/lib/services/keyVaultManagement/lib/models/resourceListResult.js index e2654f559e..9d094338fb 100755 --- a/lib/services/keyVaultManagement/lib/models/resourceListResult.js +++ b/lib/services/keyVaultManagement/lib/models/resourceListResult.js @@ -16,7 +16,7 @@ class ResourceListResult extends Array { /** * Create a ResourceListResult. - * @member {string} [nextLink] Gets the URL to get the next set of vault + * @member {string} [nextLink] The URL to get the next set of vault * resources. */ constructor() { diff --git a/lib/services/keyVaultManagement/lib/models/serviceSpecification.js b/lib/services/keyVaultManagement/lib/models/serviceSpecification.js new file mode 100644 index 0000000000..185445842d --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/serviceSpecification.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * One property of operation, include log specifications. + * + */ +class ServiceSpecification { + /** + * Create a ServiceSpecification. + * @member {array} [logSpecifications] Log specifications of operation. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceSpecification + * + * @returns {object} metadata of ServiceSpecification + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceSpecification', + type: { + name: 'Composite', + className: 'ServiceSpecification', + modelProperties: { + logSpecifications: { + required: false, + serializedName: 'logSpecifications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LogSpecificationElementType', + type: { + name: 'Composite', + className: 'LogSpecification' + } + } + } + } + } + } + }; + } +} + +module.exports = ServiceSpecification; diff --git a/lib/services/keyVaultManagement/lib/models/vault.js b/lib/services/keyVaultManagement/lib/models/vault.js index aabc17d1c5..ceaa7304d4 100755 --- a/lib/services/keyVaultManagement/lib/models/vault.js +++ b/lib/services/keyVaultManagement/lib/models/vault.js @@ -41,12 +41,22 @@ class Vault extends models['Resource'] { * @member {boolean} [properties.enabledForTemplateDeployment] Property to * specify whether Azure Resource Manager is permitted to retrieve secrets * from the key vault. - * @member {boolean} [properties.enableSoftDelete] Property to specify - * whether the 'soft delete' functionality is enabled for this key vault. It - * does not accept false value. + * @member {boolean} [properties.enableSoftDelete] Property specifying + * whether recoverable deletion is enabled for this key vault. Setting this + * property to true activates the soft delete feature, whereby vaults or + * vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept + * false as its value. * @member {string} [properties.createMode] The vault's create mode to * indicate whether the vault need to be recovered or not. Possible values * include: 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault. Setting this + * property to true activates protection against purge for this vault and its + * content - only the Key Vault service may initiate a hard, irrecoverable + * deletion. The setting is effective only if soft delete is also enabled. + * Enabling this functionality is irreversible - that is, the property does + * not accept false as its value. */ constructor() { super(); @@ -75,7 +85,8 @@ class Vault extends models['Resource'] { } }, name: { - required: true, + required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyParameters.js b/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyParameters.js new file mode 100644 index 0000000000..ab1f52c76e --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyParameters.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Parameters for updating the access policy in a vault + * + * @extends models['BaseResource'] + */ +class VaultAccessPolicyParameters extends models['BaseResource'] { + /** + * Create a VaultAccessPolicyParameters. + * @member {string} [id] The resource id of the access policy. + * @member {string} [name] The resource name of the access policy. + * @member {string} [type] The resource name of the access policy. + * @member {string} [location] The resource type of the the access policy. + * @member {object} properties Properties of the access policy + * @member {array} [properties.accessPolicies] An array of 0 to 16 identities + * that have access to the key vault. All identities in the array must use + * the same tenant ID as the key vault's tenant ID. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VaultAccessPolicyParameters + * + * @returns {object} metadata of VaultAccessPolicyParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'VaultAccessPolicyParameters', + type: { + name: 'Composite', + className: 'VaultAccessPolicyParameters', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + readOnly: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'VaultAccessPolicyProperties' + } + } + } + } + }; + } +} + +module.exports = VaultAccessPolicyParameters; diff --git a/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyProperties.js b/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyProperties.js new file mode 100644 index 0000000000..7250127fd6 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/vaultAccessPolicyProperties.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties of the vault access policy + * + */ +class VaultAccessPolicyProperties { + /** + * Create a VaultAccessPolicyProperties. + * @member {array} accessPolicies An array of 0 to 16 identities that have + * access to the key vault. All identities in the array must use the same + * tenant ID as the key vault's tenant ID. + */ + constructor() { + } + + /** + * Defines the metadata of VaultAccessPolicyProperties + * + * @returns {object} metadata of VaultAccessPolicyProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'VaultAccessPolicyProperties', + type: { + name: 'Composite', + className: 'VaultAccessPolicyProperties', + modelProperties: { + accessPolicies: { + required: true, + serializedName: 'accessPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccessPolicyEntryElementType', + type: { + name: 'Composite', + className: 'AccessPolicyEntry' + } + } + } + } + } + } + }; + } +} + +module.exports = VaultAccessPolicyProperties; diff --git a/lib/services/keyVaultManagement/lib/models/vaultCheckNameAvailabilityParameters.js b/lib/services/keyVaultManagement/lib/models/vaultCheckNameAvailabilityParameters.js new file mode 100644 index 0000000000..e8aaa893d7 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/vaultCheckNameAvailabilityParameters.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The parameters used to check the availabity of the vault name. + * + */ +class VaultCheckNameAvailabilityParameters { + /** + * Create a VaultCheckNameAvailabilityParameters. + * @member {string} name The vault name. + */ + constructor() { + } + + /** + * Defines the metadata of VaultCheckNameAvailabilityParameters + * + * @returns {object} metadata of VaultCheckNameAvailabilityParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'VaultCheckNameAvailabilityParameters', + type: { + name: 'Composite', + className: 'VaultCheckNameAvailabilityParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'Microsoft.KeyVault/vaults', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VaultCheckNameAvailabilityParameters; diff --git a/lib/services/keyVaultManagement/lib/models/vaultCreateOrUpdateParameters.js b/lib/services/keyVaultManagement/lib/models/vaultCreateOrUpdateParameters.js index 9873640528..0adb1a6e40 100755 --- a/lib/services/keyVaultManagement/lib/models/vaultCreateOrUpdateParameters.js +++ b/lib/services/keyVaultManagement/lib/models/vaultCreateOrUpdateParameters.js @@ -44,12 +44,22 @@ class VaultCreateOrUpdateParameters extends models['BaseResource'] { * @member {boolean} [properties.enabledForTemplateDeployment] Property to * specify whether Azure Resource Manager is permitted to retrieve secrets * from the key vault. - * @member {boolean} [properties.enableSoftDelete] Property to specify - * whether the 'soft delete' functionality is enabled for this key vault. It - * does not accept false value. + * @member {boolean} [properties.enableSoftDelete] Property specifying + * whether recoverable deletion is enabled for this key vault. Setting this + * property to true activates the soft delete feature, whereby vaults or + * vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept + * false as its value. * @member {string} [properties.createMode] The vault's create mode to * indicate whether the vault need to be recovered or not. Possible values * include: 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault. Setting this + * property to true activates protection against purge for this vault and its + * content - only the Key Vault service may initiate a hard, irrecoverable + * deletion. The setting is effective only if soft delete is also enabled. + * Enabling this functionality is irreversible - that is, the property does + * not accept false as its value. */ constructor() { super(); diff --git a/lib/services/keyVaultManagement/lib/models/vaultListResult.js b/lib/services/keyVaultManagement/lib/models/vaultListResult.js index 3fed784ff3..00ded6fd06 100755 --- a/lib/services/keyVaultManagement/lib/models/vaultListResult.js +++ b/lib/services/keyVaultManagement/lib/models/vaultListResult.js @@ -16,8 +16,7 @@ class VaultListResult extends Array { /** * Create a VaultListResult. - * @member {string} [nextLink] Gets or sets the URL to get the next set of - * vaults. + * @member {string} [nextLink] The URL to get the next set of vaults. */ constructor() { super(); diff --git a/lib/services/keyVaultManagement/lib/models/vaultPatchParameters.js b/lib/services/keyVaultManagement/lib/models/vaultPatchParameters.js new file mode 100644 index 0000000000..fe9e2c5bc0 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/vaultPatchParameters.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Parameters for creating or updating a vault + * + * @extends models['BaseResource'] + */ +class VaultPatchParameters extends models['BaseResource'] { + /** + * Create a VaultPatchParameters. + * @member {object} [tags] The tags that will be assigned to the key vault. + * @member {object} [properties] Properties of the vault + * @member {uuid} [properties.tenantId] The Azure Active Directory tenant ID + * that should be used for authenticating requests to the key vault. + * @member {object} [properties.sku] SKU details + * @member {string} [properties.sku.name] SKU name to specify whether the key + * vault is a standard vault or a premium vault. Possible values include: + * 'standard', 'premium' + * @member {array} [properties.accessPolicies] An array of 0 to 16 identities + * that have access to the key vault. All identities in the array must use + * the same tenant ID as the key vault's tenant ID. + * @member {boolean} [properties.enabledForDeployment] Property to specify + * whether Azure Virtual Machines are permitted to retrieve certificates + * stored as secrets from the key vault. + * @member {boolean} [properties.enabledForDiskEncryption] Property to + * specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * @member {boolean} [properties.enabledForTemplateDeployment] Property to + * specify whether Azure Resource Manager is permitted to retrieve secrets + * from the key vault. + * @member {boolean} [properties.enableSoftDelete] Property specifying + * whether recoverable deletion ('soft' delete) is enabled for this key + * vault. The property may not be set to false. + * @member {string} [properties.createMode] The vault's create mode to + * indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * @member {boolean} [properties.enablePurgeProtection] Property specifying + * whether protection against purge is enabled for this vault; it is only + * effective if soft delete is also enabled. Once activated, the property may + * no longer be reset to false. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VaultPatchParameters + * + * @returns {object} metadata of VaultPatchParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'VaultPatchParameters', + type: { + name: 'Composite', + className: 'VaultPatchParameters', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'VaultPatchProperties' + } + } + } + } + }; + } +} + +module.exports = VaultPatchParameters; diff --git a/lib/services/keyVaultManagement/lib/models/vaultPatchProperties.js b/lib/services/keyVaultManagement/lib/models/vaultPatchProperties.js new file mode 100644 index 0000000000..6b8c793c44 --- /dev/null +++ b/lib/services/keyVaultManagement/lib/models/vaultPatchProperties.js @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties of the vault + * + */ +class VaultPatchProperties { + /** + * Create a VaultPatchProperties. + * @member {uuid} [tenantId] The Azure Active Directory tenant ID that should + * be used for authenticating requests to the key vault. + * @member {object} [sku] SKU details + * @member {string} [sku.name] SKU name to specify whether the key vault is a + * standard vault or a premium vault. Possible values include: 'standard', + * 'premium' + * @member {array} [accessPolicies] An array of 0 to 16 identities that have + * access to the key vault. All identities in the array must use the same + * tenant ID as the key vault's tenant ID. + * @member {boolean} [enabledForDeployment] Property to specify whether Azure + * Virtual Machines are permitted to retrieve certificates stored as secrets + * from the key vault. + * @member {boolean} [enabledForDiskEncryption] Property to specify whether + * Azure Disk Encryption is permitted to retrieve secrets from the vault and + * unwrap keys. + * @member {boolean} [enabledForTemplateDeployment] Property to specify + * whether Azure Resource Manager is permitted to retrieve secrets from the + * key vault. + * @member {boolean} [enableSoftDelete] Property specifying whether + * recoverable deletion ('soft' delete) is enabled for this key vault. The + * property may not be set to false. + * @member {string} [createMode] The vault's create mode to indicate whether + * the vault need to be recovered or not. Possible values include: 'recover', + * 'default' + * @member {boolean} [enablePurgeProtection] Property specifying whether + * protection against purge is enabled for this vault; it is only effective + * if soft delete is also enabled. Once activated, the property may no longer + * be reset to false. + */ + constructor() { + } + + /** + * Defines the metadata of VaultPatchProperties + * + * @returns {object} metadata of VaultPatchProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'VaultPatchProperties', + type: { + name: 'Composite', + className: 'VaultPatchProperties', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + sku: { + required: false, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'Sku' + } + }, + accessPolicies: { + required: false, + serializedName: 'accessPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccessPolicyEntryElementType', + type: { + name: 'Composite', + className: 'AccessPolicyEntry' + } + } + } + }, + enabledForDeployment: { + required: false, + serializedName: 'enabledForDeployment', + type: { + name: 'Boolean' + } + }, + enabledForDiskEncryption: { + required: false, + serializedName: 'enabledForDiskEncryption', + type: { + name: 'Boolean' + } + }, + enabledForTemplateDeployment: { + required: false, + serializedName: 'enabledForTemplateDeployment', + type: { + name: 'Boolean' + } + }, + enableSoftDelete: { + required: false, + serializedName: 'enableSoftDelete', + type: { + name: 'Boolean' + } + }, + createMode: { + required: false, + serializedName: 'createMode', + type: { + name: 'Enum', + allowedValues: [ 'recover', 'default' ] + } + }, + enablePurgeProtection: { + required: false, + serializedName: 'enablePurgeProtection', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = VaultPatchProperties; diff --git a/lib/services/keyVaultManagement/lib/models/vaultProperties.js b/lib/services/keyVaultManagement/lib/models/vaultProperties.js index f03e4c0fa2..ab195918b4 100755 --- a/lib/services/keyVaultManagement/lib/models/vaultProperties.js +++ b/lib/services/keyVaultManagement/lib/models/vaultProperties.js @@ -39,12 +39,21 @@ class VaultProperties { * @member {boolean} [enabledForTemplateDeployment] Property to specify * whether Azure Resource Manager is permitted to retrieve secrets from the * key vault. - * @member {boolean} [enableSoftDelete] Property to specify whether the 'soft - * delete' functionality is enabled for this key vault. It does not accept - * false value. + * @member {boolean} [enableSoftDelete] Property specifying whether + * recoverable deletion is enabled for this key vault. Setting this property + * to true activates the soft delete feature, whereby vaults or vault + * entities can be recovered after deletion. Enabling this functionality is + * irreversible - that is, the property does not accept false as its value. * @member {string} [createMode] The vault's create mode to indicate whether * the vault need to be recovered or not. Possible values include: 'recover', * 'default' + * @member {boolean} [enablePurgeProtection] Property specifying whether + * protection against purge is enabled for this vault. Setting this property + * to true activates protection against purge for this vault and its content + * - only the Key Vault service may initiate a hard, irrecoverable deletion. + * The setting is effective only if soft delete is also enabled. Enabling + * this functionality is irreversible - that is, the property does not accept + * false as its value. */ constructor() { } @@ -82,9 +91,6 @@ class VaultProperties { accessPolicies: { required: false, serializedName: 'accessPolicies', - constraints: { - MaxItems: 16 - }, type: { name: 'Sequence', element: { @@ -139,6 +145,13 @@ class VaultProperties { name: 'Enum', allowedValues: [ 'recover', 'default' ] } + }, + enablePurgeProtection: { + required: false, + serializedName: 'enablePurgeProtection', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/keyVaultManagement/lib/operations/index.d.ts b/lib/services/keyVaultManagement/lib/operations/index.d.ts index af0820e409..feb10f768b 100755 --- a/lib/services/keyVaultManagement/lib/operations/index.d.ts +++ b/lib/services/keyVaultManagement/lib/operations/index.d.ts @@ -67,14 +67,25 @@ export interface Vaults { * Property to specify whether Azure Resource Manager is permitted to retrieve * secrets from the key vault. * - * @param {boolean} [parameters.properties.enableSoftDelete] Property to - * specify whether the 'soft delete' functionality is enabled for this key - * vault. It does not accept false value. + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion is enabled for this key vault. + * Setting this property to true activates the soft delete feature, whereby + * vaults or vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. * * @param {string} [parameters.properties.createMode] The vault's create mode * to indicate whether the vault need to be recovered or not. Possible values * include: 'recover', 'default' * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault. + * Setting this property to true activates protection against purge for this + * vault and its content - only the Key Vault service may initiate a hard, + * irrecoverable deletion. The setting is effective only if soft delete is also + * enabled. Enabling this functionality is irreversible - that is, the property + * does not accept false as its value. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -134,14 +145,25 @@ export interface Vaults { * Property to specify whether Azure Resource Manager is permitted to retrieve * secrets from the key vault. * - * @param {boolean} [parameters.properties.enableSoftDelete] Property to - * specify whether the 'soft delete' functionality is enabled for this key - * vault. It does not accept false value. + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion is enabled for this key vault. + * Setting this property to true activates the soft delete feature, whereby + * vaults or vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. * * @param {string} [parameters.properties.createMode] The vault's create mode * to indicate whether the vault need to be recovered or not. Possible values * include: 'recover', 'default' * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault. + * Setting this property to true activates protection against purge for this + * vault and its content - only the Key Vault service may initiate a hard, + * irrecoverable deletion. The setting is effective only if soft delete is also + * enabled. Enabling this functionality is irreversible - that is, the property + * does not accept false as its value. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -174,6 +196,157 @@ export interface Vaults { createOrUpdate(resourceGroupName: string, vaultName: string, parameters: models.VaultCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to patch the vault + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} [parameters.properties] Properties of the vault + * + * @param {uuid} [parameters.properties.tenantId] The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} [parameters.properties.sku] SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion ('soft' delete) is enabled for this + * key vault. The property may not be set to false. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault; it is + * only effective if soft delete is also enabled. Once activated, the property + * may no longer be reset to false. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, vaultName: string, parameters: models.VaultPatchParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to patch the vault + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} [parameters.properties] Properties of the vault + * + * @param {uuid} [parameters.properties.tenantId] The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} [parameters.properties.sku] SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion ('soft' delete) is enabled for this + * key vault. The property may not be set to false. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault; it is + * only effective if soft delete is also enabled. Once activated, the property + * may no longer be reset to false. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Vault} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Vault} [result] - The deserialized result object if an error did not occur. + * See {@link Vault} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, vaultName: string, parameters: models.VaultPatchParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, vaultName: string, parameters: models.VaultPatchParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, vaultName: string, parameters: models.VaultPatchParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Deletes the specified Azure key vault. * @@ -295,6 +468,90 @@ export interface Vaults { get(resourceGroupName: string, vaultName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Update access policies in a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {string} operationKind Name of the operation. Possible values + * include: 'add', 'replace', 'remove' + * + * @param {object} parameters Access policy to merge into the vault + * + * @param {object} parameters.properties Properties of the access policy + * + * @param {array} parameters.properties.accessPolicies An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateAccessPolicyWithHttpOperationResponse(resourceGroupName: string, vaultName: string, operationKind: string, parameters: models.VaultAccessPolicyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update access policies in a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {string} operationKind Name of the operation. Possible values + * include: 'add', 'replace', 'remove' + * + * @param {object} parameters Access policy to merge into the vault + * + * @param {object} parameters.properties Properties of the access policy + * + * @param {array} parameters.properties.accessPolicies An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VaultAccessPolicyParameters} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VaultAccessPolicyParameters} [result] - The deserialized result object if an error did not occur. + * See {@link VaultAccessPolicyParameters} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateAccessPolicy(resourceGroupName: string, vaultName: string, operationKind: string, parameters: models.VaultAccessPolicyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateAccessPolicy(resourceGroupName: string, vaultName: string, operationKind: string, parameters: models.VaultAccessPolicyParameters, callback: ServiceCallback): void; + updateAccessPolicy(resourceGroupName: string, vaultName: string, operationKind: string, parameters: models.VaultAccessPolicyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * The List operation gets information about the vaults associated with the * subscription and within the specified resource group. @@ -358,6 +615,63 @@ export interface Vaults { listByResourceGroup(resourceGroupName: string, options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.top] Maximum number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.top] Maximum number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VaultListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VaultListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VaultListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets information about the deleted vaults in a subscription. * @@ -586,6 +900,66 @@ export interface Vaults { list(options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Checks that the vault name is valid and is not already in use. + * + * @param {object} vaultName The name of the vault. + * + * @param {string} vaultName.name The vault name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + checkNameAvailabilityWithHttpOperationResponse(vaultName: models.VaultCheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Checks that the vault name is valid and is not already in use. + * + * @param {object} vaultName The name of the vault. + * + * @param {string} vaultName.name The vault name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {CheckNameAvailabilityResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {CheckNameAvailabilityResult} [result] - The deserialized result object if an error did not occur. + * See {@link CheckNameAvailabilityResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + checkNameAvailability(vaultName: models.VaultCheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + checkNameAvailability(vaultName: models.VaultCheckNameAvailabilityParameters, callback: ServiceCallback): void; + checkNameAvailability(vaultName: models.VaultCheckNameAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Permanently deletes the specified vault. aka Purges the deleted Azure key * vault. @@ -705,6 +1079,65 @@ export interface Vaults { listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VaultListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VaultListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VaultListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets information about the deleted vaults in a subscription. * @@ -821,3 +1254,120 @@ export interface Vaults { listNext(nextPageLink: string, callback: ServiceCallback): void; listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the KeyVaultManagementClient. + */ +export interface Operations { + + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/keyVaultManagement/lib/operations/index.js b/lib/services/keyVaultManagement/lib/operations/index.js index 63640a1f27..d279f112bb 100755 --- a/lib/services/keyVaultManagement/lib/operations/index.js +++ b/lib/services/keyVaultManagement/lib/operations/index.js @@ -15,3 +15,4 @@ 'use strict'; exports.Vaults = require('./vaults'); +exports.Operations = require('./operations'); diff --git a/lib/services/keyVaultManagement/lib/operations/operations.js b/lib/services/keyVaultManagement/lib/operations/operations.js new file mode 100644 index 0000000000..dd417b2efa --- /dev/null +++ b/lib/services/keyVaultManagement/lib/operations/operations.js @@ -0,0 +1,449 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Lists all of the available Key Vault Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.KeyVault/operations'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all of the available Key Vault Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Operations. */ +class Operations { + /** + * Create a Operations. + * @param {KeyVaultManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listNext = _listNext; + } + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available Key Vault Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Operations; diff --git a/lib/services/keyVaultManagement/lib/operations/vaults.js b/lib/services/keyVaultManagement/lib/operations/vaults.js index f89d9f468f..897a628092 100755 --- a/lib/services/keyVaultManagement/lib/operations/vaults.js +++ b/lib/services/keyVaultManagement/lib/operations/vaults.js @@ -60,14 +60,25 @@ const WebResource = msRest.WebResource; * Property to specify whether Azure Resource Manager is permitted to retrieve * secrets from the key vault. * - * @param {boolean} [parameters.properties.enableSoftDelete] Property to - * specify whether the 'soft delete' functionality is enabled for this key - * vault. It does not accept false value. + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion is enabled for this key vault. + * Setting this property to true activates the soft delete feature, whereby + * vaults or vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. * * @param {string} [parameters.properties.createMode] The vault's create mode * to indicate whether the vault need to be recovered or not. Possible values * include: 'recover', 'default' * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault. + * Setting this property to true activates protection against purge for this + * vault and its content - only the Key Vault service may initiate a hard, + * irrecoverable deletion. The setting is effective only if soft delete is also + * enabled. Enabling this functionality is irreversible - that is, the property + * does not accept false as its value. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -183,7 +194,7 @@ function _createOrUpdate(resourceGroupName, vaultName, parameters, options, call return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -212,7 +223,7 @@ function _createOrUpdate(resourceGroupName, vaultName, parameters, options, call let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -229,7 +240,7 @@ function _createOrUpdate(resourceGroupName, vaultName, parameters, options, call } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -251,12 +262,57 @@ function _createOrUpdate(resourceGroupName, vaultName, parameters, options, call } /** - * Deletes the specified Azure key vault. + * Update a key vault in the specified subscription. * * @param {string} resourceGroupName The name of the Resource Group to which - * the vault belongs. + * the server belongs. * - * @param {string} vaultName The name of the vault to delete + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to patch the vault + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} [parameters.properties] Properties of the vault + * + * @param {uuid} [parameters.properties.tenantId] The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} [parameters.properties.sku] SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion ('soft' delete) is enabled for this + * key vault. The property may not be set to false. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault; it is + * only effective if soft delete is also enabled. Once activated, the property + * may no longer be reset to false. * * @param {object} [options] Optional Parameters. * @@ -269,13 +325,14 @@ function _createOrUpdate(resourceGroupName, vaultName, parameters, options, call * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Vault} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, vaultName, options, callback) { +function _update(resourceGroupName, vaultName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -285,6 +342,10 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + if (parameters === null || parameters === undefined) + { + parameters = {}; + } // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -293,9 +354,18 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { throw new Error('vaultName cannot be null or undefined and it must be of type string.'); } + if (vaultName !== null && vaultName !== undefined) { + if (vaultName.match(/^[a-zA-Z0-9-]{3,24}$/) === null) + { + throw new Error('"vaultName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9-]{3,24}$/'); + } + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -320,7 +390,7 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -338,14 +408,28 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['VaultPatchParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -373,18 +457,52 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Vault']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Vault']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } return callback(null, result, httpRequest, response); }); } /** - * Gets the specified Azure key vault. + * Deletes the specified Azure key vault. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {string} vaultName The name of the vault. + * @param {string} vaultName The name of the vault to delete * * @param {object} [options] Optional Parameters. * @@ -397,14 +515,13 @@ function _deleteMethod(resourceGroupName, vaultName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Vault} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, vaultName, options, callback) { +function _deleteMethod(resourceGroupName, vaultName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -449,7 +566,7 @@ function _get(resourceGroupName, vaultName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -502,38 +619,20 @@ function _get(resourceGroupName, vaultName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Vault']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * The List operation gets information about the vaults associated with the - * subscription and within the specified resource group. + * Gets the specified Azure key vault. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {object} [options] Optional Parameters. + * @param {string} vaultName The name of the vault. * - * @param {number} [options.top] Maximum number of results to return. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -545,13 +644,13 @@ function _get(resourceGroupName, vaultName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VaultListResult} for more information. + * See {@link Vault} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _get(resourceGroupName, vaultName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -561,14 +660,13 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (top !== null && top !== undefined && typeof top !== 'number') { - throw new Error('top must be of type number.'); + if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { + throw new Error('vaultName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); @@ -585,13 +683,11 @@ function _listByResourceGroup(resourceGroupName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (top !== null && top !== undefined) { - queryParameters.push('$top=' + encodeURIComponent(top.toString())); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -659,7 +755,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VaultListResult']().mapper(); + let resultMapper = new client.models['Vault']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -675,7 +771,23 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } /** - * Gets information about the deleted vaults in a subscription. + * Update access policies in a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {string} operationKind Name of the operation. Possible values + * include: 'add', 'replace', 'remove' + * + * @param {object} parameters Access policy to merge into the vault + * + * @param {object} parameters.properties Properties of the access policy + * + * @param {array} parameters.properties.accessPolicies An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. * * @param {object} [options] Optional Parameters. * @@ -689,14 +801,14 @@ function _listByResourceGroup(resourceGroupName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedVaultListResult} for more + * See {@link VaultAccessPolicyParameters} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listDeleted(options, callback) { +function _updateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -708,9 +820,32 @@ function _listDeleted(options, callback) { } // Validate try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { + throw new Error('vaultName cannot be null or undefined and it must be of type string.'); + } + if (vaultName !== null && vaultName !== undefined) { + if (vaultName.match(/^[a-zA-Z0-9-]{3,24}$/) === null) + { + throw new Error('"vaultName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9-]{3,24}$/'); + } + } + if (operationKind) { + let allowedValues = [ 'add', 'replace', 'remove' ]; + if (!allowedValues.some( function(item) { return item === operationKind; })) { + throw new Error(operationKind + ' is not a valid value. The valid values are: ' + allowedValues); + } + } else { + throw new Error('operationKind cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -723,7 +858,10 @@ function _listDeleted(options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); + requestUrl = requestUrl.replace('{operationKind}', encodeURIComponent(operationKind)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -733,7 +871,7 @@ function _listDeleted(options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -751,14 +889,28 @@ function _listDeleted(options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['VaultAccessPolicyParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -793,7 +945,7 @@ function _listDeleted(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedVaultListResult']().mapper(); + let resultMapper = new client.models['VaultAccessPolicyParameters']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -803,20 +955,39 @@ function _listDeleted(options, callback) { return callback(deserializationError); } } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VaultAccessPolicyParameters']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } return callback(null, result, httpRequest, response); }); } /** - * Gets the deleted Azure key vault. - * - * @param {string} vaultName The name of the vault. + * The List operation gets information about the vaults associated with the + * subscription and within the specified resource group. * - * @param {string} location The location of the deleted vault. + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] Maximum number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -827,13 +998,13 @@ function _listDeleted(options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedVault} for more information. + * See {@link VaultListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDeleted(vaultName, location, options, callback) { +function _listByResourceGroup(resourceGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -843,13 +1014,14 @@ function _getDeleted(vaultName, location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { - if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { - throw new Error('vaultName cannot be null or undefined and it must be of type string.'); - } - if (location === null || location === undefined || typeof location.valueOf() !== 'string') { - throw new Error('location cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); @@ -866,11 +1038,13 @@ function _getDeleted(vaultName, location, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}'; - requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); - requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -938,7 +1112,7 @@ function _getDeleted(vaultName, location, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedVault']().mapper(); + let resultMapper = new client.models['VaultListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -953,70 +1127,6 @@ function _getDeleted(vaultName, location, options, callback) { }); } - -/** - * Permanently deletes the specified vault. aka Purges the deleted Azure key - * vault. - * - * @param {string} vaultName The name of the soft-deleted vault. - * - * @param {string} location The location of the soft-deleted vault. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _purgeDeleted(vaultName, location, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - - if (!callback) { - throw new Error('callback cannot be null.'); - } - - // Send request - this.beginPurgeDeleted(vaultName, location, options, (err, parsedResult, httpRequest, response) => { - if (err) return callback(err); - - let initialResult = new msRest.HttpOperationResponse(); - initialResult.request = httpRequest; - initialResult.response = response; - initialResult.body = response.body; - client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { - if (err) return callback(err); - - // Create Result - let result = null; - - httpRequest = pollingResult.request; - response = pollingResult.response; - let responseBody = pollingResult.body; - if (responseBody === '') responseBody = null; - - // Deserialize Response - - return callback(null, result, httpRequest, response); - }); - }); -} - /** * The List operation gets information about the vaults associated with the * subscription. @@ -1035,13 +1145,13 @@ function _purgeDeleted(vaultName, location, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResourceListResult} for more information. + * See {@link VaultListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _listBySubscription(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1052,13 +1162,14 @@ function _list(options, callback) { throw new Error('callback cannot be null.'); } let top = (options && options.top !== undefined) ? options.top : undefined; - let filter = 'resourceType eq \'Microsoft.KeyVault/vaults\''; - let apiVersion = '2015-11-01'; // Validate try { if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1071,14 +1182,13 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resources'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('$filter=' + encodeURIComponent(filter)); if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1145,7 +1255,7 @@ function _list(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResourceListResult']().mapper(); + let resultMapper = new client.models['VaultListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1161,12 +1271,7 @@ function _list(options, callback) { } /** - * Permanently deletes the specified vault. aka Purges the deleted Azure key - * vault. - * - * @param {string} vaultName The name of the soft-deleted vault. - * - * @param {string} location The location of the soft-deleted vault. + * Gets information about the deleted vaults in a subscription. * * @param {object} [options] Optional Parameters. * @@ -1179,13 +1284,15 @@ function _list(options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedVaultListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginPurgeDeleted(vaultName, location, options, callback) { +function _listDeleted(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1197,12 +1304,6 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { } // Validate try { - if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { - throw new Error('vaultName cannot be null or undefined and it must be of type string.'); - } - if (location === null || location === undefined || typeof location.valueOf() !== 'string') { - throw new Error('location cannot be null or undefined and it must be of type string.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -1218,9 +1319,7 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'; - requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); - requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1230,7 +1329,7 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1255,7 +1354,7 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1283,17 +1382,34 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedVaultListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * The List operation gets information about the vaults associated with the - * subscription and within the specified resource group. + * Gets the deleted Azure key vault. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} vaultName The name of the vault. + * + * @param {string} location The location of the deleted vault. * * @param {object} [options] Optional Parameters. * @@ -1307,13 +1423,13 @@ function _beginPurgeDeleted(vaultName, location, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VaultListResult} for more information. + * See {@link DeletedVault} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroupNext(nextPageLink, options, callback) { +function _getDeleted(vaultName, location, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1325,8 +1441,17 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { + throw new Error('vaultName cannot be null or undefined and it must be of type string.'); + } + if (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1336,8 +1461,16 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}'; + requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1401,7 +1534,7 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VaultListResult']().mapper(); + let resultMapper = new client.models['DeletedVault']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1416,14 +1549,78 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { }); } + /** - * Gets information about the deleted vaults in a subscription. + * Permanently deletes the specified vault. aka Purges the deleted Azure key + * vault. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} vaultName The name of the soft-deleted vault. + * + * @param {string} location The location of the soft-deleted vault. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _purgeDeleted(vaultName, location, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginPurgeDeleted(vaultName, location, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * The List operation gets information about the vaults associated with the + * subscription. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] Maximum number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1434,14 +1631,13 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeletedVaultListResult} for more - * information. + * See {@link ResourceListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listDeletedNext(nextPageLink, options, callback) { +function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1451,10 +1647,16 @@ function _listDeletedNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let top = (options && options.top !== undefined) ? options.top : undefined; + let filter = 'resourceType eq \'Microsoft.KeyVault/vaults\''; + let apiVersion = '2015-11-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1464,8 +1666,18 @@ function _listDeletedNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resources'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('$filter=' + encodeURIComponent(filter)); + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1529,7 +1741,7 @@ function _listDeletedNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DeletedVaultListResult']().mapper(); + let resultMapper = new client.models['ResourceListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1545,11 +1757,11 @@ function _listDeletedNext(nextPageLink, options, callback) { } /** - * The List operation gets information about the vaults associated with the - * subscription. + * Checks that the vault name is valid and is not already in use. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} vaultName The name of the vault. + * + * @param {string} vaultName.name The vault name. * * @param {object} [options] Optional Parameters. * @@ -1563,13 +1775,14 @@ function _listDeletedNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResourceListResult} for more information. + * See {@link CheckNameAvailabilityResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listNext(nextPageLink, options, callback) { +function _checkNameAvailability(vaultName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1579,10 +1792,20 @@ function _listNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + if (vaultName === null || vaultName === undefined) + { + vaultName = {}; + } // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (vaultName === null || vaultName === undefined) { + throw new Error('vaultName cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1592,12 +1815,18 @@ function _listNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1615,7 +1844,21 @@ function _listNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (vaultName !== null && vaultName !== undefined) { + let requestModelMapper = new client.models['VaultCheckNameAvailabilityParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, vaultName, 'vaultName'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(vaultName, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1657,7 +1900,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ResourceListResult']().mapper(); + let resultMapper = new client.models['CheckNameAvailabilityResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1672,143 +1915,983 @@ function _listNext(nextPageLink, options, callback) { }); } -/** Class representing a Vaults. */ -class Vaults { - /** - * Create a Vaults. - * @param {KeyVaultManagementClient} client Reference to the service client. - */ - constructor(client) { - this.client = client; - this._createOrUpdate = _createOrUpdate; - this._deleteMethod = _deleteMethod; - this._get = _get; - this._listByResourceGroup = _listByResourceGroup; - this._listDeleted = _listDeleted; - this._getDeleted = _getDeleted; - this._purgeDeleted = _purgeDeleted; - this._list = _list; - this._beginPurgeDeleted = _beginPurgeDeleted; - this._listByResourceGroupNext = _listByResourceGroupNext; - this._listDeletedNext = _listDeletedNext; - this._listNext = _listNext; +/** + * Permanently deletes the specified vault. aka Purges the deleted Azure key + * vault. + * + * @param {string} vaultName The name of the soft-deleted vault. + * + * @param {string} location The location of the soft-deleted vault. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginPurgeDeleted(vaultName, location, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (vaultName === null || vaultName === undefined || typeof vaultName.valueOf() !== 'string') { + throw new Error('vaultName cannot be null or undefined and it must be of type string.'); + } + if (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); } - /** - * Create or update a key vault in the specified subscription. - * - * @param {string} resourceGroupName The name of the Resource Group to which - * the server belongs. - * - * @param {string} vaultName Name of the vault - * - * @param {object} parameters Parameters to create or update the vault - * - * @param {string} parameters.location The supported Azure location where the - * key vault should be created. - * - * @param {object} [parameters.tags] The tags that will be assigned to the key - * vault. - * - * @param {object} parameters.properties Properties of the vault - * - * @param {uuid} parameters.properties.tenantId The Azure Active Directory - * tenant ID that should be used for authenticating requests to the key vault. - * - * @param {object} parameters.properties.sku SKU details - * - * @param {string} parameters.properties.sku.name SKU name to specify whether - * the key vault is a standard vault or a premium vault. Possible values - * include: 'standard', 'premium' - * - * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 - * identities that have access to the key vault. All identities in the array - * must use the same tenant ID as the key vault's tenant ID. - * - * @param {string} [parameters.properties.vaultUri] The URI of the vault for - * performing operations on keys and secrets. - * - * @param {boolean} [parameters.properties.enabledForDeployment] Property to - * specify whether Azure Virtual Machines are permitted to retrieve - * certificates stored as secrets from the key vault. - * - * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property - * to specify whether Azure Disk Encryption is permitted to retrieve secrets - * from the vault and unwrap keys. - * - * @param {boolean} [parameters.properties.enabledForTemplateDeployment] - * Property to specify whether Azure Resource Manager is permitted to retrieve - * secrets from the key vault. - * - * @param {boolean} [parameters.properties.enableSoftDelete] Property to - * specify whether the 'soft delete' functionality is enabled for this key - * vault. It does not accept false value. - * - * @param {string} [parameters.properties.createMode] The vault's create mode - * to indicate whether the vault need to be recovered or not. Possible values - * include: 'recover', 'default' - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, vaultName, parameters, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'; + requestUrl = requestUrl.replace('{vaultName}', encodeURIComponent(vaultName)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); } - /** - * Create or update a key vault in the specified subscription. - * - * @param {string} resourceGroupName The name of the Resource Group to which - * the server belongs. - * - * @param {string} vaultName Name of the vault - * - * @param {object} parameters Parameters to create or update the vault - * - * @param {string} parameters.location The supported Azure location where the - * key vault should be created. - * - * @param {object} [parameters.tags] The tags that will be assigned to the key - * vault. - * - * @param {object} parameters.properties Properties of the vault - * - * @param {uuid} parameters.properties.tenantId The Azure Active Directory - * tenant ID that should be used for authenticating requests to the key vault. - * - * @param {object} parameters.properties.sku SKU details - * - * @param {string} parameters.properties.sku.name SKU name to specify whether - * the key vault is a standard vault or a premium vault. Possible values - * include: 'standard', 'premium' - * - * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 - * identities that have access to the key vault. All identities in the array - * must use the same tenant ID as the key vault's tenant ID. - * - * @param {string} [parameters.properties.vaultUri] The URI of the vault for - * performing operations on keys and secrets. - * - * @param {boolean} [parameters.properties.enabledForDeployment] Property to - * specify whether Azure Virtual Machines are permitted to retrieve + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * The List operation gets information about the vaults associated with the + * subscription and within the specified resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VaultListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VaultListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VaultListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VaultListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets information about the deleted vaults in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeletedVaultListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listDeletedNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DeletedVaultListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Vaults. */ +class Vaults { + /** + * Create a Vaults. + * @param {KeyVaultManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._update = _update; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._updateAccessPolicy = _updateAccessPolicy; + this._listByResourceGroup = _listByResourceGroup; + this._listBySubscription = _listBySubscription; + this._listDeleted = _listDeleted; + this._getDeleted = _getDeleted; + this._purgeDeleted = _purgeDeleted; + this._list = _list; + this._checkNameAvailability = _checkNameAvailability; + this._beginPurgeDeleted = _beginPurgeDeleted; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySubscriptionNext = _listBySubscriptionNext; + this._listDeletedNext = _listDeletedNext; + this._listNext = _listNext; + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to create or update the vault + * + * @param {string} parameters.location The supported Azure location where the + * key vault should be created. + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} parameters.properties Properties of the vault + * + * @param {uuid} parameters.properties.tenantId The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} parameters.properties.sku SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {string} [parameters.properties.vaultUri] The URI of the vault for + * performing operations on keys and secrets. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion is enabled for this key vault. + * Setting this property to true activates the soft delete feature, whereby + * vaults or vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault. + * Setting this property to true activates protection against purge for this + * vault and its content - only the Key Vault service may initiate a hard, + * irrecoverable deletion. The setting is effective only if soft delete is also + * enabled. Enabling this functionality is irreversible - that is, the property + * does not accept false as its value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, vaultName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to create or update the vault + * + * @param {string} parameters.location The supported Azure location where the + * key vault should be created. + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} parameters.properties Properties of the vault + * + * @param {uuid} parameters.properties.tenantId The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} parameters.properties.sku SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {string} [parameters.properties.vaultUri] The URI of the vault for + * performing operations on keys and secrets. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion is enabled for this key vault. + * Setting this property to true activates the soft delete feature, whereby + * vaults or vault entities can be recovered after deletion. Enabling this + * functionality is irreversible - that is, the property does not accept false + * as its value. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault. + * Setting this property to true activates protection against purge for this + * vault and its content - only the Key Vault service may initiate a hard, + * irrecoverable deletion. The setting is effective only if soft delete is also + * enabled. Enabling this functionality is irreversible - that is, the property + * does not accept false as its value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Vault} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Vault} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, vaultName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, vaultName, parameters, options, optionalCallback); + } + } + + /** + * Update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to patch the vault + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} [parameters.properties] Properties of the vault + * + * @param {uuid} [parameters.properties.tenantId] The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} [parameters.properties.sku] SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve + * certificates stored as secrets from the key vault. + * + * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property + * to specify whether Azure Disk Encryption is permitted to retrieve secrets + * from the vault and unwrap keys. + * + * @param {boolean} [parameters.properties.enabledForTemplateDeployment] + * Property to specify whether Azure Resource Manager is permitted to retrieve + * secrets from the key vault. + * + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion ('soft' delete) is enabled for this + * key vault. The property may not be set to false. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault; it is + * only effective if soft delete is also enabled. Once activated, the property + * may no longer be reset to false. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, vaultName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Update a key vault in the specified subscription. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the server belongs. + * + * @param {string} vaultName Name of the vault + * + * @param {object} parameters Parameters to patch the vault + * + * @param {object} [parameters.tags] The tags that will be assigned to the key + * vault. + * + * @param {object} [parameters.properties] Properties of the vault + * + * @param {uuid} [parameters.properties.tenantId] The Azure Active Directory + * tenant ID that should be used for authenticating requests to the key vault. + * + * @param {object} [parameters.properties.sku] SKU details + * + * @param {string} parameters.properties.sku.name SKU name to specify whether + * the key vault is a standard vault or a premium vault. Possible values + * include: 'standard', 'premium' + * + * @param {array} [parameters.properties.accessPolicies] An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + * + * @param {boolean} [parameters.properties.enabledForDeployment] Property to + * specify whether Azure Virtual Machines are permitted to retrieve * certificates stored as secrets from the key vault. * * @param {boolean} [parameters.properties.enabledForDiskEncryption] Property @@ -1819,13 +2902,193 @@ class Vaults { * Property to specify whether Azure Resource Manager is permitted to retrieve * secrets from the key vault. * - * @param {boolean} [parameters.properties.enableSoftDelete] Property to - * specify whether the 'soft delete' functionality is enabled for this key - * vault. It does not accept false value. + * @param {boolean} [parameters.properties.enableSoftDelete] Property + * specifying whether recoverable deletion ('soft' delete) is enabled for this + * key vault. The property may not be set to false. + * + * @param {string} [parameters.properties.createMode] The vault's create mode + * to indicate whether the vault need to be recovered or not. Possible values + * include: 'recover', 'default' + * + * @param {boolean} [parameters.properties.enablePurgeProtection] Property + * specifying whether protection against purge is enabled for this vault; it is + * only effective if soft delete is also enabled. Once activated, the property + * may no longer be reset to false. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Vault} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Vault} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, vaultName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, vaultName, parameters, options, optionalCallback); + } + } + + /** + * Deletes the specified Azure key vault. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName The name of the vault to delete + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, vaultName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, vaultName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified Azure key vault. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName The name of the vault to delete + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, vaultName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, vaultName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, vaultName, options, optionalCallback); + } + } + + /** + * Gets the specified Azure key vault. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. + * + * @param {string} vaultName The name of the vault. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, vaultName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, vaultName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the specified Azure key vault. + * + * @param {string} resourceGroupName The name of the Resource Group to which + * the vault belongs. * - * @param {string} [parameters.properties.createMode] The vault's create mode - * to indicate whether the vault need to be recovered or not. Possible values - * include: 'recover', 'default' + * @param {string} vaultName The name of the vault. * * @param {object} [options] Optional Parameters. * @@ -1854,7 +3117,7 @@ class Vaults { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, vaultName, parameters, options, optionalCallback) { + get(resourceGroupName, vaultName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1863,24 +3126,35 @@ class Vaults { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, vaultName, parameters, options, (err, result, request, response) => { + self._get(resourceGroupName, vaultName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, vaultName, parameters, options, optionalCallback); + return self._get(resourceGroupName, vaultName, options, optionalCallback); } } /** - * Deletes the specified Azure key vault. + * Update access policies in a key vault in the specified subscription. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {string} vaultName The name of the vault to delete + * @param {string} vaultName Name of the vault + * + * @param {string} operationKind Name of the operation. Possible values + * include: 'add', 'replace', 'remove' + * + * @param {object} parameters Access policy to merge into the vault + * + * @param {object} parameters.properties Properties of the access policy + * + * @param {array} parameters.properties.accessPolicies An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. * * @param {object} [options] Optional Parameters. * @@ -1889,15 +3163,15 @@ class Vaults { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, vaultName, options) { + updateAccessPolicyWithHttpOperationResponse(resourceGroupName, vaultName, operationKind, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, vaultName, options, (err, result, request, response) => { + self._updateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1908,12 +3182,23 @@ class Vaults { } /** - * Deletes the specified Azure key vault. + * Update access policies in a key vault in the specified subscription. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {string} vaultName The name of the vault to delete + * @param {string} vaultName Name of the vault + * + * @param {string} operationKind Name of the operation. Possible values + * include: 'add', 'replace', 'remove' + * + * @param {object} parameters Access policy to merge into the vault + * + * @param {object} parameters.properties Properties of the access policy + * + * @param {array} parameters.properties.accessPolicies An array of 0 to 16 + * identities that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. * * @param {object} [options] Optional Parameters. * @@ -1927,7 +3212,7 @@ class Vaults { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {VaultAccessPolicyParameters} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1935,13 +3220,15 @@ class Vaults { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VaultAccessPolicyParameters} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, vaultName, options, optionalCallback) { + updateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1950,41 +3237,42 @@ class Vaults { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, vaultName, options, (err, result, request, response) => { + self._updateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, vaultName, options, optionalCallback); + return self._updateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, options, optionalCallback); } } /** - * Gets the specified Azure key vault. + * The List operation gets information about the vaults associated with the + * subscription and within the specified resource group. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {string} vaultName The name of the vault. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] Maximum number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, vaultName, options) { + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, vaultName, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1995,15 +3283,16 @@ class Vaults { } /** - * Gets the specified Azure key vault. + * The List operation gets information about the vaults associated with the + * subscription and within the specified resource group. * * @param {string} resourceGroupName The name of the Resource Group to which * the vault belongs. * - * @param {string} vaultName The name of the vault. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] Maximum number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2014,7 +3303,7 @@ class Vaults { * * {Promise} A promise is returned * - * @resolve {Vault} - The deserialized result object. + * @resolve {VaultListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2023,13 +3312,13 @@ class Vaults { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Vault} for more information. + * See {@link VaultListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, vaultName, options, optionalCallback) { + listByResourceGroup(resourceGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2038,23 +3327,20 @@ class Vaults { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, vaultName, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, vaultName, options, optionalCallback); + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); } } /** * The List operation gets information about the vaults associated with the - * subscription and within the specified resource group. - * - * @param {string} resourceGroupName The name of the Resource Group to which - * the vault belongs. + * subscription. * * @param {object} [options] Optional Parameters. * @@ -2069,11 +3355,11 @@ class Vaults { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listBySubscriptionWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listBySubscription(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2085,10 +3371,7 @@ class Vaults { /** * The List operation gets information about the vaults associated with the - * subscription and within the specified resource group. - * - * @param {string} resourceGroupName The name of the Resource Group to which - * the vault belongs. + * subscription. * * @param {object} [options] Optional Parameters. * @@ -2119,7 +3402,7 @@ class Vaults { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listBySubscription(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2128,14 +3411,14 @@ class Vaults { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listBySubscription(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listBySubscription(options, optionalCallback); } } @@ -2475,6 +3758,93 @@ class Vaults { } } + /** + * Checks that the vault name is valid and is not already in use. + * + * @param {object} vaultName The name of the vault. + * + * @param {string} vaultName.name The vault name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + checkNameAvailabilityWithHttpOperationResponse(vaultName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._checkNameAvailability(vaultName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Checks that the vault name is valid and is not already in use. + * + * @param {object} vaultName The name of the vault. + * + * @param {string} vaultName.name The vault name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {CheckNameAvailabilityResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link CheckNameAvailabilityResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + checkNameAvailability(vaultName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._checkNameAvailability(vaultName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._checkNameAvailability(vaultName, options, optionalCallback); + } + } + /** * Permanently deletes the specified vault. aka Purges the deleted Azure key * vault. @@ -2648,6 +4018,92 @@ class Vaults { } } + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The List operation gets information about the vaults associated with the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VaultListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VaultListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + /** * Gets information about the deleted vaults in a subscription. * diff --git a/runtime/ms-rest-azure/package-lock.json b/runtime/ms-rest-azure/package-lock.json index b9f311987e..aa96dc67ec 100644 --- a/runtime/ms-rest-azure/package-lock.json +++ b/runtime/ms-rest-azure/package-lock.json @@ -1,6 +1,6 @@ { "name": "ms-rest-azure", - "version": "2.5.1", + "version": "2.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/runtime/ms-rest-azure/package.json b/runtime/ms-rest-azure/package.json index 9f9a05732d..6a6697f875 100644 --- a/runtime/ms-rest-azure/package.json +++ b/runtime/ms-rest-azure/package.json @@ -57,4 +57,4 @@ "jshint": "jshint lib --reporter=jslint", "tsc": "tsc index.d.ts" } -} \ No newline at end of file +} diff --git a/test/recordings/keyVault-certificate-tests.nock.js b/test/recordings/keyVault-certificate-tests.nock.js index 68861e10df..dc502854bc 100644 --- a/test/recordings/keyVault-certificate-tests.nock.js +++ b/test/recordings/keyVault-certificate-tests.nock.js @@ -5,12 +5,12 @@ exports.scopes = [[], var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/nodeCertificate/create?api-version=2016-10-01', '*') +.post('/certificates/nodeCertificate/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending?api-version=2016-10-01&request_id=b3e877f3264441b4be6256ba748d9395', + location: 'https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending?api-version=7.0-preview&request_id=b3e877f3264441b4be6256ba748d9395', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': '64cd0406-3f56-493f-81ed-76764221f9e5', @@ -27,12 +27,12 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/nodeCertificate/create?api-version=2016-10-01', '*') +.post('/certificates/nodeCertificate/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending?api-version=2016-10-01&request_id=b3e877f3264441b4be6256ba748d9395', + location: 'https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending?api-version=7.0-preview&request_id=b3e877f3264441b4be6256ba748d9395', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': '64cd0406-3f56-493f-81ed-76764221f9e5', @@ -48,7 +48,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -68,7 +68,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -88,7 +88,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -108,7 +108,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -128,7 +128,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -148,7 +148,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -168,7 +168,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -188,7 +188,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/pending?api-version=2016-10-01') + .get('/certificates/nodeCertificate/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyU5o1ZruUGp8g+SyZhiTOPMTPejQ2t4DCzFx5/6nh/7umNVKhmFkyW9qqh7BDbWb9fw7Pqd6/pkJ9ekjlpvUeinbQApZE7ejpE72KZCbLtfxXxJi0LLv9nagvK2Yr0xINoSqZOBm+BsWIR/igyOlG8bQnasCB60jwl6dPL32aigZkA4xZUZ7hBdR9lP6bEvurNWE9tk1yK3KEKpxSDZYzJk62Nz2KSh6g1aOUcg4MOZDupOn+k3rvDmAWQBxv6YFyQAaleZbxUj83OpAdka4OITLly4fW79UC4Qykr7MCJGWe4l3Df7LbnwWuMjqSdYjtD9xChEfelm3ewKchlo4MwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALBTR81uPrFcHN7vnkOcdP2L4X3YofdevN1ovBJO3dzg5f43A5zANli75qLoo8WzDYm64+sNW1vBun0fARfj3hEUbBxYgv4pTGhnA5Cy+0qcPqG/rj9nJNvYHry4noGBs6KmCtCqX1VLxskZOa6AffGoz2S7sOvX8U4maxhsXFuVWb9ZjcuOd6OpM1MV2WvFEOic+K8YCD4k0lC1GkhFGO1tcaZTlBzUFXaDzkTfvT5w2r/J1itTjxWBlXQc2PyVwBuzOMjMIt5gibdvAyjM1Xi9K/2R8QIkVzZP9DXakzo1g15MHxvsIfHuHeAwkYJeocmjS/NPZh1LS49Csu2TrYM=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate\",\"request_id\":\"b3e877f3264441b4be6256ba748d9395\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -209,7 +209,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/nodeCertificate/?api-version=2016-10-01', '*') +.patch('/certificates/nodeCertificate/?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -230,7 +230,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/nodeCertificate/?api-version=2016-10-01', '*') +.patch('/certificates/nodeCertificate/?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -250,7 +250,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/?api-version=2016-10-01') + .get('/certificates/nodeCertificate/?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -270,7 +270,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/?api-version=2016-10-01') + .get('/certificates/nodeCertificate/?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -290,7 +290,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451?api-version=2016-10-01') + .get('/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451?api-version=7.0-preview') .reply(200, "{\"value\":\"MIIKRAIBAzCCCgQGCSqGSIb3DQEHAaCCCfUEggnxMIIJ7TCCBhYGCSqGSIb3DQEHAaCCBgcEggYDMIIF/zCCBfsGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAiscUdSdvFqCQICB9AEggTYSzuyfVtwAlb3DflGHPCobVkLyNFjZE0OYRZlBSy8AHaYAuxZLD80RVUYDR4VckBO8Y3Jv4JDuACBDAFDx8e1aeOAb6aPATDfKWgja9uqKzfNQICNO72aXqC36g1xYc9yMv4NuoH7q2Jfxi62U+W75a2wh2rGVLXecPz2yMDL0oUP4bczD6IaosdbKLH41RWWwJei3MoV9HErbi49Ll0h0Eyj55S2IuUJ8liPecIzTKCAZTLTIIU8BmB4BZozX14DoXrD1QUXD+rErxO63I/W+myFC1mtXiUH2INZ6WAKUoEN3o/+z6Siz3KNAdEOGSFNpCwKlPMwNsgNgQOzYKXCNi24hZzegih2P9/Sll3iSW59QdGfhvUY0m3azKb+sEx8xNJVuPdmi0OXQ4VJWYn6vL7/8R7QqJk5Wn68f9CcWdDXQBJ76lOBPajE+qJq4soRkQrZc/7myX74wEeJ4HlSNEYQ8Zg43qCoUSKqqjND6xtwhie3RtQJnygtqpv5gjRCVDnSWH27UjN1zFCVWXPCCwKdgQll9xA5lkgke3pG52e6g3AcLh56KkyEED0kPbogDvLB2CugBMu4qYKkUcryplxO7lZAtaL1YcGlI9xgT2JYLKnaUFwR9uO2pZ2qSgiFXleZ2xb7VJrPjrJmBG3C3PXeXuGoa5eDENlvhpomfT6bHszvQjVuMnFVMokaVZ9MtrKyPVHNSbNLT/x1TmLIcDiP989JzqfIDaROTr4iwz0efrMar1LB5uP45qZElNia9gZjgChM3crlGu76fVt98dzTHrIwkvvJeYLEAh1rdQjZOOVesgHfc5s91x0/p2JNiRaaVJ3C1Nx/6o3aV7e7CcpRJLxiypx0uzA5cub4iXK+6kOIKqlXHXyNVprDjauzTScBB2FEyQpeUYXl33UXNkFeDyE9m+NXUf/spkwuyZ0OMPE8eTzhJs9OhVXbCvrsFaKPm5iYOnVhPYI6yBeMvg3MvWsIq1IUgpSKEdxNen434gGLV3V3/QMmZl4By12iltiHt1x73PnaR/WeEqu6l6lAik7XBDJRDt68YoJBiafPhAi/AO0p/1bZU3hSEu7dvaqbMO36RF9sSQMNRF1RfRg8NzP6Ss0UEZY9ryerinGSX1n0SuptnhYc8yWGhq2vJnXrzBSHB3ml0t4cD7fjspsjUpegKoLWduXQ68KCQEF0Q3xMGzff+0AQcbOKSMsXNDayJKUcY6zq5nq3CFtBc6MRE+D+QNBJd3swlJ8WNAavb+Pdwb9cZEsEy4HX5HaSJncnkwSzX2p9iHmcgDVFf17ya5JNp8HrzcbFrlyQAZRG8rBK8HS6fXPG+h/6iRQaU9jTwGl8G+a3gEw0P3EjVaq10hoqsWa7L3tTq7IGG2MI6mu6cYQCCpqQhten34NVm/8IrDhUamBiFa+KfsYOA1Ql+CkSUJG6TuF+vE5r6xHdUraPToUYqkVBa6f2lhyGCESPds1ppZastpRTc0di8yi3f0lKm4XVRNWoLeZdkLT9FapOzgzIGzbhHN0sarxaDPX3sEFNZGEhdGgJLBphJHj02DKkgGN5FjPLHhg4ITFqkhNhLtP7MJTPYZXi7DNMyOdhIlkyNTjRR7btkOX5Faes/NtAQjQDxDcvtISggdfXCFyWZ2xxozGB6TATBgkqhkiG9w0BCRUxBgQEAQAAADBXBgkqhkiG9w0BCRQxSh5IAGMANAA4ADUAZAA5ADcAOQAtAGYANgA1ADQALQA0AGMAMgA3AC0AYQA0ADUAMAAtADcAOAAxAGEAOQBjADEAZQBkADMAYwBhMHkGCSsGAQQBgjcRATFsHmoATQBpAGMAcgBvAHMAbwBmAHQAIABFAG4AaABhAG4AYwBlAGQAIABSAFMAQQAgAGEAbgBkACAAQQBFAFMAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByMIIDzwYJKoZIhvcNAQcGoIIDwDCCA7wCAQAwggO1BgkqhkiG9w0BBwEwHAYKKoZIhvcNAQwBBjAOBAjD22qgnGK5FgICB9CAggOID2MOVo1r70/3b8lJBgclcB/Vypdtmc9kQVDOrRSs2MqJu4GC4T42y+8PaM4P4Z8vy52JofMn+JxToc6s1rHp50hsacFtcYPSNbRnGtiFCYOruPJ3iReo9UvA9a+rGDjRRYxZGvQuxNQMpcHOAcXeWijmXr4eJsAiEACiJKc1s4UHcWM4Deayp9tmB76fByvuNd0EPqDLJuWri37vaFlIm2HMi4pA3YGvDpZzY0IAY8Sl2+axdseHpX0vNare9VUfPvfFJq1kqK/ufv7Stcx5Kd4c+H/sS7WCafuqA/fDzgPU+kp3ED38EWti3fDK2EAJ7Sc82a7IUAh829Kc6sPQDuXs/FLdjNyh1dtW7psQiefPnrQVlmActSEJCK17BY2bQlUSBY3lDeowBEDBcPzqoRkaEROTf4Neg1US1QTTQSOuBJssWUmCwtuuOaGLLhM6OXwTDyVtwXwVa85hsRnLfkh1rWTQ5hkKD8hxS6EwDpJNIdva2JWie2VzGmDAjtXZQ2W0bw0t3eooWv2l9Nl17uIyiJnz9I2olgIBVS3bzDfDp+5fxBYUI3xHuGO4sgwJcM1PldTC8p0mRgd7uzdb7t1mCeh+GkQtaa1F+4870wbtlU6imgmYtVO364Zz+588YWp0nHrXGlAPf2pigdNsz3zmMtRdnYLEsIck0f5uCvxM0mcsGtQM6wM+k8m8WlesHbw5nPacGoZx2B6M8VD4nL9hg30EUGnSZaU2g4KJTYyl2B0k2UrB4QxC7J21ycTQwrJDC9e4Sw2AwiHIFpWGsBBJ9ZDfBCwb9WIBZuPxrjJTtQYvss44NcTueP3IL32KWalOLit924YxBvxgbNHvCUtiqskeWyso/fTVUFFNfr00P+I1AF5LbM8E2QkVHqxLKiP0xEt5jMbQl25lck0rCextZiS5hqCJd9FzToC5J5OM2tRz6M9gBEiRZ5ogb0iIJ8l6Vr04ulqXOiIFGMLWs9bTq3Yzl2QnqBDv+pIZ5ZAwysypwDvkw50Yvz9Si4Y+Wtu7QlXCMu3hRZYcwgtyjFXnybMMWwEpfYSGyeJuOjYP/7jB1xgXb4iWh5NxMqhE9lCuiXPlMCXgn87HgQ5F3ZXgb4SR1LFJ5RfPbOG18MYWC7YJC43CQF/w17GJUzvi0e9ROG7c57DAi2e5gjFl/546c4yTHL2u+TTVH1RlO0b+OlG5Zj5eIDA3MB8wBwYFKw4DAhoEFMsz3woHyf+OiRD4i87YiAPxBu9pBBQjqoxe3mKTCA+kDn435CSqqfUAKw==\",\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -310,7 +310,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451?api-version=2016-10-01') + .get('/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451?api-version=7.0-preview') .reply(200, "{\"value\":\"MIIKRAIBAzCCCgQGCSqGSIb3DQEHAaCCCfUEggnxMIIJ7TCCBhYGCSqGSIb3DQEHAaCCBgcEggYDMIIF/zCCBfsGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAiscUdSdvFqCQICB9AEggTYSzuyfVtwAlb3DflGHPCobVkLyNFjZE0OYRZlBSy8AHaYAuxZLD80RVUYDR4VckBO8Y3Jv4JDuACBDAFDx8e1aeOAb6aPATDfKWgja9uqKzfNQICNO72aXqC36g1xYc9yMv4NuoH7q2Jfxi62U+W75a2wh2rGVLXecPz2yMDL0oUP4bczD6IaosdbKLH41RWWwJei3MoV9HErbi49Ll0h0Eyj55S2IuUJ8liPecIzTKCAZTLTIIU8BmB4BZozX14DoXrD1QUXD+rErxO63I/W+myFC1mtXiUH2INZ6WAKUoEN3o/+z6Siz3KNAdEOGSFNpCwKlPMwNsgNgQOzYKXCNi24hZzegih2P9/Sll3iSW59QdGfhvUY0m3azKb+sEx8xNJVuPdmi0OXQ4VJWYn6vL7/8R7QqJk5Wn68f9CcWdDXQBJ76lOBPajE+qJq4soRkQrZc/7myX74wEeJ4HlSNEYQ8Zg43qCoUSKqqjND6xtwhie3RtQJnygtqpv5gjRCVDnSWH27UjN1zFCVWXPCCwKdgQll9xA5lkgke3pG52e6g3AcLh56KkyEED0kPbogDvLB2CugBMu4qYKkUcryplxO7lZAtaL1YcGlI9xgT2JYLKnaUFwR9uO2pZ2qSgiFXleZ2xb7VJrPjrJmBG3C3PXeXuGoa5eDENlvhpomfT6bHszvQjVuMnFVMokaVZ9MtrKyPVHNSbNLT/x1TmLIcDiP989JzqfIDaROTr4iwz0efrMar1LB5uP45qZElNia9gZjgChM3crlGu76fVt98dzTHrIwkvvJeYLEAh1rdQjZOOVesgHfc5s91x0/p2JNiRaaVJ3C1Nx/6o3aV7e7CcpRJLxiypx0uzA5cub4iXK+6kOIKqlXHXyNVprDjauzTScBB2FEyQpeUYXl33UXNkFeDyE9m+NXUf/spkwuyZ0OMPE8eTzhJs9OhVXbCvrsFaKPm5iYOnVhPYI6yBeMvg3MvWsIq1IUgpSKEdxNen434gGLV3V3/QMmZl4By12iltiHt1x73PnaR/WeEqu6l6lAik7XBDJRDt68YoJBiafPhAi/AO0p/1bZU3hSEu7dvaqbMO36RF9sSQMNRF1RfRg8NzP6Ss0UEZY9ryerinGSX1n0SuptnhYc8yWGhq2vJnXrzBSHB3ml0t4cD7fjspsjUpegKoLWduXQ68KCQEF0Q3xMGzff+0AQcbOKSMsXNDayJKUcY6zq5nq3CFtBc6MRE+D+QNBJd3swlJ8WNAavb+Pdwb9cZEsEy4HX5HaSJncnkwSzX2p9iHmcgDVFf17ya5JNp8HrzcbFrlyQAZRG8rBK8HS6fXPG+h/6iRQaU9jTwGl8G+a3gEw0P3EjVaq10hoqsWa7L3tTq7IGG2MI6mu6cYQCCpqQhten34NVm/8IrDhUamBiFa+KfsYOA1Ql+CkSUJG6TuF+vE5r6xHdUraPToUYqkVBa6f2lhyGCESPds1ppZastpRTc0di8yi3f0lKm4XVRNWoLeZdkLT9FapOzgzIGzbhHN0sarxaDPX3sEFNZGEhdGgJLBphJHj02DKkgGN5FjPLHhg4ITFqkhNhLtP7MJTPYZXi7DNMyOdhIlkyNTjRR7btkOX5Faes/NtAQjQDxDcvtISggdfXCFyWZ2xxozGB6TATBgkqhkiG9w0BCRUxBgQEAQAAADBXBgkqhkiG9w0BCRQxSh5IAGMANAA4ADUAZAA5ADcAOQAtAGYANgA1ADQALQA0AGMAMgA3AC0AYQA0ADUAMAAtADcAOAAxAGEAOQBjADEAZQBkADMAYwBhMHkGCSsGAQQBgjcRATFsHmoATQBpAGMAcgBvAHMAbwBmAHQAIABFAG4AaABhAG4AYwBlAGQAIABSAFMAQQAgAGEAbgBkACAAQQBFAFMAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByMIIDzwYJKoZIhvcNAQcGoIIDwDCCA7wCAQAwggO1BgkqhkiG9w0BBwEwHAYKKoZIhvcNAQwBBjAOBAjD22qgnGK5FgICB9CAggOID2MOVo1r70/3b8lJBgclcB/Vypdtmc9kQVDOrRSs2MqJu4GC4T42y+8PaM4P4Z8vy52JofMn+JxToc6s1rHp50hsacFtcYPSNbRnGtiFCYOruPJ3iReo9UvA9a+rGDjRRYxZGvQuxNQMpcHOAcXeWijmXr4eJsAiEACiJKc1s4UHcWM4Deayp9tmB76fByvuNd0EPqDLJuWri37vaFlIm2HMi4pA3YGvDpZzY0IAY8Sl2+axdseHpX0vNare9VUfPvfFJq1kqK/ufv7Stcx5Kd4c+H/sS7WCafuqA/fDzgPU+kp3ED38EWti3fDK2EAJ7Sc82a7IUAh829Kc6sPQDuXs/FLdjNyh1dtW7psQiefPnrQVlmActSEJCK17BY2bQlUSBY3lDeowBEDBcPzqoRkaEROTf4Neg1US1QTTQSOuBJssWUmCwtuuOaGLLhM6OXwTDyVtwXwVa85hsRnLfkh1rWTQ5hkKD8hxS6EwDpJNIdva2JWie2VzGmDAjtXZQ2W0bw0t3eooWv2l9Nl17uIyiJnz9I2olgIBVS3bzDfDp+5fxBYUI3xHuGO4sgwJcM1PldTC8p0mRgd7uzdb7t1mCeh+GkQtaa1F+4870wbtlU6imgmYtVO364Zz+588YWp0nHrXGlAPf2pigdNsz3zmMtRdnYLEsIck0f5uCvxM0mcsGtQM6wM+k8m8WlesHbw5nPacGoZx2B6M8VD4nL9hg30EUGnSZaU2g4KJTYyl2B0k2UrB4QxC7J21ycTQwrJDC9e4Sw2AwiHIFpWGsBBJ9ZDfBCwb9WIBZuPxrjJTtQYvss44NcTueP3IL32KWalOLit924YxBvxgbNHvCUtiqskeWyso/fTVUFFNfr00P+I1AF5LbM8E2QkVHqxLKiP0xEt5jMbQl25lck0rCextZiS5hqCJd9FzToC5J5OM2tRz6M9gBEiRZ5ogb0iIJ8l6Vr04ulqXOiIFGMLWs9bTq3Yzl2QnqBDv+pIZ5ZAwysypwDvkw50Yvz9Si4Y+Wtu7QlXCMu3hRZYcwgtyjFXnybMMWwEpfYSGyeJuOjYP/7jB1xgXb4iWh5NxMqhE9lCuiXPlMCXgn87HgQ5F3ZXgb4SR1LFJ5RfPbOG18MYWC7YJC43CQF/w17GJUzvi0e9ROG7c57DAi2e5gjFl/546c4yTHL2u+TTVH1RlO0b+OlG5Zj5eIDA3MB8wBwYFKw4DAhoEFMsz3woHyf+OiRD4i87YiAPxBu9pBBQjqoxe3mKTCA+kDn435CSqqfUAKw==\",\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -330,7 +330,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/certificates/nodeCertificate?api-version=2016-10-01') + .delete('/certificates/nodeCertificate?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -350,7 +350,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/certificates/nodeCertificate?api-version=2016-10-01') + .delete('/certificates/nodeCertificate?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeCertificate/0f93d1b124164208a0052651efaaf451\",\"x5t\":\"7Qg3O1SKToJbhvqI9p_P0Rp_bP0\",\"cer\":\"MIIDOjCCAiKgAwIBAgIQFdoXMRE5T0aJp6Uz7hlnjTANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wHhcNMTYxMTE3MDAzNjI0WhcNMTgxMTE3MDA0NjI0WjAaMRgwFgYDVQQDDA8qLm1pY3Jvc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJTmjVmu5QanyD5LJmGJM48xM96NDa3gMLMXHn/qeH/u6Y1UqGYWTJb2qqHsENtZv1/Ds+p3r+mQn16SOWm9R6KdtAClkTt6OkTvYpkJsu1/FfEmLQsu/2dqC8rZivTEg2hKpk4Gb4GxYhH+KDI6UbxtCdqwIHrSPCXp08vfZqKBmQDjFlRnuEF1H2U/psS+6s1YT22TXIrcoQqnFINljMmTrY3PYpKHqDVo5RyDgw5kO6k6f6Teu8OYBZAHG/pgXJABqV5lvFSPzc6kB2Rrg4hMuXLh9bv1QLhDKSvswIkZZ7iXcN/stufBa4yOpJ1iO0P3EKER96Wbd7ApyGWjgzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQ7C98zWPQuUcnTskgKltP//DTJETAdBgNVHQ4EFgQUOwvfM1j0LlHJ07JICpbT//w0yREwDQYJKoZIhvcNAQELBQADggEBAAshYxgNnbgvNSyoVbAls1fbf7rNgIIvpFNFRS5mYG2YTR6GybETvVdGtuOVuE/nDvJJW2BBKi867Wod1X124FOblIhhjS9ZudSHbBE2qNo/339QFnkYw5sXfHWiKfyeEdG2u9Y5j/271Hypsq37PBnR/iR5r/h/EeBFehsZsrpVE3ApaXNiQi7e27rav9HEFaCjb+Km45ahNjvAKQCcxPqeJU9bWtOUyTbjuhNRHTV+UpwsRl80MM4A/kFI4Nd1DlatM5peW4v0zu4I4S26qwjcQeA3zJ7hiBy06/EyYBGiXnI5PUdJBnOawOfrPSJ2kckgT8HoFSzy66wk5YHSrj0=\",\"attributes\":{\"enabled\":true,\"nbf\":1479342984,\"exp\":1542415584,\"created\":1479343585,\"updated\":1479343587},\"tags\":{\"tag1\":\"value1\"},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":24,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343565,\"updated\":1479343565}},\"pending\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeCertificate/pending\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -370,7 +370,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/?api-version=2016-10-01') + .get('/certificates/nodeCertificate/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Certificate nodeCertificate not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '90', @@ -390,7 +390,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/nodeCertificate/?api-version=2016-10-01') + .get('/certificates/nodeCertificate/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Certificate nodeCertificate not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '90', @@ -411,7 +411,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/nodeImportCertificate/import?api-version=2016-10-01', '*') +.post('/certificates/nodeImportCertificate/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340291,\"updated\":1479343590}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -432,7 +432,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/nodeImportCertificate/import?api-version=2016-10-01', '*') +.post('/certificates/nodeImportCertificate/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate/9f52f6eeefce4512b72a48743ba0413a\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340291,\"updated\":1479343590}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -453,7 +453,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListCertificate1/import?api-version=2016-10-01', '*') +.post('/certificates/importListCertificate1/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340291,\"updated\":1479343592}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -474,7 +474,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListCertificate1/import?api-version=2016-10-01', '*') +.post('/certificates/importListCertificate1/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1/3110786e59404564a15d6130d418ba6d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340291,\"updated\":1479343592}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -495,7 +495,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListCertificate2/import?api-version=2016-10-01', '*') +.post('/certificates/importListCertificate2/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2/2608950c01ee442e898514431248d561\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2/2608950c01ee442e898514431248d561\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2/2608950c01ee442e898514431248d561\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340293,\"updated\":1479343593}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -516,7 +516,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListCertificate2/import?api-version=2016-10-01', '*') +.post('/certificates/importListCertificate2/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2/2608950c01ee442e898514431248d561\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2/2608950c01ee442e898514431248d561\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2/2608950c01ee442e898514431248d561\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340293,\"updated\":1479343593}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -536,8 +536,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -556,8 +556,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate1\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343592,\"updated\":1479343592}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListCertificate2\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343593,\"updated\":1479343593}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -576,8 +576,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -596,8 +596,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDQhTURBd01ETTBJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTWhNREF3TURJNElUSXdNVFl0TVRFdE1UWlVNak02TVRrNk1qQXVOREl5TXpFME1sb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/nodeImportCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343590,\"updated\":1479343590}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -616,7 +616,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -636,7 +636,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01EUXdJV05sY25ScFptbGpZWFJsTDA1UFJFVkpUVkJQVWxSRFJWSlVTVVpKUTBGVVJTOVFUMHhKUTFraE1EQXdNREk0SVRJd01UWXRNVEV0TVRaVU1qTTZNakk2TVRNdU5UVTNNRE0zTUZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -657,7 +657,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListVersionCerts/import?api-version=2016-10-01', '*') +.post('/certificates/importListVersionCerts/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343596,\"updated\":1479343596},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340296,\"updated\":1479343596}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -678,7 +678,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListVersionCerts/import?api-version=2016-10-01', '*') +.post('/certificates/importListVersionCerts/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343596,\"updated\":1479343596},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340296,\"updated\":1479343596}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -699,7 +699,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListVersionCerts/import?api-version=2016-10-01', '*') +.post('/certificates/importListVersionCerts/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340296,\"updated\":1479343598}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -720,7 +720,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/importListVersionCerts/import?api-version=2016-10-01', '*') +.post('/certificates/importListVersionCerts/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340296,\"updated\":1479343598}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -740,8 +740,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/importListVersionCerts/versions?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/7065a66c9684439b8d7c1c7a6d0a5b2d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340296,\"updated\":1479340296}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/importListVersionCerts/versions?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/importListVersionCerts/versions?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/7065a66c9684439b8d7c1c7a6d0a5b2d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340296,\"updated\":1479340296}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/importListVersionCerts/versions?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -760,8 +760,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/importListVersionCerts/versions?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/7065a66c9684439b8d7c1c7a6d0a5b2d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340296,\"updated\":1479340296}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/importListVersionCerts/versions?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/importListVersionCerts/versions?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/66a00da331b7411b8849973f97f242ce\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343598,\"updated\":1479343598}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/7065a66c9684439b8d7c1c7a6d0a5b2d\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340296,\"updated\":1479340296}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/importListVersionCerts/versions?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -780,7 +780,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/importListVersionCerts/versions?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates/importListVersionCerts/versions?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/c521d1828f0e4012ae134d5219c28826\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343596,\"updated\":1479343596}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -800,7 +800,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/importListVersionCerts/versions?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates/importListVersionCerts/versions?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExNjAhTURBd01EYzJJV05sY25ScFptbGpZWFJsTDBsTlVFOVNWRXhKVTFSV1JWSlRTVTlPUTBWU1ZGTXZWa1ZTVTBsUFRsTXZRVFkwT0RKQ05rVkRRMFl4TkVaQlFVRkNOamszUXpZMk1EYzBNelJEUXpNaE1EQXdNREk0SVRrNU9Ua3RNVEl0TXpGVU1qTTZOVGs2TlRrdU9UazVPVGs1T1ZvaCIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/c521d1828f0e4012ae134d5219c28826\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/importListVersionCerts/e182e57dfb2f47bb845210015c82d2b3\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343596,\"updated\":1479343596}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -821,7 +821,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343600}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -842,7 +842,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343600}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -862,7 +862,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .get('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343600}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -882,7 +882,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .get('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343600}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -903,7 +903,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/issuers/nodeIssuer?api-version=2016-10-01', '*') +.patch('/certificates/issuers/nodeIssuer?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"xboxuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane II\",\"last_name\":\"Doe\",\"email\":\"admin@contoso2.com\",\"phone\":\"1111111111\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -924,7 +924,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/issuers/nodeIssuer?api-version=2016-10-01', '*') +.patch('/certificates/issuers/nodeIssuer?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"xboxuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane II\",\"last_name\":\"Doe\",\"email\":\"admin@contoso2.com\",\"phone\":\"1111111111\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -944,7 +944,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .delete('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"xboxuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane II\",\"last_name\":\"Doe\",\"email\":\"admin@contoso2.com\",\"phone\":\"1111111111\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -964,7 +964,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .delete('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"xboxuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane II\",\"last_name\":\"Doe\",\"email\":\"admin@contoso2.com\",\"phone\":\"1111111111\"}]},\"attributes\":{\"enabled\":true,\"created\":1479343600,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -984,7 +984,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .get('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"CertificateIssuerNotFound\",\"message\":\"Issuer not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '75', @@ -1004,7 +1004,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers/nodeIssuer?api-version=2016-10-01') + .get('/certificates/issuers/nodeIssuer?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"CertificateIssuerNotFound\",\"message\":\"Issuer not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '75', @@ -1025,7 +1025,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer1?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer1?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer1\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1467158231,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1046,7 +1046,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer1?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer1?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer1\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1467158231,\"updated\":1479343602}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1067,7 +1067,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer2?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer2?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer2\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1466812762,\"updated\":1479343603}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1088,7 +1088,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/issuers/nodeIssuer2?api-version=2016-10-01', '*') +.put('/certificates/issuers/nodeIssuer2?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer2\",\"provider\":\"test\",\"credentials\":{\"account_id\":\"keyvaultuser\"},\"org_details\":{\"zip\":0,\"admin_details\":[{\"first_name\":\"Jane\",\"last_name\":\"Doe\",\"email\":\"admin@contoso.com\",\"phone\":\"4256666666\"}]},\"attributes\":{\"enabled\":true,\"created\":1466812762,\"updated\":1479343603}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1108,8 +1108,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPemIssuer01\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPkcs12Issuer01\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/issuers?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPemIssuer01\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPkcs12Issuer01\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -1128,8 +1128,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPemIssuer01\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPkcs12Issuer01\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/issuers?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPemIssuer01\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/createCertificateJavaPkcs12Issuer01\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -1148,8 +1148,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/issuer03\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/myIssuer2\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/issuer03\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/myIssuer2\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -1168,8 +1168,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/issuer03\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/myIssuer2\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJNElXTmxjblJwWm1sallYUmxMMGxUVTFWRlVsTXZTVk5UVlVWU01ETWhNREF3TURJNElUSXdNVFl0TURVdE1UZFVNVGM2TkRBNk16SXVNekEyTnpBMk1Wb2giLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/issuer03\",\"provider\":\"Test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/myIssuer2\",\"provider\":\"Test\"}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -1188,7 +1188,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer1\",\"provider\":\"test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer2\",\"provider\":\"test\"}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1208,7 +1208,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/issuers?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/certificates/issuers?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ETXdJV05sY25ScFptbGpZWFJsTDBsVFUxVkZVbE12VGs5RVJVbFRVMVZGVWlFd01EQXdNamdoTWpBeE5pMHhNUzB4TmxReU16b3hPVG95TWk0ME1qRTBNREUzV2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer1\",\"provider\":\"test\"},{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/issuers/nodeIssuer2\",\"provider\":\"test\"}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1229,12 +1229,12 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/asyncCancelledDeletedCert/create?api-version=2016-10-01', '*') +.post('/certificates/asyncCancelledDeletedCert/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01&request_id=9eb8e2ccbe214b35828ceecbfd33e478', + location: 'https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview&request_id=9eb8e2ccbe214b35828ceecbfd33e478', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': 'f806d132-7f4b-45d9-a737-3f2ba6a3f452', @@ -1251,12 +1251,12 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/asyncCancelledDeletedCert/create?api-version=2016-10-01', '*') +.post('/certificates/asyncCancelledDeletedCert/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01&request_id=9eb8e2ccbe214b35828ceecbfd33e478', + location: 'https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview&request_id=9eb8e2ccbe214b35828ceecbfd33e478', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': 'f806d132-7f4b-45d9-a737-3f2ba6a3f452', @@ -1273,7 +1273,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01', '*') +.patch('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1294,7 +1294,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01', '*') +.patch('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1314,7 +1314,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .get('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1334,7 +1334,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .get('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1354,7 +1354,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .delete('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1374,7 +1374,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .delete('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouxnc+MtLSG3lhJ9ZYOigXX3KlzdZSbUDK/15G0gu3vf586WOGvmFoark7IswJwfxC8ph3zMBE6P56lS5QZ3WPuDvA/B1O6hDxmoOODg7B6AMr+LNfjKxVuFriwZ56KBiRMgiuRJL6V4UbI4Lti7urAi9cOq7Y9x6kU9ErP3JaQVAh/Kloz9RnVScNzkxhX6fNy+uF4Xy/AvjgypcxVv6p+MqrFfWzzQ6DThGVAv4eGqlx6ssDYgZrYQLZ16SLNao+mxNyj/kjduKmtQI8MklAGxnXjclF8UEnO06CIGHRT/XrJCQrnMejJ8mNecQ2VDuaihHcR1rG/bf277rnpUtwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA5bjwInjkZ+zH+/IlMBrkvi8c+e58XeZD9Tg5T3bfWWPsPzp/lKOlvrbnm3ZD52ERDvOHAJl2QKZAzlxg4alLkYZaemlvRukl62OpbRcSVkM0XBDRCBIzyo6HKvRZcXX+Zm/kBiiTYqqC3fZJLO0bDsHU6T8GQsWBoR/6WmV6FIQEhof0UjPwFKatUt8tYNUclBWSOcaW/vmxsrh7J1U+46fSzBE9R6fEAhT65hc9sWim1bSdWgnv+mNcWhgkiAknj4TLaKIIlAZpRxO0NaBowF8HlN/4zbziuBRdCLc8v9lWNFHpxUjuybm7KYzevZxRpilJ9kqwKBfzUG/cPCDfM=\",\"cancellation_requested\":true,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"9eb8e2ccbe214b35828ceecbfd33e478\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1394,7 +1394,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .get('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"PendingCertificateNotFound\",\"message\":\"Pending certificate not found: asyncCancelledDeletedCert\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '116', @@ -1414,7 +1414,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/asyncCancelledDeletedCert/pending?api-version=2016-10-01') + .get('/certificates/asyncCancelledDeletedCert/pending?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"PendingCertificateNotFound\",\"message\":\"Pending certificate not found: asyncCancelledDeletedCert\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '116', @@ -1434,7 +1434,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/certificates/asyncCancelledDeletedCert?api-version=2016-10-01') + .delete('/certificates/asyncCancelledDeletedCert?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/c67f212ffb924fb09787ecd41595ab48\",\"attributes\":{\"enabled\":true,\"nbf\":1479343006,\"exp\":1510879606,\"created\":1479343606,\"updated\":1479343606},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343606,\"updated\":1479343606}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1454,7 +1454,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/certificates/asyncCancelledDeletedCert?api-version=2016-10-01') + .delete('/certificates/asyncCancelledDeletedCert?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/c67f212ffb924fb09787ecd41595ab48\",\"attributes\":{\"enabled\":true,\"nbf\":1479343006,\"exp\":1510879606,\"created\":1479343606,\"updated\":1479343606},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/asyncCancelledDeletedCert/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=*.microsoft.com\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479343606,\"updated\":1479343606}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1475,7 +1475,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/contacts?api-version=2016-10-01', '*') +.put('/certificates/contacts?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1496,7 +1496,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/certificates/contacts?api-version=2016-10-01', '*') +.put('/certificates/contacts?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1516,7 +1516,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/contacts?api-version=2016-10-01') + .get('/certificates/contacts?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1536,7 +1536,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/contacts?api-version=2016-10-01') + .get('/certificates/contacts?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1556,7 +1556,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/certificates/contacts?api-version=2016-10-01') + .delete('/certificates/contacts?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1576,7 +1576,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/certificates/contacts?api-version=2016-10-01') + .delete('/certificates/contacts?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"admin@contoso.com\",\"name\":\"John Doe\",\"phone\":\"1111111111\"},{\"email\":\"admin2@contoso.com\",\"name\":\"John Doe2\",\"phone\":\"2222222222\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1596,7 +1596,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/contacts?api-version=2016-10-01') + .get('/certificates/contacts?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"ContactsNotFound\",\"message\":\"Contacts not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '68', @@ -1616,7 +1616,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/contacts?api-version=2016-10-01') + .get('/certificates/contacts?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"ContactsNotFound\",\"message\":\"Contacts not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '68', @@ -1637,7 +1637,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/policyCertificate/import?api-version=2016-10-01', '*') +.post('/certificates/policyCertificate/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343612,\"updated\":1479343612},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343612}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1658,7 +1658,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/policyCertificate/import?api-version=2016-10-01', '*') +.post('/certificates/policyCertificate/import?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"sid\":\"https://sdktestvault0511.vault.azure.net/secrets/policyCertificate/2f42315672a245e9a0ef1c055b189d21\",\"x5t\":\"fLi3U52HunIVNXubkEnf8tP6Wbo\",\"cer\":\"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479343612,\"updated\":1479343612},\"policy\":{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343612}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1678,7 +1678,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/policyCertificate/policy?api-version=2016-10-01') + .get('/certificates/policyCertificate/policy?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343612}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1698,7 +1698,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/policyCertificate/policy?api-version=2016-10-01') + .get('/certificates/policyCertificate/policy?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Unknown\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343612}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1719,7 +1719,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/policyCertificate/policy?api-version=2016-10-01', '*') +.patch('/certificates/policyCertificate/policy?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343613}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1740,7 +1740,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/certificates/policyCertificate/policy?api-version=2016-10-01', '*') +.patch('/certificates/policyCertificate/policy?api-version=7.0-preview', '*') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343613}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1760,7 +1760,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/policyCertificate/policy?api-version=2016-10-01') + .get('/certificates/policyCertificate/policy?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343613}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1780,7 +1780,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/policyCertificate/policy?api-version=2016-10-01') + .get('/certificates/policyCertificate/policy?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/policyCertificate/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"CN=KeyVaultTest\",\"ekus\":[],\"key_usage\":[],\"validity_months\":297,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"EmailContacts\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1479340309,\"updated\":1479343613}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1801,12 +1801,12 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/UnknownIssuerCert1/create?api-version=2016-10-01', '*') +.post('/certificates/UnknownIssuerCert1/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending\",\"issuer\":{\"name\":\"Unknown\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxkvaI0lwQtH4lmrFT2FANKY/lJbS/6wjk8EDnKmmewOSGFnH1XwvmVqcRhmt8JkeG3NgJ44Rolkl6oFNAkyLl+DSyU5EzJILda60CLfcgpCJTXazBSQDU1Pzfe/lcnOUGBlpQ7cqtDTpBM+LrcZW3Dgrttj2Ssez0bR6mcMipNL2HJd9iAXN7CMzkcLCPXBbxvvl8r9D89eqPbrDYcDrXBropOXNO6rlLa/ZAH/CAPv2WVWAwY0U+DjknolcjMwev/O5/rrB8iakja7EXd68yOIn4kUnRA1dyC8jGN0XRyvnkte2+bT0B7aWbo3d3vi4fHizQi93XGKDEe6LznxcbwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAB1lgCNwHl9AAaB24ji3K++ERx5Zp8Vj/KqF4bLICsVQouR+NGq9oOTtAIQlgXLSR10W8OUS3/0/J9iyNYaCg9wYWghp2+4ZpKvLrfHtyEVFTkYpWKztMiLpViy6tHuo2sCtrLCnwpQ4M34/edMKkiWTlaAV0aUej/dXsjIm2VupIg1WSPloVFnY0IOAq4d/Klcc82/fc9D1tAc/pO8UJf2XvewM3UdnUH7mFs1pHADQmFCz0NVd2C19NejZ0H7ZHeOGvGwVXDcuRryD6s47yvkfRMiUk1RfXBrEeFGc6Q0vXq5hNVHwGmR1UBBqWFkKmtVf+RxNXhtWsSGN/8I+4Lc=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Please Perform Merge to complete the request.\",\"request_id\":\"70492f95e78f43e881be882173b8c7a9\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending?api-version=2016-10-01&request_id=70492f95e78f43e881be882173b8c7a9', + location: 'https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending?api-version=7.0-preview&request_id=70492f95e78f43e881be882173b8c7a9', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': '411bbde9-a320-4016-a62c-0cb9af059403', @@ -1823,12 +1823,12 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates/UnknownIssuerCert1/create?api-version=2016-10-01', '*') +.post('/certificates/UnknownIssuerCert1/create?api-version=7.0-preview', '*') .reply(202, "{\"id\":\"https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending\",\"issuer\":{\"name\":\"Unknown\"},\"csr\":\"MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxkvaI0lwQtH4lmrFT2FANKY/lJbS/6wjk8EDnKmmewOSGFnH1XwvmVqcRhmt8JkeG3NgJ44Rolkl6oFNAkyLl+DSyU5EzJILda60CLfcgpCJTXazBSQDU1Pzfe/lcnOUGBlpQ7cqtDTpBM+LrcZW3Dgrttj2Ssez0bR6mcMipNL2HJd9iAXN7CMzkcLCPXBbxvvl8r9D89eqPbrDYcDrXBropOXNO6rlLa/ZAH/CAPv2WVWAwY0U+DjknolcjMwev/O5/rrB8iakja7EXd68yOIn4kUnRA1dyC8jGN0XRyvnkte2+bT0B7aWbo3d3vi4fHizQi93XGKDEe6LznxcbwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAB1lgCNwHl9AAaB24ji3K++ERx5Zp8Vj/KqF4bLICsVQouR+NGq9oOTtAIQlgXLSR10W8OUS3/0/J9iyNYaCg9wYWghp2+4ZpKvLrfHtyEVFTkYpWKztMiLpViy6tHuo2sCtrLCnwpQ4M34/edMKkiWTlaAV0aUej/dXsjIm2VupIg1WSPloVFnY0IOAq4d/Klcc82/fc9D1tAc/pO8UJf2XvewM3UdnUH7mFs1pHADQmFCz0NVd2C19NejZ0H7ZHeOGvGwVXDcuRryD6s47yvkfRMiUk1RfXBrEeFGc6Q0vXq5hNVHwGmR1UBBqWFkKmtVf+RxNXhtWsSGN/8I+4Lc=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Please Perform Merge to complete the request.\",\"request_id\":\"70492f95e78f43e881be882173b8c7a9\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', - location: 'https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending?api-version=2016-10-01&request_id=70492f95e78f43e881be882173b8c7a9', + location: 'https://sdktestvault0511.vault.azure.net/certificates/UnknownIssuerCert1/pending?api-version=7.0-preview&request_id=70492f95e78f43e881be882173b8c7a9', server: 'Microsoft-IIS/8.5', 'x-ms-keyvault-region': 'East US', 'x-ms-request-id': '411bbde9-a320-4016-a62c-0cb9af059403', @@ -1844,7 +1844,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/certificates/UnknownIssuerCert1/pending?api-version=2016-10-01') + .get('/certificates/UnknownIssuerCert1/pending?api-version=7.0-preview') .reply(200, "MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxkvaI0lwQtH4lmrFT2FANKY/lJbS/6wjk8EDnKmmewOSGFnH1XwvmVqcRhmt8JkeG3NgJ44Rolkl6oFNAkyLl+DSyU5EzJILda60CLfcgpCJTXazBSQDU1Pzfe/lcnOUGBlpQ7cqtDTpBM+LrcZW3Dgrttj2Ssez0bR6mcMipNL2HJd9iAXN7CMzkcLCPXBbxvvl8r9D89eqPbrDYcDrXBropOXNO6rlLa/ZAH/CAPv2WVWAwY0U+DjknolcjMwev/O5/rrB8iakja7EXd68yOIn4kUnRA1dyC8jGN0XRyvnkte2+bT0B7aWbo3d3vi4fHizQi93XGKDEe6LznxcbwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAB1lgCNwHl9AAaB24ji3K++ERx5Zp8Vj/KqF4bLICsVQouR+NGq9oOTtAIQlgXLSR10W8OUS3/0/J9iyNYaCg9wYWghp2+4ZpKvLrfHtyEVFTkYpWKztMiLpViy6tHuo2sCtrLCnwpQ4M34/edMKkiWTlaAV0aUej/dXsjIm2VupIg1WSPloVFnY0IOAq4d/Klcc82/fc9D1tAc/pO8UJf2XvewM3UdnUH7mFs1pHADQmFCz0NVd2C19NejZ0H7ZHeOGvGwVXDcuRryD6s47yvkfRMiUk1RfXBrEeFGc6Q0vXq5hNVHwGmR1UBBqWFkKmtVf+RxNXhtWsSGN/8I+4Lc=", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/pkcs10; charset=utf-8', @@ -1864,7 +1864,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/certificates/UnknownIssuerCert1/pending?api-version=2016-10-01') + .get('/certificates/UnknownIssuerCert1/pending?api-version=7.0-preview') .reply(200, "MIICqjCCAZICAQAwGjEYMBYGA1UEAwwPKi5taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxkvaI0lwQtH4lmrFT2FANKY/lJbS/6wjk8EDnKmmewOSGFnH1XwvmVqcRhmt8JkeG3NgJ44Rolkl6oFNAkyLl+DSyU5EzJILda60CLfcgpCJTXazBSQDU1Pzfe/lcnOUGBlpQ7cqtDTpBM+LrcZW3Dgrttj2Ssez0bR6mcMipNL2HJd9iAXN7CMzkcLCPXBbxvvl8r9D89eqPbrDYcDrXBropOXNO6rlLa/ZAH/CAPv2WVWAwY0U+DjknolcjMwev/O5/rrB8iakja7EXd68yOIn4kUnRA1dyC8jGN0XRyvnkte2+bT0B7aWbo3d3vi4fHizQi93XGKDEe6LznxcbwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAB1lgCNwHl9AAaB24ji3K++ERx5Zp8Vj/KqF4bLICsVQouR+NGq9oOTtAIQlgXLSR10W8OUS3/0/J9iyNYaCg9wYWghp2+4ZpKvLrfHtyEVFTkYpWKztMiLpViy6tHuo2sCtrLCnwpQ4M34/edMKkiWTlaAV0aUej/dXsjIm2VupIg1WSPloVFnY0IOAq4d/Klcc82/fc9D1tAc/pO8UJf2XvewM3UdnUH7mFs1pHADQmFCz0NVd2C19NejZ0H7ZHeOGvGwVXDcuRryD6s47yvkfRMiUk1RfXBrEeFGc6Q0vXq5hNVHwGmR1UBBqWFkKmtVf+RxNXhtWsSGN/8I+4Lc=", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/pkcs10; charset=utf-8', diff --git a/test/recordings/keyVault-key-tests.nock.js b/test/recordings/keyVault-key-tests.nock.js index 2b92f8977e..3411ae8769 100644 --- a/test/recordings/keyVault-key-tests.nock.js +++ b/test/recordings/keyVault-key-tests.nock.js @@ -5,7 +5,7 @@ exports.scopes = [[], var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -26,7 +26,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -46,7 +46,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/?api-version=2016-10-01') + .get('/keys/nodeKey/?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -66,7 +66,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/?api-version=2016-10-01') + .get('/keys/nodeKey/?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -86,7 +86,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=2016-10-01') + .get('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -106,7 +106,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=2016-10-01') + .get('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343537,\"updated\":1479343537}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -127,7 +127,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/keys/nodeKey/?api-version=2016-10-01', '*') +.patch('/keys/nodeKey/?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343542},\"tags\":{\"foo\":\"ede2c2613ab96101ef90e0f93ed400417324724f8d0793cc46156eb21c83a50b2aa6d24fbbdce46d3a06ef47b671ba579248\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -148,7 +148,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/keys/nodeKey/?api-version=2016-10-01', '*') +.patch('/keys/nodeKey/?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343542},\"tags\":{\"foo\":\"ede2c2613ab96101ef90e0f93ed400417324724f8d0793cc46156eb21c83a50b2aa6d24fbbdce46d3a06ef47b671ba579248\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -169,7 +169,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=2016-10-01', '*') +.patch('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343540},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -190,7 +190,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=2016-10-01', '*') +.patch('/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343540},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -210,7 +210,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/keys/nodeKey?api-version=2016-10-01') + .delete('/keys/nodeKey?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343540},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -230,7 +230,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/keys/nodeKey?api-version=2016-10-01') + .delete('/keys/nodeKey?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/3a3bdeca7e11417fa7f61088922efe28\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"lBOpQ0I8sppH9uINXQfwngviBxy2nCqytM0wzviJI8PsFvXMmnWAzAJuUmw3nbl1R1_7ZWgWl_wg5Ccz_oU4hAEgZKLm1UVC30ApTWV-mZOgLoy5dH1XDT88zVW2x77Jjvcqz6hTrJrydImBmus6pVFUALR5LWaAz9msakwgqiuKuCqDdv_SYSWxZI4FOwsRNp4fu71An-zvBW3GEOwLOV_-N_c-eF4FMmFfLN4BxAaAXT2-UkGoytomgJtbchuuRGRqxyi1rIypVlNXRdYOSlQYoWBJaq41UW-_SZRk3sPeE-KPVcveL5WfoORyfS6IjHT_EoxachvQ_Co28VqLYw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343537,\"updated\":1479343540},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -250,7 +250,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/?api-version=2016-10-01') + .get('/keys/nodeKey/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key nodeKey not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '66', @@ -270,7 +270,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/?api-version=2016-10-01') + .get('/keys/nodeKey/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Key nodeKey not found\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '66', @@ -291,7 +291,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/df486325e40e49c1ab418fb3366b60ef\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -312,7 +312,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/df486325e40e49c1ab418fb3366b60ef\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -333,7 +333,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/5129c5aeba9f4703883bad9b82e6e99b\",\"kty\":\"RSA-HSM\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -354,7 +354,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/5129c5aeba9f4703883bad9b82e6e99b\",\"kty\":\"RSA-HSM\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -375,7 +375,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey1/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey1/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1/5a41bf4d82364b1894760fa264bf7468\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"ovWcATG62oRTnlSI_GXywk6GAYt4CmS1Zqi-Gfz9ozxTqpbdwhjIvAFQGkG1E6Z4w9IPxaTS9I8XCGXxy6RI-6lp-R2uRBuuqtWlamUIWxMrPbeDyvd_sPdpfE6t2rXpdH81UzC26WMAKhC7duboHpatEn1SxUFPxFVgf9L2Muhf4A1ATpN_-fv762VXrAkLxK_agdzji5rStn5HA9CT0CuCpQjLhiQ7tZIadJXs0iR4RI8cuTe-PYkBFTsgxLTvSs1GM_M03hQjMI4n_EUsgTPCn4NLr1n3F9xwlz4q9JXzgTJKgJMIQ4n8IvsMscYZuVoSUIZYXtCil8d5eHbl9Q\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -396,7 +396,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey1/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey1/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1/5a41bf4d82364b1894760fa264bf7468\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"ovWcATG62oRTnlSI_GXywk6GAYt4CmS1Zqi-Gfz9ozxTqpbdwhjIvAFQGkG1E6Z4w9IPxaTS9I8XCGXxy6RI-6lp-R2uRBuuqtWlamUIWxMrPbeDyvd_sPdpfE6t2rXpdH81UzC26WMAKhC7duboHpatEn1SxUFPxFVgf9L2Muhf4A1ATpN_-fv762VXrAkLxK_agdzji5rStn5HA9CT0CuCpQjLhiQ7tZIadJXs0iR4RI8cuTe-PYkBFTsgxLTvSs1GM_M03hQjMI4n_EUsgTPCn4NLr1n3F9xwlz4q9JXzgTJKgJMIQ4n8IvsMscYZuVoSUIZYXtCil8d5eHbl9Q\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -417,7 +417,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey2/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey2/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2/d0d822ffb84f4dbbbfe592ec939cefb6\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"4o3f-Zk7QfuPHPdm8iODBK0VXoqrxNVYCkltMtFPD2CcGSqo_6h-NreXINbY8_8wEJNUskK-jbTyWNjzvQQsVCR0EIMjtFgPifAo_EkzTfHH4J1XJgoALn4UTxPBvLq06kftvk0J0yeNPUzYkv8NetwuRYQOaP3NqUwV7SO1lloj9xCEviGqRorPs6PwcBUbUtJjF5CeEz3ZSFg2ZTul9pu4dLrh9MZriTVsjQ0Bm1ocCkrIDTMoqgQ4cNaPtDy_t1OiC8DWCYml6RCJBshGc0uiYEeQpBA6BLTBDqqL1yLPPMurkVY1E0TSCH8tIV6RfvJ1slwcafo1JBEBtIASJw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -438,7 +438,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey2/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey2/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2/d0d822ffb84f4dbbbfe592ec939cefb6\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"4o3f-Zk7QfuPHPdm8iODBK0VXoqrxNVYCkltMtFPD2CcGSqo_6h-NreXINbY8_8wEJNUskK-jbTyWNjzvQQsVCR0EIMjtFgPifAo_EkzTfHH4J1XJgoALn4UTxPBvLq06kftvk0J0yeNPUzYkv8NetwuRYQOaP3NqUwV7SO1lloj9xCEviGqRorPs6PwcBUbUtJjF5CeEz3ZSFg2ZTul9pu4dLrh9MZriTVsjQ0Bm1ocCkrIDTMoqgQ4cNaPtDy_t1OiC8DWCYml6RCJBshGc0uiYEeQpBA6BLTBDqqL1yLPPMurkVY1E0TSCH8tIV6RfvJ1slwcafo1JBEBtIASJw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -458,8 +458,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -478,8 +478,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate1\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListCertificate2\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -498,8 +498,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -518,8 +518,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5NiFNREF3TURJMklXdGxlUzlKVFZCUFVsUk1TVk5VVmtWU1UwbFBUa05GVWxSVElUQXdNREF5T0NFNU9UazVMVEV5TFRNeFZESXpPalU1T2pVNUxqazVPVGs1T1RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/importListVersionCerts\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297},\"managed\":true},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeImportCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291},\"managed\":true}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -538,8 +538,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1\",\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1\",\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -558,8 +558,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1\",\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeElXdGxlUzlPVDBSRlMwVlpJVEF3TURBeU9DRXlNREUyTFRFeExURTJWREl6T2pFNE9qRXlMalEzTnpJNE1UUmFJUS0tIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey1\",\"attributes\":{\"enabled\":true,\"created\":1479343545,\"updated\":1479343545}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -578,8 +578,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp\",\"attributes\":{\"enabled\":true,\"created\":1479340248,\"updated\":1479340248}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp\",\"attributes\":{\"enabled\":true,\"created\":1479340248,\"updated\":1479340248}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -598,8 +598,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') - .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp\",\"attributes\":{\"enabled\":true,\"created\":1479340248,\"updated\":1479340248}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE3NiFNREF3TURFeUlXdGxlUzlPVDBSRlMwVlpNaUV3TURBd01qZ2hNakF4TmkweE1TMHhObFF5TXpveU1Ub3lNaTQ0TlRnM056UXpXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey2\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp\",\"attributes\":{\"enabled\":true,\"created\":1479340248,\"updated\":1479340248}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -618,7 +618,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/policyCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309},\"managed\":true}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -638,7 +638,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') + .get('/keys?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4OCFNREF3TURJeElXdGxlUzlRVDB4SlExbERSVkpVU1VaSlEwRlVSU0V3TURBd01qZ2hPVGs1T1MweE1pMHpNVlF5TXpvMU9UbzFPUzQ1T1RrNU9UazVXaUUtIiwiVGFyZ2V0TG9jYXRpb24iOjB9&maxresults=2') .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/policyCertificate\",\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309},\"managed\":true}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -659,7 +659,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/ba2bb59497a84dbd82530db5e3dcc8db\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2_TKCL1VqkbVxFKKGp1Y5IpdPJXENYHnx0IZ5vZ-3l370KaE8HuJtqMFSNXnaTUo_U4C-pzXH83mVHUXryKPLpAAgmdgj58HxVUmL6WBFeNqz7ZM1hjQGy5pfK1HLcihHq9NSQSWuuxoyKjRVUTTy1edpGB4gLsESahLlDJauFivArrfNmUfXJBksWbJBGr_ZXmHtEUR7UWgw9AlZm-W2xSfiNFVDCtb_AYSUIq-9AifACVkkkoh1xsKmShJtOFOapqEr95TIWCnP7-sXJdchWq8IsEHRCMt-9nLXj1dXKRUoF38MYaFTYXqqMmHS1ZvPl5dzIZO1zdphI8dkNbx1w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343549,\"updated\":1479343549}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -680,7 +680,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/ba2bb59497a84dbd82530db5e3dcc8db\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2_TKCL1VqkbVxFKKGp1Y5IpdPJXENYHnx0IZ5vZ-3l370KaE8HuJtqMFSNXnaTUo_U4C-pzXH83mVHUXryKPLpAAgmdgj58HxVUmL6WBFeNqz7ZM1hjQGy5pfK1HLcihHq9NSQSWuuxoyKjRVUTTy1edpGB4gLsESahLlDJauFivArrfNmUfXJBksWbJBGr_ZXmHtEUR7UWgw9AlZm-W2xSfiNFVDCtb_AYSUIq-9AifACVkkkoh1xsKmShJtOFOapqEr95TIWCnP7-sXJdchWq8IsEHRCMt-9nLXj1dXKRUoF38MYaFTYXqqMmHS1ZvPl5dzIZO1zdphI8dkNbx1w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343549,\"updated\":1479343549}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -701,7 +701,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/334aad9281484d6e9160693cd76138f7\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"gsvLpp48GhFa6No5UKHMLFuBXSh6oI1MnPPwkznYFRqdfALz6D_MX7PkuFSC5u0wkuX-k50NICim6rb-gezirtBPBF_t2Qss4WQ4qT-t1xKtLXPLavpBXWySGqLcQ2DIM1wqCTg8LfPhPSfslFI9i_oaadZkwjmwfCegc38CSgyjr7MukgqmogIle51X6FWjsvK314tElIFUTIWpl2TVk53qQE0av4OOfaB8_XYzfvK-R73sOwotz6XWuCdD9VW4-HPbqPXYypatSaL7BnYMpyqJK2EESDXeTPYqDVx_sWkAXCOosQMprUgoYysvrCc3g-9kVzjgCx1BTn9etHYhJw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -722,7 +722,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/create?api-version=2016-10-01', '*') +.post('/keys/nodeKey/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/334aad9281484d6e9160693cd76138f7\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"gsvLpp48GhFa6No5UKHMLFuBXSh6oI1MnPPwkznYFRqdfALz6D_MX7PkuFSC5u0wkuX-k50NICim6rb-gezirtBPBF_t2Qss4WQ4qT-t1xKtLXPLavpBXWySGqLcQ2DIM1wqCTg8LfPhPSfslFI9i_oaadZkwjmwfCegc38CSgyjr7MukgqmogIle51X6FWjsvK314tElIFUTIWpl2TVk53qQE0av4OOfaB8_XYzfvK-R73sOwotz6XWuCdD9VW4-HPbqPXYypatSaL7BnYMpyqJK2EESDXeTPYqDVx_sWkAXCOosQMprUgoYysvrCc3g-9kVzjgCx1BTn9etHYhJw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -742,7 +742,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/versions?api-version=2016-10-01') + .get('/keys/nodeKey/versions?api-version=7.0-preview') .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/334aad9281484d6e9160693cd76138f7\",\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/5129c5aeba9f4703883bad9b82e6e99b\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/ba2bb59497a84dbd82530db5e3dcc8db\",\"attributes\":{\"enabled\":true,\"created\":1479343549,\"updated\":1479343549}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/df486325e40e49c1ab418fb3366b60ef\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -762,7 +762,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/keys/nodeKey/versions?api-version=2016-10-01') + .get('/keys/nodeKey/versions?api-version=7.0-preview') .reply(200, "{\"value\":[{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/334aad9281484d6e9160693cd76138f7\",\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/5129c5aeba9f4703883bad9b82e6e99b\",\"attributes\":{\"enabled\":true,\"created\":1479343542,\"updated\":1479343542}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/ba2bb59497a84dbd82530db5e3dcc8db\",\"attributes\":{\"enabled\":true,\"created\":1479343549,\"updated\":1479343549}},{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/df486325e40e49c1ab418fb3366b60ef\",\"attributes\":{\"enabled\":true,\"created\":1479343543,\"updated\":1479343543}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -783,7 +783,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKeyforBkp/create?api-version=2016-10-01', '*') +.post('/keys/nodeKeyforBkp/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -804,7 +804,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKeyforBkp/create?api-version=2016-10-01', '*') +.post('/keys/nodeKeyforBkp/create?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -824,7 +824,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .post('/keys/nodeKeyforBkp/backup?api-version=2016-10-01') + .post('/keys/nodeKeyforBkp/backup?api-version=7.0-preview') .reply(200, "{\"value\":\"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmMwc2U0b0g1VjNOT1VoZW41Vzh3by1CbGVlUWVOTFNVSi1wX0xqUFpsaUpTV0xQREFiSDZDUl9GS05jN0RsVF9NNENwMmRJd1lxRnptUW1fdENuVXI1ODN2dWVSWjVxSTVjcHRCTnhsRWFSczJfQ0ZOUzI1WGs4WHNZZFhkaVRJT2Y2dnVnTm9YTnE5TjhfNUxfcFZwWjRZYTZjWjZpWXpDcnFObG9WaVpuLUFsOWNDcGtYYjU3c3dhcFhFbmtmN0UxZTRTTFZyeVloRFQ5T3d6N1Vhelpyd2cySU5YNnE4TUVOOVR5X0w1VTlxUERoQjJxeEU2aVJsLVNCNUtncnRkdzNCTVhSYmtzNG5sbzFpLUVpRWFWeHhkZzlTWWRIQ0I4bVdfRnRKaUp1d29pRlo1cU9UdVlwaDhTaWRTcjdsenRSd21heTI1VWRtaldmdkVUNGhiQS5GbHY3RGVIR1Q0UlBCUGE4T0VKTTFBLnFHQlZKT1V0M1N0M1R1QVdwUl9HY1NvejhFMC1DT0tMR2tETDV0MDBfeFRrWFNUSnJLRUdtdTF5bUF6dEhUTlFXRTc0a1JhUVBCc1FHVGJWQmo4OGxRNjJ2dm5qbklHWUtyVU92bU13UGNVMnlPWlFHdWhiZmp2Q0YxY3o2OUdROTk5Xzl0MUlPS1JuRGpmMGdJN01IWE5hdktXSV9nM0ZPRjlWTWxxeE01SzRHUmZ0dml4S2hxZ09JOHoySHBuUXFpZEx5a1J0UGlTZmxoRGZYc2c0UDBnWlZWaXpjZ195dTlNT0RwLWR5d3NFZW9MS2dEUTE0WjE3SlNTcGVrSkphRFNIbHJpUGtBNEViX3JqWXRZZ2l1UjBKNlp4OEdlZ1BMMm9KbWxCLVNGTTRiUmdaWVAxWlRoNldiVXJDdG9BTnNFRHB4aTNFaEFCT3V5TXRReE53SnpSXzFRQ1NqQWt1dzExNUpCMmh5eGxPWlZiSGVYUVpjUUlhcUtRRU9abkptcDl4UHcyUlhQS0toam5TOURzU0FXdW5oXzlpaDJPMlRIT2JiSDlLY3pJS094ZFhNdjVMRUhjdV9nN3IteGtLaElZUnNWUGl3Yk1rNTNmZGpoSkh4b1hXcVByNGxaODczeWd4b0RpVlZ1Nzl1TXR6SElpb193SGxjWTlXUTM0SkVsMlZZOUFNeTByNW93cVJaTWs2SFY3ekNCeUlQVU5iaV92bHVNc2RrZUdPaE5VMWFLY0lNblpQRnFERFo0LUhHWVlBM0o3eV95R1E5cFJjUGV2UDcxTWZ0aldiSkY3dVVRZEl1eFcyMGluX3U4Xy1yQlhBVjdsVGViNS1GTFRLcHhFb2pYdm83YXZ2d2U0RlJrTjBwZHp3OGthX0k0VFRxaVdNQ2xHZVV3MDVNdnFxMFA1bkcteGFQTVF5SVU0YjF5SUhnMVRuQ2dKekpnY2lnQkt0b0YyUXFvV1pwelpEUm4weGY0MW81UTRkWVh1THFxYVBDbWZPWjlMYWhmRHBta09MWl85cWcwVjhaUi1CdWUwOGlncnhlUWM0Yk81b09pcC16OG1NWWd1S090NnFFS21tb3dTR2hVYk9qcW5MOWVmYjVOeTJlNXVSMkJMVFlZZG1KcWFka3ZXbzFmbFRHWEZ0aWw0ZWgxLU93WE9RdmJvWTAwTEx5ZjJ2c2dHN2NWYmw5Y0poSk45eXBPNDBCTTh3YXFMQ0g3b3NFc3dHTWVzOWJ6MFgzOHNSaDJZYjE1UldqdmNiTTlCaTRyYWlod3o1V1NIQ0RlV0lWX3dwTmh0alBsd0FfUUc2UjdVVEJ2U00zbFRuQTBlUjF3RWxzVWl0NGl0blc0ODFodHE3UXdNRmFWMGpnZ3I1ZU5peXpBaHNsSHlBbzFPWXltZjh5dUJzZ2tQQjFCUEs2ZFBoc2pQa2c2YUJuMnROeEF2X1ZvTDhjQkt1WFExd3JYUlBuWDRyMjhJMG9OU1NKVUg5eXRzZ1lUYjlGcl9rejdzSFVxelZ0MVc2NmhJN0lDTTNpNzBMak16QTJxRm4xNi0xNzlfN0xZTlVWdXkzMG5SV0Q5S1d0TjA4Tmo4TFV2RXo2SEtfd05lSGV5MWlTOHVBbnNyOGJrVHZUWmc4RllVZ2RheDB1eXJSd1VJaXhfeE41OUhvQ0J1OTdEOXdSLVdEUUw5T3EyaFBXelNZV2lJVXdqQkRBUEZxX1VWczFZOHRUeEhiYmJEcUdNYU9FOFdEcG5GMUVBbmFOdTNGeEtPVVdPaFVQWlBrZlYxVHpYLUNMLWVUWVFMUEpQMjBNMlpMOW1qRlhMRmRoR1BWUnlXdzBKeGx0Y2UyUlEzTWJEaFdzWDhncU1lai1YTVMtLXowdm9NYm5ZdW85T295ckVkN1RWVU9iVmZIakFZcTNmdFp3Z0pSTmg0RnJLQXQzYVlJak1LQTB2d3NCdmFFY1BndDVDaVZMdzUzbVZ1OEZWQ2pLU0diUmM3Vi1hX1NHWnRySjVXY1IwRDUybE56bC05Z0UzUEpzV01DRDNzQW9uOUI3ZXFkYXhsLTFPbEFUNGw4a01xWHNtVEEwTnVpVC1jNHFfdWo0bUJpb0Z0Wk1vMS1WVDFRSDh4SWpSdlIxNHRkMEJYSms5VmZtWVV6bFhIX0FXZEVhaGZxNDR6NFdfN1ZoQXhfM05IcDQ1ZWttdGVWWWNDb3ZOVHh0ODBVTHdRRDJtbFlLZmhuaWlqMDBaT2hnb0R1T2REeXJJU2JkWS1HQ3RVSm1BVnB0cTdtYnlickxNSXQweWxhNHJZWGxDWGpmNG1RUjN2MnZ6NGNLemMwLWpLM2JOSHppRV9HRnB1akt2cVpVNlhXeEtJb29JeFQ4YlVRSWtpN1gtVXJ2eDg5R1cxUXJjLWtQNkxheUxFYzBaczlaM2EyelVnbUZKMEFQelFGc056QTIzdHphMEZoVUxpNXZjWFQyRWFmRUtObGpqVUpfV3J1QzkyeHdaMnJvemh6YzY2anozTmVjN2ZjTzJBZEZ6ZFI2X1ZsOG0tWVNYZVVNQ3Vzd2xyVzlMTmZQTXZSSFN5XzJocnRyOERQYUkwLWtnSG5qWDhlUDIteTVBQnd0SXE1UlFfWm4tendLMjctRzBRbTJIQTkzYzZmUFVoNW1fbmEyMmVOZlA5ZngyeUhzR2Vyc01hVHAzNlRIdVQtYTZsMUt3YVR2MnRRTjVoZUItUVk5dDRIaXZ0MUdWdGI5dVNIdUxzNWswdjA3S0tLSXFTV0hQZUdUYjM2ZHFXY2w2RVNFdzFxNWF2QWdaYmFNY21uREN2bll2MXo5VWs3UVotUm9BNnZBcDBRMDMwOUoyTHk3MlNSUXozdnZvMnN2bjF2Rm52ejhmcXNQNThHQ3ZYY2hnS0FVLXNIX3EzWmJEdUNLOWhoUXRVdlJrNmZueGlwbERpMkpvVlAwMEpNYUxUSnIwMjVTTjR4YVpqVjZQeGFiaU1XSHJTbHplU0cwZUVLSks5eVB2ZWJzNWl5REZiTHpPTi14WWRicndXWGdNdGFReVFFQXdGdHBRbjhkVzVzQlZ1UE5NeGZoOWh6QkZGdzloWmNDRUNhUng3eVI2M3R1c1gzYW1DVWtNSVZDMUE1VktkaGItRW5ESXBGbGJyejk1ZDVwZGd5ckhGTXBEVEZNZ0dKT3hURjNOekdmbnVyd1B1Z2RzaGh6QXU2LUJ1aE9vM0Z6RWpJNHdqd0h3aFFNTWdpUUdJYVFxdVFpWE1CZkN4YV9RQkMzLVZCdHBXTlV5MEo5aHRjMlJkd2E4WWRjQjhfZjFYTE9jZjBvVXljOHlYRDhVT1JVdTZXNjd4V1lTcHhoNjg5MU1KR3ZPZVBRbFpGMVZ5NHNSaTBkMzlCSlQtanN4Vlg0Z2dQemh5Qmt5eFBSTGJaajJNX3YzaXVLS2hwei04X3JlRWxlY2w0aGFGY2N0WDQxQl91dlNQUkF6aEx5U2FrdFZYWWJzcTJ0Y2U0Y0ZNa2swM3d4cm83R21zdDJGSGxaQXlXdGNuczlMQjdVLTdWWkpVWVlqbjRkalF3NWZXNVNDNUlEOE9uVlcwTTVuVU00bjhTeTZYSUszNnRsNEVhdks0NHdNLW1YbzViZ0RlVmNCZE1wOFFyNFNEeXp0RVRET2dZQkFfMEl0Uk9pcjlrakRoNHN4SXM2eEpfZF9kRUt0cEVHVERmSl9VYnlfU1U4MDJrLWZoZ3dEaE43WkJCQXFxTGpjV21kZTZELXo4UURfbE5QZkUtVW9HeUNrS19seXlLUWxqdTNOVHRjVmFUQkVWTmt2YU9vNjlOVXIyRjFhanhXZUdZb1ZGSm40NC1yQmxFdXUzQmxJU2JrYlllWUFQMWxQZDBnYTRqWlFJTW1XSXhfUUtEdS1PQkY2aUM5enB0dkZfODJENEtLbzNrMzFrWHJGcVc4enJwTnJLc3B6N0ZVeVpwRW5OT0RMM2lzbHJ5a0VQMHY3d3FRTDVjVkp1VHh1VU95eHpsc1M5NG01SDVrNkdwRy1iOGJJQTd5eVJISElibndtd0JlWjZYLUctdlducDRPRXFVMlVIWlcydlJ5SkNmTUlyWTF6eHlzcmxYenNBaU1QUGg3VlMyam1Fb1ROcGgxaEdIRm0zZVNFQWVKek1HOHlOXzFRbnhiSmZYeGFkWjRKSTJON21rcnBfbl9yU1JRZW1pcjVkU21ZZEdGTkc5Uy1HcldMNlp4WHVjRGJ2dzZrdld1bEJGZm1qX1lRaGpPeENzMk5iN3pLT19tYWhrc0MwRVQyaGVabzFLNXJhR055RElybWZ4cDJNZWs0M3UtT3FDYWZsaE8xZnJwWElCd3hGV21IM05oZGhrN1VDM0FDa0Y1ak1fb1QwRDBpam5wdmh1eEdyaTF3WnUzTllzX0FFR25WT0NsRW1vdnpmbDdDRlBSZ2lIcDVzZk9OdTZ4S2Y3T2VhZ1hDNTU3STVRRzBySllIMHh2WGJpOWRXOW52cnUyemp6am9rY3oycUxlX0VHOGszWm9UeHVfVW9NMktldmdwdWVVbzM0dlhvTS1hTVVpLVVhY0hQVW9QNnV6Z1VqazhXT2pfU09KV0ZQVEltWk9Wd2hRZTFtUTdzWEJjb2dkazlBcVVQdTR2UjZSZG9SOXBKcXM2bWtWaW9mVDhCTjVNc2hyOWwydnJFTFlpTWdLY2JDdmNqTWl0dmdzblZacmNSMEhWRFJQN2FkOEI2V1REUVF2NTJfZTkzLTBMTC1qeHRaUFBNRkV1YVJ4akZfbGkwR19NU3AtVndpT3N6UU80UkY5RVZXU3RxY2ttbUlUZUUwbTRZU09HRDdhX3pQU3BwaWdpa1BxbDFrU2RPblpJMzFhQm1IUFVoWjQzM2ljRzJfRWw4dTc0d1JyWlkzVG1OT2Z1cGh2dlRJeHQ1R05McGpZS3BKRThGZHdjTXRnNnJ4Mk9MbDV2TUtOQUE2dV9tV3VSc1pIQ3R1b3k1eFktX01uNHpSQURKdGtseURMallBZkhrR0VXSEJaRkRFVWk5dEx2Y2tWd1ozSXIzdXRZVkxERDhuTUtKVDJadDVLRDBmUk5OeFB2VDBxWldnN3B0RFFpOG9SWE4tMzZyS1c4bWlLX2RtT0pTUWRUb0o2WkxaUzBJVHppd0EtTTdnMUVKZGZQak50eUlaYlFkQWtWNlRzckRGNi1HWk5Nc3E3WS1tZGFYNnkyaG1hOW5vZklGYXFfYXBDYTJ1b19jaXZOZDJ4TTF4RW5Ya3IxTERyLUJ5X0FJZFp2SzJhUk53SGZNTklRTndpTHp1VG1TUmZuTEhMSUVwX210ckhUZXFNeHdnbjBhSGtyQkRsQnpXdFd5ZW9RUGdPc2ZEZVpaaTJZYmx0Q19QdlNtczRQTEtwTm04cVpPVzZGczRxTjlpci1LZHUwSlFGZ05WVm1GN1RDZ2FTZTJrYWFMX0l6VGEwZzB1RUduV0EzY0oyMml6aHA1RnVXWHBEQjk1NjV4clBPMXhyVTVkUGx3WU5COEJ6ZlM4WG5HVDd5dXZ3aHQwWGRMcVlyYUpSd1BIRlExeHFVam5TZ0RaZVR5aXVNWGVpM0RoMi1Xa2Zydk5pOThEZUM4LWdXbU8zRkRGSTlRZHhibUVjeGRXck1vMnl3MjVQS2VvTWVId1hSdTRuSVhsNm43VHZTN0UtYlNpY1FxOVBla2JUeGttdUdob2dobmFNazZaY0VfcmllWlVicTc1eFNIMWVXdU90blJ1dFV0OEEtRGFUNGs1RDlubHhqUEFEVTZfMzhIU2RnUURzc0pnVGlKWHhyMHZwdUhCWXVSdzBVT1BMdDN2T0lzM2p1WUt4R3dDTHJEdTlwUmxxSnFjdDJmMmx3NzUwSjcwTkpLY2VhMFRTcW1WeXR2bGdMZW9hYWU0ci03ZE5paWk5OVVFb2Z2aFZsenFiVTY4clY5Q2ZzMTdkblo1QV9rYm9XRmREcEV1MnZqWkw4Nk1lTVRScXdvcmg2bDhDTWJuMWNKQU0wUF8tbE1CamxGeU4wc3BsYy1ON1NyM0NwVzY4OXZOcGtHaXA4VHpyaFl0djc2aHFrbGpIYmRmQ21EMXJBa3N3T1FOVE5XMkI2QTNyLV9EbEk1clU2bTgxTFdVRkxJQ1Jpc1hHVGEyb3BxaGk3Y2dYdGJMVkFzTDA4d3hwVjR5RDhXeWdXcy1WUXVDOWpCY2ZpZVRVXzFNbjNVSlNLVDIxNTZyczF4dDYzdjRUQ0ZMc19ZMnoxU2dXZnNTeWZaSTZVZWY2eVZKTjI3QXRZZEJYdTdWX1dXWi03Vk5kbzNVdG1aQ3lMTTZoVEtWbkdHdHRYM3pPTW84QzZPRUk2dl9pUy1pU1pQeW04b0NWVmtybTdsaVZWQzcwUkZCQkxFMnlOc1hqRXlXNmJadjJyUUlZYm9Qd05XZ0xsVTlOVzJDcjBhOC1ZOWQ0SERHMVdDei1oeU93SDJjY2FwZXZGRnRJQ0dPNi0tRHgyT3BkSmlkbGljeE82bXRnQU1lTl9rN0JabzFOOGRpWDNUcUJkUFJ2N2psVHdLa19rNlNlRmdtcUhDbUhSdW4tXzlzUzdFa1I2bFhCRkJpX0RjM3VqcEZyaVBQVXIyeE1MMlJDc21SRy1vNXBFcEpfLVJsaTdEczBLandSZGZvVWV5ZWJmT3RIN3o5azVaRHpEbm85ZTJKUGYzRjJsWS12dk5yemRrVUszSWw2alh3ZHFEdDQ3QmdiUXdYR0FaX1o1aTBjUHZGSU1yNjhkb3NIblJnUVMyMkZjZ1BCMWZobWtvellFNWpBSnlXcVkyQ0RIZlF2cjIwRVdYNTUtRnhISkI3SnJnTGI2R2x3N1JtRDBiaTBnSUpjVC1uVEhBUWpkWmhPY1otbFBYNFBIak9hc1c0ejhmczJNYmFEZFJVYy1rc3hZSFNTdzdWejg3UktCa3pkWWh6eG9LWlI0SHNfbFpfd3B3ODlxbnlmT0NfRkJlTVBISkRzelFXM3o3X0loM01mNjhoUDFfa25yZWtZUF9zOWFDX1dGRks3enJJcjAxVlJpbzdIX2tjTzFwZVBjSDhSNnR6SGstcTU0ekpmQ0JHa1hUaHp6dnpFd2V4Q3VESWFyZDdydlFmdjdySTRpOHpqV2pyZ1BTMjhKUnB0N0Y5Smw3SGFNSDJIbWpFV01QRWZkYS1tZmtCMG53Z0Nhc19OWGRuZnJNdkZCYlBiLVRaLVc2TzJzM29iUXNncUVSb0g2eUhXY2dCaUd6S1hhbTNPbTZZcktoaHpmQUxEa0stS1lHNmVyTjAtTDkwZlIyM1pBYVg0eXVQTTkxRU5HSmFnSHBpVGRTbGpScldkUVlWWmFiMzd5X0NlYlJqOW1CLTJNQVotTHdxVklSemJVeWdTd3NPZWpfLUYtQkNqeGdWMlFSWE51YW55UnBVdGpFYmNRU2RtZjZTOHNocUJaWk9hWDV0SEpjV1RqSWNlVmF5T3N4U29mTTd1WTgwTGl2R25PTUUzSWU3QTM5OTlNSjRSbnNWT1dDMHl4cWZzamNGTm16NTFJOTJPbHRVLUx0aFBEYVdzdGozdDFzTE9LdmhObVNTd3Bqc2hRcWxMM2NqSlY1WVBLeGgxTVNVVWY3eXAzTEc2bW9pbkE0UHdFOVEtU0Y0bTdZdkNfeUF5aTB4Vk1lLUctTnc2UnVUQm9JZFNyTG8tVGY4TGhPMWFZY2pmRExpeXE4eGg5U0c5SllkT1NnMHVXTm9PZkVPMU1xZ0xaSmF4bl9sVTZvRWhtOEFXbFQxV3BCOGNoOXJoQlhwWW50NjJFaF9IVFExSzh5TWNxS0NrSU9hRGFRNEhxdHRkZW00Z2Y3MWs1MDkzNVE2eUFBYUpoVm44Ti1kdmFFdVJlNWQydTNXTERNcjJSREx5Ml9xNXNnYUVpVHZDa21KcTVYYTVBNlI4bkRKVzYycUZqMl8yVnVlc0xIUVEyZmtieGdnSkJoZzhEMHpROUlwYzdsOXZJQ24wckMxeUxRQnR2bWlNOFR2QklaUFNFTUJ4WXRMdmlteERqeWlGajM1MENNNnFYRWprdnlZR1FkSElseDVFdDVRSjBTVVhVTjFONmI5cmJkYk54VzBoT1lPTzN1bU5oOHVhQnJzcmRKQ2tPLW5HQi1QUkh0VURqTFpKTXBabTBfcERubHhXeWhJNV8tczRQNFFBZnJDQ05lT3cwcTVLZFZUYmRaVXNhcTdHQzA3TjJCT3F1YTdNNW14Wl8ydU56Sm5aVUNBZU93MWh4OEtQZGxpV083RWZmU0JCU0tWRFd4UmhMVmVPYlRScC1tWk1FeUd4MDNqcURFTV9URXU5TW94ZHlJdEVJLV9nQ0UwcjdQcjVxVEFFMUg3bDVMdkFfZUh0amZ1cWFmXzVDZmNnYXpNRHRVU05ma0t0a25QdzU1ak13bzc4VnVqeUFmUFJxTE9USW12VjFSZktpMWh5WVB5TFdFNEptWXoyV3VPeEhyRnJlOFNIZklkTi1FRGl2ZDJxa3VBaEY0bG5SdV9fdVhwbi1sM1VNWFA1ZnFDdUh4SXJ0QnR5c2lJM0Mta0dtdFZCTHlBZUN1clVTbU9IZXlVNlU2aklYR190SUV3T1dUUlNjOGR0VE5zYWV1XzIteUdTZXlCMTc2NzkzNWdlVWVEMjBoUHd4cnpkZ056SjdtV0U4ajNmXy1LUUVwdWlmaUlZY0hSV1ItWkFTU0xqVVllOXJ1dUpxUlJsbklwX3pOVEtGTXlaMUh2ekFabXJWZXVoVjJ2elUyQ2ZOSlVYVzF6NTNsaTNIMlNjVUllUkZPVFVtSEt2R3QzUmxmSnF1OG1ULTFTMG1jM3lsV1RUWVRHM1J1OG95cTI1NDlMVGhrY0Qwc3BiZUdLVDAtbW91Z2hETHVQc1kwOHhZYkZqQXpMYTA0bmZldUJaYVdfYzBHMERnLVJoRHREWWdidlVsMjRuLUNlNGJjUFk5MUFSSU1odDVQRkNlTk05bHBGd08xZWVyeWVielFkTmtoOW13MkVTOTRCMVdnLW9RNGNIWDlqS0lRMmk5b1QteTdWaVkxd2doTGVyTHBTSEIwV2p3d3M5QmJ4MVlDWHRRUUR5SV81RFQyekllRl9ZV2ZuaUZVRFd6VGUtdlhRMHU1TGpHeWpTZVRZYWJyZ1F2cmVpcE9yZFpXZXBoSFA4bEV2UF9ZeHRyTW5wVk45WVNKR0tfU1BtSnBrcExJaW5wUEtLOGZTbEVrRzlKMTBlbjNUU002c1pnVVRsVXdyN3BNYzFaRkJQV3BPYVZIOWxqSnlHaXlnd19UZGhFamYyUzJFcmctak5ZbmNUSWxYUVV5Tk9qRzNMVl83ZElHSnpoSTJPWlFYZnl5UldUNXAtdWNUTFVKdFJFYVJDVXM3djFacFJpNld4MkZKQUhrVmFBWVVYbHNFNmI5SFcxRkpfdXdmam5HVVRuZ3ZoNm53eVR1ODZXZ2tNbU5oQkR3bUY4cl9uZWVNLVhBdTlUZlZxMjdmT212dVdtSEhEaERxZ0ZyRm0zZ2lSZ2xUVkd0VTRnSktxanFTYXBQbXJEMWxmTmYwdnV4WTlkejFLN3R3bC1PemRlQlUySVRqT3Vwd3l5X09nLWZaZ2JWcEd5QW9SbVA3aXlJSGZYLXQyc2V4blpTWGxkcXA5RDZUOTNvQ3pJamlPTHFiX25GRGpSUlRiUGVZZXpCZFdHZDN6a0hFcU1SLWI1V2dmOS1pbXd5YmtRNUNHRHFxV05sSWxuRi05UHR1V2ZvLXF4Vk5qZ3BKU1BFd19fX05QZm5oUjFkVGtYOHI5bi1LeHFEcW00VERvbzlPX3JxRlV3NzZRWDJUbHRUa0xoY2ZwLVZQNS1WdFNnc243VmlEVVQ4WkN4RDVaUHBCZE5fdDB0Y3hzeF94d2NaVlc5U1ZMTTdtUUhyQjNMdFJCbkRJWlViT0ZJeFN2d0RXTnh1SGhRLW9vNFBRQVNNdWhKZjlCSTZZUl9Gc3NuM2NXV2tNQzl1bDhMZUVMeTdKZTVIME04Z3g0QTVHYXNLMWNqQlhQVVBhR2Q5T081S1ZobWZmWWh0Njhua0ViUjRQUWZZbVY5cHBKSzY1YTJpWjdUSFkza1AxVlk3Y2RiSm1pVnU2NXBGY0RSSjJ0c1g0YWprRHdOV2l6dGg1cTdoNTZMbk42ODJHeHNOS2tfT3RfQTNxeGNpWVAtUlc5N1hxQUtDcTc0U3VIQXM1ejRwQVp1LUU4ZXFTZVpmMWhJVVllZGczamJ3TEI1MU1SQkRwbV9OS01fNGNlTUxUSWU4el9aUTY3a1B4bGxQMWdFTVVuX2NtTV9ERE1fMVYzYWJmdVh5c1FEcV8tZzJMd2hEVC16Z0VDdWpOWVpsUEp3SlRfaXJmMThtWUljS2xVXzJkaC1DYktxUTdBaXJqUWx4RlRHd0NRckQzVnltRDN0cUY5d25FNC1xdmpMNUVSMUtuVUdzU2NLM003dzEyZDh2cTc5bTl1NHRXSE9YTHJzeXdrcGs4U2daWmxVQ2JMaDFTRWxPbUlSY0FRVzgycXE1MVJUZnZ5UWxCNjMzaEgtaTVfMThEWkNzanVQRVlseUUtNzYyQ29YYmY0WDBBcHRLa3dZTElfR3QxdkxUaTdIOXhVTjdFZVIzSWZBZHAwTVBmZVFiX1drSWJOYjR2aDIxSmx5T1RCLTZMVk1xRGNFNUpHc0NBZmJvWHVMUFliSGNRd2llanFMUlhzbklZdWZqTzZ6MUdZakpTYnlHUlZybjRfd0tKTHEtZnkxLVUwY19sWlN5a0I4eGlISjd0U3JjalFCb0xza2JRRkhGV1h6djFjZ3dkWFFfRHZ2TGJEZ3dnWHF6cWU5TjhWRTM4Q0tibUpCbXl5UXdxdU1zaVpqdjZqTzFMX1FIZnJfZTlIX0w4WGxwMlFfVmR3NG12a2JlQVZBakFBTWhObnk2S1FvbE0tejhKS3doeGFUWWVTZDVFQ3dhd2VyQmU3UkVBMnFJVDZjS2xBekJFRFJxTTJHNjg1T0lsZEp4bjhMQ2ctaEhWRlJMaV9nS3h3Y2k3bUVLVnBZNEJQRUI2d1hVZDgtMkhlWWNQZVlKc0xBanJNTDJMR0hQS1FjSS1ad3NvazliZlQwU2M0aVVSa1hUN1o2YzNfcXBfTXBZTXlGeEhCcXQtOTFVRjNYcWFRNnd0ZjhwcG1aY0lzaXo0TVZQSmo3eVJDMU1tVFB5RUdpczVVTVJ1VlVvbEZSeDg5ODNiZEdKLUhseUFKcXBHYnQ0MTYybVlxcWVkd2dqZkJfWjBDWWgzQnlGWHZxRGxwel9HLUpmUWxJVTVHb1JGeTNLTnBfN2F0SXlnRVUxaWhHWGFQR1piQzVkY3hfZWRvTC1vM3Z2VXA4aHJkU0lrUmFTbm1RLmlrcHRpNkNpMUJhVGk4ZjA3TVB4UXc\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -844,7 +844,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .post('/keys/nodeKeyforBkp/backup?api-version=2016-10-01') + .post('/keys/nodeKeyforBkp/backup?api-version=7.0-preview') .reply(200, "{\"value\":\"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmMwc2U0b0g1VjNOT1VoZW41Vzh3by1CbGVlUWVOTFNVSi1wX0xqUFpsaUpTV0xQREFiSDZDUl9GS05jN0RsVF9NNENwMmRJd1lxRnptUW1fdENuVXI1ODN2dWVSWjVxSTVjcHRCTnhsRWFSczJfQ0ZOUzI1WGs4WHNZZFhkaVRJT2Y2dnVnTm9YTnE5TjhfNUxfcFZwWjRZYTZjWjZpWXpDcnFObG9WaVpuLUFsOWNDcGtYYjU3c3dhcFhFbmtmN0UxZTRTTFZyeVloRFQ5T3d6N1Vhelpyd2cySU5YNnE4TUVOOVR5X0w1VTlxUERoQjJxeEU2aVJsLVNCNUtncnRkdzNCTVhSYmtzNG5sbzFpLUVpRWFWeHhkZzlTWWRIQ0I4bVdfRnRKaUp1d29pRlo1cU9UdVlwaDhTaWRTcjdsenRSd21heTI1VWRtaldmdkVUNGhiQS5GbHY3RGVIR1Q0UlBCUGE4T0VKTTFBLnFHQlZKT1V0M1N0M1R1QVdwUl9HY1NvejhFMC1DT0tMR2tETDV0MDBfeFRrWFNUSnJLRUdtdTF5bUF6dEhUTlFXRTc0a1JhUVBCc1FHVGJWQmo4OGxRNjJ2dm5qbklHWUtyVU92bU13UGNVMnlPWlFHdWhiZmp2Q0YxY3o2OUdROTk5Xzl0MUlPS1JuRGpmMGdJN01IWE5hdktXSV9nM0ZPRjlWTWxxeE01SzRHUmZ0dml4S2hxZ09JOHoySHBuUXFpZEx5a1J0UGlTZmxoRGZYc2c0UDBnWlZWaXpjZ195dTlNT0RwLWR5d3NFZW9MS2dEUTE0WjE3SlNTcGVrSkphRFNIbHJpUGtBNEViX3JqWXRZZ2l1UjBKNlp4OEdlZ1BMMm9KbWxCLVNGTTRiUmdaWVAxWlRoNldiVXJDdG9BTnNFRHB4aTNFaEFCT3V5TXRReE53SnpSXzFRQ1NqQWt1dzExNUpCMmh5eGxPWlZiSGVYUVpjUUlhcUtRRU9abkptcDl4UHcyUlhQS0toam5TOURzU0FXdW5oXzlpaDJPMlRIT2JiSDlLY3pJS094ZFhNdjVMRUhjdV9nN3IteGtLaElZUnNWUGl3Yk1rNTNmZGpoSkh4b1hXcVByNGxaODczeWd4b0RpVlZ1Nzl1TXR6SElpb193SGxjWTlXUTM0SkVsMlZZOUFNeTByNW93cVJaTWs2SFY3ekNCeUlQVU5iaV92bHVNc2RrZUdPaE5VMWFLY0lNblpQRnFERFo0LUhHWVlBM0o3eV95R1E5cFJjUGV2UDcxTWZ0aldiSkY3dVVRZEl1eFcyMGluX3U4Xy1yQlhBVjdsVGViNS1GTFRLcHhFb2pYdm83YXZ2d2U0RlJrTjBwZHp3OGthX0k0VFRxaVdNQ2xHZVV3MDVNdnFxMFA1bkcteGFQTVF5SVU0YjF5SUhnMVRuQ2dKekpnY2lnQkt0b0YyUXFvV1pwelpEUm4weGY0MW81UTRkWVh1THFxYVBDbWZPWjlMYWhmRHBta09MWl85cWcwVjhaUi1CdWUwOGlncnhlUWM0Yk81b09pcC16OG1NWWd1S090NnFFS21tb3dTR2hVYk9qcW5MOWVmYjVOeTJlNXVSMkJMVFlZZG1KcWFka3ZXbzFmbFRHWEZ0aWw0ZWgxLU93WE9RdmJvWTAwTEx5ZjJ2c2dHN2NWYmw5Y0poSk45eXBPNDBCTTh3YXFMQ0g3b3NFc3dHTWVzOWJ6MFgzOHNSaDJZYjE1UldqdmNiTTlCaTRyYWlod3o1V1NIQ0RlV0lWX3dwTmh0alBsd0FfUUc2UjdVVEJ2U00zbFRuQTBlUjF3RWxzVWl0NGl0blc0ODFodHE3UXdNRmFWMGpnZ3I1ZU5peXpBaHNsSHlBbzFPWXltZjh5dUJzZ2tQQjFCUEs2ZFBoc2pQa2c2YUJuMnROeEF2X1ZvTDhjQkt1WFExd3JYUlBuWDRyMjhJMG9OU1NKVUg5eXRzZ1lUYjlGcl9rejdzSFVxelZ0MVc2NmhJN0lDTTNpNzBMak16QTJxRm4xNi0xNzlfN0xZTlVWdXkzMG5SV0Q5S1d0TjA4Tmo4TFV2RXo2SEtfd05lSGV5MWlTOHVBbnNyOGJrVHZUWmc4RllVZ2RheDB1eXJSd1VJaXhfeE41OUhvQ0J1OTdEOXdSLVdEUUw5T3EyaFBXelNZV2lJVXdqQkRBUEZxX1VWczFZOHRUeEhiYmJEcUdNYU9FOFdEcG5GMUVBbmFOdTNGeEtPVVdPaFVQWlBrZlYxVHpYLUNMLWVUWVFMUEpQMjBNMlpMOW1qRlhMRmRoR1BWUnlXdzBKeGx0Y2UyUlEzTWJEaFdzWDhncU1lai1YTVMtLXowdm9NYm5ZdW85T295ckVkN1RWVU9iVmZIakFZcTNmdFp3Z0pSTmg0RnJLQXQzYVlJak1LQTB2d3NCdmFFY1BndDVDaVZMdzUzbVZ1OEZWQ2pLU0diUmM3Vi1hX1NHWnRySjVXY1IwRDUybE56bC05Z0UzUEpzV01DRDNzQW9uOUI3ZXFkYXhsLTFPbEFUNGw4a01xWHNtVEEwTnVpVC1jNHFfdWo0bUJpb0Z0Wk1vMS1WVDFRSDh4SWpSdlIxNHRkMEJYSms5VmZtWVV6bFhIX0FXZEVhaGZxNDR6NFdfN1ZoQXhfM05IcDQ1ZWttdGVWWWNDb3ZOVHh0ODBVTHdRRDJtbFlLZmhuaWlqMDBaT2hnb0R1T2REeXJJU2JkWS1HQ3RVSm1BVnB0cTdtYnlickxNSXQweWxhNHJZWGxDWGpmNG1RUjN2MnZ6NGNLemMwLWpLM2JOSHppRV9HRnB1akt2cVpVNlhXeEtJb29JeFQ4YlVRSWtpN1gtVXJ2eDg5R1cxUXJjLWtQNkxheUxFYzBaczlaM2EyelVnbUZKMEFQelFGc056QTIzdHphMEZoVUxpNXZjWFQyRWFmRUtObGpqVUpfV3J1QzkyeHdaMnJvemh6YzY2anozTmVjN2ZjTzJBZEZ6ZFI2X1ZsOG0tWVNYZVVNQ3Vzd2xyVzlMTmZQTXZSSFN5XzJocnRyOERQYUkwLWtnSG5qWDhlUDIteTVBQnd0SXE1UlFfWm4tendLMjctRzBRbTJIQTkzYzZmUFVoNW1fbmEyMmVOZlA5ZngyeUhzR2Vyc01hVHAzNlRIdVQtYTZsMUt3YVR2MnRRTjVoZUItUVk5dDRIaXZ0MUdWdGI5dVNIdUxzNWswdjA3S0tLSXFTV0hQZUdUYjM2ZHFXY2w2RVNFdzFxNWF2QWdaYmFNY21uREN2bll2MXo5VWs3UVotUm9BNnZBcDBRMDMwOUoyTHk3MlNSUXozdnZvMnN2bjF2Rm52ejhmcXNQNThHQ3ZYY2hnS0FVLXNIX3EzWmJEdUNLOWhoUXRVdlJrNmZueGlwbERpMkpvVlAwMEpNYUxUSnIwMjVTTjR4YVpqVjZQeGFiaU1XSHJTbHplU0cwZUVLSks5eVB2ZWJzNWl5REZiTHpPTi14WWRicndXWGdNdGFReVFFQXdGdHBRbjhkVzVzQlZ1UE5NeGZoOWh6QkZGdzloWmNDRUNhUng3eVI2M3R1c1gzYW1DVWtNSVZDMUE1VktkaGItRW5ESXBGbGJyejk1ZDVwZGd5ckhGTXBEVEZNZ0dKT3hURjNOekdmbnVyd1B1Z2RzaGh6QXU2LUJ1aE9vM0Z6RWpJNHdqd0h3aFFNTWdpUUdJYVFxdVFpWE1CZkN4YV9RQkMzLVZCdHBXTlV5MEo5aHRjMlJkd2E4WWRjQjhfZjFYTE9jZjBvVXljOHlYRDhVT1JVdTZXNjd4V1lTcHhoNjg5MU1KR3ZPZVBRbFpGMVZ5NHNSaTBkMzlCSlQtanN4Vlg0Z2dQemh5Qmt5eFBSTGJaajJNX3YzaXVLS2hwei04X3JlRWxlY2w0aGFGY2N0WDQxQl91dlNQUkF6aEx5U2FrdFZYWWJzcTJ0Y2U0Y0ZNa2swM3d4cm83R21zdDJGSGxaQXlXdGNuczlMQjdVLTdWWkpVWVlqbjRkalF3NWZXNVNDNUlEOE9uVlcwTTVuVU00bjhTeTZYSUszNnRsNEVhdks0NHdNLW1YbzViZ0RlVmNCZE1wOFFyNFNEeXp0RVRET2dZQkFfMEl0Uk9pcjlrakRoNHN4SXM2eEpfZF9kRUt0cEVHVERmSl9VYnlfU1U4MDJrLWZoZ3dEaE43WkJCQXFxTGpjV21kZTZELXo4UURfbE5QZkUtVW9HeUNrS19seXlLUWxqdTNOVHRjVmFUQkVWTmt2YU9vNjlOVXIyRjFhanhXZUdZb1ZGSm40NC1yQmxFdXUzQmxJU2JrYlllWUFQMWxQZDBnYTRqWlFJTW1XSXhfUUtEdS1PQkY2aUM5enB0dkZfODJENEtLbzNrMzFrWHJGcVc4enJwTnJLc3B6N0ZVeVpwRW5OT0RMM2lzbHJ5a0VQMHY3d3FRTDVjVkp1VHh1VU95eHpsc1M5NG01SDVrNkdwRy1iOGJJQTd5eVJISElibndtd0JlWjZYLUctdlducDRPRXFVMlVIWlcydlJ5SkNmTUlyWTF6eHlzcmxYenNBaU1QUGg3VlMyam1Fb1ROcGgxaEdIRm0zZVNFQWVKek1HOHlOXzFRbnhiSmZYeGFkWjRKSTJON21rcnBfbl9yU1JRZW1pcjVkU21ZZEdGTkc5Uy1HcldMNlp4WHVjRGJ2dzZrdld1bEJGZm1qX1lRaGpPeENzMk5iN3pLT19tYWhrc0MwRVQyaGVabzFLNXJhR055RElybWZ4cDJNZWs0M3UtT3FDYWZsaE8xZnJwWElCd3hGV21IM05oZGhrN1VDM0FDa0Y1ak1fb1QwRDBpam5wdmh1eEdyaTF3WnUzTllzX0FFR25WT0NsRW1vdnpmbDdDRlBSZ2lIcDVzZk9OdTZ4S2Y3T2VhZ1hDNTU3STVRRzBySllIMHh2WGJpOWRXOW52cnUyemp6am9rY3oycUxlX0VHOGszWm9UeHVfVW9NMktldmdwdWVVbzM0dlhvTS1hTVVpLVVhY0hQVW9QNnV6Z1VqazhXT2pfU09KV0ZQVEltWk9Wd2hRZTFtUTdzWEJjb2dkazlBcVVQdTR2UjZSZG9SOXBKcXM2bWtWaW9mVDhCTjVNc2hyOWwydnJFTFlpTWdLY2JDdmNqTWl0dmdzblZacmNSMEhWRFJQN2FkOEI2V1REUVF2NTJfZTkzLTBMTC1qeHRaUFBNRkV1YVJ4akZfbGkwR19NU3AtVndpT3N6UU80UkY5RVZXU3RxY2ttbUlUZUUwbTRZU09HRDdhX3pQU3BwaWdpa1BxbDFrU2RPblpJMzFhQm1IUFVoWjQzM2ljRzJfRWw4dTc0d1JyWlkzVG1OT2Z1cGh2dlRJeHQ1R05McGpZS3BKRThGZHdjTXRnNnJ4Mk9MbDV2TUtOQUE2dV9tV3VSc1pIQ3R1b3k1eFktX01uNHpSQURKdGtseURMallBZkhrR0VXSEJaRkRFVWk5dEx2Y2tWd1ozSXIzdXRZVkxERDhuTUtKVDJadDVLRDBmUk5OeFB2VDBxWldnN3B0RFFpOG9SWE4tMzZyS1c4bWlLX2RtT0pTUWRUb0o2WkxaUzBJVHppd0EtTTdnMUVKZGZQak50eUlaYlFkQWtWNlRzckRGNi1HWk5Nc3E3WS1tZGFYNnkyaG1hOW5vZklGYXFfYXBDYTJ1b19jaXZOZDJ4TTF4RW5Ya3IxTERyLUJ5X0FJZFp2SzJhUk53SGZNTklRTndpTHp1VG1TUmZuTEhMSUVwX210ckhUZXFNeHdnbjBhSGtyQkRsQnpXdFd5ZW9RUGdPc2ZEZVpaaTJZYmx0Q19QdlNtczRQTEtwTm04cVpPVzZGczRxTjlpci1LZHUwSlFGZ05WVm1GN1RDZ2FTZTJrYWFMX0l6VGEwZzB1RUduV0EzY0oyMml6aHA1RnVXWHBEQjk1NjV4clBPMXhyVTVkUGx3WU5COEJ6ZlM4WG5HVDd5dXZ3aHQwWGRMcVlyYUpSd1BIRlExeHFVam5TZ0RaZVR5aXVNWGVpM0RoMi1Xa2Zydk5pOThEZUM4LWdXbU8zRkRGSTlRZHhibUVjeGRXck1vMnl3MjVQS2VvTWVId1hSdTRuSVhsNm43VHZTN0UtYlNpY1FxOVBla2JUeGttdUdob2dobmFNazZaY0VfcmllWlVicTc1eFNIMWVXdU90blJ1dFV0OEEtRGFUNGs1RDlubHhqUEFEVTZfMzhIU2RnUURzc0pnVGlKWHhyMHZwdUhCWXVSdzBVT1BMdDN2T0lzM2p1WUt4R3dDTHJEdTlwUmxxSnFjdDJmMmx3NzUwSjcwTkpLY2VhMFRTcW1WeXR2bGdMZW9hYWU0ci03ZE5paWk5OVVFb2Z2aFZsenFiVTY4clY5Q2ZzMTdkblo1QV9rYm9XRmREcEV1MnZqWkw4Nk1lTVRScXdvcmg2bDhDTWJuMWNKQU0wUF8tbE1CamxGeU4wc3BsYy1ON1NyM0NwVzY4OXZOcGtHaXA4VHpyaFl0djc2aHFrbGpIYmRmQ21EMXJBa3N3T1FOVE5XMkI2QTNyLV9EbEk1clU2bTgxTFdVRkxJQ1Jpc1hHVGEyb3BxaGk3Y2dYdGJMVkFzTDA4d3hwVjR5RDhXeWdXcy1WUXVDOWpCY2ZpZVRVXzFNbjNVSlNLVDIxNTZyczF4dDYzdjRUQ0ZMc19ZMnoxU2dXZnNTeWZaSTZVZWY2eVZKTjI3QXRZZEJYdTdWX1dXWi03Vk5kbzNVdG1aQ3lMTTZoVEtWbkdHdHRYM3pPTW84QzZPRUk2dl9pUy1pU1pQeW04b0NWVmtybTdsaVZWQzcwUkZCQkxFMnlOc1hqRXlXNmJadjJyUUlZYm9Qd05XZ0xsVTlOVzJDcjBhOC1ZOWQ0SERHMVdDei1oeU93SDJjY2FwZXZGRnRJQ0dPNi0tRHgyT3BkSmlkbGljeE82bXRnQU1lTl9rN0JabzFOOGRpWDNUcUJkUFJ2N2psVHdLa19rNlNlRmdtcUhDbUhSdW4tXzlzUzdFa1I2bFhCRkJpX0RjM3VqcEZyaVBQVXIyeE1MMlJDc21SRy1vNXBFcEpfLVJsaTdEczBLandSZGZvVWV5ZWJmT3RIN3o5azVaRHpEbm85ZTJKUGYzRjJsWS12dk5yemRrVUszSWw2alh3ZHFEdDQ3QmdiUXdYR0FaX1o1aTBjUHZGSU1yNjhkb3NIblJnUVMyMkZjZ1BCMWZobWtvellFNWpBSnlXcVkyQ0RIZlF2cjIwRVdYNTUtRnhISkI3SnJnTGI2R2x3N1JtRDBiaTBnSUpjVC1uVEhBUWpkWmhPY1otbFBYNFBIak9hc1c0ejhmczJNYmFEZFJVYy1rc3hZSFNTdzdWejg3UktCa3pkWWh6eG9LWlI0SHNfbFpfd3B3ODlxbnlmT0NfRkJlTVBISkRzelFXM3o3X0loM01mNjhoUDFfa25yZWtZUF9zOWFDX1dGRks3enJJcjAxVlJpbzdIX2tjTzFwZVBjSDhSNnR6SGstcTU0ekpmQ0JHa1hUaHp6dnpFd2V4Q3VESWFyZDdydlFmdjdySTRpOHpqV2pyZ1BTMjhKUnB0N0Y5Smw3SGFNSDJIbWpFV01QRWZkYS1tZmtCMG53Z0Nhc19OWGRuZnJNdkZCYlBiLVRaLVc2TzJzM29iUXNncUVSb0g2eUhXY2dCaUd6S1hhbTNPbTZZcktoaHpmQUxEa0stS1lHNmVyTjAtTDkwZlIyM1pBYVg0eXVQTTkxRU5HSmFnSHBpVGRTbGpScldkUVlWWmFiMzd5X0NlYlJqOW1CLTJNQVotTHdxVklSemJVeWdTd3NPZWpfLUYtQkNqeGdWMlFSWE51YW55UnBVdGpFYmNRU2RtZjZTOHNocUJaWk9hWDV0SEpjV1RqSWNlVmF5T3N4U29mTTd1WTgwTGl2R25PTUUzSWU3QTM5OTlNSjRSbnNWT1dDMHl4cWZzamNGTm16NTFJOTJPbHRVLUx0aFBEYVdzdGozdDFzTE9LdmhObVNTd3Bqc2hRcWxMM2NqSlY1WVBLeGgxTVNVVWY3eXAzTEc2bW9pbkE0UHdFOVEtU0Y0bTdZdkNfeUF5aTB4Vk1lLUctTnc2UnVUQm9JZFNyTG8tVGY4TGhPMWFZY2pmRExpeXE4eGg5U0c5SllkT1NnMHVXTm9PZkVPMU1xZ0xaSmF4bl9sVTZvRWhtOEFXbFQxV3BCOGNoOXJoQlhwWW50NjJFaF9IVFExSzh5TWNxS0NrSU9hRGFRNEhxdHRkZW00Z2Y3MWs1MDkzNVE2eUFBYUpoVm44Ti1kdmFFdVJlNWQydTNXTERNcjJSREx5Ml9xNXNnYUVpVHZDa21KcTVYYTVBNlI4bkRKVzYycUZqMl8yVnVlc0xIUVEyZmtieGdnSkJoZzhEMHpROUlwYzdsOXZJQ24wckMxeUxRQnR2bWlNOFR2QklaUFNFTUJ4WXRMdmlteERqeWlGajM1MENNNnFYRWprdnlZR1FkSElseDVFdDVRSjBTVVhVTjFONmI5cmJkYk54VzBoT1lPTzN1bU5oOHVhQnJzcmRKQ2tPLW5HQi1QUkh0VURqTFpKTXBabTBfcERubHhXeWhJNV8tczRQNFFBZnJDQ05lT3cwcTVLZFZUYmRaVXNhcTdHQzA3TjJCT3F1YTdNNW14Wl8ydU56Sm5aVUNBZU93MWh4OEtQZGxpV083RWZmU0JCU0tWRFd4UmhMVmVPYlRScC1tWk1FeUd4MDNqcURFTV9URXU5TW94ZHlJdEVJLV9nQ0UwcjdQcjVxVEFFMUg3bDVMdkFfZUh0amZ1cWFmXzVDZmNnYXpNRHRVU05ma0t0a25QdzU1ak13bzc4VnVqeUFmUFJxTE9USW12VjFSZktpMWh5WVB5TFdFNEptWXoyV3VPeEhyRnJlOFNIZklkTi1FRGl2ZDJxa3VBaEY0bG5SdV9fdVhwbi1sM1VNWFA1ZnFDdUh4SXJ0QnR5c2lJM0Mta0dtdFZCTHlBZUN1clVTbU9IZXlVNlU2aklYR190SUV3T1dUUlNjOGR0VE5zYWV1XzIteUdTZXlCMTc2NzkzNWdlVWVEMjBoUHd4cnpkZ056SjdtV0U4ajNmXy1LUUVwdWlmaUlZY0hSV1ItWkFTU0xqVVllOXJ1dUpxUlJsbklwX3pOVEtGTXlaMUh2ekFabXJWZXVoVjJ2elUyQ2ZOSlVYVzF6NTNsaTNIMlNjVUllUkZPVFVtSEt2R3QzUmxmSnF1OG1ULTFTMG1jM3lsV1RUWVRHM1J1OG95cTI1NDlMVGhrY0Qwc3BiZUdLVDAtbW91Z2hETHVQc1kwOHhZYkZqQXpMYTA0bmZldUJaYVdfYzBHMERnLVJoRHREWWdidlVsMjRuLUNlNGJjUFk5MUFSSU1odDVQRkNlTk05bHBGd08xZWVyeWVielFkTmtoOW13MkVTOTRCMVdnLW9RNGNIWDlqS0lRMmk5b1QteTdWaVkxd2doTGVyTHBTSEIwV2p3d3M5QmJ4MVlDWHRRUUR5SV81RFQyekllRl9ZV2ZuaUZVRFd6VGUtdlhRMHU1TGpHeWpTZVRZYWJyZ1F2cmVpcE9yZFpXZXBoSFA4bEV2UF9ZeHRyTW5wVk45WVNKR0tfU1BtSnBrcExJaW5wUEtLOGZTbEVrRzlKMTBlbjNUU002c1pnVVRsVXdyN3BNYzFaRkJQV3BPYVZIOWxqSnlHaXlnd19UZGhFamYyUzJFcmctak5ZbmNUSWxYUVV5Tk9qRzNMVl83ZElHSnpoSTJPWlFYZnl5UldUNXAtdWNUTFVKdFJFYVJDVXM3djFacFJpNld4MkZKQUhrVmFBWVVYbHNFNmI5SFcxRkpfdXdmam5HVVRuZ3ZoNm53eVR1ODZXZ2tNbU5oQkR3bUY4cl9uZWVNLVhBdTlUZlZxMjdmT212dVdtSEhEaERxZ0ZyRm0zZ2lSZ2xUVkd0VTRnSktxanFTYXBQbXJEMWxmTmYwdnV4WTlkejFLN3R3bC1PemRlQlUySVRqT3Vwd3l5X09nLWZaZ2JWcEd5QW9SbVA3aXlJSGZYLXQyc2V4blpTWGxkcXA5RDZUOTNvQ3pJamlPTHFiX25GRGpSUlRiUGVZZXpCZFdHZDN6a0hFcU1SLWI1V2dmOS1pbXd5YmtRNUNHRHFxV05sSWxuRi05UHR1V2ZvLXF4Vk5qZ3BKU1BFd19fX05QZm5oUjFkVGtYOHI5bi1LeHFEcW00VERvbzlPX3JxRlV3NzZRWDJUbHRUa0xoY2ZwLVZQNS1WdFNnc243VmlEVVQ4WkN4RDVaUHBCZE5fdDB0Y3hzeF94d2NaVlc5U1ZMTTdtUUhyQjNMdFJCbkRJWlViT0ZJeFN2d0RXTnh1SGhRLW9vNFBRQVNNdWhKZjlCSTZZUl9Gc3NuM2NXV2tNQzl1bDhMZUVMeTdKZTVIME04Z3g0QTVHYXNLMWNqQlhQVVBhR2Q5T081S1ZobWZmWWh0Njhua0ViUjRQUWZZbVY5cHBKSzY1YTJpWjdUSFkza1AxVlk3Y2RiSm1pVnU2NXBGY0RSSjJ0c1g0YWprRHdOV2l6dGg1cTdoNTZMbk42ODJHeHNOS2tfT3RfQTNxeGNpWVAtUlc5N1hxQUtDcTc0U3VIQXM1ejRwQVp1LUU4ZXFTZVpmMWhJVVllZGczamJ3TEI1MU1SQkRwbV9OS01fNGNlTUxUSWU4el9aUTY3a1B4bGxQMWdFTVVuX2NtTV9ERE1fMVYzYWJmdVh5c1FEcV8tZzJMd2hEVC16Z0VDdWpOWVpsUEp3SlRfaXJmMThtWUljS2xVXzJkaC1DYktxUTdBaXJqUWx4RlRHd0NRckQzVnltRDN0cUY5d25FNC1xdmpMNUVSMUtuVUdzU2NLM003dzEyZDh2cTc5bTl1NHRXSE9YTHJzeXdrcGs4U2daWmxVQ2JMaDFTRWxPbUlSY0FRVzgycXE1MVJUZnZ5UWxCNjMzaEgtaTVfMThEWkNzanVQRVlseUUtNzYyQ29YYmY0WDBBcHRLa3dZTElfR3QxdkxUaTdIOXhVTjdFZVIzSWZBZHAwTVBmZVFiX1drSWJOYjR2aDIxSmx5T1RCLTZMVk1xRGNFNUpHc0NBZmJvWHVMUFliSGNRd2llanFMUlhzbklZdWZqTzZ6MUdZakpTYnlHUlZybjRfd0tKTHEtZnkxLVUwY19sWlN5a0I4eGlISjd0U3JjalFCb0xza2JRRkhGV1h6djFjZ3dkWFFfRHZ2TGJEZ3dnWHF6cWU5TjhWRTM4Q0tibUpCbXl5UXdxdU1zaVpqdjZqTzFMX1FIZnJfZTlIX0w4WGxwMlFfVmR3NG12a2JlQVZBakFBTWhObnk2S1FvbE0tejhKS3doeGFUWWVTZDVFQ3dhd2VyQmU3UkVBMnFJVDZjS2xBekJFRFJxTTJHNjg1T0lsZEp4bjhMQ2ctaEhWRlJMaV9nS3h3Y2k3bUVLVnBZNEJQRUI2d1hVZDgtMkhlWWNQZVlKc0xBanJNTDJMR0hQS1FjSS1ad3NvazliZlQwU2M0aVVSa1hUN1o2YzNfcXBfTXBZTXlGeEhCcXQtOTFVRjNYcWFRNnd0ZjhwcG1aY0lzaXo0TVZQSmo3eVJDMU1tVFB5RUdpczVVTVJ1VlVvbEZSeDg5ODNiZEdKLUhseUFKcXBHYnQ0MTYybVlxcWVkd2dqZkJfWjBDWWgzQnlGWHZxRGxwel9HLUpmUWxJVTVHb1JGeTNLTnBfN2F0SXlnRVUxaWhHWGFQR1piQzVkY3hfZWRvTC1vM3Z2VXA4aHJkU0lrUmFTbm1RLmlrcHRpNkNpMUJhVGk4ZjA3TVB4UXc\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -864,7 +864,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/keys/nodeKeyforBkp?api-version=2016-10-01') + .delete('/keys/nodeKeyforBkp?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -884,7 +884,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/keys/nodeKeyforBkp?api-version=2016-10-01') + .delete('/keys/nodeKeyforBkp?api-version=7.0-preview') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -905,7 +905,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/restore?api-version=2016-10-01', '*') +.post('/keys/restore?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -926,7 +926,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/restore?api-version=2016-10-01', '*') +.post('/keys/restore?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKeyforBkp/09512c88de6345ed9885cc6bc44fea2d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mzqyezVi5JNG4sUd0IBbcKWQZdc87Wy_i4OCPQKytQXA5mU3F5TCAjSdk__J56WW8bVnRHADzEMY8TiXNvDfK3D8e1D2qKwDkCaLEdpAQ28wAYvl2Bcqp0f7qAx6rNDNd621m_tGdSI6yVC2Hu8kImXYWdyTQnHnKhBOWqBqLQpaz6NX41iQi2X5Lprk0lr1PYM6mVF5b_vSqdAgXSD74pQC25qIMnmq81nJTY_6URauMYb_oZSK-nGmOyXJMYjFJJaqjCDqFii6aMjtBAtlpRiwTmeibAzoQOZUZ11M-teq_GZPmmnbtVv2J2Tipnykqoi8PA8pXW6f477sj33ABw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343548,\"updated\":1479343548}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -947,7 +947,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343550,\"updated\":1479343550}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -968,7 +968,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343550,\"updated\":1479343550}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -989,7 +989,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//encrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey//encrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"lQlK1kJdeI6BFvc_T6aZkgd5yUZkx0LmfjRb7tSqCTOzpmdPqX2dC4un1EvaFo9ur6biJdJKLzyE11YL_vAf_tI4vQzW4hG9addrI_XgistIWC4m9gDujYbg38NMWyZquSmvFRaZEJdCRWdd5UV9WYKsFMLp_E2VMexbtIBn4SS8EgX3dheEwIk1T-M9B43Jz7aHN97Xpp-ie94c6g1JeEFwHGpznSxYLqeNXv9EOE3oY-xIPWtBHwWvqrcekjM0BrFUhx-rQvr4rtBB0VQGwyYxeCRL6vsRykgQyN3RTZP-JrcwjNUBQ7iRWa9YpKHekY2DnNSxNzz7VKhnZqL16A\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1010,7 +1010,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//encrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey//encrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"lQlK1kJdeI6BFvc_T6aZkgd5yUZkx0LmfjRb7tSqCTOzpmdPqX2dC4un1EvaFo9ur6biJdJKLzyE11YL_vAf_tI4vQzW4hG9addrI_XgistIWC4m9gDujYbg38NMWyZquSmvFRaZEJdCRWdd5UV9WYKsFMLp_E2VMexbtIBn4SS8EgX3dheEwIk1T-M9B43Jz7aHN97Xpp-ie94c6g1JeEFwHGpznSxYLqeNXv9EOE3oY-xIPWtBHwWvqrcekjM0BrFUhx-rQvr4rtBB0VQGwyYxeCRL6vsRykgQyN3RTZP-JrcwjNUBQ7iRWa9YpKHekY2DnNSxNzz7VKhnZqL16A\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1031,7 +1031,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//decrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey//decrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"3Y5h5oesyasX3LF56H8TGOdRJSLtkyvmeR47rIuj2qt5uesz5bYId0RQjJJRXJ-8KkMDe3JRdZGi2oUJMzF2MXLGWYlKeFkkzDMX_NhXfufsUA6O8Q_uS_pUUHEqJ6c6YYQdbg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1052,7 +1052,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//decrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey//decrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"3Y5h5oesyasX3LF56H8TGOdRJSLtkyvmeR47rIuj2qt5uesz5bYId0RQjJJRXJ-8KkMDe3JRdZGi2oUJMzF2MXLGWYlKeFkkzDMX_NhXfufsUA6O8Q_uS_pUUHEqJ6c6YYQdbg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1073,7 +1073,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/encrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/encrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"wZBsLMrtWYT_OfK5FjTnhU0yOJuVGFWp001nEx3y6_wEXR2m9mM0M1CSE_IO-ipmvpHwouDBoX2ieHo7XAILb7b1kgZlfKIFEl6IV8WMCbs9tKjDpIYOfOImduoROudj73yyu1ZxNgsshvk_QMgQs2H5qYVhLRhK3IrVQaS16YjxlkntVRa63ZOPMG_dgdgL3tpYvGkwnnJ_OWJhr0tflBwo-ffAZ_POFdIVk0s5YpO4e1eGvCJS0l9tp8bxcQ1TujS70LEfrVNtnuGz51C4vJ0FzjsAm9qV18iAa4dmQD6DZFrZz8JxoSsiWAGEUGM1UtYUkFF9xJ9KsCdSDuvwXA\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1094,7 +1094,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/encrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/encrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"wZBsLMrtWYT_OfK5FjTnhU0yOJuVGFWp001nEx3y6_wEXR2m9mM0M1CSE_IO-ipmvpHwouDBoX2ieHo7XAILb7b1kgZlfKIFEl6IV8WMCbs9tKjDpIYOfOImduoROudj73yyu1ZxNgsshvk_QMgQs2H5qYVhLRhK3IrVQaS16YjxlkntVRa63ZOPMG_dgdgL3tpYvGkwnnJ_OWJhr0tflBwo-ffAZ_POFdIVk0s5YpO4e1eGvCJS0l9tp8bxcQ1TujS70LEfrVNtnuGz51C4vJ0FzjsAm9qV18iAa4dmQD6DZFrZz8JxoSsiWAGEUGM1UtYUkFF9xJ9KsCdSDuvwXA\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1115,7 +1115,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/decrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/decrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"3Y5h5oesyasX3LF56H8TGOdRJSLtkyvmeR47rIuj2qt5uesz5bYId0RQjJJRXJ-8KkMDe3JRdZGi2oUJMzF2MXLGWYlKeFkkzDMX_NhXfufsUA6O8Q_uS_pUUHEqJ6c6YYQdbg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1136,7 +1136,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/decrypt?api-version=2016-10-01', '*') +.post('/keys/nodeKey/d385f29f138249c5b46c107112a9d80f/decrypt?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/d385f29f138249c5b46c107112a9d80f\",\"value\":\"3Y5h5oesyasX3LF56H8TGOdRJSLtkyvmeR47rIuj2qt5uesz5bYId0RQjJJRXJ-8KkMDe3JRdZGi2oUJMzF2MXLGWYlKeFkkzDMX_NhXfufsUA6O8Q_uS_pUUHEqJ6c6YYQdbg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1157,7 +1157,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343552,\"updated\":1479343552}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1178,7 +1178,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343552,\"updated\":1479343552}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1199,7 +1199,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//wrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey//wrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"MBfBTGgoi0S4ui5d8hdnscta6CDPTUrRUWLIryha5ZbpSzCvUcXGQvRZyQNmDVbExAVUBMzrVwyQkGQAx6CnhBBipvlBokZCYBwWX9Y69fdRfoy5ofY5hyTd-Dc3g4P0LjC-Hv9-DR2pGY4hIRAhtOjsV8WAz1_StB1DTxzUWTx54CSiMuYGrdEHvKZXMuTms5rnw-aJLp7kaaFpWvUZEUu4VvvWVUd-uLFEbN5-BxbIKsaekm415RFutXoaSPHIyzZDdNMWpoqQ9S8H61Qf52QLLZiNrGnm55XH4gwMtPXD4nO199404ZFjFcdNIwbBEGCAaU-WG8GmTqTKQaUCoQ\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1220,7 +1220,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//wrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey//wrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"MBfBTGgoi0S4ui5d8hdnscta6CDPTUrRUWLIryha5ZbpSzCvUcXGQvRZyQNmDVbExAVUBMzrVwyQkGQAx6CnhBBipvlBokZCYBwWX9Y69fdRfoy5ofY5hyTd-Dc3g4P0LjC-Hv9-DR2pGY4hIRAhtOjsV8WAz1_StB1DTxzUWTx54CSiMuYGrdEHvKZXMuTms5rnw-aJLp7kaaFpWvUZEUu4VvvWVUd-uLFEbN5-BxbIKsaekm415RFutXoaSPHIyzZDdNMWpoqQ9S8H61Qf52QLLZiNrGnm55XH4gwMtPXD4nO199404ZFjFcdNIwbBEGCAaU-WG8GmTqTKQaUCoQ\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1241,7 +1241,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//unwrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey//unwrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"Wa8DE-d3U27TUVkT2RXWrRUOcOyjDGJ6XhACZf7e3JFeOmSn0eYDEwju3lFDItDiuu4CeQ4_m38KvvXrT2B92I-xChdT8PSEnjUegJwVy8iEaP_ref3C8AmcpTX1IqcxPZNuIw\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1262,7 +1262,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//unwrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey//unwrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"Wa8DE-d3U27TUVkT2RXWrRUOcOyjDGJ6XhACZf7e3JFeOmSn0eYDEwju3lFDItDiuu4CeQ4_m38KvvXrT2B92I-xChdT8PSEnjUegJwVy8iEaP_ref3C8AmcpTX1IqcxPZNuIw\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1283,7 +1283,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/wrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/wrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"BgpKmXN7SLCT24hak7fGwA-5TGiy3qok_fTR-EEYox8G6IuaYm2UFTl31OV5bGtdddpYFn7peeiMU5YjtSJY4bHzJ3eRZIGBwIjID102tue1WEDPGedrCf_06SWCWrhWH_QYKznEGgnNu1yLtZwovPvHgbJ7HtUMQt2kp37nVvLz1kabdeUxH5th8QwAOvpBJiZ5er1-atwSCdM1jQ-FHywAHQu2MGS4l3selIT6yyVeZGkyPd0-HwRo0mvZKkrIMI-bswvhWL2wUB15FG473S0bEWBhosv9yzN0vLzzKSg8ooe4gLxqQNH8tgni5KH5c5L96UyrYWtVmuWqL2V2sg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1304,7 +1304,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/wrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/wrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"BgpKmXN7SLCT24hak7fGwA-5TGiy3qok_fTR-EEYox8G6IuaYm2UFTl31OV5bGtdddpYFn7peeiMU5YjtSJY4bHzJ3eRZIGBwIjID102tue1WEDPGedrCf_06SWCWrhWH_QYKznEGgnNu1yLtZwovPvHgbJ7HtUMQt2kp37nVvLz1kabdeUxH5th8QwAOvpBJiZ5er1-atwSCdM1jQ-FHywAHQu2MGS4l3selIT6yyVeZGkyPd0-HwRo0mvZKkrIMI-bswvhWL2wUB15FG473S0bEWBhosv9yzN0vLzzKSg8ooe4gLxqQNH8tgni5KH5c5L96UyrYWtVmuWqL2V2sg\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1325,7 +1325,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/unwrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/unwrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"Wa8DE-d3U27TUVkT2RXWrRUOcOyjDGJ6XhACZf7e3JFeOmSn0eYDEwju3lFDItDiuu4CeQ4_m38KvvXrT2B92I-xChdT8PSEnjUegJwVy8iEaP_ref3C8AmcpTX1IqcxPZNuIw\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1346,7 +1346,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/unwrapkey?api-version=2016-10-01', '*') +.post('/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d/unwrapkey?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/e48625e09a994f4ca2a7852f14c5912d\",\"value\":\"Wa8DE-d3U27TUVkT2RXWrRUOcOyjDGJ6XhACZf7e3JFeOmSn0eYDEwju3lFDItDiuu4CeQ4_m38KvvXrT2B92I-xChdT8PSEnjUegJwVy8iEaP_ref3C8AmcpTX1IqcxPZNuIw\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1367,7 +1367,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/15d59393004e4ff990719bd32dd66333\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343554,\"updated\":1479343554}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1388,7 +1388,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/keys/nodeKey?api-version=2016-10-01', '*') +.put('/keys/nodeKey?api-version=7.0-preview', '*') .reply(200, "{\"key\":{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/15d59393004e4ff990719bd32dd66333\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2E2mRyr2K55w1RHwmMTGkW5Z4ZKBmf-BlL4It1yZZkYks4k0QkNHDjFqLMkQkXL8bEMJ5doAq7WUWKOG4JBlIwBpoYBjgtI97TCARH1yTA1s3TDc2ZYlSnCBohlw6r68OYOjHHWpY4J3HgeoNuLkIMTcM5el3zI0F11OBUgC0PyuZ9rlZc_4C0NGAg604vmiz6dOjY-o-KnGOfo1qyfMl1DDCeEur-Dy0UEFB6XeSd4SlNHlc3-ViN23flWTSgw710RYRaL8XHar6O7Ml4nqO7KKvSJcHnZgPzZDsoqxvNnbpwuCr_2pOrjy2ygJy2Gz_H4nhobDxzy1pXogEd8snQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1479343554,\"updated\":1479343554}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1409,7 +1409,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//sign?api-version=2016-10-01', '*') +.post('/keys/nodeKey//sign?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/15d59393004e4ff990719bd32dd66333\",\"value\":\"TdSqFCmuzVvgj94A9Yry1IdSsZJUcrfUJoCAiIZEkkLp2jh2MyqX3GArU99YhHcnEEtjxCi8VsJfjoXE1CJg6_4hiFx0Ja3if_VENF25MtQy28UEkHj-Ydb7_ZgNBMaCLSqs507E9sn2xj4Jfzp_tEhuh7DaG9T3YsfxtoWbD-MkyaUn3IpSq4r6e2t3km-gDGUSU2CaURfJNMjNuRNW2y9-nPcNIDTD4ysKEWcEdNXhxKdsa4aOAvi5oaMGqrbmu2OUbKFC063juyDPQ0IZtvs3a-93yfBShGhS6Vrg8Xdyl-ccu0cCZ3jWjEuKTAl50FiBdJyeEvCV3nF-q0GDmQ\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1430,7 +1430,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//sign?api-version=2016-10-01', '*') +.post('/keys/nodeKey//sign?api-version=7.0-preview', '*') .reply(200, "{\"kid\":\"https://sdktestvault0511.vault.azure.net/keys/nodeKey/15d59393004e4ff990719bd32dd66333\",\"value\":\"TdSqFCmuzVvgj94A9Yry1IdSsZJUcrfUJoCAiIZEkkLp2jh2MyqX3GArU99YhHcnEEtjxCi8VsJfjoXE1CJg6_4hiFx0Ja3if_VENF25MtQy28UEkHj-Ydb7_ZgNBMaCLSqs507E9sn2xj4Jfzp_tEhuh7DaG9T3YsfxtoWbD-MkyaUn3IpSq4r6e2t3km-gDGUSU2CaURfJNMjNuRNW2y9-nPcNIDTD4ysKEWcEdNXhxKdsa4aOAvi5oaMGqrbmu2OUbKFC063juyDPQ0IZtvs3a-93yfBShGhS6Vrg8Xdyl-ccu0cCZ3jWjEuKTAl50FiBdJyeEvCV3nF-q0GDmQ\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1451,7 +1451,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//verify?api-version=2016-10-01', '*') +.post('/keys/nodeKey//verify?api-version=7.0-preview', '*') .reply(200, "{\"value\":true}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -1472,7 +1472,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.post('/keys/nodeKey//verify?api-version=2016-10-01', '*') +.post('/keys/nodeKey//verify?api-version=7.0-preview', '*') .reply(200, "{\"value\":true}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', diff --git a/test/recordings/keyVault-secret-tests.nock.js b/test/recordings/keyVault-secret-tests.nock.js index f4c483ae53..ee22ac817c 100644 --- a/test/recordings/keyVault-secret-tests.nock.js +++ b/test/recordings/keyVault-secret-tests.nock.js @@ -5,7 +5,7 @@ exports.scopes = [[], var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -26,7 +26,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -46,7 +46,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/?api-version=2016-10-01') + .get('/secrets/nodeSecret/?api-version=7.0-preview') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -66,7 +66,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/?api-version=2016-10-01') + .get('/secrets/nodeSecret/?api-version=7.0-preview') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -86,7 +86,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=2016-10-01') + .get('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=7.0-preview') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -106,7 +106,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=2016-10-01') + .get('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=7.0-preview') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"created\":1479343555,\"updated\":1479343555}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -127,7 +127,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/secrets/nodeSecret/?api-version=2016-10-01', '*') +.patch('/secrets/nodeSecret/?api-version=7.0-preview', '*') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"ede2c2613ab96101ef90e0f93ed400417324724f8d0793cc46156eb21c83a50b2aa6d24fbbdce46d3a06ef47b671ba579248\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -148,7 +148,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/secrets/nodeSecret/?api-version=2016-10-01', '*') +.patch('/secrets/nodeSecret/?api-version=7.0-preview', '*') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"ede2c2613ab96101ef90e0f93ed400417324724f8d0793cc46156eb21c83a50b2aa6d24fbbdce46d3a06ef47b671ba579248\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -169,7 +169,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=2016-10-01', '*') +.patch('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=7.0-preview', '*') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -190,7 +190,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.patch('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=2016-10-01', '*') +.patch('/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c?api-version=7.0-preview', '*') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -210,7 +210,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/secrets/nodeSecret?api-version=2016-10-01') + .delete('/secrets/nodeSecret?api-version=7.0-preview') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -230,7 +230,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/secrets/nodeSecret?api-version=2016-10-01') + .delete('/secrets/nodeSecret?api-version=7.0-preview') .reply(200, "{\"contentType\":\"text/plain\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/d4452cd0989a4c96a7dc638d53fa6f7c\",\"attributes\":{\"enabled\":true,\"exp\":2527401600,\"created\":1479343555,\"updated\":1479343557},\"tags\":{\"foo\":\"1c2113c5908b1633b597923b338e697e6396c6b61dea3431fd058d6efb89d103d134e7d6c14ec3c37686dccf447009884afa\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -250,7 +250,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/?api-version=2016-10-01') + .get('/secrets/nodeSecret/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: nodeSecret\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '76', @@ -270,7 +270,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/?api-version=2016-10-01') + .get('/secrets/nodeSecret/?api-version=7.0-preview') .reply(404, "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Secret not found: nodeSecret\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '76', @@ -291,7 +291,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a\",\"attributes\":{\"enabled\":false,\"created\":1479343558,\"updated\":1479343558}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -312,7 +312,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a\",\"attributes\":{\"enabled\":false,\"created\":1479343558,\"updated\":1479343558}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -332,7 +332,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a?api-version=2016-10-01') + .get('/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a?api-version=7.0-preview') .reply(403, "{\"error\":{\"code\":\"Forbidden\",\"message\":\"Operation get is not allowed on a disabled secret.\",\"innererror\":{\"code\":\"SecretDisabled\"}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '132', @@ -352,7 +352,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a?api-version=2016-10-01') + .get('/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a?api-version=7.0-preview') .reply(403, "{\"error\":{\"code\":\"Forbidden\",\"message\":\"Operation get is not allowed on a disabled secret.\",\"innererror\":{\"code\":\"SecretDisabled\"}}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '132', @@ -372,7 +372,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .delete('/secrets/nodeSecret?api-version=2016-10-01') + .delete('/secrets/nodeSecret?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a\",\"attributes\":{\"enabled\":false,\"created\":1479343558,\"updated\":1479343558}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -392,7 +392,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .delete('/secrets/nodeSecret?api-version=2016-10-01') + .delete('/secrets/nodeSecret?api-version=7.0-preview') .reply(200, "{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/e9401d729bca408d87f4b841f4278b4a\",\"attributes\":{\"enabled\":false,\"created\":1479343558,\"updated\":1479343558}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -413,7 +413,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret1?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret1?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1/3068d4b9a7124e019b1f585327bd3bd2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -434,7 +434,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret1?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret1?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1/3068d4b9a7124e019b1f585327bd3bd2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -455,7 +455,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret2?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret2?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2/58d980672e5541a3970aff66c6b0642d\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -476,7 +476,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret2?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret2?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2/58d980672e5541a3970aff66c6b0642d\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -496,8 +496,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -516,8 +516,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets?maxresults=2&api-version=2016-10-01') - .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?maxresults=2&api-version=7.0-preview') + .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate1\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListCertificate2\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340293,\"updated\":1479340293}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -536,8 +536,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') - .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -556,8 +556,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') - .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMDAhTURBd01ESTVJWE5sWTNKbGRDOUpUVkJQVWxSTVNWTlVWa1ZTVTBsUFRrTkZVbFJUSVRBd01EQXlPQ0U1T1RrNUxURXlMVE14VkRJek9qVTVPalU1TGprNU9UazVPVGxhSVEtLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/importListVersionCerts\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340297,\"updated\":1479340297}},{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeImportCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340291,\"updated\":1479340291}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -576,8 +576,8 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -596,8 +596,8 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') - .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE4NCFNREF3TURFM0lYTmxZM0psZEM5T1QwUkZVMFZEVWtWVUlUQXdNREF5T0NFeU1ERTJMVEV4TFRFMlZERTRPalF3T2pVd0xqQXdORGcyT0RsYUlRLS0iLCJUYXJnZXRMb2NhdGlvbiI6MH0&maxresults=2') + .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret1\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret2\",\"attributes\":{\"enabled\":true,\"created\":1479343561,\"updated\":1479343561}}],\"nextLink\":\"https://sdktestvault0511.vault.azure.net:443/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', @@ -616,7 +616,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/policyCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -636,7 +636,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets?api-version=2016-10-01&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') + .get('/secrets?api-version=7.0-preview&$skiptoken=eyJOZXh0TWFya2VyIjoiMiE5MiFNREF3TURJMElYTmxZM0psZEM5UVQweEpRMWxEUlZKVVNVWkpRMEZVUlNFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=2') .reply(200, "{\"value\":[{\"contentType\":\"application/x-pkcs12\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/policyCertificate\",\"managed\":true,\"attributes\":{\"enabled\":true,\"nbf\":1430344421,\"exp\":2208988799,\"created\":1479340309,\"updated\":1479340309}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -657,7 +657,7 @@ nock('https://sdktestvault0511.vault.azure.net') var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/094c85e701c1406a968cdeeea8161720\",\"attributes\":{\"enabled\":true,\"created\":1479343563,\"updated\":1479343563}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -678,7 +678,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/094c85e701c1406a968cdeeea8161720\",\"attributes\":{\"enabled\":true,\"created\":1479343563,\"updated\":1479343563}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -699,7 +699,7 @@ function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/7b26fa2cfce74b1f898acfbb2ec8ff7d\",\"attributes\":{\"enabled\":true,\"created\":1479343564,\"updated\":1479343564}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -720,7 +720,7 @@ function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') .filteringRequestBody(function (path) { return '*';}) -.put('/secrets/nodeSecret?api-version=2016-10-01', '*') +.put('/secrets/nodeSecret?api-version=7.0-preview', '*') .reply(200, "{\"value\":\"Pa$$w0rd\",\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/7b26fa2cfce74b1f898acfbb2ec8ff7d\",\"attributes\":{\"enabled\":true,\"created\":1479343564,\"updated\":1479343564}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -740,7 +740,7 @@ nock('https://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('http://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/versions?api-version=2016-10-01') + .get('/secrets/nodeSecret/versions?api-version=7.0-preview') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/094c85e701c1406a968cdeeea8161720\",\"attributes\":{\"enabled\":true,\"created\":1479343563,\"updated\":1479343563}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/7b26fa2cfce74b1f898acfbb2ec8ff7d\",\"attributes\":{\"enabled\":true,\"created\":1479343564,\"updated\":1479343564}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', @@ -760,7 +760,7 @@ nock('http://sdktestvault0511.vault.azure.net') function (nock) { var result = nock('https://sdktestvault0511.vault.azure.net') - .get('/secrets/nodeSecret/versions?api-version=2016-10-01') + .get('/secrets/nodeSecret/versions?api-version=7.0-preview') .reply(200, "{\"value\":[{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/094c85e701c1406a968cdeeea8161720\",\"attributes\":{\"enabled\":true,\"created\":1479343563,\"updated\":1479343563}},{\"id\":\"https://sdktestvault0511.vault.azure.net/secrets/nodeSecret/7b26fa2cfce74b1f898acfbb2ec8ff7d\",\"attributes\":{\"enabled\":true,\"created\":1479343564,\"updated\":1479343564}}],\"nextLink\":null}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', From 000e7007d63f7746facb8d685402490ed614f831 Mon Sep 17 00:00:00 2001 From: David Desberg Date: Mon, 12 Mar 2018 14:02:47 -0700 Subject: [PATCH 2/2] update AKV version numbers --- lib/services/keyVault/package.json | 4 ++-- lib/services/keyVaultManagement/package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/services/keyVault/package.json b/lib/services/keyVault/package.json index 4c6b331ec9..dc42e15035 100644 --- a/lib/services/keyVault/package.json +++ b/lib/services/keyVault/package.json @@ -11,7 +11,7 @@ "Wang, Yugang ", "Xu, Willie " ], - "version": "3.0.1-preview", + "version": "3.0.2-preview", "description": "Microsoft Azure Key Vault Client Library for node", "tags": [ "azure", @@ -25,7 +25,7 @@ "types": "./lib/keyVault.d.ts", "license": "MIT", "dependencies": { - "ms-rest": "^2.3.0", + "ms-rest": "^2.3.2", "ms-rest-azure": "^2.5.2", "underscore": "^1.8.3" }, diff --git a/lib/services/keyVaultManagement/package.json b/lib/services/keyVaultManagement/package.json index d0ff627768..747a24a217 100644 --- a/lib/services/keyVaultManagement/package.json +++ b/lib/services/keyVaultManagement/package.json @@ -10,7 +10,7 @@ "Zavery, Amar ", "Wang, Yugang " ], - "version": "1.1.0-preview", + "version": "1.1.1-preview", "description": "Microsoft Azure Key Vault Management Client Library for node", "tags": [ "azure", @@ -24,8 +24,8 @@ "types": "./lib/keyVaultManagementClient.d.ts", "license": "MIT", "dependencies": { - "ms-rest": "^2.2.2", - "ms-rest-azure": "^2.3.3", + "ms-rest": "^2.3.2", + "ms-rest-azure": "^2.5.2", "underscore": "^1.8.3" }, "homepage": "http://github.com/Azure/azure-sdk-for-node",