diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index e5640602396b..f2041c6e4653 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -63,6 +63,7 @@ "lint:terminal": "eslint package.json \"src/**/*.ts\" samples --ext .ts", "pack": "npm pack 2>&1", "prebuild": "npm run clean", + "regenerate": "npx autorest swagger/README.md --typescript", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", "test:node": "npm run clean && npm run build:test && npm run unit-test:node", "test": "npm run clean && npm run build:test && npm run unit-test", diff --git a/sdk/keyvault/keyvault-certificates/review/keyvault-certificates.api.md b/sdk/keyvault/keyvault-certificates/review/keyvault-certificates.api.md index 127e5e805b64..8af7d41bd1f1 100644 --- a/sdk/keyvault/keyvault-certificates/review/keyvault-certificates.api.md +++ b/sdk/keyvault/keyvault-certificates/review/keyvault-certificates.api.md @@ -107,7 +107,7 @@ export interface CertificateIssuer extends IssuerProperties { export type CertificateKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; // @public -export type CertificateKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM"; +export type CertificateKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; // @public export interface CertificateOperation { @@ -241,7 +241,7 @@ export interface DeletedCertificate extends KeyVaultCertificateWithPolicy { export type DeleteIssuerOptions = coreHttp.OperationOptions; // @public -export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription"; +export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription" | "CustomizedRecoverable+Purgeable" | "CustomizedRecoverable" | "CustomizedRecoverable+ProtectedSubscription"; // @public export interface ErrorModel { diff --git a/sdk/keyvault/keyvault-certificates/src/certificatesModels.ts b/sdk/keyvault/keyvault-certificates/src/certificatesModels.ts index 91f21d1a7ed0..1fe5a383bd2e 100644 --- a/sdk/keyvault/keyvault-certificates/src/certificatesModels.ts +++ b/sdk/keyvault/keyvault-certificates/src/certificatesModels.ts @@ -6,11 +6,11 @@ import { DeletionRecoveryLevel, KeyUsageType } from "./core/models"; /** * Defines values for CertificateKeyType. - * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM' + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @readonly * @enum {string} */ -export type CertificateKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM"; +export type CertificateKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; /** * Defines values for CertificateKeyCurveName. diff --git a/sdk/keyvault/keyvault-certificates/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-certificates/src/core/keyVaultClient.ts index 5ef6d256b678..50fba3c99017 100644 --- a/sdk/keyvault/keyvault-certificates/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-certificates/src/core/keyVaultClient.ts @@ -30,5475 +30,1506 @@ class KeyVaultClient extends KeyVaultClientContext { } /** - * 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. - * @summary Creates a new key, stores it, then returns key parameters and attributes to the client. + * The GetCertificates operation returns the set of certificates resources in the specified key + * vault. This operation requires the certificates/list permission. + * @summary List certificates in a specified key vault * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createKey( + getCertificates( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - options?: Models.KeyVaultClientCreateKeyOptionalParams - ): Promise; + options?: Models.KeyVaultClientGetCertificatesOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @param callback The callback */ - createKey( + getCertificates( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @param options The optional parameters * @param callback The callback */ - createKey( + getCertificates( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - options: Models.KeyVaultClientCreateKeyOptionalParams, - callback: coreHttp.ServiceCallback + options: Models.KeyVaultClientGetCertificatesOptionalParams, + callback: coreHttp.ServiceCallback ): void; - createKey( + getCertificates( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, options?: - | Models.KeyVaultClientCreateKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientGetCertificatesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - kty, options }, - createKeyOperationSpec, + getCertificatesOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Imports an externally created key, stores it, and returns key parameters and attributes - * to the client. + * 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. + * @summary Deletes a certificate from a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - importKey( + deleteCertificate( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - options?: Models.KeyVaultClientImportKeyOptionalParams - ): Promise; + certificateName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param certificateName The name of the certificate. * @param callback The callback */ - importKey( + deleteCertificate( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - importKey( + deleteCertificate( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - options: Models.KeyVaultClientImportKeyOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - importKey( + deleteCertificate( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, + certificateName: string, options?: - | Models.KeyVaultClientImportKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - key, + certificateName, options }, - importKeyOperationSpec, + deleteCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Deletes a key of any type from storage in Azure Key Vault. + * Sets the certificate contacts for the specified key vault. This operation requires the + * certificates/managecontacts permission. + * @summary Sets the certificate contacts for the specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param contacts The contacts for the key vault certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteKey( + setCertificateContacts( vaultBaseUrl: string, - keyName: string, + contacts: Models.Contacts, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param contacts The contacts for the key vault certificate. * @param callback The callback */ - deleteKey( + setCertificateContacts( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + contacts: Models.Contacts, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param contacts The contacts for the key vault certificate. * @param options The optional parameters * @param callback The callback */ - deleteKey( + setCertificateContacts( vaultBaseUrl: string, - keyName: string, + contacts: Models.Contacts, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - deleteKey( + setCertificateContacts( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + contacts: Models.Contacts, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + contacts, options }, - deleteKeyOperationSpec, + setCertificateContactsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @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. + * The GetCertificateContacts operation returns the set of certificate contact resources in the + * specified key vault. This operation requires the certificates/managecontacts permission. + * @summary Lists the certificate contacts for a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateKey( + getCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: Models.KeyVaultClientUpdateKeyOptionalParams - ): Promise; + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. * @param callback The callback */ - updateKey( + getCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. * @param options The optional parameters * @param callback The callback */ - updateKey( + getCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options: Models.KeyVaultClientUpdateKeyOptionalParams, - callback: coreHttp.ServiceCallback + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - updateKey( + getCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: - | Models.KeyVaultClientUpdateKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, options }, - updateKeyOperationSpec, + getCertificateContactsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Gets the public part of a stored key. + * Deletes the certificate contacts for a specified key vault certificate. This operation requires + * the certificates/managecontacts permission. + * @summary Deletes the certificate contacts for a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKey( + deleteCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param callback The callback */ - getKey( + deleteCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param options The optional parameters * @param callback The callback */ - getKey( + deleteCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - getKey( + deleteCertificateContacts( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, options }, - getKeyOperationSpec, + deleteCertificateContactsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * The full key identifier, attributes, and tags are provided in the response. This operation - * requires the keys/list permission. - * @summary Retrieves a list of individual key versions with the same key name. + * The GetCertificateIssuers operation returns the set of certificate issuer resources in the + * specified key vault. This operation requires the certificates/manageissuers/getissuers + * permission. + * @summary List certificate issuers for a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKeyVersions( + getCertificateIssuers( vaultBaseUrl: string, - keyName: string, - options?: Models.KeyVaultClientGetKeyVersionsOptionalParams - ): Promise; + options?: Models.KeyVaultClientGetCertificateIssuersOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. * @param callback The callback */ - getKeyVersions( + getCertificateIssuers( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. * @param options The optional parameters * @param callback The callback */ - getKeyVersions( + getCertificateIssuers( vaultBaseUrl: string, - keyName: string, - options: Models.KeyVaultClientGetKeyVersionsOptionalParams, - callback: coreHttp.ServiceCallback + options: Models.KeyVaultClientGetCertificateIssuersOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getKeyVersions( + getCertificateIssuers( vaultBaseUrl: string, - keyName: string, options?: - | Models.KeyVaultClientGetKeyVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientGetCertificateIssuersOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, options }, - getKeyVersionsOperationSpec, + getCertificateIssuersOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary List keys in the specified vault. + * The SetCertificateIssuer operation adds or updates the specified certificate issuer. This + * operation requires the certificates/setissuers permission. + * @summary Sets the specified certificate issuer. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param issuerName The name of the issuer. + * @param provider The issuer provider. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKeys( + setCertificateIssuer( vaultBaseUrl: string, - options?: Models.KeyVaultClientGetKeysOptionalParams - ): Promise; + issuerName: string, + provider: string, + options?: Models.KeyVaultClientSetCertificateIssuerOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param issuerName The name of the issuer. + * @param provider The issuer provider. * @param callback The callback */ - getKeys(vaultBaseUrl: string, callback: coreHttp.ServiceCallback): void; + setCertificateIssuer( + vaultBaseUrl: string, + issuerName: string, + provider: string, + callback: coreHttp.ServiceCallback + ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param issuerName The name of the issuer. + * @param provider The issuer provider. * @param options The optional parameters * @param callback The callback */ - getKeys( + setCertificateIssuer( vaultBaseUrl: string, - options: Models.KeyVaultClientGetKeysOptionalParams, - callback: coreHttp.ServiceCallback + issuerName: string, + provider: string, + options: Models.KeyVaultClientSetCertificateIssuerOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getKeys( + setCertificateIssuer( vaultBaseUrl: string, + issuerName: string, + provider: string, options?: - | Models.KeyVaultClientGetKeysOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientSetCertificateIssuerOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, + issuerName, + provider, options }, - getKeysOperationSpec, + setCertificateIssuerOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Requests that a backup of the specified key be downloaded to the client. + * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer + * entity. This operation requires the certificates/setissuers permission. + * @summary Updates the specified certificate issuer. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param issuerName The name of the issuer. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - backupKey( + updateCertificateIssuer( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; + issuerName: string, + options?: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param issuerName The name of the issuer. * @param callback The callback */ - backupKey( + updateCertificateIssuer( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + issuerName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param issuerName The name of the issuer. * @param options The optional parameters * @param callback The callback */ - backupKey( + updateCertificateIssuer( vaultBaseUrl: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + issuerName: string, + options: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams, + callback: coreHttp.ServiceCallback ): void; - backupKey( + updateCertificateIssuer( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + issuerName: string, + options?: + | Models.KeyVaultClientUpdateCertificateIssuerOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + issuerName, options }, - backupKeyOperationSpec, + updateCertificateIssuerOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Restores a backed up key to a vault. + * The GetCertificateIssuer operation returns the specified certificate issuer resources in the + * specified key vault. This operation requires the certificates/manageissuers/getissuers + * permission. + * @summary Lists the specified certificate issuer. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param issuerName The name of the issuer. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - restoreKey( + getCertificateIssuer( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, + issuerName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param issuerName The name of the issuer. * @param callback The callback */ - restoreKey( + getCertificateIssuer( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback + issuerName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param issuerName The name of the issuer. * @param options The optional parameters * @param callback The callback */ - restoreKey( + getCertificateIssuer( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, + issuerName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - restoreKey( + getCertificateIssuer( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + issuerName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyBundleBackup, + issuerName, options }, - restoreKeyOperationSpec, + getCertificateIssuerOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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/encrypt permission. - * @summary Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key - * vault. + * The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from + * the vault. This operation requires the certificates/manageissuers/deleteissuers permission. + * @summary Deletes the specified certificate issuer. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param issuerName The name of the issuer. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - encrypt( + deleteCertificateIssuer( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + issuerName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param issuerName The name of the issuer. * @param callback The callback */ - encrypt( + deleteCertificateIssuer( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback + issuerName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param issuerName The name of the issuer. * @param options The optional parameters * @param callback The callback */ - encrypt( + deleteCertificateIssuer( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + issuerName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - encrypt( + deleteCertificateIssuer( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + issuerName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, + issuerName, options }, - encryptOperationSpec, + deleteCertificateIssuerOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Decrypts a single block of encrypted data. + * If this is the first version, the certificate resource is created. This operation requires the + * certificates/create permission. + * @summary Creates a new certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - decrypt( + createCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; + certificateName: string, + options?: Models.KeyVaultClientCreateCertificateOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate. * @param callback The callback */ - decrypt( + createCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - decrypt( + createCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + certificateName: string, + options: Models.KeyVaultClientCreateCertificateOptionalParams, + callback: coreHttp.ServiceCallback ): void; - decrypt( + createCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: + | Models.KeyVaultClientCreateCertificateOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, + certificateName, options }, - decryptOperationSpec, + createCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Creates a signature from a digest using the specified key. + * 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. + * @summary Imports a certificate into a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value + * @param certificateName The name of the certificate. + * @param base64EncodedCertificate Base64 encoded representation of the certificate object to + * import. This certificate needs to contain the private key. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - sign( + importCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; + certificateName: string, + base64EncodedCertificate: string, + options?: Models.KeyVaultClientImportCertificateOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value + * @param certificateName The name of the certificate. + * @param base64EncodedCertificate Base64 encoded representation of the certificate object to + * import. This certificate needs to contain the private key. * @param callback The callback */ - sign( + importCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback + certificateName: string, + base64EncodedCertificate: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value + * @param certificateName The name of the certificate. + * @param base64EncodedCertificate Base64 encoded representation of the certificate object to + * import. This certificate needs to contain the private key. * @param options The optional parameters * @param callback The callback */ - sign( + importCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + certificateName: string, + base64EncodedCertificate: string, + options: Models.KeyVaultClientImportCertificateOptionalParams, + callback: coreHttp.ServiceCallback ): void; - sign( + importCertificate( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + base64EncodedCertificate: string, + options?: + | Models.KeyVaultClientImportCertificateOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, + certificateName, + base64EncodedCertificate, options }, - signOperationSpec, + importCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Verifies a signature using a specified key. + * The GetCertificateVersions operation returns the versions of a certificate in the specified key + * vault. This operation requires the certificates/list permission. + * @summary List the versions of a certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - verify( + getCertificateVersions( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; + certificateName: string, + options?: Models.KeyVaultClientGetCertificateVersionsOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. + * @param certificateName The name of the certificate. * @param callback The callback */ - verify( + getCertificateVersions( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - verify( + getCertificateVersions( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + certificateName: string, + options: Models.KeyVaultClientGetCertificateVersionsOptionalParams, + callback: coreHttp.ServiceCallback ): void; - verify( + getCertificateVersions( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: + | Models.KeyVaultClientGetCertificateVersionsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - digest, - signature, + certificateName, options }, - verifyOperationSpec, + getCertificateVersionsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Wraps a symmetric key using a specified key. + * The GetCertificatePolicy operation returns the specified certificate policy resources in the + * specified key vault. This operation requires the certificates/get permission. + * @summary Lists the policy for a certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in a given key vault. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - wrapKey( + getCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + certificateName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in a given key vault. * @param callback The callback */ - wrapKey( + getCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in a given key vault. * @param options The optional parameters * @param callback The callback */ - wrapKey( + getCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + certificateName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - wrapKey( + getCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, + certificateName, options }, - wrapKeyOperationSpec, + getCertificatePolicyOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Unwraps a symmetric key using the specified key that was initially used for wrapping - * that key. + * Set specified members in the certificate policy. Leave others as null. This operation requires + * the certificates/update permission. + * @summary Updates the policy for a certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in the given vault. + * @param certificatePolicy The policy for the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - unwrapKey( + updateCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + certificateName: string, + certificatePolicy: Models.CertificatePolicy, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in the given vault. + * @param certificatePolicy The policy for the certificate. * @param callback The callback */ - unwrapKey( + updateCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback + certificateName: string, + certificatePolicy: Models.CertificatePolicy, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value + * @param certificateName The name of the certificate in the given vault. + * @param certificatePolicy The policy for the certificate. * @param options The optional parameters * @param callback The callback */ - unwrapKey( + updateCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, + certificateName: string, + certificatePolicy: Models.CertificatePolicy, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - unwrapKey( + updateCertificatePolicy( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + certificatePolicy: Models.CertificatePolicy, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, + certificateName, + certificatePolicy, options }, - unwrapKeyOperationSpec, + updateCertificatePolicyOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Lists the deleted keys in the specified vault. + * 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. + * @summary Updates the specified attributes associated with the given certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate in the given key vault. + * @param certificateVersion The version of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getDeletedKeys( + updateCertificate( vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedKeysOptionalParams - ): Promise; + certificateName: string, + certificateVersion: string, + options?: Models.KeyVaultClientUpdateCertificateOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate in the given key vault. + * @param certificateVersion The version of the certificate. * @param callback The callback */ - getDeletedKeys( + updateCertificate( vaultBaseUrl: string, - callback: coreHttp.ServiceCallback + certificateName: string, + certificateVersion: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate in the given key vault. + * @param certificateVersion The version of the certificate. * @param options The optional parameters * @param callback The callback */ - getDeletedKeys( + updateCertificate( vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedKeysOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + certificateVersion: string, + options: Models.KeyVaultClientUpdateCertificateOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getDeletedKeys( + updateCertificate( vaultBaseUrl: string, + certificateName: string, + certificateVersion: string, options?: - | Models.KeyVaultClientGetDeletedKeysOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientUpdateCertificateOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, + certificateName, + certificateVersion, options }, - getDeletedKeysOperationSpec, + updateCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Gets the public part of a deleted key. + * Gets information about a specific certificate. This operation requires the certificates/get + * permission. + * @summary Gets information about a certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param certificateName The name of the certificate in the given vault. + * @param certificateVersion The version of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getDeletedKey( + getCertificate( vaultBaseUrl: string, - keyName: string, + certificateName: string, + certificateVersion: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param certificateName The name of the certificate in the given vault. + * @param certificateVersion The version of the certificate. * @param callback The callback */ - getDeletedKey( + getCertificate( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + certificateVersion: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param certificateName The name of the certificate in the given vault. + * @param certificateVersion The version of the certificate. * @param options The optional parameters * @param callback The callback */ - getDeletedKey( + getCertificate( vaultBaseUrl: string, - keyName: string, + certificateName: string, + certificateVersion: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - getDeletedKey( + getCertificate( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + certificateVersion: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + certificateName, + certificateVersion, options }, - getDeletedKeyOperationSpec, + getCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Permanently deletes the specified key. + * Updates a certificate creation operation that is already in progress. This operation requires + * the certificates/update permission. + * @summary Updates a certificate operation. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key + * @param certificateName The name of the certificate. + * @param cancellationRequested Indicates if cancellation was requested on the certificate + * operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - purgeDeletedKey( + updateCertificateOperation( vaultBaseUrl: string, - keyName: string, + certificateName: string, + cancellationRequested: boolean, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key + * @param certificateName The name of the certificate. + * @param cancellationRequested Indicates if cancellation was requested on the certificate + * operation. * @param callback The callback */ - purgeDeletedKey( + updateCertificateOperation( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + cancellationRequested: boolean, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key + * @param certificateName The name of the certificate. + * @param cancellationRequested Indicates if cancellation was requested on the certificate + * operation. * @param options The optional parameters * @param callback The callback */ - purgeDeletedKey( + updateCertificateOperation( vaultBaseUrl: string, - keyName: string, + certificateName: string, + cancellationRequested: boolean, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - purgeDeletedKey( + updateCertificateOperation( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + cancellationRequested: boolean, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + certificateName, + cancellationRequested, options }, - purgeDeletedKeyOperationSpec, + updateCertificateOperationOperationSpec, callback - ); + ) as Promise; } /** - * 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. - * @summary Recovers the deleted key to its latest version. + * Gets the creation operation associated with a specified certificate. This operation requires the + * certificates/get permission. + * @summary Gets the creation operation of a certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - recoverDeletedKey( + getCertificateOperation( vaultBaseUrl: string, - keyName: string, + certificateName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. + * @param certificateName The name of the certificate. * @param callback The callback */ - recoverDeletedKey( + getCertificateOperation( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - recoverDeletedKey( + getCertificateOperation( vaultBaseUrl: string, - keyName: string, + certificateName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - recoverDeletedKey( + getCertificateOperation( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + certificateName, options }, - recoverDeletedKeyOperationSpec, + getCertificateOperationOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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 + * 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. - * @summary Sets a secret in a specified key vault. + * @summary Deletes the creation operation for a specific certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - setSecret( + deleteCertificateOperation( vaultBaseUrl: string, - secretName: string, - value: string, - options?: Models.KeyVaultClientSetSecretOptionalParams - ): Promise; + certificateName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. + * @param certificateName The name of the certificate. * @param callback The callback */ - setSecret( + deleteCertificateOperation( vaultBaseUrl: string, - secretName: string, - value: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - setSecret( + deleteCertificateOperation( vaultBaseUrl: string, - secretName: string, - value: string, - options: Models.KeyVaultClientSetSecretOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - setSecret( + deleteCertificateOperation( vaultBaseUrl: string, - secretName: string, - value: string, - options?: - | Models.KeyVaultClientSetSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, - value, + certificateName, options }, - setSecretOperationSpec, + deleteCertificateOperationOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Deletes a secret from a 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. + * @summary Merges a certificate or a certificate chain with a key pair existing on the server. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate. + * @param x509Certificates The certificate or the certificate chain to merge. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteSecret( + mergeCertificate( vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; + certificateName: string, + x509Certificates: Uint8Array[], + options?: Models.KeyVaultClientMergeCertificateOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate. + * @param x509Certificates The certificate or the certificate chain to merge. * @param callback The callback */ - deleteSecret( + mergeCertificate( vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + x509Certificates: Uint8Array[], + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate. + * @param x509Certificates The certificate or the certificate chain to merge. * @param options The optional parameters * @param callback The callback */ - deleteSecret( + mergeCertificate( vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + certificateName: string, + x509Certificates: Uint8Array[], + options: Models.KeyVaultClientMergeCertificateOptionalParams, + callback: coreHttp.ServiceCallback ): void; - deleteSecret( + mergeCertificate( vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + x509Certificates: Uint8Array[], + options?: + | Models.KeyVaultClientMergeCertificateOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, + certificateName, + x509Certificates, options }, - deleteSecretOperationSpec, + mergeCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Updates the attributes associated with a specified secret in a given key vault. + * Requests that a backup of the specified certificate be downloaded to the client. All versions of + * the certificate will be downloaded. This operation requires the certificates/backup permission. + * @summary Backs up the specified certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateName The name of the certificate. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateSecret( + backupCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: Models.KeyVaultClientUpdateSecretOptionalParams - ): Promise; + certificateName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateName The name of the certificate. * @param callback The callback */ - updateSecret( + backupCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateName The name of the certificate. * @param options The optional parameters * @param callback The callback */ - updateSecret( + backupCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options: Models.KeyVaultClientUpdateSecretOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - updateSecret( + backupCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, + certificateName: string, options?: - | Models.KeyVaultClientUpdateSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, - secretVersion, + certificateName, options }, - updateSecretOperationSpec, + backupCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires - * the secrets/get permission. - * @summary Get a specified secret from a given key vault. + * Restores a backed up certificate, and all its versions, to a vault. This operation requires the + * certificates/restore permission. + * @summary Restores a backed up certificate to a vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateBundleBackup The backup blob associated with a certificate bundle. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getSecret( + restoreCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, + certificateBundleBackup: Uint8Array, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateBundleBackup The backup blob associated with a certificate bundle. * @param callback The callback */ - getSecret( + restoreCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback + certificateBundleBackup: Uint8Array, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. + * @param certificateBundleBackup The backup blob associated with a certificate bundle. * @param options The optional parameters * @param callback The callback */ - getSecret( + restoreCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, + certificateBundleBackup: Uint8Array, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - getSecret( + restoreCertificate( vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateBundleBackup: Uint8Array, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, - secretVersion, + certificateBundleBackup, options }, - getSecretOperationSpec, + restoreCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary List secrets in a 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. + * @summary Lists the deleted certificates in the specified vault currently available for recovery. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getSecrets( + getDeletedCertificates( vaultBaseUrl: string, - options?: Models.KeyVaultClientGetSecretsOptionalParams - ): Promise; + options?: Models.KeyVaultClientGetDeletedCertificatesOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param callback The callback */ - getSecrets( + getDeletedCertificates( vaultBaseUrl: string, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param options The optional parameters * @param callback The callback */ - getSecrets( + getDeletedCertificates( vaultBaseUrl: string, - options: Models.KeyVaultClientGetSecretsOptionalParams, - callback: coreHttp.ServiceCallback + options: Models.KeyVaultClientGetDeletedCertificatesOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getSecrets( + getDeletedCertificates( vaultBaseUrl: string, options?: - | Models.KeyVaultClientGetSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientGetDeletedCertificatesOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, options }, - getSecretsOperationSpec, + getDeletedCertificatesOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary List all versions of the specified secret. + * 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. + * @summary Retrieves information about the specified deleted certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getSecretVersions( + getDeletedCertificate( vaultBaseUrl: string, - secretName: string, - options?: Models.KeyVaultClientGetSecretVersionsOptionalParams - ): Promise; + certificateName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate * @param callback The callback */ - getSecretVersions( + getDeletedCertificate( vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the certificate * @param options The optional parameters * @param callback The callback */ - getSecretVersions( + getDeletedCertificate( vaultBaseUrl: string, - secretName: string, - options: Models.KeyVaultClientGetSecretVersionsOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - getSecretVersions( + getDeletedCertificate( vaultBaseUrl: string, - secretName: string, + certificateName: string, options?: - | Models.KeyVaultClientGetSecretVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | coreHttp.RequestOptionsBase + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, + certificateName, options }, - getSecretVersionsOperationSpec, + getDeletedCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Lists deleted secrets for the specified vault. + * 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. + * @summary Permanently deletes the specified deleted certificate. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getDeletedSecrets( + purgeDeletedCertificate( vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams - ): Promise; + certificateName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate * @param callback The callback */ - getDeletedSecrets( + purgeDeletedCertificate( vaultBaseUrl: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param certificateName The name of the certificate * @param options The optional parameters * @param callback The callback */ - getDeletedSecrets( + purgeDeletedCertificate( vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedSecretsOptionalParams, - callback: coreHttp.ServiceCallback + certificateName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - getDeletedSecrets( + purgeDeletedCertificate( vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, + certificateName, options }, - getDeletedSecretsOperationSpec, + purgeDeletedCertificateOperationSpec, callback - ) as Promise; + ); } /** - * The Get Deleted Secret operation returns the specified deleted secret along with its attributes. - * This operation requires the secrets/get permission. - * @summary Gets the specified deleted secret. + * 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. + * @summary Recovers the deleted certificate back to its current version under /certificates. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the deleted certificate * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getDeletedSecret( + recoverDeletedCertificate( vaultBaseUrl: string, - secretName: string, + certificateName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the deleted certificate * @param callback The callback */ - getDeletedSecret( + recoverDeletedCertificate( vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback + certificateName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. + * @param certificateName The name of the deleted certificate * @param options The optional parameters * @param callback The callback */ - getDeletedSecret( + recoverDeletedCertificate( vaultBaseUrl: string, - secretName: string, + certificateName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - getDeletedSecret( + recoverDeletedCertificate( vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + certificateName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - secretName, + certificateName, options }, - getDeletedSecretOperationSpec, + recoverDeletedCertificateOperationSpec, callback - ) as Promise; + ) as Promise; } +} - /** - * 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. - * @summary Permanently deletes the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - purgeDeletedSecretOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted secret to the latest version. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - recoverDeletedSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Backs up the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - backupSecretOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up secret, and all its versions, to a vault. This operation requires the - * secrets/restore permission. - * @summary Restores a backed up secret to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretBundleBackup, - options - }, - restoreSecretOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificates operation returns the set of certificates resources in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List certificates in a specified key vault - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes a certificate from a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Sets the certificate contacts for the specified key vault. This operation requires the - * certificates/managecontacts permission. - * @summary Sets the certificate contacts for the specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - contacts, - options - }, - setCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateContacts operation returns the set of certificate contact resources in the - * specified key vault. This operation requires the certificates/managecontacts permission. - * @summary Lists the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes the certificate contacts for a specified key vault certificate. This operation requires - * the certificates/managecontacts permission. - * @summary Deletes the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - deleteCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuers operation returns the set of certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary List certificate issuers for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuers( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificateIssuersOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificateIssuersOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuers( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificateIssuersOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateIssuersOperationSpec, - callback - ) as Promise; - } - - /** - * The SetCertificateIssuer operation adds or updates the specified certificate issuer. This - * operation requires the certificates/setissuers permission. - * @summary Sets the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: Models.KeyVaultClientSetCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options: Models.KeyVaultClientSetCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: - | Models.KeyVaultClientSetCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - provider, - options - }, - setCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer - * entity. This operation requires the certificates/setissuers permission. - * @summary Updates the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: - | Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - updateCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuer operation returns the specified certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary Lists the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - getCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from - * the vault. This operation requires the certificates/manageissuers/deleteissuers permission. - * @summary Deletes the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - deleteCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * If this is the first version, the certificate resource is created. This operation requires the - * certificates/create permission. - * @summary Creates a new certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientCreateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientCreateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientCreateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - createCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Imports a certificate into a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param [options] The optional parameters - * @returns Promise - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: Models.KeyVaultClientImportCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param options The optional parameters - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options: Models.KeyVaultClientImportCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: - | Models.KeyVaultClientImportCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - base64EncodedCertificate, - options - }, - importCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateVersions operation returns the versions of a certificate in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List the versions of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientGetCertificateVersionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientGetCertificateVersionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientGetCertificateVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateVersionsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificatePolicy operation returns the specified certificate policy resources in the - * specified key vault. This operation requires the certificates/get permission. - * @summary Lists the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param options The optional parameters - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * Set specified members in the certificate policy. Leave others as null. This operation requires - * the certificates/update permission. - * @summary Updates the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificatePolicy, - options - }, - updateCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Updates the specified attributes associated with the given certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: Models.KeyVaultClientUpdateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: Models.KeyVaultClientUpdateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: - | Models.KeyVaultClientUpdateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - updateCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specific certificate. This operation requires the certificates/get - * permission. - * @summary Gets information about a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - getCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Updates a certificate creation operation that is already in progress. This operation requires - * the certificates/update permission. - * @summary Updates a certificate operation. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - cancellationRequested, - options - }, - updateCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * Gets the creation operation associated with a specified certificate. This operation requires the - * certificates/get permission. - * @summary Gets the creation operation of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes the creation operation for a specific certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Merges a certificate or a certificate chain with a key pair existing on the server. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param [options] The optional parameters - * @returns Promise - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: Models.KeyVaultClientMergeCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param options The optional parameters - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options: Models.KeyVaultClientMergeCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: - | Models.KeyVaultClientMergeCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - x509Certificates, - options - }, - mergeCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified certificate be downloaded to the client. All versions of - * the certificate will be downloaded. This operation requires the certificates/backup permission. - * @summary Backs up the specified certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - backupCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up certificate, and all its versions, to a vault. This operation requires the - * certificates/restore permission. - * @summary Restores a backed up certificate to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateBundleBackup, - options - }, - restoreCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists the deleted certificates in the specified vault currently available for recovery. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Retrieves information about the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - purgeDeletedCertificateOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted certificate back to its current version under /certificates. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - recoverDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * List storage accounts managed by the specified key vault. This operation requires the - * storage/list permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted storage accounts for the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted Storage Account operation returns the specified deleted storage account along - * with its attributes. This operation requires the storage/get permission. - * @summary Gets the specified deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - purgeDeletedStorageAccountOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - recoverDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified storage account be downloaded to the client. This - * operation requires the storage/backup permission. - * @summary Backs up the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - backupStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up storage account to a vault. This operation requires the storage/restore - * permission. - * @summary Restores a backed up storage account to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param [options] The optional parameters - * @returns Promise - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param options The optional parameters - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageBundleBackup, - options - }, - restoreStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a storage account. This operation requires the storage/delete permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - deleteStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specified storage account. This operation requires the storage/get - * permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new storage account. This operation requires the storage/set permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param [options] The optional parameters - * @returns Promise - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: Models.KeyVaultClientSetStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param options The optional parameters - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options: Models.KeyVaultClientSetStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: - | Models.KeyVaultClientSetStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - resourceId, - activeKeyName, - autoRegenerateKey, - options - }, - setStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given storage account. This operation - * requires the storage/set/update permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientUpdateStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientUpdateStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientUpdateStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - updateStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Regenerates the specified key value for the given storage account. This operation requires the - * storage/regeneratekey permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param [options] The optional parameters - * @returns Promise - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param options The optional parameters - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - keyName, - options - }, - regenerateStorageAccountKeyOperationSpec, - callback - ) as Promise; - } - - /** - * List storage SAS definitions for the given storage account. This operation requires the - * storage/listsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted SAS definitions for the specified vault and storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted SAS Definition operation returns the specified deleted SAS definition along with - * its attributes. This operation requires the storage/getsas permission. - * @summary Gets the specified deleted sas definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Recovers the deleted SAS definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - recoverDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a SAS definition from a specified storage account. This operation requires the - * storage/deletesas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - deleteSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a SAS definition for the specified storage account. This operation - * requires the storage/getsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new SAS definition for the specified storage account. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: Models.KeyVaultClientSetSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options: Models.KeyVaultClientSetSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: - | Models.KeyVaultClientSetSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - templateUri, - sasType, - validityPeriod, - options - }, - setSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given SAS definition. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: Models.KeyVaultClientUpdateSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: Models.KeyVaultClientUpdateSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | Models.KeyVaultClientUpdateSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - updateSasDefinitionOperationSpec, - callback - ) as Promise; - } -} - -// Operation Specifications -const serializer = new coreHttp.Serializer(Mappers); -const createKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - kty: "kty", - keySize: ["options", "keySize"], - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"], - curve: ["options", "curve"] - }, - mapper: { - ...Mappers.KeyCreateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - hsm: ["options", "hsm"], - key: "key", - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupKeyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyBundleBackup: "keyBundleBackup" - }, - mapper: { - ...Mappers.KeyRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const encryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/encrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const decryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/decrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const signOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/sign", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeySignParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const verifyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/verify", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - digest: "digest", - signature: "signature" - }, - mapper: { - ...Mappers.KeyVerifyParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyVerifyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const wrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/wrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const unwrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/unwrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedkeys/{key-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - value: "value", - tags: ["options", "tags"], - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"] - }, - mapper: { - ...Mappers.SecretSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SecretUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedsecrets/{secret-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/{secret-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupSecretResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - secretBundleBackup: "secretBundleBackup" - }, - mapper: { - ...Mappers.SecretRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificatesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "contacts", - mapper: { - ...Mappers.Contacts, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuersOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateIssuerListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: "provider", - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: ["options", "provider"], - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const createCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateCreateParameters, - required: true - } - }, - responses: { - 202: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/import", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - base64EncodedCertificate: "base64EncodedCertificate", - password: ["options", "password"], - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateVersionsOperationSpec: coreHttp.OperationSpec = { +// Operation Specifications +const serializer = new coreHttp.Serializer(Mappers); +const getCertificatesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "certificates/{certificate-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], + path: "certificates", + urlParameters: [Parameters.vaultBaseUrl], + queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], responses: { 200: { bodyMapper: Mappers.CertificateListResult @@ -5510,88 +1541,14 @@ const getCertificateVersionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/policy", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/policy", +const deleteCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "certificates/{certificate-name}", urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "certificatePolicy", - mapper: { - ...Mappers.CertificatePolicy, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.CertificateBundle + bodyMapper: Mappers.DeletedCertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5600,23 +1557,21 @@ const getCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], +const setCertificateContactsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "certificates/contacts", + urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], requestBody: { - parameterPath: { - cancellationRequested: "cancellationRequested" - }, + parameterPath: "contacts", mapper: { - ...Mappers.CertificateOperationUpdateParameter, + ...Mappers.Contacts, required: true } }, responses: { 200: { - bodyMapper: Mappers.CertificateOperation + bodyMapper: Mappers.Contacts }, default: { bodyMapper: Mappers.KeyVaultError @@ -5625,14 +1580,14 @@ const updateCertificateOperationOperationSpec: coreHttp.OperationSpec = { serializer }; -const getCertificateOperationOperationSpec: coreHttp.OperationSpec = { +const getCertificateContactsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + path: "certificates/contacts", + urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.CertificateOperation + bodyMapper: Mappers.Contacts }, default: { bodyMapper: Mappers.KeyVaultError @@ -5641,82 +1596,14 @@ const getCertificateOperationOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteCertificateOperationOperationSpec: coreHttp.OperationSpec = { +const deleteCertificateContactsOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const mergeCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/pending/merge", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - x509Certificates: "x509Certificates", - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateMergeParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupCertificateResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/restore", + path: "certificates/contacts", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificateBundleBackup: "certificateBundleBackup" - }, - mapper: { - ...Mappers.CertificateRestoreParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CertificateBundle + bodyMapper: Mappers.Contacts }, default: { bodyMapper: Mappers.KeyVaultError @@ -5725,30 +1612,14 @@ const restoreCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedCertificatesOperationSpec: coreHttp.OperationSpec = { +const getCertificateIssuersOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedcertificates", + path: "certificates/issuers", urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedCertificateBundle + bodyMapper: Mappers.CertificateIssuerListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5757,44 +1628,26 @@ const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const purgeDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedcertificates/{certificate-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], +const setCertificateIssuerOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "certificates/issuers/{issuer-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle + requestBody: { + parameterPath: { + provider: "provider", + credentials: ["options", "credentials"], + organizationDetails: ["options", "organizationDetails"], + attributes: ["options", "attributes"] }, - default: { - bodyMapper: Mappers.KeyVaultError + mapper: { + ...Mappers.CertificateIssuerSetParameters, + required: true } }, - serializer -}; - -const getStorageAccountsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.StorageListResult + bodyMapper: Mappers.IssuerBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5803,14 +1656,26 @@ const getStorageAccountsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], +const updateCertificateIssuerOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "certificates/issuers/{issuer-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + provider: ["options", "provider"], + credentials: ["options", "credentials"], + organizationDetails: ["options", "organizationDetails"], + attributes: ["options", "attributes"] + }, + mapper: { + ...Mappers.CertificateIssuerUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DeletedStorageListResult + bodyMapper: Mappers.IssuerBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5819,14 +1684,14 @@ const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { +const getCertificateIssuerOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "certificates/issuers/{issuer-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedStorageBundle + bodyMapper: Mappers.IssuerBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5835,13 +1700,15 @@ const getDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const purgeDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { +const deleteCertificateIssuerOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "certificates/issuers/{issuer-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], queryParameters: [Parameters.apiVersion], responses: { - 204: {}, + 200: { + bodyMapper: Mappers.IssuerBundle + }, default: { bodyMapper: Mappers.KeyVaultError } @@ -5849,30 +1716,25 @@ const purgeDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const recoverDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { +const createCertificateOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "certificates/{certificate-name}/create", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.StorageBundle + requestBody: { + parameterPath: { + certificatePolicy: ["options", "certificatePolicy"], + certificateAttributes: ["options", "certificateAttributes"], + tags: ["options", "tags"] }, - default: { - bodyMapper: Mappers.KeyVaultError + mapper: { + ...Mappers.CertificateCreateParameters, + required: true } }, - serializer -}; - -const backupStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "storage/{storage-account-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName1], - queryParameters: [Parameters.apiVersion], responses: { - 200: { - bodyMapper: Mappers.BackupStorageResult + 202: { + bodyMapper: Mappers.CertificateOperation }, default: { bodyMapper: Mappers.KeyVaultError @@ -5881,23 +1743,27 @@ const backupStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { +const importCertificateOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "storage/restore", - urlParameters: [Parameters.vaultBaseUrl], + path: "certificates/{certificate-name}/import", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - storageBundleBackup: "storageBundleBackup" + base64EncodedCertificate: "base64EncodedCertificate", + password: ["options", "password"], + certificatePolicy: ["options", "certificatePolicy"], + certificateAttributes: ["options", "certificateAttributes"], + tags: ["options", "tags"] }, mapper: { - ...Mappers.StorageRestoreParameters, + ...Mappers.CertificateImportParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.CertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5906,14 +1772,14 @@ const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], +const getCertificateVersionsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "certificates/{certificate-name}/versions", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedStorageBundle + bodyMapper: Mappers.CertificateListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5922,14 +1788,14 @@ const deleteStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const getStorageAccountOperationSpec: coreHttp.OperationSpec = { +const getCertificatePolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "certificates/{certificate-name}/policy", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.CertificatePolicy }, default: { bodyMapper: Mappers.KeyVaultError @@ -5938,28 +1804,21 @@ const getStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const setStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const updateCertificatePolicyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "certificates/{certificate-name}/policy", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], requestBody: { - parameterPath: { - resourceId: "resourceId", - activeKeyName: "activeKeyName", - autoRegenerateKey: "autoRegenerateKey", - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], - tags: ["options", "tags"] - }, + parameterPath: "certificatePolicy", mapper: { - ...Mappers.StorageAccountCreateParameters, + ...Mappers.CertificatePolicy, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.CertificatePolicy }, default: { bodyMapper: Mappers.KeyVaultError @@ -5968,27 +1827,29 @@ const setStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { +const updateCertificateOperationSpec: coreHttp.OperationSpec = { httpMethod: "PATCH", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "certificates/{certificate-name}/{certificate-version}", + urlParameters: [ + Parameters.vaultBaseUrl, + Parameters.certificateName0, + Parameters.certificateVersion + ], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - activeKeyName: ["options", "activeKeyName"], - autoRegenerateKey: ["options", "autoRegenerateKey"], - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], + certificatePolicy: ["options", "certificatePolicy"], + certificateAttributes: ["options", "certificateAttributes"], tags: ["options", "tags"] }, mapper: { - ...Mappers.StorageAccountUpdateParameters, + ...Mappers.CertificateUpdateParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.CertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5997,23 +1858,43 @@ const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "storage/{storage-account-name}/regeneratekey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const getCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "certificates/{certificate-name}/{certificate-version}", + urlParameters: [ + Parameters.vaultBaseUrl, + Parameters.certificateName0, + Parameters.certificateVersion + ], + queryParameters: [Parameters.apiVersion], + responses: { + 200: { + bodyMapper: Mappers.CertificateBundle + }, + default: { + bodyMapper: Mappers.KeyVaultError + } + }, + serializer +}; + +const updateCertificateOperationOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "certificates/{certificate-name}/pending", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - keyName: "keyName" + cancellationRequested: "cancellationRequested" }, mapper: { - ...Mappers.StorageAccountRegenerteKeyParameters, + ...Mappers.CertificateOperationUpdateParameter, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.CertificateOperation }, default: { bodyMapper: Mappers.KeyVaultError @@ -6022,14 +1903,14 @@ const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionsOperationSpec: coreHttp.OperationSpec = { +const getCertificateOperationOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], + path: "certificates/{certificate-name}/pending", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionListResult + bodyMapper: Mappers.CertificateOperation }, default: { bodyMapper: Mappers.KeyVaultError @@ -6038,14 +1919,14 @@ const getSasDefinitionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], +const deleteCertificateOperationOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "certificates/{certificate-name}/pending", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionListResult + bodyMapper: Mappers.CertificateOperation }, default: { bodyMapper: Mappers.KeyVaultError @@ -6054,18 +1935,25 @@ const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const mergeCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "certificates/{certificate-name}/pending/merge", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + x509Certificates: "x509Certificates", + certificateAttributes: ["options", "certificateAttributes"], + tags: ["options", "tags"] + }, + mapper: { + ...Mappers.CertificateMergeParameters, + required: true + } + }, responses: { - 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle + 201: { + bodyMapper: Mappers.CertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6074,18 +1962,14 @@ const getDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { +const backupCertificateOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}/recover", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], + path: "certificates/{certificate-name}/backup", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.BackupCertificateResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6094,18 +1978,23 @@ const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const restoreCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "certificates/restore", + urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + certificateBundleBackup: "certificateBundleBackup" + }, + mapper: { + ...Mappers.CertificateRestoreParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle + bodyMapper: Mappers.CertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6114,18 +2003,14 @@ const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { +const getDeletedCertificatesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], - queryParameters: [Parameters.apiVersion], + path: "deletedcertificates", + urlParameters: [Parameters.vaultBaseUrl], + queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.DeletedCertificateListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6134,31 +2019,14 @@ const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "deletedcertificates/{certificate-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - templateUri: "templateUri", - sasType: "sasType", - validityPeriod: "validityPeriod", - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SasDefinitionCreateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.DeletedCertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6167,31 +2035,28 @@ const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const purgeDeletedCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "deletedcertificates/{certificate-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - templateUri: ["options", "templateUri"], - sasType: ["options", "sasType"], - validityPeriod: ["options", "validityPeriod"], - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SasDefinitionUpdateParameters, - required: true + responses: { + 204: {}, + default: { + bodyMapper: Mappers.KeyVaultError } }, + serializer +}; + +const recoverDeletedCertificateOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "deletedcertificates/{certificate-name}/recover", + urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.CertificateBundle }, default: { bodyMapper: Mappers.KeyVaultError diff --git a/sdk/keyvault/keyvault-certificates/src/core/models/index.ts b/sdk/keyvault/keyvault-certificates/src/core/models/index.ts index de2ee71d0230..49a513440557 100644 --- a/sdk/keyvault/keyvault-certificates/src/core/models/index.ts +++ b/sdk/keyvault/keyvault-certificates/src/core/models/index.ts @@ -37,329 +37,22 @@ export interface Attributes { } /** - * As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 - */ -export interface JsonWebKey { - /** - * Key identifier. - */ - kid?: string; - /** - * JsonWebKey Key Type (kty), as defined in - * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - */ - kty?: JsonWebKeyType; - keyOps?: string[]; - /** - * RSA modulus. - */ - n?: Uint8Array; - /** - * RSA public exponent. - */ - e?: Uint8Array; - /** - * RSA private exponent, or the D component of an EC private key. - */ - d?: Uint8Array; - /** - * RSA private key parameter. - */ - dp?: Uint8Array; - /** - * RSA private key parameter. - */ - dq?: Uint8Array; - /** - * RSA private key parameter. - */ - qi?: Uint8Array; - /** - * RSA secret prime. - */ - p?: Uint8Array; - /** - * RSA secret prime, with p < q. - */ - q?: Uint8Array; - /** - * Symmetric key. - */ - k?: Uint8Array; - /** - * HSM Token, used with 'Bring Your Own Key'. - */ - t?: Uint8Array; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - crv?: JsonWebKeyCurveName; - /** - * X component of an EC public key. - */ - x?: Uint8Array; - /** - * Y component of an EC public key. - */ - y?: Uint8Array; -} - -/** - * The attributes of a key managed by the key vault service. - */ -export interface KeyAttributes extends Attributes { - /** - * Reflects the deletion recovery level currently in effect for keys in the current vault. If it - * contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only - * the system can purge the key, at the end of the retention interval. Possible values include: - * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A KeyBundle consisting of a WebKey plus its attributes. - */ -export interface KeyBundle { - /** - * The Json web key. - */ - key?: JsonWebKey; - /** - * The key management attributes. - */ - attributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * The key item containing key metadata. - */ -export interface KeyItem { - /** - * Key identifier. - */ - kid?: string; - /** - * The key management attributes. - */ - attributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info - */ -export interface DeletedKeyBundle extends KeyBundle { - /** - * The url of the recovery object, used to identify and recover the deleted key. - */ - recoveryId?: string; - /** - * The time when the key is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the key was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The deleted key item containing the deleted key metadata and information about deletion. - */ -export interface DeletedKeyItem extends KeyItem { - /** - * The url of the recovery object, used to identify and recover the deleted key. - */ - recoveryId?: string; - /** - * The time when the key is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the key was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The secret management attributes. - */ -export interface SecretAttributes extends Attributes { - /** - * Reflects the deletion recovery level currently in effect for secrets in the current vault. If - * it contains 'Purgeable', the secret can be permanently deleted by a privileged user; - * otherwise, only the system can purge the secret, at the end of the retention interval. - * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A secret consisting of a value, id and its attributes. - */ -export interface SecretBundle { - /** - * The secret value. - */ - value?: string; - /** - * The secret id. - */ - id?: string; - /** - * The content type of the secret. - */ - contentType?: string; - /** - * The secret management attributes. - */ - attributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * If this is a secret backing a KV certificate, then this field specifies the corresponding key - * backing the KV certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * True if the secret's lifetime is managed by key vault. If this is a secret backing a - * certificate, then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * The secret item containing secret metadata. - */ -export interface SecretItem { - /** - * Secret identifier. - */ - id?: string; - /** - * The secret management attributes. - */ - attributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * True if the secret's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * A Deleted Secret consisting of its previous id, attributes and its tags, as well as information - * on when it will be purged. - */ -export interface DeletedSecretBundle extends SecretBundle { - /** - * The url of the recovery object, used to identify and recover the deleted secret. - */ - recoveryId?: string; - /** - * The time when the secret is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the secret was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The deleted secret item containing metadata about the deleted secret. + * The certificate management attributes. */ -export interface DeletedSecretItem extends SecretItem { - /** - * The url of the recovery object, used to identify and recover the deleted secret. - */ - recoveryId?: string; - /** - * The time when the secret is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; +export interface CertificateAttributes extends Attributes { /** - * The time when the secret was deleted, in UTC + * softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, + * otherwise 0. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly deletedDate?: Date; -} - -/** - * The secret restore parameters. - */ -export interface SecretRestoreParameters { - /** - * The backup blob associated with a secret bundle. - */ - secretBundleBackup: Uint8Array; -} - -/** - * The secret restore parameters. - */ -export interface StorageRestoreParameters { - /** - * The backup blob associated with a storage account. - */ - storageBundleBackup: Uint8Array; -} - -/** - * The certificate management attributes. - */ -export interface CertificateAttributes extends Attributes { + readonly recoverableDays?: number; /** * Reflects the deletion recovery level currently in effect for certificates in the current * vault. If it contains 'Purgeable', the certificate can be permanently deleted by a privileged * user; otherwise, only the system can purge the certificate, at the end of the retention * interval. Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' + * 'Recoverable+ProtectedSubscription', 'CustomizedRecoverable+Purgeable', + * 'CustomizedRecoverable', 'CustomizedRecoverable+ProtectedSubscription' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recoveryLevel?: DeletionRecoveryLevel; @@ -532,7 +225,7 @@ export interface IssuerParameters { */ name?: string; /** - * Type of certificate to be requested from the issuer provider. + * Certificate type as supported by the provider (optional); for example 'OV-SSL', 'EV-SSL' */ certificateType?: string; /** @@ -859,47 +552,44 @@ export interface Contacts { } /** - * The key create parameters. + * The certificate create parameters. */ -export interface KeyCreateParameters { +export interface CertificateCreateParameters { /** - * The type of key to create. For valid values, see JsonWebKeyType. Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * The management policy for the certificate. */ - kty: JsonWebKeyType; + certificatePolicy?: CertificatePolicy; /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. + * The attributes of the certificate (optional). */ - keySize?: number; - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; + certificateAttributes?: CertificateAttributes; /** * Application specific metadata in the form of key-value pairs. */ tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; } /** - * The key import parameters. + * The certificate import parameters. */ -export interface KeyImportParameters { +export interface CertificateImportParameters { /** - * Whether to import as a hardware key (HSM) or software key. + * Base64 encoded representation of the certificate object to import. This certificate needs to + * contain the private key. + */ + base64EncodedCertificate: string; + /** + * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. */ - hsm?: boolean; + password?: string; /** - * The Json web key + * The management policy for the certificate. */ - key: JsonWebKey; + certificatePolicy?: CertificatePolicy; /** - * The key management attributes. + * The attributes of the certificate (optional). */ - keyAttributes?: KeyAttributes; + certificateAttributes?: CertificateAttributes; /** * Application specific metadata in the form of key-value pairs. */ @@ -907,206 +597,51 @@ export interface KeyImportParameters { } /** - * The key operations parameters. + * The certificate update parameters. */ -export interface KeyOperationsParameters { +export interface CertificateUpdateParameters { /** - * algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * The management policy for the certificate. */ - algorithm: JsonWebKeyEncryptionAlgorithm; - value: Uint8Array; -} - -/** - * The key operations parameters. - */ -export interface KeySignParameters { + certificatePolicy?: CertificatePolicy; + /** + * The attributes of the certificate (optional). + */ + certificateAttributes?: CertificateAttributes; /** - * 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', 'ES256K' + * Application specific metadata in the form of key-value pairs. */ - algorithm: JsonWebKeySignatureAlgorithm; - value: Uint8Array; + tags?: { [propertyName: string]: string }; } /** - * The key verify parameters. + * The certificate merge parameters */ -export interface KeyVerifyParameters { +export interface CertificateMergeParameters { /** - * 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', 'ES256K' + * The certificate or the certificate chain to merge. */ - algorithm: JsonWebKeySignatureAlgorithm; + x509Certificates: Uint8Array[]; /** - * The digest used for signing. + * The attributes of the certificate (optional). */ - digest: Uint8Array; + certificateAttributes?: CertificateAttributes; /** - * The signature to be verified. + * Application specific metadata in the form of key-value pairs. */ - signature: Uint8Array; + tags?: { [propertyName: string]: string }; } /** - * The key update parameters. + * The certificate issuer set parameters. */ -export interface KeyUpdateParameters { +export interface CertificateIssuerSetParameters { /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. + * The issuer provider. */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; + provider: string; /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key restore parameters. - */ -export interface KeyRestoreParameters { - /** - * The backup blob associated with a key bundle. - */ - keyBundleBackup: Uint8Array; -} - -/** - * The secret set parameters. - */ -export interface SecretSetParameters { - /** - * The value of the secret. - */ - value: string; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * The secret update parameters. - */ -export interface SecretUpdateParameters { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate create parameters. - */ -export interface CertificateCreateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate import parameters. - */ -export interface CertificateImportParameters { - /** - * Base64 encoded representation of the certificate object to import. This certificate needs to - * contain the private key. - */ - base64EncodedCertificate: string; - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate update parameters. - */ -export interface CertificateUpdateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate merge parameters - */ -export interface CertificateMergeParameters { - /** - * The certificate or the certificate chain to merge. - */ - x509Certificates: Uint8Array[]; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate issuer set parameters. - */ -export interface CertificateIssuerSetParameters { - /** - * The issuer provider. - */ - provider: string; - /** - * The credentials to be used for the issuer. + * The credentials to be used for the issuer. */ credentials?: IssuerCredentials; /** @@ -1151,100 +686,6 @@ export interface CertificateOperationUpdateParameter { cancellationRequested: boolean; } -/** - * The key operation result. - */ -export interface KeyOperationResult { - /** - * Key identifier - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly result?: Uint8Array; -} - -/** - * The key verify result. - */ -export interface KeyVerifyResult { - /** - * True if the signature is verified, otherwise false. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: boolean; -} - -/** - * The key list result. - */ -export interface KeyListResult { - /** - * A response message containing a list of keys in the key vault along with a link to the next - * page of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: KeyItem[]; - /** - * The URL to get the next set of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * A list of keys that have been deleted in this vault. - */ -export interface DeletedKeyListResult { - /** - * A response message containing a list of deleted keys in the vault along with a link to the - * next page of deleted keys - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedKeyItem[]; - /** - * The URL to get the next set of deleted keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The secret list result. - */ -export interface SecretListResult { - /** - * A response message containing a list of secrets in the key vault along with a link to the next - * page of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SecretItem[]; - /** - * The URL to get the next set of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted secret list result - */ -export interface DeletedSecretListResult { - /** - * A response message containing a list of the deleted secrets in the vault along with a link to - * the next page of deleted secrets - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSecretItem[]; - /** - * The URL to get the next set of deleted secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - /** * The certificate list result. */ @@ -1297,190 +738,128 @@ export interface CertificateIssuerListResult { } /** - * The backup key result, containing the backup blob. + * The pending certificate signing request result. */ -export interface BackupKeyResult { +export interface PendingCertificateSigningRequestResult { /** - * The backup blob containing the backed up key. + * The pending certificate signing request as Base64 encoded string. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: Uint8Array; + readonly value?: string; } /** - * The backup secret result, containing the backup blob. + * The certificate restore parameters. */ -export interface BackupSecretResult { +export interface CertificateRestoreParameters { /** - * The backup blob containing the backed up secret. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The backup blob associated with a certificate bundle. */ - readonly value?: Uint8Array; + certificateBundleBackup: Uint8Array; } /** - * The backup storage result, containing the backup blob. + * The backup certificate result, containing the backup blob. */ -export interface BackupStorageResult { +export interface BackupCertificateResult { /** - * The backup blob containing the backed up storage account. + * The backup blob containing the backed up certificate. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: Uint8Array; } /** - * The pending certificate signing request result. + * The key vault error exception. */ -export interface PendingCertificateSigningRequestResult { +export interface KeyVaultError { /** - * The pending certificate signing request as Base64 encoded string. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: string; + readonly error?: ErrorModel; } /** - * The storage account management attributes. + * Optional Parameters. */ -export interface StorageAccountAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; +export interface KeyVaultClientGetCertificatesOptionalParams extends coreHttp.RequestOptionsBase { /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - readonly updated?: Date; + maxresults?: number; /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Specifies whether to include certificates which are not completely provisioned. */ - readonly recoveryLevel?: DeletionRecoveryLevel; + includePending?: boolean; } /** - * A Storage account bundle consists of key vault storage account details plus its attributes. + * Optional Parameters. */ -export interface StorageBundle { +export interface KeyVaultClientGetCertificateIssuersOptionalParams + extends coreHttp.RequestOptionsBase { /** - * The storage account id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - readonly id?: string; + maxresults?: number; +} + +/** + * Optional Parameters. + */ +export interface KeyVaultClientSetCertificateIssuerOptionalParams + extends coreHttp.RequestOptionsBase { /** - * The storage account resource id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The credentials to be used for the issuer. */ - readonly resourceId?: string; + credentials?: IssuerCredentials; /** - * The current active storage account key name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the organization as provided to the issuer. */ - readonly activeKeyName?: string; + organizationDetails?: OrganizationDetails; /** - * whether keyvault should manage the storage account for the user. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Attributes of the issuer object. */ - readonly autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly regenerationPeriod?: string; - /** - * The storage account attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted storage account bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedStorageBundle extends StorageBundle { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; + attributes?: IssuerAttributes; } /** - * The storage account create parameters. + * Optional Parameters. */ -export interface StorageAccountCreateParameters { - /** - * Storage account resource id. - */ - resourceId: string; - /** - * Current active storage account key name. - */ - activeKeyName: string; +export interface KeyVaultClientUpdateCertificateIssuerOptionalParams + extends coreHttp.RequestOptionsBase { /** - * whether keyvault should manage the storage account for the user. + * The issuer provider. */ - autoRegenerateKey: boolean; + provider?: string; /** - * The key regeneration time duration specified in ISO-8601 format. + * The credentials to be used for the issuer. */ - regenerationPeriod?: string; + credentials?: IssuerCredentials; /** - * The attributes of the storage account. + * Details of the organization as provided to the issuer. */ - storageAccountAttributes?: StorageAccountAttributes; + organizationDetails?: OrganizationDetails; /** - * Application specific metadata in the form of key-value pairs. + * Attributes of the issuer object. */ - tags?: { [propertyName: string]: string }; + attributes?: IssuerAttributes; } /** - * The storage account update parameters. + * Optional Parameters. */ -export interface StorageAccountUpdateParameters { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; +export interface KeyVaultClientCreateCertificateOptionalParams extends coreHttp.RequestOptionsBase { /** - * The key regeneration time duration specified in ISO-8601 format. + * The management policy for the certificate. */ - regenerationPeriod?: string; + certificatePolicy?: CertificatePolicy; /** - * The attributes of the storage account. + * The attributes of the certificate (optional). */ - storageAccountAttributes?: StorageAccountAttributes; + certificateAttributes?: CertificateAttributes; /** * Application specific metadata in the form of key-value pairs. */ @@ -1488,290 +867,21 @@ export interface StorageAccountUpdateParameters { } /** - * The storage account key regenerate parameters. - */ -export interface StorageAccountRegenerteKeyParameters { - /** - * The storage account key name. - */ - keyName: string; -} - -/** - * The storage account item containing storage account metadata. - */ -export interface StorageAccountItem { - /** - * Storage identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * The storage account management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted storage account item containing metadata about the deleted storage account. - */ -export interface DeletedStorageAccountItem extends StorageAccountItem { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage accounts list result. - */ -export interface StorageListResult { - /** - * A response message containing a list of storage accounts in the key vault along with a link to - * the next page of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: StorageAccountItem[]; - /** - * The URL to get the next set of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted storage account list result - */ -export interface DeletedStorageListResult { - /** - * A response message containing a list of the deleted storage accounts in the vault along with a - * link to the next page of deleted storage accounts - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedStorageAccountItem[]; - /** - * The URL to get the next set of deleted storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition management attributes. - */ -export interface SasDefinitionAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; - /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A SAS definition bundle consists of key vault SAS definition details plus its attributes. - */ -export interface SasDefinitionBundle { - /** - * The SAS definition id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * 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. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly validityPeriod?: string; - /** - * The SAS definition attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted SAS definition bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedSasDefinitionBundle extends SasDefinitionBundle { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The SAS definition item containing storage SAS definition metadata. - */ -export interface SasDefinitionItem { - /** - * The storage SAS identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * The SAS definition management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted SAS definition item containing metadata about the deleted SAS definition. - */ -export interface DeletedSasDefinitionItem extends SasDefinitionItem { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage account SAS definition list result. - */ -export interface SasDefinitionListResult { - /** - * A response message containing a list of SAS definitions along with a link to the next page of - * SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SasDefinitionItem[]; - /** - * The URL to get the next set of SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted SAS definition list result - */ -export interface DeletedSasDefinitionListResult { - /** - * A response message containing a list of the deleted SAS definitions in the vault along with a - * link to the next page of deleted sas definitions - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSasDefinitionItem[]; - /** - * The URL to get the next set of deleted SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition create parameters. + * Optional Parameters. */ -export interface SasDefinitionCreateParameters { - /** - * 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. - */ - templateUri: string; +export interface KeyVaultClientImportCertificateOptionalParams extends coreHttp.RequestOptionsBase { /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' + * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. */ - sasType: SasTokenType; + password?: string; /** - * The validity period of SAS tokens created according to the SAS definition. + * The management policy for the certificate. */ - validityPeriod: string; + certificatePolicy?: CertificatePolicy; /** - * The attributes of the SAS definition. + * The attributes of the certificate (optional). */ - sasDefinitionAttributes?: SasDefinitionAttributes; + certificateAttributes?: CertificateAttributes; /** * Application specific metadata in the form of key-value pairs. */ @@ -1779,1594 +889,128 @@ export interface SasDefinitionCreateParameters { } /** - * The SAS definition update parameters. + * Optional Parameters. */ -export interface SasDefinitionUpdateParameters { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key vault error exception. - */ -export interface KeyVaultError { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; -} - -/** - * The certificate restore parameters. - */ -export interface CertificateRestoreParameters { - /** - * The backup blob associated with a certificate bundle. - */ - certificateBundleBackup: Uint8Array; -} - -/** - * The backup certificate result, containing the backup blob. - */ -export interface BackupCertificateResult { - /** - * The backup blob containing the backed up certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Whether to import as a hardware key (HSM) or software key. - */ - hsm?: boolean; - /** - * The key management attributes. - */ - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. - */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeyVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificatesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateIssuersOptionalParams - extends coreHttp.RequestOptionsBase { +export interface KeyVaultClientGetCertificateVersionsOptionalParams + extends coreHttp.RequestOptionsBase { /** * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateVersionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientMergeCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedCertificatesOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetStorageAccountOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateStorageAccountOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSasDefinitionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSasDefinitionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSasDefinitionOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSasDefinitionOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Defines values for JsonWebKeyType. - * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - * @readonly - * @enum {string} - */ -export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; - -/** - * Defines values for JsonWebKeyCurveName. - * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; - -/** - * Defines values for DeletionRecoveryLevel. - * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * @readonly - * @enum {string} - */ -export type DeletionRecoveryLevel = - | "Purgeable" - | "Recoverable+Purgeable" - | "Recoverable" - | "Recoverable+ProtectedSubscription"; - -/** - * Defines values for KeyUsageType. - * Possible values include: 'digitalSignature', 'nonRepudiation', 'keyEncipherment', - * 'dataEncipherment', 'keyAgreement', 'keyCertSign', 'cRLSign', 'encipherOnly', 'decipherOnly' - * @readonly - * @enum {string} - */ -export type KeyUsageType = - | "digitalSignature" - | "nonRepudiation" - | "keyEncipherment" - | "dataEncipherment" - | "keyAgreement" - | "keyCertSign" - | "cRLSign" - | "encipherOnly" - | "decipherOnly"; - -/** - * Defines values for ActionType. - * Possible values include: 'EmailContacts', 'AutoRenew' - * @readonly - * @enum {string} - */ -export type ActionType = "EmailContacts" | "AutoRenew"; - -/** - * Defines values for JsonWebKeyOperation. - * Possible values include: 'encrypt', 'decrypt', 'sign', 'verify', 'wrapKey', 'unwrapKey' - * @readonly - * @enum {string} - */ -export type JsonWebKeyOperation = - | "encrypt" - | "decrypt" - | "sign" - | "verify" - | "wrapKey" - | "unwrapKey"; - -/** - * Defines values for JsonWebKeyEncryptionAlgorithm. - * Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * @readonly - * @enum {string} - */ -export type JsonWebKeyEncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"; - -/** - * Defines values for JsonWebKeySignatureAlgorithm. - * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', - * 'ES256', 'ES384', 'ES512', 'ES256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeySignatureAlgorithm = - | "PS256" - | "PS384" - | "PS512" - | "RS256" - | "RS384" - | "RS512" - | "RSNULL" - | "ES256" - | "ES384" - | "ES512" - | "ES256K"; - -/** - * Defines values for SasTokenType. - * Possible values include: 'account', 'service' - * @readonly - * @enum {string} - */ -export type SasTokenType = "account" | "service"; - -/** - * Contains response data for the createKey operation. - */ -export type CreateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the importKey operation. - */ -export type ImportKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the deleteKey operation. - */ -export type DeleteKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the updateKey operation. - */ -export type UpdateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKey operation. - */ -export type GetKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKeyVersions operation. - */ -export type GetKeyVersionsResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the getKeys operation. - */ -export type GetKeysResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the backupKey operation. - */ -export type BackupKeyResponse = BackupKeyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupKeyResult; - }; -}; - -/** - * Contains response data for the restoreKey operation. - */ -export type RestoreKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the encrypt operation. - */ -export type EncryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the decrypt operation. - */ -export type DecryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the sign operation. - */ -export type SignResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the verify operation. - */ -export type VerifyResponse = KeyVerifyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyVerifyResult; - }; -}; - -/** - * Contains response data for the wrapKey operation. - */ -export type WrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the unwrapKey operation. - */ -export type UnwrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the getDeletedKeys operation. - */ -export type GetDeletedKeysResponse = DeletedKeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyListResult; - }; -}; - -/** - * Contains response data for the getDeletedKey operation. - */ -export type GetDeletedKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedKey operation. - */ -export type RecoverDeletedKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the setSecret operation. - */ -export type SetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the deleteSecret operation. - */ -export type DeleteSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the updateSecret operation. - */ -export type UpdateSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecret operation. - */ -export type GetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecrets operation. - */ -export type GetSecretsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getSecretVersions operation. - */ -export type GetSecretVersionsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecrets operation. - */ -export type GetDeletedSecretsResponse = DeletedSecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecret operation. - */ -export type GetDeletedSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedSecret operation. - */ -export type RecoverDeletedSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the backupSecret operation. - */ -export type BackupSecretResponse = BackupSecretResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupSecretResult; - }; -}; - -/** - * Contains response data for the restoreSecret operation. - */ -export type RestoreSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getCertificates operation. - */ -export type GetCertificatesResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the deleteCertificate operation. - */ -export type DeleteCertificateResponse = DeletedCertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateBundle; - }; -}; - -/** - * Contains response data for the setCertificateContacts operation. - */ -export type SetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateContacts operation. - */ -export type GetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the deleteCertificateContacts operation. - */ -export type DeleteCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateIssuers operation. - */ -export type GetCertificateIssuersResponse = CertificateIssuerListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateIssuerListResult; - }; -}; - -/** - * Contains response data for the setCertificateIssuer operation. - */ -export type SetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the updateCertificateIssuer operation. - */ -export type UpdateCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the getCertificateIssuer operation. - */ -export type GetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the deleteCertificateIssuer operation. - */ -export type DeleteCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the createCertificate operation. - */ -export type CreateCertificateResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the importCertificate operation. - */ -export type ImportCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getCertificateVersions operation. - */ -export type GetCertificateVersionsResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the getCertificatePolicy operation. - */ -export type GetCertificatePolicyResponse = CertificatePolicy & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; + * 25 results. + */ + maxresults?: number; +} /** - * Contains response data for the updateCertificatePolicy operation. + * Optional Parameters. */ -export type UpdateCertificatePolicyResponse = CertificatePolicy & { +export interface KeyVaultClientUpdateCertificateOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * The management policy for the certificate. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; + certificatePolicy?: CertificatePolicy; + /** + * The attributes of the certificate (optional). + */ + certificateAttributes?: CertificateAttributes; + /** + * Application specific metadata in the form of key-value pairs. + */ + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the updateCertificate operation. + * Optional Parameters. */ -export type UpdateCertificateResponse = CertificateBundle & { +export interface KeyVaultClientMergeCertificateOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * The attributes of the certificate (optional). */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; + certificateAttributes?: CertificateAttributes; + /** + * Application specific metadata in the form of key-value pairs. + */ + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the getCertificate operation. + * Optional Parameters. */ -export type GetCertificateResponse = CertificateBundle & { +export interface KeyVaultClientGetDeletedCertificatesOptionalParams + extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + maxresults?: number; + /** + * Specifies whether to include certificates which are not completely provisioned. + */ + includePending?: boolean; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; +/** + * Defines values for DeletionRecoveryLevel. + * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription', 'CustomizedRecoverable+Purgeable', 'CustomizedRecoverable', + * 'CustomizedRecoverable+ProtectedSubscription' + * @readonly + * @enum {string} + */ +export type DeletionRecoveryLevel = + | "Purgeable" + | "Recoverable+Purgeable" + | "Recoverable" + | "Recoverable+ProtectedSubscription" + | "CustomizedRecoverable+Purgeable" + | "CustomizedRecoverable" + | "CustomizedRecoverable+ProtectedSubscription"; /** - * Contains response data for the updateCertificateOperation operation. + * Defines values for JsonWebKeyType. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @readonly + * @enum {string} */ -export type UpdateCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; +/** + * Defines values for JsonWebKeyCurveName. + * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' + * @readonly + * @enum {string} + */ +export type JsonWebKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; /** - * Contains response data for the getCertificateOperation operation. + * Defines values for KeyUsageType. + * Possible values include: 'digitalSignature', 'nonRepudiation', 'keyEncipherment', + * 'dataEncipherment', 'keyAgreement', 'keyCertSign', 'cRLSign', 'encipherOnly', 'decipherOnly' + * @readonly + * @enum {string} */ -export type GetCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type KeyUsageType = + | "digitalSignature" + | "nonRepudiation" + | "keyEncipherment" + | "dataEncipherment" + | "keyAgreement" + | "keyCertSign" + | "cRLSign" + | "encipherOnly" + | "decipherOnly"; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; +/** + * Defines values for ActionType. + * Possible values include: 'EmailContacts', 'AutoRenew' + * @readonly + * @enum {string} + */ +export type ActionType = "EmailContacts" | "AutoRenew"; /** - * Contains response data for the deleteCertificateOperation operation. + * Contains response data for the getCertificates operation. */ -export type DeleteCertificateOperationResponse = CertificateOperation & { +export type GetCertificatesResponse = CertificateListResult & { /** * The underlying HTTP response. */ @@ -3379,14 +1023,14 @@ export type DeleteCertificateOperationResponse = CertificateOperation & { /** * The response body as parsed JSON or XML */ - parsedBody: CertificateOperation; + parsedBody: CertificateListResult; }; }; /** - * Contains response data for the mergeCertificate operation. + * Contains response data for the deleteCertificate operation. */ -export type MergeCertificateResponse = CertificateBundle & { +export type DeleteCertificateResponse = DeletedCertificateBundle & { /** * The underlying HTTP response. */ @@ -3399,14 +1043,14 @@ export type MergeCertificateResponse = CertificateBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: CertificateBundle; + parsedBody: DeletedCertificateBundle; }; }; /** - * Contains response data for the backupCertificate operation. + * Contains response data for the setCertificateContacts operation. */ -export type BackupCertificateResponse = BackupCertificateResult & { +export type SetCertificateContactsResponse = Contacts & { /** * The underlying HTTP response. */ @@ -3419,14 +1063,14 @@ export type BackupCertificateResponse = BackupCertificateResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BackupCertificateResult; + parsedBody: Contacts; }; }; /** - * Contains response data for the restoreCertificate operation. + * Contains response data for the getCertificateContacts operation. */ -export type RestoreCertificateResponse = CertificateBundle & { +export type GetCertificateContactsResponse = Contacts & { /** * The underlying HTTP response. */ @@ -3439,14 +1083,14 @@ export type RestoreCertificateResponse = CertificateBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: CertificateBundle; + parsedBody: Contacts; }; }; /** - * Contains response data for the getDeletedCertificates operation. + * Contains response data for the deleteCertificateContacts operation. */ -export type GetDeletedCertificatesResponse = DeletedCertificateListResult & { +export type DeleteCertificateContactsResponse = Contacts & { /** * The underlying HTTP response. */ @@ -3459,14 +1103,14 @@ export type GetDeletedCertificatesResponse = DeletedCertificateListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedCertificateListResult; + parsedBody: Contacts; }; }; /** - * Contains response data for the getDeletedCertificate operation. + * Contains response data for the getCertificateIssuers operation. */ -export type GetDeletedCertificateResponse = DeletedCertificateBundle & { +export type GetCertificateIssuersResponse = CertificateIssuerListResult & { /** * The underlying HTTP response. */ @@ -3479,14 +1123,14 @@ export type GetDeletedCertificateResponse = DeletedCertificateBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedCertificateBundle; + parsedBody: CertificateIssuerListResult; }; }; /** - * Contains response data for the recoverDeletedCertificate operation. + * Contains response data for the setCertificateIssuer operation. */ -export type RecoverDeletedCertificateResponse = CertificateBundle & { +export type SetCertificateIssuerResponse = IssuerBundle & { /** * The underlying HTTP response. */ @@ -3499,14 +1143,14 @@ export type RecoverDeletedCertificateResponse = CertificateBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: CertificateBundle; + parsedBody: IssuerBundle; }; }; /** - * Contains response data for the getStorageAccounts operation. + * Contains response data for the updateCertificateIssuer operation. */ -export type GetStorageAccountsResponse = StorageListResult & { +export type UpdateCertificateIssuerResponse = IssuerBundle & { /** * The underlying HTTP response. */ @@ -3519,14 +1163,14 @@ export type GetStorageAccountsResponse = StorageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageListResult; + parsedBody: IssuerBundle; }; }; /** - * Contains response data for the getDeletedStorageAccounts operation. + * Contains response data for the getCertificateIssuer operation. */ -export type GetDeletedStorageAccountsResponse = DeletedStorageListResult & { +export type GetCertificateIssuerResponse = IssuerBundle & { /** * The underlying HTTP response. */ @@ -3539,14 +1183,14 @@ export type GetDeletedStorageAccountsResponse = DeletedStorageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageListResult; + parsedBody: IssuerBundle; }; }; /** - * Contains response data for the getDeletedStorageAccount operation. + * Contains response data for the deleteCertificateIssuer operation. */ -export type GetDeletedStorageAccountResponse = DeletedStorageBundle & { +export type DeleteCertificateIssuerResponse = IssuerBundle & { /** * The underlying HTTP response. */ @@ -3559,14 +1203,14 @@ export type GetDeletedStorageAccountResponse = DeletedStorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageBundle; + parsedBody: IssuerBundle; }; }; /** - * Contains response data for the recoverDeletedStorageAccount operation. + * Contains response data for the createCertificate operation. */ -export type RecoverDeletedStorageAccountResponse = StorageBundle & { +export type CreateCertificateResponse = CertificateOperation & { /** * The underlying HTTP response. */ @@ -3579,14 +1223,14 @@ export type RecoverDeletedStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificateOperation; }; }; /** - * Contains response data for the backupStorageAccount operation. + * Contains response data for the importCertificate operation. */ -export type BackupStorageAccountResponse = BackupStorageResult & { +export type ImportCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3599,14 +1243,14 @@ export type BackupStorageAccountResponse = BackupStorageResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BackupStorageResult; + parsedBody: CertificateBundle; }; }; /** - * Contains response data for the restoreStorageAccount operation. + * Contains response data for the getCertificateVersions operation. */ -export type RestoreStorageAccountResponse = StorageBundle & { +export type GetCertificateVersionsResponse = CertificateListResult & { /** * The underlying HTTP response. */ @@ -3619,14 +1263,14 @@ export type RestoreStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificateListResult; }; }; /** - * Contains response data for the deleteStorageAccount operation. + * Contains response data for the getCertificatePolicy operation. */ -export type DeleteStorageAccountResponse = DeletedStorageBundle & { +export type GetCertificatePolicyResponse = CertificatePolicy & { /** * The underlying HTTP response. */ @@ -3639,14 +1283,14 @@ export type DeleteStorageAccountResponse = DeletedStorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageBundle; + parsedBody: CertificatePolicy; }; }; /** - * Contains response data for the getStorageAccount operation. + * Contains response data for the updateCertificatePolicy operation. */ -export type GetStorageAccountResponse = StorageBundle & { +export type UpdateCertificatePolicyResponse = CertificatePolicy & { /** * The underlying HTTP response. */ @@ -3659,14 +1303,14 @@ export type GetStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificatePolicy; }; }; /** - * Contains response data for the setStorageAccount operation. + * Contains response data for the updateCertificate operation. */ -export type SetStorageAccountResponse = StorageBundle & { +export type UpdateCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3679,14 +1323,14 @@ export type SetStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificateBundle; }; }; /** - * Contains response data for the updateStorageAccount operation. + * Contains response data for the getCertificate operation. */ -export type UpdateStorageAccountResponse = StorageBundle & { +export type GetCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3699,14 +1343,14 @@ export type UpdateStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificateBundle; }; }; /** - * Contains response data for the regenerateStorageAccountKey operation. + * Contains response data for the updateCertificateOperation operation. */ -export type RegenerateStorageAccountKeyResponse = StorageBundle & { +export type UpdateCertificateOperationResponse = CertificateOperation & { /** * The underlying HTTP response. */ @@ -3719,14 +1363,14 @@ export type RegenerateStorageAccountKeyResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: CertificateOperation; }; }; /** - * Contains response data for the getSasDefinitions operation. + * Contains response data for the getCertificateOperation operation. */ -export type GetSasDefinitionsResponse = SasDefinitionListResult & { +export type GetCertificateOperationResponse = CertificateOperation & { /** * The underlying HTTP response. */ @@ -3739,14 +1383,14 @@ export type GetSasDefinitionsResponse = SasDefinitionListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionListResult; + parsedBody: CertificateOperation; }; }; /** - * Contains response data for the getDeletedSasDefinitions operation. + * Contains response data for the deleteCertificateOperation operation. */ -export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & { +export type DeleteCertificateOperationResponse = CertificateOperation & { /** * The underlying HTTP response. */ @@ -3759,14 +1403,14 @@ export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionListResult; + parsedBody: CertificateOperation; }; }; /** - * Contains response data for the getDeletedSasDefinition operation. + * Contains response data for the mergeCertificate operation. */ -export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type MergeCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3779,14 +1423,14 @@ export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: CertificateBundle; }; }; /** - * Contains response data for the recoverDeletedSasDefinition operation. + * Contains response data for the backupCertificate operation. */ -export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { +export type BackupCertificateResponse = BackupCertificateResult & { /** * The underlying HTTP response. */ @@ -3799,14 +1443,14 @@ export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: BackupCertificateResult; }; }; /** - * Contains response data for the deleteSasDefinition operation. + * Contains response data for the restoreCertificate operation. */ -export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type RestoreCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3819,14 +1463,14 @@ export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: CertificateBundle; }; }; /** - * Contains response data for the getSasDefinition operation. + * Contains response data for the getDeletedCertificates operation. */ -export type GetSasDefinitionResponse = SasDefinitionBundle & { +export type GetDeletedCertificatesResponse = DeletedCertificateListResult & { /** * The underlying HTTP response. */ @@ -3839,14 +1483,14 @@ export type GetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: DeletedCertificateListResult; }; }; /** - * Contains response data for the setSasDefinition operation. + * Contains response data for the getDeletedCertificate operation. */ -export type SetSasDefinitionResponse = SasDefinitionBundle & { +export type GetDeletedCertificateResponse = DeletedCertificateBundle & { /** * The underlying HTTP response. */ @@ -3859,14 +1503,14 @@ export type SetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: DeletedCertificateBundle; }; }; /** - * Contains response data for the updateSasDefinition operation. + * Contains response data for the recoverDeletedCertificate operation. */ -export type UpdateSasDefinitionResponse = SasDefinitionBundle & { +export type RecoverDeletedCertificateResponse = CertificateBundle & { /** * The underlying HTTP response. */ @@ -3879,6 +1523,6 @@ export type UpdateSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: CertificateBundle; }; }; diff --git a/sdk/keyvault/keyvault-certificates/src/core/models/mappers.ts b/sdk/keyvault/keyvault-certificates/src/core/models/mappers.ts index 69c3d78908ad..bcdda5a172ae 100644 --- a/sdk/keyvault/keyvault-certificates/src/core/models/mappers.ts +++ b/sdk/keyvault/keyvault-certificates/src/core/models/mappers.ts @@ -50,128 +50,142 @@ export const Attributes: coreHttp.CompositeMapper = { } }; -export const JsonWebKey: coreHttp.CompositeMapper = { - serializedName: "JsonWebKey", +export const CertificateAttributes: coreHttp.CompositeMapper = { + serializedName: "CertificateAttributes", type: { name: "Composite", - className: "JsonWebKey", + className: "CertificateAttributes", modelProperties: { - kid: { - serializedName: "kid", + ...Attributes.type.modelProperties, + recoverableDays: { + readOnly: true, + serializedName: "recoverableDays", type: { - name: "String" + name: "Number" } }, - kty: { - serializedName: "kty", + recoveryLevel: { + nullable: false, + readOnly: true, + serializedName: "recoveryLevel", type: { name: "String" } - }, - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - n: { - serializedName: "n", + } + } + } +}; + +export const CertificateItem: coreHttp.CompositeMapper = { + serializedName: "CertificateItem", + type: { + name: "Composite", + className: "CertificateItem", + modelProperties: { + id: { + serializedName: "id", type: { - name: "Base64Url" + name: "String" } }, - e: { - serializedName: "e", + attributes: { + serializedName: "attributes", type: { - name: "Base64Url" + name: "Composite", + className: "CertificateAttributes" } }, - d: { - serializedName: "d", + tags: { + serializedName: "tags", type: { - name: "Base64Url" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - dp: { - serializedName: "dp", + x509Thumbprint: { + serializedName: "x5t", type: { name: "Base64Url" } - }, - dq: { - serializedName: "dq", + } + } + } +}; + +export const CertificateIssuerItem: coreHttp.CompositeMapper = { + serializedName: "CertificateIssuerItem", + type: { + name: "Composite", + className: "CertificateIssuerItem", + modelProperties: { + id: { + serializedName: "id", type: { - name: "Base64Url" + name: "String" } }, - qi: { - serializedName: "qi", + provider: { + serializedName: "provider", type: { - name: "Base64Url" + name: "String" } - }, - p: { - serializedName: "p", + } + } + } +}; + +export const KeyProperties: coreHttp.CompositeMapper = { + serializedName: "KeyProperties", + type: { + name: "Composite", + className: "KeyProperties", + modelProperties: { + exportable: { + serializedName: "exportable", type: { - name: "Base64Url" + name: "Boolean" } }, - q: { - serializedName: "q", + keyType: { + serializedName: "kty", type: { - name: "Base64Url" + name: "String" } }, - k: { - serializedName: "k", + keySize: { + serializedName: "key_size", type: { - name: "Base64Url" + name: "Number" } }, - t: { - serializedName: "key_hsm", + reuseKey: { + serializedName: "reuse_key", type: { - name: "Base64Url" + name: "Boolean" } }, - crv: { + curve: { serializedName: "crv", type: { name: "String" } - }, - x: { - serializedName: "x", - type: { - name: "Base64Url" - } - }, - y: { - serializedName: "y", - type: { - name: "Base64Url" - } } } } }; -export const KeyAttributes: coreHttp.CompositeMapper = { - serializedName: "KeyAttributes", +export const SecretProperties: coreHttp.CompositeMapper = { + serializedName: "SecretProperties", type: { name: "Composite", - className: "KeyAttributes", + className: "SecretProperties", modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + contentType: { + serializedName: "contentType", type: { name: "String" } @@ -180,247 +194,321 @@ export const KeyAttributes: coreHttp.CompositeMapper = { } }; -export const KeyBundle: coreHttp.CompositeMapper = { - serializedName: "KeyBundle", +export const SubjectAlternativeNames: coreHttp.CompositeMapper = { + serializedName: "SubjectAlternativeNames", type: { name: "Composite", - className: "KeyBundle", + className: "SubjectAlternativeNames", modelProperties: { - key: { - serializedName: "key", - type: { - name: "Composite", - className: "JsonWebKey" - } - }, - attributes: { - serializedName: "attributes", + emails: { + serializedName: "emails", type: { - name: "Composite", - className: "KeyAttributes" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - tags: { - serializedName: "tags", + dnsNames: { + serializedName: "dns_names", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } } } }, - managed: { - readOnly: true, - serializedName: "managed", + upns: { + serializedName: "upns", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const KeyItem: coreHttp.CompositeMapper = { - serializedName: "KeyItem", +export const X509CertificateProperties: coreHttp.CompositeMapper = { + serializedName: "X509CertificateProperties", type: { name: "Composite", - className: "KeyItem", + className: "X509CertificateProperties", modelProperties: { - kid: { - serializedName: "kid", + subject: { + serializedName: "subject", type: { name: "String" } }, - attributes: { - serializedName: "attributes", + ekus: { + serializedName: "ekus", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + subjectAlternativeNames: { + serializedName: "sans", type: { name: "Composite", - className: "KeyAttributes" + className: "SubjectAlternativeNames" } }, - tags: { - serializedName: "tags", + keyUsage: { + serializedName: "key_usage", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } } } }, - managed: { - readOnly: true, - serializedName: "managed", + validityInMonths: { + serializedName: "validity_months", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "Boolean" + name: "Number" } } } } }; -export const DeletedKeyBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyBundle", +export const Trigger: coreHttp.CompositeMapper = { + serializedName: "Trigger", type: { name: "Composite", - className: "DeletedKeyBundle", + className: "Trigger", modelProperties: { - ...KeyBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", + lifetimePercentage: { + serializedName: "lifetime_percentage", + constraints: { + InclusiveMaximum: 99, + InclusiveMinimum: 1 + }, type: { - name: "UnixTime" + name: "Number" } }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + daysBeforeExpiry: { + serializedName: "days_before_expiry", type: { - name: "UnixTime" + name: "Number" } } } } }; -export const DeletedKeyItem: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyItem", +export const Action: coreHttp.CompositeMapper = { + serializedName: "Action", type: { name: "Composite", - className: "DeletedKeyItem", + className: "Action", modelProperties: { - ...KeyItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + actionType: { + serializedName: "action_type", type: { - name: "UnixTime" + name: "Enum", + allowedValues: ["EmailContacts", "AutoRenew"] } } } } }; -export const SecretAttributes: coreHttp.CompositeMapper = { - serializedName: "SecretAttributes", +export const LifetimeAction: coreHttp.CompositeMapper = { + serializedName: "LifetimeAction", type: { name: "Composite", - className: "SecretAttributes", + className: "LifetimeAction", modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + trigger: { + serializedName: "trigger", type: { - name: "String" + name: "Composite", + className: "Trigger" + } + }, + action: { + serializedName: "action", + type: { + name: "Composite", + className: "Action" } } } } }; -export const SecretBundle: coreHttp.CompositeMapper = { - serializedName: "SecretBundle", +export const IssuerParameters: coreHttp.CompositeMapper = { + serializedName: "IssuerParameters", type: { name: "Composite", - className: "SecretBundle", + className: "IssuerParameters", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + certificateType: { + serializedName: "cty", type: { name: "String" } }, + certificateTransparency: { + serializedName: "cert_transparency", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CertificatePolicy: coreHttp.CompositeMapper = { + serializedName: "CertificatePolicy", + type: { + name: "Composite", + className: "CertificatePolicy", + modelProperties: { id: { + readOnly: true, serializedName: "id", type: { name: "String" } }, - contentType: { - serializedName: "contentType", + keyProperties: { + serializedName: "key_props", type: { - name: "String" + name: "Composite", + className: "KeyProperties" } }, - attributes: { - serializedName: "attributes", + secretProperties: { + serializedName: "secret_props", type: { name: "Composite", - className: "SecretAttributes" + className: "SecretProperties" } }, - tags: { - serializedName: "tags", + x509CertificateProperties: { + serializedName: "x509_props", type: { - name: "Dictionary", - value: { + name: "Composite", + className: "X509CertificateProperties" + } + }, + lifetimeActions: { + serializedName: "lifetime_actions", + type: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "LifetimeAction" } } } }, - kid: { - readOnly: true, - serializedName: "kid", + issuerParameters: { + serializedName: "issuer", type: { - name: "String" + name: "Composite", + className: "IssuerParameters" } }, - managed: { - readOnly: true, - serializedName: "managed", + attributes: { + serializedName: "attributes", type: { - name: "Boolean" + name: "Composite", + className: "CertificateAttributes" } } } } }; -export const SecretItem: coreHttp.CompositeMapper = { - serializedName: "SecretItem", +export const CertificateBundle: coreHttp.CompositeMapper = { + serializedName: "CertificateBundle", type: { name: "Composite", - className: "SecretItem", + className: "CertificateBundle", modelProperties: { id: { + readOnly: true, serializedName: "id", type: { name: "String" } }, + kid: { + readOnly: true, + serializedName: "kid", + type: { + name: "String" + } + }, + sid: { + readOnly: true, + serializedName: "sid", + type: { + name: "String" + } + }, + x509Thumbprint: { + readOnly: true, + serializedName: "x5t", + type: { + name: "Base64Url" + } + }, + policy: { + readOnly: true, + serializedName: "policy", + type: { + name: "Composite", + className: "CertificatePolicy" + } + }, + cer: { + serializedName: "cer", + type: { + name: "ByteArray" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, attributes: { serializedName: "attributes", type: { name: "Composite", - className: "SecretAttributes" + className: "CertificateAttributes" } }, tags: { @@ -433,31 +521,18 @@ export const SecretItem: coreHttp.CompositeMapper = { } } } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - managed: { - readOnly: true, - serializedName: "managed", - type: { - name: "Boolean" - } } } } }; -export const DeletedSecretBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretBundle", +export const DeletedCertificateBundle: coreHttp.CompositeMapper = { + serializedName: "DeletedCertificateBundle", type: { name: "Composite", - className: "DeletedSecretBundle", + className: "DeletedCertificateBundle", modelProperties: { - ...SecretBundle.type.modelProperties, + ...CertificateBundle.type.modelProperties, recoveryId: { serializedName: "recoveryId", type: { @@ -482,13 +557,13 @@ export const DeletedSecretBundle: coreHttp.CompositeMapper = { } }; -export const DeletedSecretItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretItem", +export const DeletedCertificateItem: coreHttp.CompositeMapper = { + serializedName: "DeletedCertificateItem", type: { name: "Composite", - className: "DeletedSecretItem", + className: "DeletedCertificateItem", modelProperties: { - ...SecretItem.type.modelProperties, + ...CertificateItem.type.modelProperties, recoveryId: { serializedName: "recoveryId", type: { @@ -513,153 +588,97 @@ export const DeletedSecretItem: coreHttp.CompositeMapper = { } }; -export const SecretRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "SecretRestoreParameters", +export const ErrorModel: coreHttp.CompositeMapper = { + serializedName: "Error", type: { name: "Composite", - className: "SecretRestoreParameters", + className: "ErrorModel", modelProperties: { - secretBundleBackup: { - required: true, - serializedName: "value", + code: { + readOnly: true, + serializedName: "code", type: { - name: "Base64Url" + name: "String" } - } - } - } -}; - -export const StorageRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "StorageRestoreParameters", - type: { - name: "Composite", - className: "StorageRestoreParameters", - modelProperties: { - storageBundleBackup: { - required: true, - serializedName: "value", + }, + message: { + readOnly: true, + serializedName: "message", type: { - name: "Base64Url" + name: "String" } - } - } - } -}; - -export const CertificateAttributes: coreHttp.CompositeMapper = { - serializedName: "CertificateAttributes", - type: { - name: "Composite", - className: "CertificateAttributes", - modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, + }, + innerError: { readOnly: true, - serializedName: "recoveryLevel", + serializedName: "innererror", type: { - name: "String" + name: "Composite", + className: "ErrorModel" } } } } }; -export const CertificateItem: coreHttp.CompositeMapper = { - serializedName: "CertificateItem", +export const CertificateOperation: coreHttp.CompositeMapper = { + serializedName: "CertificateOperation", type: { name: "Composite", - className: "CertificateItem", + className: "CertificateOperation", modelProperties: { id: { + readOnly: true, serializedName: "id", type: { name: "String" } }, - attributes: { - serializedName: "attributes", + issuerParameters: { + serializedName: "issuer", type: { name: "Composite", - className: "CertificateAttributes" + className: "IssuerParameters" } }, - tags: { - serializedName: "tags", + csr: { + serializedName: "csr", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "ByteArray" } }, - x509Thumbprint: { - serializedName: "x5t", + cancellationRequested: { + serializedName: "cancellation_requested", type: { - name: "Base64Url" + name: "Boolean" } - } - } - } -}; - -export const CertificateIssuerItem: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerItem", - type: { - name: "Composite", - className: "CertificateIssuerItem", - modelProperties: { - id: { - serializedName: "id", + }, + status: { + serializedName: "status", type: { name: "String" } }, - provider: { - serializedName: "provider", + statusDetails: { + serializedName: "status_details", type: { name: "String" } - } - } - } -}; - -export const KeyProperties: coreHttp.CompositeMapper = { - serializedName: "KeyProperties", - type: { - name: "Composite", - className: "KeyProperties", - modelProperties: { - exportable: { - serializedName: "exportable", - type: { - name: "Boolean" - } }, - keyType: { - serializedName: "kty", - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", + error: { + serializedName: "error", type: { - name: "Number" + name: "Composite", + className: "ErrorModel" } }, - reuseKey: { - serializedName: "reuse_key", + target: { + serializedName: "target", type: { - name: "Boolean" + name: "String" } }, - curve: { - serializedName: "crv", + requestId: { + serializedName: "request_id", type: { name: "String" } @@ -668,1626 +687,95 @@ export const KeyProperties: coreHttp.CompositeMapper = { } }; -export const SecretProperties: coreHttp.CompositeMapper = { - serializedName: "SecretProperties", +export const IssuerCredentials: coreHttp.CompositeMapper = { + serializedName: "IssuerCredentials", type: { name: "Composite", - className: "SecretProperties", + className: "IssuerCredentials", modelProperties: { - contentType: { - serializedName: "contentType", + accountId: { + serializedName: "account_id", type: { name: "String" } - } - } - } -}; - -export const SubjectAlternativeNames: coreHttp.CompositeMapper = { - serializedName: "SubjectAlternativeNames", - type: { - name: "Composite", - className: "SubjectAlternativeNames", - modelProperties: { - emails: { - serializedName: "emails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - dnsNames: { - serializedName: "dns_names", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } }, - upns: { - serializedName: "upns", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const X509CertificateProperties: coreHttp.CompositeMapper = { - serializedName: "X509CertificateProperties", - type: { - name: "Composite", - className: "X509CertificateProperties", - modelProperties: { - subject: { - serializedName: "subject", + password: { + serializedName: "pwd", type: { name: "String" } - }, - ekus: { - serializedName: "ekus", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - subjectAlternativeNames: { - serializedName: "sans", - type: { - name: "Composite", - className: "SubjectAlternativeNames" - } - }, - keyUsage: { - serializedName: "key_usage", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - validityInMonths: { - serializedName: "validity_months", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const Trigger: coreHttp.CompositeMapper = { - serializedName: "Trigger", - type: { - name: "Composite", - className: "Trigger", - modelProperties: { - lifetimePercentage: { - serializedName: "lifetime_percentage", - constraints: { - InclusiveMaximum: 99, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - daysBeforeExpiry: { - serializedName: "days_before_expiry", - type: { - name: "Number" - } - } - } - } -}; - -export const Action: coreHttp.CompositeMapper = { - serializedName: "Action", - type: { - name: "Composite", - className: "Action", - modelProperties: { - actionType: { - serializedName: "action_type", - type: { - name: "Enum", - allowedValues: ["EmailContacts", "AutoRenew"] - } } } } }; -export const LifetimeAction: coreHttp.CompositeMapper = { - serializedName: "LifetimeAction", +export const AdministratorDetails: coreHttp.CompositeMapper = { + serializedName: "AdministratorDetails", type: { name: "Composite", - className: "LifetimeAction", + className: "AdministratorDetails", modelProperties: { - trigger: { - serializedName: "trigger", + firstName: { + serializedName: "first_name", type: { - name: "Composite", - className: "Trigger" + name: "String" } }, - action: { - serializedName: "action", - type: { - name: "Composite", - className: "Action" - } - } - } - } -}; - -export const IssuerParameters: coreHttp.CompositeMapper = { - serializedName: "IssuerParameters", - type: { - name: "Composite", - className: "IssuerParameters", - modelProperties: { - name: { - serializedName: "name", + lastName: { + serializedName: "last_name", type: { name: "String" } }, - certificateType: { - serializedName: "cty", + emailAddress: { + serializedName: "email", type: { name: "String" } }, - certificateTransparency: { - serializedName: "cert_transparency", + phone: { + serializedName: "phone", type: { - name: "Boolean" + name: "String" } } } } }; -export const CertificatePolicy: coreHttp.CompositeMapper = { - serializedName: "CertificatePolicy", +export const OrganizationDetails: coreHttp.CompositeMapper = { + serializedName: "OrganizationDetails", type: { name: "Composite", - className: "CertificatePolicy", + className: "OrganizationDetails", modelProperties: { id: { - readOnly: true, serializedName: "id", type: { name: "String" } }, - keyProperties: { - serializedName: "key_props", - type: { - name: "Composite", - className: "KeyProperties" - } - }, - secretProperties: { - serializedName: "secret_props", - type: { - name: "Composite", - className: "SecretProperties" - } - }, - x509CertificateProperties: { - serializedName: "x509_props", - type: { - name: "Composite", - className: "X509CertificateProperties" - } - }, - lifetimeActions: { - serializedName: "lifetime_actions", + adminDetails: { + serializedName: "admin_details", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LifetimeAction" - } - } - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - } - } - } -}; - -export const CertificateBundle: coreHttp.CompositeMapper = { - serializedName: "CertificateBundle", - type: { - name: "Composite", - className: "CertificateBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - sid: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - x509Thumbprint: { - readOnly: true, - serializedName: "x5t", - type: { - name: "Base64Url" - } - }, - policy: { - readOnly: true, - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - cer: { - serializedName: "cer", - type: { - name: "ByteArray" - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedCertificateBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateBundle", - type: { - name: "Composite", - className: "DeletedCertificateBundle", - modelProperties: { - ...CertificateBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const DeletedCertificateItem: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateItem", - type: { - name: "Composite", - className: "DeletedCertificateItem", - modelProperties: { - ...CertificateItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const ErrorModel: coreHttp.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - }, - innerError: { - readOnly: true, - serializedName: "innererror", - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - } -}; - -export const CertificateOperation: coreHttp.CompositeMapper = { - serializedName: "CertificateOperation", - type: { - name: "Composite", - className: "CertificateOperation", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - csr: { - serializedName: "csr", - type: { - name: "ByteArray" - } - }, - cancellationRequested: { - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - statusDetails: { - serializedName: "status_details", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - requestId: { - serializedName: "request_id", - type: { - name: "String" - } - } - } - } -}; - -export const IssuerCredentials: coreHttp.CompositeMapper = { - serializedName: "IssuerCredentials", - type: { - name: "Composite", - className: "IssuerCredentials", - modelProperties: { - accountId: { - serializedName: "account_id", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - } - } - } -}; - -export const AdministratorDetails: coreHttp.CompositeMapper = { - serializedName: "AdministratorDetails", - type: { - name: "Composite", - className: "AdministratorDetails", - modelProperties: { - firstName: { - serializedName: "first_name", - type: { - name: "String" - } - }, - lastName: { - serializedName: "last_name", - type: { - name: "String" - } - }, - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const OrganizationDetails: coreHttp.CompositeMapper = { - serializedName: "OrganizationDetails", - type: { - name: "Composite", - className: "OrganizationDetails", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - adminDetails: { - serializedName: "admin_details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdministratorDetails" - } - } - } - } - } - } -}; - -export const IssuerAttributes: coreHttp.CompositeMapper = { - serializedName: "IssuerAttributes", - type: { - name: "Composite", - className: "IssuerAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const IssuerBundle: coreHttp.CompositeMapper = { - serializedName: "IssuerBundle", - type: { - name: "Composite", - className: "IssuerBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const Contact: coreHttp.CompositeMapper = { - serializedName: "Contact", - type: { - name: "Composite", - className: "Contact", - modelProperties: { - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const Contacts: coreHttp.CompositeMapper = { - serializedName: "Contacts", - type: { - name: "Composite", - className: "Contacts", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - contactList: { - serializedName: "contacts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Contact" - } - } - } - } - } - } -}; - -export const KeyCreateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyCreateParameters", - type: { - name: "Composite", - className: "KeyCreateParameters", - modelProperties: { - kty: { - required: true, - serializedName: "kty", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", - type: { - name: "Number" - } - }, - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - curve: { - serializedName: "crv", - type: { - name: "String" - } - } - } - } -}; - -export const KeyImportParameters: coreHttp.CompositeMapper = { - serializedName: "KeyImportParameters", - type: { - name: "Composite", - className: "KeyImportParameters", - modelProperties: { - hsm: { - serializedName: "Hsm", - type: { - name: "Boolean" - } - }, - key: { - required: true, - serializedName: "key", - type: { - name: "Composite", - className: "JsonWebKey" - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyOperationsParameters: coreHttp.CompositeMapper = { - serializedName: "KeyOperationsParameters", - type: { - name: "Composite", - className: "KeyOperationsParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeySignParameters: coreHttp.CompositeMapper = { - serializedName: "KeySignParameters", - type: { - name: "Composite", - className: "KeySignParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyParameters: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyParameters", - type: { - name: "Composite", - className: "KeyVerifyParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - digest: { - required: true, - serializedName: "digest", - type: { - name: "Base64Url" - } - }, - signature: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyUpdateParameters", - type: { - name: "Composite", - className: "KeyUpdateParameters", - modelProperties: { - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "KeyRestoreParameters", - type: { - name: "Composite", - className: "KeyRestoreParameters", - modelProperties: { - keyBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const SecretSetParameters: coreHttp.CompositeMapper = { - serializedName: "SecretSetParameters", - type: { - name: "Composite", - className: "SecretSetParameters", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - } - } - } -}; - -export const SecretUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SecretUpdateParameters", - type: { - name: "Composite", - className: "SecretUpdateParameters", - modelProperties: { - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateCreateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateCreateParameters", - type: { - name: "Composite", - className: "CertificateCreateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateImportParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateImportParameters", - type: { - name: "Composite", - className: "CertificateImportParameters", - modelProperties: { - base64EncodedCertificate: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - }, - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateUpdateParameters", - type: { - name: "Composite", - className: "CertificateUpdateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateMergeParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateMergeParameters", - type: { - name: "Composite", - className: "CertificateMergeParameters", - modelProperties: { - x509Certificates: { - required: true, - serializedName: "x5c", - type: { - name: "Sequence", - element: { - type: { - name: "ByteArray" - } - } - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateIssuerSetParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerSetParameters", - type: { - name: "Composite", - className: "CertificateIssuerSetParameters", - modelProperties: { - provider: { - required: true, - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateIssuerUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerUpdateParameters", - type: { - name: "Composite", - className: "CertificateIssuerUpdateParameters", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateOperationUpdateParameter: coreHttp.CompositeMapper = { - serializedName: "CertificateOperationUpdateParameter", - type: { - name: "Composite", - className: "CertificateOperationUpdateParameter", - modelProperties: { - cancellationRequested: { - required: true, - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyOperationResult: coreHttp.CompositeMapper = { - serializedName: "KeyOperationResult", - type: { - name: "Composite", - className: "KeyOperationResult", - modelProperties: { - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - result: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyResult: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyResult", - type: { - name: "Composite", - className: "KeyVerifyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyListResult: coreHttp.CompositeMapper = { - serializedName: "KeyListResult", - type: { - name: "Composite", - className: "KeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedKeyListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyListResult", - type: { - name: "Composite", - className: "DeletedKeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedKeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SecretListResult: coreHttp.CompositeMapper = { - serializedName: "SecretListResult", - type: { - name: "Composite", - className: "SecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedSecretListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretListResult", - type: { - name: "Composite", - className: "DeletedSecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedSecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateListResult", - type: { - name: "Composite", - className: "CertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedCertificateListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateListResult", - type: { - name: "Composite", - className: "DeletedCertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedCertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateIssuerListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerListResult", - type: { - name: "Composite", - className: "CertificateIssuerListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateIssuerItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const BackupKeyResult: coreHttp.CompositeMapper = { - serializedName: "BackupKeyResult", - type: { - name: "Composite", - className: "BackupKeyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupSecretResult: coreHttp.CompositeMapper = { - serializedName: "BackupSecretResult", - type: { - name: "Composite", - className: "BackupSecretResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupStorageResult: coreHttp.CompositeMapper = { - serializedName: "BackupStorageResult", - type: { - name: "Composite", - className: "BackupStorageResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const PendingCertificateSigningRequestResult: coreHttp.CompositeMapper = { - serializedName: "PendingCertificateSigningRequestResult", - type: { - name: "Composite", - className: "PendingCertificateSigningRequestResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "String" + className: "AdministratorDetails" + } + } } } } } }; -export const StorageAccountAttributes: coreHttp.CompositeMapper = { - serializedName: "StorageAccountAttributes", +export const IssuerAttributes: coreHttp.CompositeMapper = { + serializedName: "IssuerAttributes", type: { name: "Composite", - className: "StorageAccountAttributes", + className: "IssuerAttributes", modelProperties: { enabled: { serializedName: "enabled", @@ -2308,24 +796,16 @@ export const StorageAccountAttributes: coreHttp.CompositeMapper = { type: { name: "UnixTime" } - }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } } } } }; -export const StorageBundle: coreHttp.CompositeMapper = { - serializedName: "StorageBundle", +export const IssuerBundle: coreHttp.CompositeMapper = { + serializedName: "IssuerBundle", type: { name: "Composite", - className: "StorageBundle", + className: "IssuerBundle", modelProperties: { id: { readOnly: true, @@ -2334,136 +814,86 @@ export const StorageBundle: coreHttp.CompositeMapper = { name: "String" } }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - readOnly: true, - serializedName: "activeKeyName", + provider: { + serializedName: "provider", type: { name: "String" } }, - autoRegenerateKey: { - readOnly: true, - serializedName: "autoRegenerateKey", + credentials: { + serializedName: "credentials", type: { - name: "Boolean" + name: "Composite", + className: "IssuerCredentials" } }, - regenerationPeriod: { - readOnly: true, - serializedName: "regenerationPeriod", + organizationDetails: { + serializedName: "org_details", type: { - name: "String" + name: "Composite", + className: "OrganizationDetails" } }, attributes: { - readOnly: true, serializedName: "attributes", type: { name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + className: "IssuerAttributes" } } } } }; -export const DeletedStorageBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageBundle", +export const Contact: coreHttp.CompositeMapper = { + serializedName: "Contact", type: { name: "Composite", - className: "DeletedStorageBundle", + className: "Contact", modelProperties: { - ...StorageBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", + emailAddress: { + serializedName: "email", type: { name: "String" } }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", + name: { + serializedName: "name", type: { - name: "UnixTime" + name: "String" } }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + phone: { + serializedName: "phone", type: { - name: "UnixTime" + name: "String" } } } } }; -export const StorageAccountCreateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountCreateParameters", +export const Contacts: coreHttp.CompositeMapper = { + serializedName: "Contacts", type: { name: "Composite", - className: "StorageAccountCreateParameters", + className: "Contacts", modelProperties: { - resourceId: { - required: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - required: true, - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - required: true, - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - storageAccountAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - serializedName: "tags", + contactList: { + serializedName: "contacts", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "Contact" } } } @@ -2472,35 +902,24 @@ export const StorageAccountCreateParameters: coreHttp.CompositeMapper = { } }; -export const StorageAccountUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountUpdateParameters", +export const CertificateCreateParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateCreateParameters", type: { name: "Composite", - className: "StorageAccountUpdateParameters", + className: "CertificateCreateParameters", modelProperties: { - activeKeyName: { - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", + certificatePolicy: { + serializedName: "policy", type: { - name: "String" + name: "Composite", + className: "CertificatePolicy" } }, - storageAccountAttributes: { + certificateAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "StorageAccountAttributes" + className: "CertificateAttributes" } }, tags: { @@ -2518,53 +937,40 @@ export const StorageAccountUpdateParameters: coreHttp.CompositeMapper = { } }; -export const StorageAccountRegenerteKeyParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountRegenerteKeyParameters", +export const CertificateImportParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateImportParameters", type: { name: "Composite", - className: "StorageAccountRegenerteKeyParameters", + className: "CertificateImportParameters", modelProperties: { - keyName: { + base64EncodedCertificate: { required: true, - serializedName: "keyName", + serializedName: "value", type: { name: "String" } - } - } - } -}; - -export const StorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "StorageAccountItem", - type: { - name: "Composite", - className: "StorageAccountItem", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + }, + password: { + serializedName: "pwd", type: { name: "String" } }, - resourceId: { - readOnly: true, - serializedName: "resourceId", + certificatePolicy: { + serializedName: "policy", type: { - name: "String" + name: "Composite", + className: "CertificatePolicy" } }, - attributes: { - readOnly: true, + certificateAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "StorageAccountAttributes" + className: "CertificateAttributes" } }, tags: { - readOnly: true, serializedName: "tags", type: { name: "Dictionary", @@ -2579,186 +985,67 @@ export const StorageAccountItem: coreHttp.CompositeMapper = { } }; -export const DeletedStorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageAccountItem", - type: { - name: "Composite", - className: "DeletedStorageAccountItem", - modelProperties: { - ...StorageAccountItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const StorageListResult: coreHttp.CompositeMapper = { - serializedName: "StorageListResult", - type: { - name: "Composite", - className: "StorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedStorageListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageListResult", - type: { - name: "Composite", - className: "DeletedStorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedStorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SasDefinitionAttributes: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionAttributes", +export const CertificateUpdateParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateUpdateParameters", type: { name: "Composite", - className: "SasDefinitionAttributes", + className: "CertificateUpdateParameters", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", + certificatePolicy: { + serializedName: "policy", type: { - name: "UnixTime" + name: "Composite", + className: "CertificatePolicy" } }, - updated: { - readOnly: true, - serializedName: "updated", + certificateAttributes: { + serializedName: "attributes", type: { - name: "UnixTime" + name: "Composite", + className: "CertificateAttributes" } }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const SasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionBundle", +export const CertificateMergeParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateMergeParameters", type: { name: "Composite", - className: "SasDefinitionBundle", + className: "CertificateMergeParameters", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - secretId: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - templateUri: { - readOnly: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - readOnly: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - readOnly: true, - serializedName: "validityPeriod", + x509Certificates: { + required: true, + serializedName: "x5c", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "ByteArray" + } + } } }, - attributes: { - readOnly: true, + certificateAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "SasDefinitionAttributes" + className: "CertificateAttributes" } }, tags: { - readOnly: true, serializedName: "tags", type: { name: "Dictionary", @@ -2773,117 +1060,103 @@ export const SasDefinitionBundle: coreHttp.CompositeMapper = { } }; -export const DeletedSasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionBundle", +export const CertificateIssuerSetParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateIssuerSetParameters", type: { name: "Composite", - className: "DeletedSasDefinitionBundle", + className: "CertificateIssuerSetParameters", modelProperties: { - ...SasDefinitionBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", + provider: { + required: true, + serializedName: "provider", type: { name: "String" } }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", + credentials: { + serializedName: "credentials", type: { - name: "UnixTime" + name: "Composite", + className: "IssuerCredentials" } }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + organizationDetails: { + serializedName: "org_details", type: { - name: "UnixTime" + name: "Composite", + className: "OrganizationDetails" + } + }, + attributes: { + serializedName: "attributes", + type: { + name: "Composite", + className: "IssuerAttributes" } } } } }; -export const SasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionItem", +export const CertificateIssuerUpdateParameters: coreHttp.CompositeMapper = { + serializedName: "CertificateIssuerUpdateParameters", type: { name: "Composite", - className: "SasDefinitionItem", + className: "CertificateIssuerUpdateParameters", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + provider: { + serializedName: "provider", type: { name: "String" } }, - secretId: { - readOnly: true, - serializedName: "sid", + credentials: { + serializedName: "credentials", type: { - name: "String" + name: "Composite", + className: "IssuerCredentials" } }, - attributes: { - readOnly: true, - serializedName: "attributes", + organizationDetails: { + serializedName: "org_details", type: { name: "Composite", - className: "SasDefinitionAttributes" + className: "OrganizationDetails" } }, - tags: { - readOnly: true, - serializedName: "tags", + attributes: { + serializedName: "attributes", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "IssuerAttributes" } } } } }; -export const DeletedSasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionItem", +export const CertificateOperationUpdateParameter: coreHttp.CompositeMapper = { + serializedName: "CertificateOperationUpdateParameter", type: { name: "Composite", - className: "DeletedSasDefinitionItem", + className: "CertificateOperationUpdateParameter", modelProperties: { - ...SasDefinitionItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + cancellationRequested: { + required: true, + serializedName: "cancellation_requested", type: { - name: "UnixTime" + name: "Boolean" } } } } }; -export const SasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionListResult", +export const CertificateListResult: coreHttp.CompositeMapper = { + serializedName: "CertificateListResult", type: { name: "Composite", - className: "SasDefinitionListResult", + className: "CertificateListResult", modelProperties: { value: { readOnly: true, @@ -2893,7 +1166,7 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "SasDefinitionItem" + className: "CertificateItem" } } } @@ -2909,11 +1182,11 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { } }; -export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionListResult", +export const DeletedCertificateListResult: coreHttp.CompositeMapper = { + serializedName: "DeletedCertificateListResult", type: { name: "Composite", - className: "DeletedSasDefinitionListResult", + className: "DeletedCertificateListResult", modelProperties: { value: { readOnly: true, @@ -2923,7 +1196,7 @@ export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "DeletedSasDefinitionItem" + className: "DeletedCertificateItem" } } } @@ -2939,113 +1212,47 @@ export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { } }; -export const SasDefinitionCreateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionCreateParameters", +export const CertificateIssuerListResult: coreHttp.CompositeMapper = { + serializedName: "CertificateIssuerListResult", type: { name: "Composite", - className: "SasDefinitionCreateParameters", + className: "CertificateIssuerListResult", modelProperties: { - templateUri: { - required: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - required: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - required: true, - serializedName: "validityPeriod", - type: { - name: "String" - } - }, - sasDefinitionAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", + value: { + readOnly: true, + serializedName: "value", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "CertificateIssuerItem" } } } - } - } - } -}; - -export const SasDefinitionUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionUpdateParameters", - type: { - name: "Composite", - className: "SasDefinitionUpdateParameters", - modelProperties: { - templateUri: { - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - serializedName: "sasType", - type: { - name: "String" - } }, - validityPeriod: { - serializedName: "validityPeriod", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } - }, - sasDefinitionAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } } } } }; -export const KeyVaultError: coreHttp.CompositeMapper = { - serializedName: "KeyVaultError", +export const PendingCertificateSigningRequestResult: coreHttp.CompositeMapper = { + serializedName: "PendingCertificateSigningRequestResult", type: { name: "Composite", - className: "KeyVaultError", + className: "PendingCertificateSigningRequestResult", modelProperties: { - error: { + value: { readOnly: true, - serializedName: "error", + serializedName: "value", type: { - name: "Composite", - className: "ErrorModel" + name: "String" } } } @@ -3085,3 +1292,21 @@ export const BackupCertificateResult: coreHttp.CompositeMapper = { } } }; + +export const KeyVaultError: coreHttp.CompositeMapper = { + serializedName: "KeyVaultError", + type: { + name: "Composite", + className: "KeyVaultError", + modelProperties: { + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; diff --git a/sdk/keyvault/keyvault-certificates/src/core/models/parameters.ts b/sdk/keyvault/keyvault-certificates/src/core/models/parameters.ts index 7c92c284d8ee..3ecbcbd44977 100644 --- a/sdk/keyvault/keyvault-certificates/src/core/models/parameters.ts +++ b/sdk/keyvault/keyvault-certificates/src/core/models/parameters.ts @@ -72,39 +72,6 @@ export const issuerName: coreHttp.OperationURLParameter = { } } }; -export const keyName0: coreHttp.OperationURLParameter = { - parameterPath: "keyName", - mapper: { - required: true, - serializedName: "key-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const keyName1: coreHttp.OperationURLParameter = { - parameterPath: "keyName", - mapper: { - required: true, - serializedName: "key-name", - type: { - name: "String" - } - } -}; -export const keyVersion: coreHttp.OperationURLParameter = { - parameterPath: "keyVersion", - mapper: { - required: true, - serializedName: "key-version", - type: { - name: "String" - } - } -}; export const maxresults: coreHttp.OperationQueryParameter = { parameterPath: ["options", "maxresults"], mapper: { @@ -118,75 +85,6 @@ export const maxresults: coreHttp.OperationQueryParameter = { } } }; -export const sasDefinitionName: coreHttp.OperationURLParameter = { - parameterPath: "sasDefinitionName", - mapper: { - required: true, - serializedName: "sas-definition-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; -export const secretName0: coreHttp.OperationURLParameter = { - parameterPath: "secretName", - mapper: { - required: true, - serializedName: "secret-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const secretName1: coreHttp.OperationURLParameter = { - parameterPath: "secretName", - mapper: { - required: true, - serializedName: "secret-name", - type: { - name: "String" - } - } -}; -export const secretVersion: coreHttp.OperationURLParameter = { - parameterPath: "secretVersion", - mapper: { - required: true, - serializedName: "secret-version", - type: { - name: "String" - } - } -}; -export const storageAccountName0: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; -export const storageAccountName1: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - type: { - name: "String" - } - } -}; export const vaultBaseUrl: coreHttp.OperationURLParameter = { parameterPath: "vaultBaseUrl", mapper: { diff --git a/sdk/keyvault/keyvault-certificates/swagger/README.md b/sdk/keyvault/keyvault-certificates/swagger/README.md new file mode 100644 index 000000000000..ce8719d54309 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/swagger/README.md @@ -0,0 +1,17 @@ +# KeyVault Certificates Swagger Configuration + +> see https://aka.ms/autorest + +``` yaml +typescript: + package-name: "@azure/keyvault-certificates" +use-extension: + "@microsoft.azure/autorest.typescript": "~5.0.1" +azure-arm: false +generate-metadata: false +add-credentials: true +license-header: MICROSOFT_MIT_NO_VERSION +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.1/certificates.json +output-folder: ../ +source-code-folder-path: ./src/core +``` diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index b1a15d9a3d81..e11305efdf52 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -61,6 +61,7 @@ "lint:terminal": "eslint package.json tsconfig.json src test samples --ext .ts", "pack": "npm pack 2>&1", "prebuild": "npm run clean", + "regenerate": "npx autorest swagger/README.md --typescript", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", "test:node": "npm run clean && npm run build:test && npm run unit-test:node", "test": "npm run clean && npm run build:test && npm run unit-test", diff --git a/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md b/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md index a5d7df4b0978..f63d4653b4e0 100644 --- a/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md +++ b/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md @@ -93,7 +93,7 @@ export interface DeletedKey { } // @public -export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription"; +export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription" | "CustomizedRecoverable+Purgeable" | "CustomizedRecoverable" | "CustomizedRecoverable+ProtectedSubscription"; // @public export type EncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"; diff --git a/sdk/keyvault/keyvault-keys/src/core/keyVaultBase.ts b/sdk/keyvault/keyvault-keys/src/core/keyVaultBase.ts index 3d920bf36604..14df77380b02 100644 --- a/sdk/keyvault/keyvault-keys/src/core/keyVaultBase.ts +++ b/sdk/keyvault/keyvault-keys/src/core/keyVaultBase.ts @@ -15,5 +15,3 @@ export interface ParsedKeyVaultEntityIdentifier { */ name: string; } - - diff --git a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts index 5ef6d256b678..2c18723878a0 100644 --- a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts @@ -1297,4401 +1297,32 @@ class KeyVaultClient extends KeyVaultClientContext { callback ) as Promise; } +} - /** - * 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. - * @summary Sets a secret in a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options?: Models.KeyVaultClientSetSecretOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param callback The callback - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param options The optional parameters - * @param callback The callback - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options: Models.KeyVaultClientSetSecretOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options?: - | Models.KeyVaultClientSetSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - value, - options - }, - setSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes a secret from a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - deleteSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Updates the attributes associated with a specified secret in a given key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: Models.KeyVaultClientUpdateSecretOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param callback The callback - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param options The optional parameters - * @param callback The callback - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options: Models.KeyVaultClientUpdateSecretOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: - | Models.KeyVaultClientUpdateSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - secretVersion, - options - }, - updateSecretOperationSpec, - callback - ) as Promise; - } - - /** - * The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires - * the secrets/get permission. - * @summary Get a specified secret from a given key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param callback The callback - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - secretVersion, - options - }, - getSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary List secrets in a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getSecrets( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetSecretsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getSecrets( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getSecrets( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetSecretsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSecrets( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getSecretsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary List all versions of the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options?: Models.KeyVaultClientGetSecretVersionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options: Models.KeyVaultClientGetSecretVersionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options?: - | Models.KeyVaultClientGetSecretVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - getSecretVersionsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted secrets for the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSecrets( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedSecrets( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSecrets( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedSecretsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSecrets( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedSecretsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted Secret operation returns the specified deleted secret along with its attributes. - * This operation requires the secrets/get permission. - * @summary Gets the specified deleted secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - getDeletedSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - purgeDeletedSecretOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted secret to the latest version. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - recoverDeletedSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Backs up the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - backupSecretOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up secret, and all its versions, to a vault. This operation requires the - * secrets/restore permission. - * @summary Restores a backed up secret to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretBundleBackup, - options - }, - restoreSecretOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificates operation returns the set of certificates resources in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List certificates in a specified key vault - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes a certificate from a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Sets the certificate contacts for the specified key vault. This operation requires the - * certificates/managecontacts permission. - * @summary Sets the certificate contacts for the specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - contacts, - options - }, - setCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateContacts operation returns the set of certificate contact resources in the - * specified key vault. This operation requires the certificates/managecontacts permission. - * @summary Lists the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes the certificate contacts for a specified key vault certificate. This operation requires - * the certificates/managecontacts permission. - * @summary Deletes the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - deleteCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuers operation returns the set of certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary List certificate issuers for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuers( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificateIssuersOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificateIssuersOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuers( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificateIssuersOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateIssuersOperationSpec, - callback - ) as Promise; - } - - /** - * The SetCertificateIssuer operation adds or updates the specified certificate issuer. This - * operation requires the certificates/setissuers permission. - * @summary Sets the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: Models.KeyVaultClientSetCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options: Models.KeyVaultClientSetCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: - | Models.KeyVaultClientSetCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - provider, - options - }, - setCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer - * entity. This operation requires the certificates/setissuers permission. - * @summary Updates the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: - | Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - updateCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuer operation returns the specified certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary Lists the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - getCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from - * the vault. This operation requires the certificates/manageissuers/deleteissuers permission. - * @summary Deletes the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - deleteCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * If this is the first version, the certificate resource is created. This operation requires the - * certificates/create permission. - * @summary Creates a new certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientCreateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientCreateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientCreateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - createCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Imports a certificate into a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param [options] The optional parameters - * @returns Promise - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: Models.KeyVaultClientImportCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param options The optional parameters - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options: Models.KeyVaultClientImportCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: - | Models.KeyVaultClientImportCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - base64EncodedCertificate, - options - }, - importCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateVersions operation returns the versions of a certificate in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List the versions of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientGetCertificateVersionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientGetCertificateVersionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientGetCertificateVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateVersionsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificatePolicy operation returns the specified certificate policy resources in the - * specified key vault. This operation requires the certificates/get permission. - * @summary Lists the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param options The optional parameters - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * Set specified members in the certificate policy. Leave others as null. This operation requires - * the certificates/update permission. - * @summary Updates the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificatePolicy, - options - }, - updateCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Updates the specified attributes associated with the given certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: Models.KeyVaultClientUpdateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: Models.KeyVaultClientUpdateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: - | Models.KeyVaultClientUpdateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - updateCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specific certificate. This operation requires the certificates/get - * permission. - * @summary Gets information about a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - getCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Updates a certificate creation operation that is already in progress. This operation requires - * the certificates/update permission. - * @summary Updates a certificate operation. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - cancellationRequested, - options - }, - updateCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * Gets the creation operation associated with a specified certificate. This operation requires the - * certificates/get permission. - * @summary Gets the creation operation of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes the creation operation for a specific certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Merges a certificate or a certificate chain with a key pair existing on the server. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param [options] The optional parameters - * @returns Promise - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: Models.KeyVaultClientMergeCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param options The optional parameters - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options: Models.KeyVaultClientMergeCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: - | Models.KeyVaultClientMergeCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - x509Certificates, - options - }, - mergeCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified certificate be downloaded to the client. All versions of - * the certificate will be downloaded. This operation requires the certificates/backup permission. - * @summary Backs up the specified certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - backupCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up certificate, and all its versions, to a vault. This operation requires the - * certificates/restore permission. - * @summary Restores a backed up certificate to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateBundleBackup, - options - }, - restoreCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists the deleted certificates in the specified vault currently available for recovery. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Retrieves information about the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - purgeDeletedCertificateOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted certificate back to its current version under /certificates. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - recoverDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * List storage accounts managed by the specified key vault. This operation requires the - * storage/list permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted storage accounts for the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted Storage Account operation returns the specified deleted storage account along - * with its attributes. This operation requires the storage/get permission. - * @summary Gets the specified deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - purgeDeletedStorageAccountOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - recoverDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified storage account be downloaded to the client. This - * operation requires the storage/backup permission. - * @summary Backs up the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - backupStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up storage account to a vault. This operation requires the storage/restore - * permission. - * @summary Restores a backed up storage account to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param [options] The optional parameters - * @returns Promise - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param options The optional parameters - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageBundleBackup, - options - }, - restoreStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a storage account. This operation requires the storage/delete permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - deleteStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specified storage account. This operation requires the storage/get - * permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new storage account. This operation requires the storage/set permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param [options] The optional parameters - * @returns Promise - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: Models.KeyVaultClientSetStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param options The optional parameters - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options: Models.KeyVaultClientSetStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: - | Models.KeyVaultClientSetStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - resourceId, - activeKeyName, - autoRegenerateKey, - options - }, - setStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given storage account. This operation - * requires the storage/set/update permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientUpdateStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientUpdateStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientUpdateStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - updateStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Regenerates the specified key value for the given storage account. This operation requires the - * storage/regeneratekey permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param [options] The optional parameters - * @returns Promise - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param options The optional parameters - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - keyName, - options - }, - regenerateStorageAccountKeyOperationSpec, - callback - ) as Promise; - } - - /** - * List storage SAS definitions for the given storage account. This operation requires the - * storage/listsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted SAS definitions for the specified vault and storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted SAS Definition operation returns the specified deleted SAS definition along with - * its attributes. This operation requires the storage/getsas permission. - * @summary Gets the specified deleted sas definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Recovers the deleted SAS definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - recoverDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a SAS definition from a specified storage account. This operation requires the - * storage/deletesas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - deleteSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a SAS definition for the specified storage account. This operation - * requires the storage/getsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new SAS definition for the specified storage account. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: Models.KeyVaultClientSetSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options: Models.KeyVaultClientSetSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: - | Models.KeyVaultClientSetSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - templateUri, - sasType, - validityPeriod, - options - }, - setSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given SAS definition. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: Models.KeyVaultClientUpdateSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: Models.KeyVaultClientUpdateSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | Models.KeyVaultClientUpdateSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - updateSasDefinitionOperationSpec, - callback - ) as Promise; - } -} - -// Operation Specifications -const serializer = new coreHttp.Serializer(Mappers); -const createKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - kty: "kty", - keySize: ["options", "keySize"], - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"], - curve: ["options", "curve"] - }, - mapper: { - ...Mappers.KeyCreateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - hsm: ["options", "hsm"], - key: "key", - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupKeyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyBundleBackup: "keyBundleBackup" - }, - mapper: { - ...Mappers.KeyRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const encryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/encrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const decryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/decrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const signOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/sign", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeySignParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const verifyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/verify", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - digest: "digest", - signature: "signature" - }, - mapper: { - ...Mappers.KeyVerifyParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyVerifyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const wrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/wrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const unwrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/unwrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedkeys/{key-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - value: "value", - tags: ["options", "tags"], - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"] - }, - mapper: { - ...Mappers.SecretSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SecretUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedsecrets/{secret-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/{secret-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupSecretResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - secretBundleBackup: "secretBundleBackup" - }, - mapper: { - ...Mappers.SecretRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificatesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "contacts", - mapper: { - ...Mappers.Contacts, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuersOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateIssuerListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: "provider", - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: ["options", "provider"], - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const createCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateCreateParameters, - required: true - } - }, - responses: { - 202: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/import", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - base64EncodedCertificate: "base64EncodedCertificate", - password: ["options", "password"], - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/policy", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/policy", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "certificatePolicy", - mapper: { - ...Mappers.CertificatePolicy, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - cancellationRequested: "cancellationRequested" - }, - mapper: { - ...Mappers.CertificateOperationUpdateParameter, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const mergeCertificateOperationSpec: coreHttp.OperationSpec = { +// Operation Specifications +const serializer = new coreHttp.Serializer(Mappers); +const createKeyOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "certificates/{certificate-name}/pending/merge", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], + path: "keys/{key-name}/create", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - x509Certificates: "x509Certificates", - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] + kty: "kty", + keySize: ["options", "keySize"], + keyOps: ["options", "keyOps"], + keyAttributes: ["options", "keyAttributes"], + tags: ["options", "tags"], + curve: ["options", "curve"] }, mapper: { - ...Mappers.CertificateMergeParameters, + ...Mappers.KeyCreateParameters, required: true } }, - responses: { - 201: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.BackupCertificateResult + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5700,39 +1331,26 @@ const backupCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const restoreCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/restore", - urlParameters: [Parameters.vaultBaseUrl], +const importKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "keys/{key-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - certificateBundleBackup: "certificateBundleBackup" + hsm: ["options", "hsm"], + key: "key", + keyAttributes: ["options", "keyAttributes"], + tags: ["options", "tags"] }, mapper: { - ...Mappers.CertificateRestoreParameters, + ...Mappers.KeyImportParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedCertificatesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedcertificates", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateListResult + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5741,14 +1359,14 @@ const getDeletedCertificatesOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], +const deleteKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "keys/{key-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedCertificateBundle + bodyMapper: Mappers.DeletedKeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5757,28 +1375,25 @@ const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const purgeDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], +const updateKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "keys/{key-name}/{key-version}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError + requestBody: { + parameterPath: { + keyOps: ["options", "keyOps"], + keyAttributes: ["options", "keyAttributes"], + tags: ["options", "tags"] + }, + mapper: { + ...Mappers.KeyUpdateParameters, + required: true } }, - serializer -}; - -const recoverDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedcertificates/{certificate-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.CertificateBundle + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5787,14 +1402,14 @@ const recoverDeletedCertificateOperationSpec: coreHttp.OperationSpec = { serializer }; -const getStorageAccountsOperationSpec: coreHttp.OperationSpec = { +const getKeyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], + path: "keys/{key-name}/{key-version}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], + queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.StorageListResult + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5803,14 +1418,14 @@ const getStorageAccountsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { +const getKeyVersionsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedstorage", - urlParameters: [Parameters.vaultBaseUrl], + path: "keys/{key-name}/versions", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedStorageListResult + bodyMapper: Mappers.KeyListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5819,44 +1434,14 @@ const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { +const getKeysOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedStorageBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], + path: "keys", + urlParameters: [Parameters.vaultBaseUrl], + queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5865,14 +1450,14 @@ const recoverDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const backupStorageAccountOperationSpec: coreHttp.OperationSpec = { +const backupKeyOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "storage/{storage-account-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName1], + path: "keys/{key-name}/backup", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.BackupStorageResult + bodyMapper: Mappers.BackupKeyResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5881,23 +1466,23 @@ const backupStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { +const restoreKeyOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "storage/restore", + path: "keys/restore", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - storageBundleBackup: "storageBundleBackup" + keyBundleBackup: "keyBundleBackup" }, mapper: { - ...Mappers.StorageRestoreParameters, + ...Mappers.KeyRestoreParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5906,30 +1491,24 @@ const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const encryptOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "keys/{key-name}/{key-version}/encrypt", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedStorageBundle + requestBody: { + parameterPath: { + algorithm: "algorithm", + value: "value" }, - default: { - bodyMapper: Mappers.KeyVaultError + mapper: { + ...Mappers.KeyOperationsParameters, + required: true } }, - serializer -}; - -const getStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyOperationResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5938,28 +1517,24 @@ const getStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const setStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const decryptOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "keys/{key-name}/{key-version}/decrypt", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - resourceId: "resourceId", - activeKeyName: "activeKeyName", - autoRegenerateKey: "autoRegenerateKey", - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], - tags: ["options", "tags"] + algorithm: "algorithm", + value: "value" }, mapper: { - ...Mappers.StorageAccountCreateParameters, + ...Mappers.KeyOperationsParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyOperationResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5968,27 +1543,24 @@ const setStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const signOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "keys/{key-name}/{key-version}/sign", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - activeKeyName: ["options", "activeKeyName"], - autoRegenerateKey: ["options", "autoRegenerateKey"], - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], - tags: ["options", "tags"] + algorithm: "algorithm", + value: "value" }, mapper: { - ...Mappers.StorageAccountUpdateParameters, + ...Mappers.KeySignParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyOperationResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -5997,23 +1569,25 @@ const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { +const verifyOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", - path: "storage/{storage-account-name}/regeneratekey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "keys/{key-name}/{key-version}/verify", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - keyName: "keyName" + algorithm: "algorithm", + digest: "digest", + signature: "signature" }, mapper: { - ...Mappers.StorageAccountRegenerteKeyParameters, + ...Mappers.KeyVerifyParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.KeyVerifyResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6022,30 +1596,24 @@ const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SasDefinitionListResult +const wrapKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "keys/{key-name}/{key-version}/wrapkey", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], + queryParameters: [Parameters.apiVersion], + requestBody: { + parameterPath: { + algorithm: "algorithm", + value: "value" }, - default: { - bodyMapper: Mappers.KeyVaultError + mapper: { + ...Mappers.KeyOperationsParameters, + required: true } }, - serializer -}; - -const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionListResult + bodyMapper: Mappers.KeyOperationResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6054,38 +1622,24 @@ const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const unwrapKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "keys/{key-name}/{key-version}/unwrapkey", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle + requestBody: { + parameterPath: { + algorithm: "algorithm", + value: "value" }, - default: { - bodyMapper: Mappers.KeyVaultError + mapper: { + ...Mappers.KeyOperationsParameters, + required: true } }, - serializer -}; - -const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}/recover", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], - queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.KeyOperationResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6094,18 +1648,14 @@ const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], - queryParameters: [Parameters.apiVersion], +const getDeletedKeysOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "deletedkeys", + urlParameters: [Parameters.vaultBaseUrl], + queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle + bodyMapper: Mappers.DeletedKeyListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6114,18 +1664,14 @@ const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { +const getDeletedKeyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], + path: "deletedkeys/{key-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.DeletedKeyBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6134,32 +1680,13 @@ const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const purgeDeletedKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "DELETE", + path: "deletedkeys/{key-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - templateUri: "templateUri", - sasType: "sasType", - validityPeriod: "validityPeriod", - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SasDefinitionCreateParameters, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.SasDefinitionBundle - }, + 204: {}, default: { bodyMapper: Mappers.KeyVaultError } @@ -6167,31 +1694,14 @@ const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const recoverDeletedKeyOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "deletedkeys/{key-name}/recover", + urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - templateUri: ["options", "templateUri"], - sasType: ["options", "sasType"], - validityPeriod: ["options", "validityPeriod"], - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SasDefinitionUpdateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.KeyBundle }, default: { bodyMapper: Mappers.KeyVaultError diff --git a/sdk/keyvault/keyvault-keys/src/core/models/index.ts b/sdk/keyvault/keyvault-keys/src/core/models/index.ts index 2757827d6b2e..37795725444d 100644 --- a/sdk/keyvault/keyvault-keys/src/core/models/index.ts +++ b/sdk/keyvault/keyvault-keys/src/core/models/index.ts @@ -8,34 +8,6 @@ import * as coreHttp from "@azure/core-http"; -/** - * The object attributes managed by the KeyVault service. - */ -export interface Attributes { - /** - * Determines whether the object is enabled. - */ - enabled?: boolean; - /** - * Not before date in UTC. - */ - notBefore?: Date; - /** - * Expiry date in UTC. - */ - expires?: Date; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; -} - /** * As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 */ @@ -50,7 +22,7 @@ export interface JsonWebKey { * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' */ kty?: JsonWebKeyType; - keyOps?: JsonWebKeyOperation[]; + keyOps?: string[]; /** * RSA modulus. */ @@ -106,15 +78,51 @@ export interface JsonWebKey { y?: Uint8Array; } +/** + * The object attributes managed by the KeyVault service. + */ +export interface Attributes { + /** + * Determines whether the object is enabled. + */ + enabled?: boolean; + /** + * Not before date in UTC. + */ + notBefore?: Date; + /** + * Expiry date in UTC. + */ + expires?: Date; + /** + * Creation time in UTC. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: Date; + /** + * Last updated time in UTC. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updated?: Date; +} + /** * The attributes of a key managed by the key vault service. */ export interface KeyAttributes extends Attributes { + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, + * otherwise 0. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recoverableDays?: number; /** * Reflects the deletion recovery level currently in effect for keys in the current vault. If it * contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only * the system can purge the key, at the end of the retention interval. Possible values include: - * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription', + * 'CustomizedRecoverable+Purgeable', 'CustomizedRecoverable', + * 'CustomizedRecoverable+ProtectedSubscription' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recoveryLevel?: DeletionRecoveryLevel; @@ -209,471 +217,231 @@ export interface DeletedKeyItem extends KeyItem { } /** - * The secret management attributes. - */ -export interface SecretAttributes extends Attributes { - /** - * Reflects the deletion recovery level currently in effect for secrets in the current vault. If - * it contains 'Purgeable', the secret can be permanently deleted by a privileged user; - * otherwise, only the system can purge the secret, at the end of the retention interval. - * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A secret consisting of a value, id and its attributes. + * Properties of the key pair backing a certificate. */ -export interface SecretBundle { - /** - * The secret value. - */ - value?: string; - /** - * The secret id. - */ - id?: string; +export interface KeyProperties { /** - * The content type of the secret. + * Indicates if the private key can be exported. */ - contentType?: string; + exportable?: boolean; /** - * The secret management attributes. + * The type of key pair to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' */ - attributes?: SecretAttributes; + keyType?: JsonWebKeyType; /** - * Application specific metadata in the form of key-value pairs. + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. */ - tags?: { [propertyName: string]: string }; + keySize?: number; /** - * If this is a secret backing a KV certificate, then this field specifies the corresponding key - * backing the KV certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Indicates if the same key pair will be used on certificate renewal. */ - readonly kid?: string; + reuseKey?: boolean; /** - * True if the secret's lifetime is managed by key vault. If this is a secret backing a - * certificate, then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' */ - readonly managed?: boolean; + curve?: JsonWebKeyCurveName; } /** - * The secret item containing secret metadata. + * The key create parameters. */ -export interface SecretItem { +export interface KeyCreateParameters { /** - * Secret identifier. + * The type of key to create. For valid values, see JsonWebKeyType. Possible values include: + * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' */ - id?: string; + kty: JsonWebKeyType; /** - * The secret management attributes. + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. */ - attributes?: SecretAttributes; + keySize?: number; + keyOps?: JsonWebKeyOperation[]; + keyAttributes?: KeyAttributes; /** * Application specific metadata in the form of key-value pairs. */ tags?: { [propertyName: string]: string }; /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * True if the secret's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' */ - readonly managed?: boolean; + curve?: JsonWebKeyCurveName; } /** - * A Deleted Secret consisting of its previous id, attributes and its tags, as well as information - * on when it will be purged. + * The key import parameters. */ -export interface DeletedSecretBundle extends SecretBundle { - /** - * The url of the recovery object, used to identify and recover the deleted secret. - */ - recoveryId?: string; - /** - * The time when the secret is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; +export interface KeyImportParameters { /** - * The time when the secret was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Whether to import as a hardware key (HSM) or software key. */ - readonly deletedDate?: Date; -} - -/** - * The deleted secret item containing metadata about the deleted secret. - */ -export interface DeletedSecretItem extends SecretItem { + hsm?: boolean; /** - * The url of the recovery object, used to identify and recover the deleted secret. + * The Json web key */ - recoveryId?: string; + key: JsonWebKey; /** - * The time when the secret is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The key management attributes. */ - readonly scheduledPurgeDate?: Date; + keyAttributes?: KeyAttributes; /** - * The time when the secret was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Application specific metadata in the form of key-value pairs. */ - readonly deletedDate?: Date; + tags?: { [propertyName: string]: string }; } /** - * The secret restore parameters. + * The key operations parameters. */ -export interface SecretRestoreParameters { +export interface KeyOperationsParameters { /** - * The backup blob associated with a secret bundle. + * algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' */ - secretBundleBackup: Uint8Array; + algorithm: JsonWebKeyEncryptionAlgorithm; + value: Uint8Array; } /** - * The secret restore parameters. + * The key operations parameters. */ -export interface StorageRestoreParameters { +export interface KeySignParameters { /** - * The backup blob associated with a storage account. + * 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', 'ES256K' */ - storageBundleBackup: Uint8Array; + algorithm: JsonWebKeySignatureAlgorithm; + value: Uint8Array; } /** - * The certificate management attributes. + * The key verify parameters. */ -export interface CertificateAttributes extends Attributes { +export interface KeyVerifyParameters { /** - * Reflects the deletion recovery level currently in effect for certificates in the current - * vault. If it contains 'Purgeable', the certificate can be permanently deleted by a privileged - * user; otherwise, only the system can purge the certificate, at the end of the retention - * interval. Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * 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', 'ES256K' */ - readonly recoveryLevel?: DeletionRecoveryLevel; + algorithm: JsonWebKeySignatureAlgorithm; + /** + * The digest used for signing. + */ + digest: Uint8Array; + /** + * The signature to be verified. + */ + signature: Uint8Array; } /** - * The certificate item containing certificate metadata. + * The key update parameters. */ -export interface CertificateItem { - /** - * Certificate identifier. - */ - id?: string; +export interface KeyUpdateParameters { /** - * The certificate management attributes. + * Json web key operations. For more information on possible key operations, see + * JsonWebKeyOperation. */ - attributes?: CertificateAttributes; + keyOps?: JsonWebKeyOperation[]; + keyAttributes?: KeyAttributes; /** * Application specific metadata in the form of key-value pairs. */ tags?: { [propertyName: string]: string }; - /** - * Thumbprint of the certificate. - */ - x509Thumbprint?: Uint8Array; } /** - * The certificate issuer item containing certificate issuer metadata. + * The key restore parameters. */ -export interface CertificateIssuerItem { - /** - * Certificate Identifier. - */ - id?: string; +export interface KeyRestoreParameters { /** - * The issuer provider. + * The backup blob associated with a key bundle. */ - provider?: string; + keyBundleBackup: Uint8Array; } /** - * Properties of the key pair backing a certificate. + * The key operation result. */ -export interface KeyProperties { - /** - * Indicates if the private key can be exported. - */ - exportable?: boolean; - /** - * The type of key pair to be used for the certificate. Possible values include: 'EC', 'EC-HSM', - * 'RSA', 'RSA-HSM', 'oct' - */ - keyType?: JsonWebKeyType; - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; +export interface KeyOperationResult { /** - * Indicates if the same key pair will be used on certificate renewal. + * Key identifier + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - reuseKey?: boolean; + readonly kid?: string; /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - curve?: JsonWebKeyCurveName; + readonly result?: Uint8Array; } /** - * Properties of the key backing a certificate. + * The key verify result. */ -export interface SecretProperties { +export interface KeyVerifyResult { /** - * The media type (MIME type). + * True if the signature is verified, otherwise false. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - contentType?: string; + readonly value?: boolean; } /** - * The subject alternate names of a X509 object. + * The key list result. */ -export interface SubjectAlternativeNames { - /** - * Email addresses. - */ - emails?: string[]; +export interface KeyListResult { /** - * Domain names. + * A response message containing a list of keys in the key vault along with a link to the next + * page of keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dnsNames?: string[]; + readonly value?: KeyItem[]; /** - * User principal names. + * The URL to get the next set of keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - upns?: string[]; + readonly nextLink?: string; } /** - * Properties of the X509 component of a certificate. + * A list of keys that have been deleted in this vault. */ -export interface X509CertificateProperties { - /** - * The subject name. Should be a valid X509 distinguished Name. - */ - subject?: string; - /** - * The enhanced key usage. - */ - ekus?: string[]; - /** - * The subject alternative names. - */ - subjectAlternativeNames?: SubjectAlternativeNames; +export interface DeletedKeyListResult { /** - * List of key usages. + * A response message containing a list of deleted keys in the vault along with a link to the + * next page of deleted keys + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - keyUsage?: KeyUsageType[]; + readonly value?: DeletedKeyItem[]; /** - * The duration that the certificate is valid in months. + * The URL to get the next set of deleted keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - validityInMonths?: number; + readonly nextLink?: string; } /** - * A condition to be satisfied for an action to be executed. + * The backup key result, containing the backup blob. */ -export interface Trigger { - /** - * Percentage of lifetime at which to trigger. Value should be between 1 and 99. - */ - lifetimePercentage?: number; +export interface BackupKeyResult { /** - * Days before expiry to attempt renewal. Value should be between 1 and validity_in_months - * multiplied by 27. If validity_in_months is 36, then value should be between 1 and 972 (36 * - * 27). + * The backup blob containing the backed up key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - daysBeforeExpiry?: number; + readonly value?: Uint8Array; } /** - * The action that will be executed. + * The key vault server error. */ -export interface Action { +export interface ErrorModel { /** - * The type of the action. Possible values include: 'EmailContacts', 'AutoRenew' + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - actionType?: ActionType; -} - -/** - * Action and its trigger that will be performed by Key Vault over the lifetime of a certificate. - */ -export interface LifetimeAction { - /** - * The condition that will execute the action. - */ - trigger?: Trigger; - /** - * The action that will be executed. - */ - action?: Action; -} - -/** - * Parameters for the issuer of the X509 component of a certificate. - */ -export interface IssuerParameters { - /** - * Name of the referenced issuer object or reserved names; for example, 'Self' or 'Unknown'. - */ - name?: string; - /** - * Type of certificate to be requested from the issuer provider. - */ - certificateType?: string; - /** - * Indicates if the certificates generated under this policy should be published to certificate - * transparency logs. - */ - certificateTransparency?: boolean; -} - -/** - * Management policy for a certificate. - */ -export interface CertificatePolicy { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Properties of the key backing a certificate. - */ - keyProperties?: KeyProperties; - /** - * Properties of the secret backing a certificate. - */ - secretProperties?: SecretProperties; - /** - * Properties of the X509 component of a certificate. - */ - x509CertificateProperties?: X509CertificateProperties; - /** - * Actions that will be performed by Key Vault over the lifetime of a certificate. - */ - lifetimeActions?: LifetimeAction[]; - /** - * Parameters for the issuer of the X509 component of a certificate. - */ - issuerParameters?: IssuerParameters; - /** - * The certificate attributes. - */ - attributes?: CertificateAttributes; -} - -/** - * A certificate bundle consists of a certificate (X509) plus its attributes. - */ -export interface CertificateBundle { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The key id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * The secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sid?: string; - /** - * Thumbprint of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly x509Thumbprint?: Uint8Array; - /** - * The management policy. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly policy?: CertificatePolicy; - /** - * CER contents of x509 certificate. - */ - cer?: Uint8Array; - /** - * The content type of the secret. - */ - contentType?: string; - /** - * The certificate attributes. - */ - attributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs - */ - tags?: { [propertyName: string]: string }; -} - -/** - * A Deleted Certificate consisting of its previous id, attributes and its tags, as well as - * information on when it will be purged. - */ -export interface DeletedCertificateBundle extends CertificateBundle { - /** - * The url of the recovery object, used to identify and recover the deleted certificate. - */ - recoveryId?: string; - /** - * The time when the certificate is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the certificate was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The deleted certificate item containing metadata about the deleted certificate. - */ -export interface DeletedCertificateItem extends CertificateItem { - /** - * The url of the recovery object, used to identify and recover the deleted certificate. - */ - recoveryId?: string; - /** - * The time when the certificate is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the certificate was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The key vault server error. - */ -export interface ErrorModel { - /** - * The error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; + readonly code?: string; /** * The error message. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -686,187 +454,19 @@ export interface ErrorModel { } /** - * A certificate operation is returned in case of asynchronous requests. - */ -export interface CertificateOperation { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Parameters for the issuer of the X509 component of a certificate. - */ - issuerParameters?: IssuerParameters; - /** - * The certificate signing request (CSR) that is being used in the certificate operation. - */ - csr?: Uint8Array; - /** - * Indicates if cancellation was requested on the certificate operation. - */ - cancellationRequested?: boolean; - /** - * Status of the certificate operation. - */ - status?: string; - /** - * The status details of the certificate operation. - */ - statusDetails?: string; - /** - * Error encountered, if any, during the certificate operation. - */ - error?: ErrorModel; - /** - * Location which contains the result of the certificate operation. - */ - target?: string; - /** - * Identifier for the certificate operation. - */ - requestId?: string; -} - -/** - * The credentials to be used for the certificate issuer. - */ -export interface IssuerCredentials { - /** - * The user name/account name/account id. - */ - accountId?: string; - /** - * The password/secret/account key. - */ - password?: string; -} - -/** - * Details of the organization administrator of the certificate issuer. - */ -export interface AdministratorDetails { - /** - * First name. - */ - firstName?: string; - /** - * Last name. - */ - lastName?: string; - /** - * Email address. - */ - emailAddress?: string; - /** - * Phone number. - */ - phone?: string; -} - -/** - * Details of the organization of the certificate issuer. - */ -export interface OrganizationDetails { - /** - * Id of the organization. - */ - id?: string; - /** - * Details of the organization administrator. - */ - adminDetails?: AdministratorDetails[]; -} - -/** - * The attributes of an issuer managed by the Key Vault service. - */ -export interface IssuerAttributes { - /** - * Determines whether the issuer is enabled. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; -} - -/** - * The issuer for Key Vault certificate. - */ -export interface IssuerBundle { - /** - * Identifier for the issuer object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The contact information for the vault certificates. - */ -export interface Contact { - /** - * Email address. - */ - emailAddress?: string; - /** - * Name. - */ - name?: string; - /** - * Phone number. - */ - phone?: string; -} - -/** - * The contacts for the vault certificates. + * The key vault error exception. */ -export interface Contacts { +export interface KeyVaultError { /** - * Identifier for the contacts collection. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; - /** - * The contact list for the vault certificates. - */ - contactList?: Contact[]; + readonly error?: ErrorModel; } /** - * The key create parameters. + * Optional Parameters. */ -export interface KeyCreateParameters { - /** - * The type of key to create. For valid values, see JsonWebKeyType. Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - */ - kty: JsonWebKeyType; +export interface KeyVaultClientCreateKeyOptionalParams extends coreHttp.RequestOptionsBase { /** * The key size in bits. For example: 2048, 3072, or 4096 for RSA. */ @@ -877,2656 +477,161 @@ export interface KeyCreateParameters { * Application specific metadata in the form of key-value pairs. */ tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - -/** - * The key import parameters. - */ -export interface KeyImportParameters { - /** - * Whether to import as a hardware key (HSM) or software key. - */ - hsm?: boolean; - /** - * The Json web key - */ - key: JsonWebKey; - /** - * The key management attributes. - */ - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key operations parameters. - */ -export interface KeyOperationsParameters { - /** - * algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - */ - algorithm: JsonWebKeyEncryptionAlgorithm; - value: Uint8Array; -} - -/** - * The key operations parameters. - */ -export interface KeySignParameters { - /** - * 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', 'ES256K' - */ - algorithm: JsonWebKeySignatureAlgorithm; - value: Uint8Array; -} - -/** - * The key verify parameters. - */ -export interface KeyVerifyParameters { - /** - * 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', 'ES256K' - */ - algorithm: JsonWebKeySignatureAlgorithm; - /** - * The digest used for signing. - */ - digest: Uint8Array; - /** - * The signature to be verified. - */ - signature: Uint8Array; -} - -/** - * The key update parameters. - */ -export interface KeyUpdateParameters { - /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. - */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key restore parameters. - */ -export interface KeyRestoreParameters { - /** - * The backup blob associated with a key bundle. - */ - keyBundleBackup: Uint8Array; -} - -/** - * The secret set parameters. - */ -export interface SecretSetParameters { - /** - * The value of the secret. - */ - value: string; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * The secret update parameters. - */ -export interface SecretUpdateParameters { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate create parameters. - */ -export interface CertificateCreateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate import parameters. - */ -export interface CertificateImportParameters { - /** - * Base64 encoded representation of the certificate object to import. This certificate needs to - * contain the private key. - */ - base64EncodedCertificate: string; - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate update parameters. - */ -export interface CertificateUpdateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate merge parameters - */ -export interface CertificateMergeParameters { - /** - * The certificate or the certificate chain to merge. - */ - x509Certificates: Uint8Array[]; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate issuer set parameters. - */ -export interface CertificateIssuerSetParameters { - /** - * The issuer provider. - */ - provider: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The certificate issuer update parameters. - */ -export interface CertificateIssuerUpdateParameters { - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The certificate operation update parameters. - */ -export interface CertificateOperationUpdateParameter { - /** - * Indicates if cancellation was requested on the certificate operation. - */ - cancellationRequested: boolean; -} - -/** - * The key operation result. - */ -export interface KeyOperationResult { - /** - * Key identifier - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly result?: Uint8Array; -} - -/** - * The key verify result. - */ -export interface KeyVerifyResult { - /** - * True if the signature is verified, otherwise false. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: boolean; -} - -/** - * The key list result. - */ -export interface KeyListResult { - /** - * A response message containing a list of keys in the key vault along with a link to the next - * page of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: KeyItem[]; - /** - * The URL to get the next set of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * A list of keys that have been deleted in this vault. - */ -export interface DeletedKeyListResult { - /** - * A response message containing a list of deleted keys in the vault along with a link to the - * next page of deleted keys - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedKeyItem[]; - /** - * The URL to get the next set of deleted keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The secret list result. - */ -export interface SecretListResult { - /** - * A response message containing a list of secrets in the key vault along with a link to the next - * page of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SecretItem[]; - /** - * The URL to get the next set of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted secret list result - */ -export interface DeletedSecretListResult { - /** - * A response message containing a list of the deleted secrets in the vault along with a link to - * the next page of deleted secrets - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSecretItem[]; - /** - * The URL to get the next set of deleted secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The certificate list result. - */ -export interface CertificateListResult { - /** - * A response message containing a list of certificates in the key vault along with a link to the - * next page of certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: CertificateItem[]; - /** - * The URL to get the next set of certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * A list of certificates that have been deleted in this vault. - */ -export interface DeletedCertificateListResult { - /** - * A response message containing a list of deleted certificates in the vault along with a link to - * the next page of deleted certificates - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedCertificateItem[]; - /** - * The URL to get the next set of deleted certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The certificate issuer list result. - */ -export interface CertificateIssuerListResult { - /** - * A response message containing a list of certificate issuers in the key vault along with a link - * to the next page of certificate issuers. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: CertificateIssuerItem[]; - /** - * The URL to get the next set of certificate issuers. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The backup key result, containing the backup blob. - */ -export interface BackupKeyResult { - /** - * The backup blob containing the backed up key. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The backup secret result, containing the backup blob. - */ -export interface BackupSecretResult { - /** - * The backup blob containing the backed up secret. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The backup storage result, containing the backup blob. - */ -export interface BackupStorageResult { - /** - * The backup blob containing the backed up storage account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The pending certificate signing request result. - */ -export interface PendingCertificateSigningRequestResult { - /** - * The pending certificate signing request as Base64 encoded string. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: string; -} - -/** - * The storage account management attributes. - */ -export interface StorageAccountAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; - /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A Storage account bundle consists of key vault storage account details plus its attributes. - */ -export interface StorageBundle { - /** - * The storage account id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The storage account resource id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * The current active storage account key name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly regenerationPeriod?: string; - /** - * The storage account attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted storage account bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedStorageBundle extends StorageBundle { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage account create parameters. - */ -export interface StorageAccountCreateParameters { - /** - * Storage account resource id. - */ - resourceId: string; - /** - * Current active storage account key name. - */ - activeKeyName: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The storage account update parameters. - */ -export interface StorageAccountUpdateParameters { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The storage account key regenerate parameters. - */ -export interface StorageAccountRegenerteKeyParameters { - /** - * The storage account key name. - */ - keyName: string; -} - -/** - * The storage account item containing storage account metadata. - */ -export interface StorageAccountItem { - /** - * Storage identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * The storage account management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted storage account item containing metadata about the deleted storage account. - */ -export interface DeletedStorageAccountItem extends StorageAccountItem { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage accounts list result. - */ -export interface StorageListResult { - /** - * A response message containing a list of storage accounts in the key vault along with a link to - * the next page of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: StorageAccountItem[]; - /** - * The URL to get the next set of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted storage account list result - */ -export interface DeletedStorageListResult { - /** - * A response message containing a list of the deleted storage accounts in the vault along with a - * link to the next page of deleted storage accounts - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedStorageAccountItem[]; - /** - * The URL to get the next set of deleted storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition management attributes. - */ -export interface SasDefinitionAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; - /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A SAS definition bundle consists of key vault SAS definition details plus its attributes. - */ -export interface SasDefinitionBundle { - /** - * The SAS definition id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * 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. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly validityPeriod?: string; - /** - * The SAS definition attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted SAS definition bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedSasDefinitionBundle extends SasDefinitionBundle { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The SAS definition item containing storage SAS definition metadata. - */ -export interface SasDefinitionItem { - /** - * The storage SAS identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * The SAS definition management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted SAS definition item containing metadata about the deleted SAS definition. - */ -export interface DeletedSasDefinitionItem extends SasDefinitionItem { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage account SAS definition list result. - */ -export interface SasDefinitionListResult { - /** - * A response message containing a list of SAS definitions along with a link to the next page of - * SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SasDefinitionItem[]; - /** - * The URL to get the next set of SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted SAS definition list result - */ -export interface DeletedSasDefinitionListResult { - /** - * A response message containing a list of the deleted SAS definitions in the vault along with a - * link to the next page of deleted sas definitions - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSasDefinitionItem[]; - /** - * The URL to get the next set of deleted SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition create parameters. - */ -export interface SasDefinitionCreateParameters { - /** - * 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. - */ - templateUri: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The SAS definition update parameters. - */ -export interface SasDefinitionUpdateParameters { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key vault error exception. - */ -export interface KeyVaultError { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; -} - -/** - * The certificate restore parameters. - */ -export interface CertificateRestoreParameters { - /** - * The backup blob associated with a certificate bundle. - */ - certificateBundleBackup: Uint8Array; -} - -/** - * The backup certificate result, containing the backup blob. - */ -export interface BackupCertificateResult { - /** - * The backup blob containing the backed up certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Whether to import as a hardware key (HSM) or software key. - */ - hsm?: boolean; - /** - * The key management attributes. - */ - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. - */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeyVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificatesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateIssuersOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateVersionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientMergeCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedCertificatesOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetStorageAccountOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateStorageAccountOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSasDefinitionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSasDefinitionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSasDefinitionOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSasDefinitionOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Defines values for JsonWebKeyType. - * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - * @readonly - * @enum {string} - */ -export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; - -/** - * Defines values for JsonWebKeyCurveName. - * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; - -/** - * Defines values for DeletionRecoveryLevel. - * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * @readonly - * @enum {string} - */ -export type DeletionRecoveryLevel = - | "Purgeable" - | "Recoverable+Purgeable" - | "Recoverable" - | "Recoverable+ProtectedSubscription"; - -/** - * Defines values for KeyUsageType. - * Possible values include: 'digitalSignature', 'nonRepudiation', 'keyEncipherment', - * 'dataEncipherment', 'keyAgreement', 'keyCertSign', 'cRLSign', 'encipherOnly', 'decipherOnly' - * @readonly - * @enum {string} - */ -export type KeyUsageType = - | "digitalSignature" - | "nonRepudiation" - | "keyEncipherment" - | "dataEncipherment" - | "keyAgreement" - | "keyCertSign" - | "cRLSign" - | "encipherOnly" - | "decipherOnly"; - -/** - * Defines values for ActionType. - * Possible values include: 'EmailContacts', 'AutoRenew' - * @readonly - * @enum {string} - */ -export type ActionType = "EmailContacts" | "AutoRenew"; - -/** - * Defines values for JsonWebKeyOperation. - * Possible values include: 'encrypt', 'decrypt', 'sign', 'verify', 'wrapKey', 'unwrapKey' - * @readonly - * @enum {string} - */ -export type JsonWebKeyOperation = - | "encrypt" - | "decrypt" - | "sign" - | "verify" - | "wrapKey" - | "unwrapKey"; - -/** - * Defines values for JsonWebKeyEncryptionAlgorithm. - * Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * @readonly - * @enum {string} - */ -export type JsonWebKeyEncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"; - -/** - * Defines values for JsonWebKeySignatureAlgorithm. - * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', - * 'ES256', 'ES384', 'ES512', 'ES256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeySignatureAlgorithm = - | "PS256" - | "PS384" - | "PS512" - | "RS256" - | "RS384" - | "RS512" - | "RSNULL" - | "ES256" - | "ES384" - | "ES512" - | "ES256K"; - -/** - * Defines values for SasTokenType. - * Possible values include: 'account', 'service' - * @readonly - * @enum {string} - */ -export type SasTokenType = "account" | "service"; - -/** - * Contains response data for the createKey operation. - */ -export type CreateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the importKey operation. - */ -export type ImportKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the deleteKey operation. - */ -export type DeleteKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the updateKey operation. - */ -export type UpdateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKey operation. - */ -export type GetKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKeyVersions operation. - */ -export type GetKeyVersionsResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the getKeys operation. - */ -export type GetKeysResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the backupKey operation. - */ -export type BackupKeyResponse = BackupKeyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupKeyResult; - }; -}; - -/** - * Contains response data for the restoreKey operation. - */ -export type RestoreKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the encrypt operation. - */ -export type EncryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the decrypt operation. - */ -export type DecryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the sign operation. - */ -export type SignResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the verify operation. - */ -export type VerifyResponse = KeyVerifyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyVerifyResult; - }; -}; - -/** - * Contains response data for the wrapKey operation. - */ -export type WrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the unwrapKey operation. - */ -export type UnwrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the getDeletedKeys operation. - */ -export type GetDeletedKeysResponse = DeletedKeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyListResult; - }; -}; - -/** - * Contains response data for the getDeletedKey operation. - */ -export type GetDeletedKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedKey operation. - */ -export type RecoverDeletedKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the setSecret operation. - */ -export type SetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the deleteSecret operation. - */ -export type DeleteSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the updateSecret operation. - */ -export type UpdateSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecret operation. - */ -export type GetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecrets operation. - */ -export type GetSecretsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getSecretVersions operation. - */ -export type GetSecretVersionsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecrets operation. - */ -export type GetDeletedSecretsResponse = DeletedSecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecret operation. - */ -export type GetDeletedSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedSecret operation. - */ -export type RecoverDeletedSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the backupSecret operation. - */ -export type BackupSecretResponse = BackupSecretResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupSecretResult; - }; -}; - -/** - * Contains response data for the restoreSecret operation. - */ -export type RestoreSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getCertificates operation. - */ -export type GetCertificatesResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the deleteCertificate operation. - */ -export type DeleteCertificateResponse = DeletedCertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateBundle; - }; -}; - -/** - * Contains response data for the setCertificateContacts operation. - */ -export type SetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateContacts operation. - */ -export type GetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the deleteCertificateContacts operation. - */ -export type DeleteCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateIssuers operation. - */ -export type GetCertificateIssuersResponse = CertificateIssuerListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateIssuerListResult; - }; -}; - -/** - * Contains response data for the setCertificateIssuer operation. - */ -export type SetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the updateCertificateIssuer operation. - */ -export type UpdateCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the getCertificateIssuer operation. - */ -export type GetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the deleteCertificateIssuer operation. - */ -export type DeleteCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the createCertificate operation. - */ -export type CreateCertificateResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the importCertificate operation. - */ -export type ImportCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getCertificateVersions operation. - */ -export type GetCertificateVersionsResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the getCertificatePolicy operation. - */ -export type GetCertificatePolicyResponse = CertificatePolicy & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; - -/** - * Contains response data for the updateCertificatePolicy operation. - */ -export type UpdateCertificatePolicyResponse = CertificatePolicy & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; - -/** - * Contains response data for the updateCertificate operation. - */ -export type UpdateCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getCertificate operation. - */ -export type GetCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the updateCertificateOperation operation. - */ -export type UpdateCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the getCertificateOperation operation. - */ -export type GetCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; + /** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' + */ + curve?: JsonWebKeyCurveName; +} /** - * Contains response data for the deleteCertificateOperation operation. + * Optional Parameters. */ -export type DeleteCertificateOperationResponse = CertificateOperation & { +export interface KeyVaultClientImportKeyOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Whether to import as a hardware key (HSM) or software key. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; + hsm?: boolean; + /** + * The key management attributes. + */ + keyAttributes?: KeyAttributes; + /** + * Application specific metadata in the form of key-value pairs. + */ + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the mergeCertificate operation. + * Optional Parameters. */ -export type MergeCertificateResponse = CertificateBundle & { +export interface KeyVaultClientUpdateKeyOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Json web key operations. For more information on possible key operations, see + * JsonWebKeyOperation. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; + keyOps?: JsonWebKeyOperation[]; + keyAttributes?: KeyAttributes; + /** + * Application specific metadata in the form of key-value pairs. + */ + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the backupCertificate operation. + * Optional Parameters. */ -export type BackupCertificateResponse = BackupCertificateResult & { +export interface KeyVaultClientGetKeyVersionsOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupCertificateResult; - }; -}; + maxresults?: number; +} /** - * Contains response data for the restoreCertificate operation. + * Optional Parameters. */ -export type RestoreCertificateResponse = CertificateBundle & { +export interface KeyVaultClientGetKeysOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; + maxresults?: number; +} /** - * Contains response data for the getDeletedCertificates operation. + * Optional Parameters. */ -export type GetDeletedCertificatesResponse = DeletedCertificateListResult & { +export interface KeyVaultClientGetDeletedKeysOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateListResult; - }; -}; + maxresults?: number; +} /** - * Contains response data for the getDeletedCertificate operation. + * Defines values for JsonWebKeyType. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @readonly + * @enum {string} */ -export type GetDeletedCertificateResponse = DeletedCertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateBundle; - }; -}; +/** + * Defines values for JsonWebKeyCurveName. + * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' + * @readonly + * @enum {string} + */ +export type JsonWebKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; /** - * Contains response data for the recoverDeletedCertificate operation. + * Defines values for DeletionRecoveryLevel. + * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription', 'CustomizedRecoverable+Purgeable', 'CustomizedRecoverable', + * 'CustomizedRecoverable+ProtectedSubscription' + * @readonly + * @enum {string} */ -export type RecoverDeletedCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DeletionRecoveryLevel = + | "Purgeable" + | "Recoverable+Purgeable" + | "Recoverable" + | "Recoverable+ProtectedSubscription" + | "CustomizedRecoverable+Purgeable" + | "CustomizedRecoverable" + | "CustomizedRecoverable+ProtectedSubscription"; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; +/** + * Defines values for JsonWebKeyOperation. + * Possible values include: 'encrypt', 'decrypt', 'sign', 'verify', 'wrapKey', 'unwrapKey', + * 'import' + * @readonly + * @enum {string} + */ +export type JsonWebKeyOperation = + | "encrypt" + | "decrypt" + | "sign" + | "verify" + | "wrapKey" + | "unwrapKey" + | "import"; /** - * Contains response data for the getStorageAccounts operation. + * Defines values for JsonWebKeyEncryptionAlgorithm. + * Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @readonly + * @enum {string} */ -export type GetStorageAccountsResponse = StorageListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type JsonWebKeyEncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageListResult; - }; -}; +/** + * Defines values for JsonWebKeySignatureAlgorithm. + * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', + * 'ES256', 'ES384', 'ES512', 'ES256K' + * @readonly + * @enum {string} + */ +export type JsonWebKeySignatureAlgorithm = + | "PS256" + | "PS384" + | "PS512" + | "RS256" + | "RS384" + | "RS512" + | "RSNULL" + | "ES256" + | "ES384" + | "ES512" + | "ES256K"; /** - * Contains response data for the getDeletedStorageAccounts operation. + * Contains response data for the createKey operation. */ -export type GetDeletedStorageAccountsResponse = DeletedStorageListResult & { +export type CreateKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3539,14 +644,14 @@ export type GetDeletedStorageAccountsResponse = DeletedStorageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageListResult; + parsedBody: KeyBundle; }; }; /** - * Contains response data for the getDeletedStorageAccount operation. + * Contains response data for the importKey operation. */ -export type GetDeletedStorageAccountResponse = DeletedStorageBundle & { +export type ImportKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3559,14 +664,14 @@ export type GetDeletedStorageAccountResponse = DeletedStorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageBundle; + parsedBody: KeyBundle; }; }; /** - * Contains response data for the recoverDeletedStorageAccount operation. + * Contains response data for the deleteKey operation. */ -export type RecoverDeletedStorageAccountResponse = StorageBundle & { +export type DeleteKeyResponse = DeletedKeyBundle & { /** * The underlying HTTP response. */ @@ -3579,14 +684,14 @@ export type RecoverDeletedStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: DeletedKeyBundle; }; }; /** - * Contains response data for the backupStorageAccount operation. + * Contains response data for the updateKey operation. */ -export type BackupStorageAccountResponse = BackupStorageResult & { +export type UpdateKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3599,14 +704,14 @@ export type BackupStorageAccountResponse = BackupStorageResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BackupStorageResult; + parsedBody: KeyBundle; }; }; /** - * Contains response data for the restoreStorageAccount operation. + * Contains response data for the getKey operation. */ -export type RestoreStorageAccountResponse = StorageBundle & { +export type GetKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3619,14 +724,14 @@ export type RestoreStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: KeyBundle; }; }; /** - * Contains response data for the deleteStorageAccount operation. + * Contains response data for the getKeyVersions operation. */ -export type DeleteStorageAccountResponse = DeletedStorageBundle & { +export type GetKeyVersionsResponse = KeyListResult & { /** * The underlying HTTP response. */ @@ -3639,14 +744,14 @@ export type DeleteStorageAccountResponse = DeletedStorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedStorageBundle; + parsedBody: KeyListResult; }; }; /** - * Contains response data for the getStorageAccount operation. + * Contains response data for the getKeys operation. */ -export type GetStorageAccountResponse = StorageBundle & { +export type GetKeysResponse = KeyListResult & { /** * The underlying HTTP response. */ @@ -3659,14 +764,14 @@ export type GetStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: KeyListResult; }; }; /** - * Contains response data for the setStorageAccount operation. + * Contains response data for the backupKey operation. */ -export type SetStorageAccountResponse = StorageBundle & { +export type BackupKeyResponse = BackupKeyResult & { /** * The underlying HTTP response. */ @@ -3679,14 +784,14 @@ export type SetStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: BackupKeyResult; }; }; /** - * Contains response data for the updateStorageAccount operation. + * Contains response data for the restoreKey operation. */ -export type UpdateStorageAccountResponse = StorageBundle & { +export type RestoreKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3699,14 +804,14 @@ export type UpdateStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: KeyBundle; }; }; /** - * Contains response data for the regenerateStorageAccountKey operation. + * Contains response data for the encrypt operation. */ -export type RegenerateStorageAccountKeyResponse = StorageBundle & { +export type EncryptResponse = KeyOperationResult & { /** * The underlying HTTP response. */ @@ -3719,14 +824,14 @@ export type RegenerateStorageAccountKeyResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: KeyOperationResult; }; }; /** - * Contains response data for the getSasDefinitions operation. + * Contains response data for the decrypt operation. */ -export type GetSasDefinitionsResponse = SasDefinitionListResult & { +export type DecryptResponse = KeyOperationResult & { /** * The underlying HTTP response. */ @@ -3739,14 +844,14 @@ export type GetSasDefinitionsResponse = SasDefinitionListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionListResult; + parsedBody: KeyOperationResult; }; }; /** - * Contains response data for the getDeletedSasDefinitions operation. + * Contains response data for the sign operation. */ -export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & { +export type SignResponse = KeyOperationResult & { /** * The underlying HTTP response. */ @@ -3759,14 +864,14 @@ export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionListResult; + parsedBody: KeyOperationResult; }; }; /** - * Contains response data for the getDeletedSasDefinition operation. + * Contains response data for the verify operation. */ -export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type VerifyResponse = KeyVerifyResult & { /** * The underlying HTTP response. */ @@ -3779,14 +884,14 @@ export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: KeyVerifyResult; }; }; /** - * Contains response data for the recoverDeletedSasDefinition operation. + * Contains response data for the wrapKey operation. */ -export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { +export type WrapKeyResponse = KeyOperationResult & { /** * The underlying HTTP response. */ @@ -3799,14 +904,14 @@ export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: KeyOperationResult; }; }; /** - * Contains response data for the deleteSasDefinition operation. + * Contains response data for the unwrapKey operation. */ -export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type UnwrapKeyResponse = KeyOperationResult & { /** * The underlying HTTP response. */ @@ -3819,14 +924,14 @@ export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: KeyOperationResult; }; }; /** - * Contains response data for the getSasDefinition operation. + * Contains response data for the getDeletedKeys operation. */ -export type GetSasDefinitionResponse = SasDefinitionBundle & { +export type GetDeletedKeysResponse = DeletedKeyListResult & { /** * The underlying HTTP response. */ @@ -3839,14 +944,14 @@ export type GetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: DeletedKeyListResult; }; }; /** - * Contains response data for the setSasDefinition operation. + * Contains response data for the getDeletedKey operation. */ -export type SetSasDefinitionResponse = SasDefinitionBundle & { +export type GetDeletedKeyResponse = DeletedKeyBundle & { /** * The underlying HTTP response. */ @@ -3859,14 +964,14 @@ export type SetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: DeletedKeyBundle; }; }; /** - * Contains response data for the updateSasDefinition operation. + * Contains response data for the recoverDeletedKey operation. */ -export type UpdateSasDefinitionResponse = SasDefinitionBundle & { +export type RecoverDeletedKeyResponse = KeyBundle & { /** * The underlying HTTP response. */ @@ -3879,6 +984,6 @@ export type UpdateSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: KeyBundle; }; }; diff --git a/sdk/keyvault/keyvault-keys/src/core/models/mappers.ts b/sdk/keyvault/keyvault-keys/src/core/models/mappers.ts index 69c3d78908ad..d7d3df32b86a 100644 --- a/sdk/keyvault/keyvault-keys/src/core/models/mappers.ts +++ b/sdk/keyvault/keyvault-keys/src/core/models/mappers.ts @@ -8,48 +8,6 @@ import * as coreHttp from "@azure/core-http"; -export const Attributes: coreHttp.CompositeMapper = { - serializedName: "Attributes", - type: { - name: "Composite", - className: "Attributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - notBefore: { - serializedName: "nbf", - type: { - name: "UnixTime" - } - }, - expires: { - serializedName: "exp", - type: { - name: "UnixTime" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - } - } - } -}; - export const JsonWebKey: coreHttp.CompositeMapper = { serializedName: "JsonWebKey", type: { @@ -161,6 +119,48 @@ export const JsonWebKey: coreHttp.CompositeMapper = { } }; +export const Attributes: coreHttp.CompositeMapper = { + serializedName: "Attributes", + type: { + name: "Composite", + className: "Attributes", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + notBefore: { + serializedName: "nbf", + type: { + name: "UnixTime" + } + }, + expires: { + serializedName: "exp", + type: { + name: "UnixTime" + } + }, + created: { + readOnly: true, + serializedName: "created", + type: { + name: "UnixTime" + } + }, + updated: { + readOnly: true, + serializedName: "updated", + type: { + name: "UnixTime" + } + } + } + } +}; + export const KeyAttributes: coreHttp.CompositeMapper = { serializedName: "KeyAttributes", type: { @@ -168,6 +168,13 @@ export const KeyAttributes: coreHttp.CompositeMapper = { className: "KeyAttributes", modelProperties: { ...Attributes.type.modelProperties, + recoverableDays: { + readOnly: true, + serializedName: "recoverableDays", + type: { + name: "Number" + } + }, recoveryLevel: { nullable: false, readOnly: true, @@ -325,17 +332,38 @@ export const DeletedKeyItem: coreHttp.CompositeMapper = { } }; -export const SecretAttributes: coreHttp.CompositeMapper = { - serializedName: "SecretAttributes", +export const KeyProperties: coreHttp.CompositeMapper = { + serializedName: "KeyProperties", type: { name: "Composite", - className: "SecretAttributes", + className: "KeyProperties", modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + exportable: { + serializedName: "exportable", + type: { + name: "Boolean" + } + }, + keyType: { + serializedName: "kty", + type: { + name: "String" + } + }, + keySize: { + serializedName: "key_size", + type: { + name: "Number" + } + }, + reuseKey: { + serializedName: "reuse_key", + type: { + name: "Boolean" + } + }, + curve: { + serializedName: "crv", type: { name: "String" } @@ -344,35 +372,44 @@ export const SecretAttributes: coreHttp.CompositeMapper = { } }; -export const SecretBundle: coreHttp.CompositeMapper = { - serializedName: "SecretBundle", +export const KeyCreateParameters: coreHttp.CompositeMapper = { + serializedName: "KeyCreateParameters", type: { name: "Composite", - className: "SecretBundle", + className: "KeyCreateParameters", modelProperties: { - value: { - serializedName: "value", + kty: { + required: true, + serializedName: "kty", + constraints: { + MinLength: 1 + }, type: { name: "String" } }, - id: { - serializedName: "id", + keySize: { + serializedName: "key_size", type: { - name: "String" + name: "Number" } }, - contentType: { - serializedName: "contentType", + keyOps: { + serializedName: "key_ops", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - attributes: { + keyAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "SecretAttributes" + className: "KeyAttributes" } }, tags: { @@ -386,41 +423,41 @@ export const SecretBundle: coreHttp.CompositeMapper = { } } }, - kid: { - readOnly: true, - serializedName: "kid", + curve: { + serializedName: "crv", type: { name: "String" } - }, - managed: { - readOnly: true, - serializedName: "managed", - type: { - name: "Boolean" - } } } } }; -export const SecretItem: coreHttp.CompositeMapper = { - serializedName: "SecretItem", +export const KeyImportParameters: coreHttp.CompositeMapper = { + serializedName: "KeyImportParameters", type: { name: "Composite", - className: "SecretItem", + className: "KeyImportParameters", modelProperties: { - id: { - serializedName: "id", + hsm: { + serializedName: "Hsm", type: { - name: "String" + name: "Boolean" } }, - attributes: { + key: { + required: true, + serializedName: "key", + type: { + name: "Composite", + className: "JsonWebKey" + } + }, + keyAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "SecretAttributes" + className: "KeyAttributes" } }, tags: { @@ -433,93 +470,55 @@ export const SecretItem: coreHttp.CompositeMapper = { } } } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - managed: { - readOnly: true, - serializedName: "managed", - type: { - name: "Boolean" - } } } } }; -export const DeletedSecretBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretBundle", +export const KeyOperationsParameters: coreHttp.CompositeMapper = { + serializedName: "KeyOperationsParameters", type: { name: "Composite", - className: "DeletedSecretBundle", + className: "KeyOperationsParameters", modelProperties: { - ...SecretBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", + algorithm: { + required: true, + serializedName: "alg", + constraints: { + MinLength: 1 + }, type: { name: "String" } }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + value: { + required: true, + serializedName: "value", type: { - name: "UnixTime" + name: "Base64Url" } } } } }; -export const DeletedSecretItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretItem", +export const KeySignParameters: coreHttp.CompositeMapper = { + serializedName: "KeySignParameters", type: { name: "Composite", - className: "DeletedSecretItem", + className: "KeySignParameters", modelProperties: { - ...SecretItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", + algorithm: { + required: true, + serializedName: "alg", + constraints: { + MinLength: 1 + }, type: { name: "String" } }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const SecretRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "SecretRestoreParameters", - type: { - name: "Composite", - className: "SecretRestoreParameters", - modelProperties: { - secretBundleBackup: { + value: { required: true, serializedName: "value", type: { @@ -530,2235 +529,65 @@ export const SecretRestoreParameters: coreHttp.CompositeMapper = { } }; -export const StorageRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "StorageRestoreParameters", +export const KeyVerifyParameters: coreHttp.CompositeMapper = { + serializedName: "KeyVerifyParameters", type: { name: "Composite", - className: "StorageRestoreParameters", + className: "KeyVerifyParameters", modelProperties: { - storageBundleBackup: { + algorithm: { required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const CertificateAttributes: coreHttp.CompositeMapper = { - serializedName: "CertificateAttributes", - type: { - name: "Composite", - className: "CertificateAttributes", - modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateItem: coreHttp.CompositeMapper = { - serializedName: "CertificateItem", - type: { - name: "Composite", - className: "CertificateItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - x509Thumbprint: { - serializedName: "x5t", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const CertificateIssuerItem: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerItem", - type: { - name: "Composite", - className: "CertificateIssuerItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - provider: { - serializedName: "provider", - type: { - name: "String" - } - } - } - } -}; - -export const KeyProperties: coreHttp.CompositeMapper = { - serializedName: "KeyProperties", - type: { - name: "Composite", - className: "KeyProperties", - modelProperties: { - exportable: { - serializedName: "exportable", - type: { - name: "Boolean" - } - }, - keyType: { - serializedName: "kty", - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", - type: { - name: "Number" - } - }, - reuseKey: { - serializedName: "reuse_key", - type: { - name: "Boolean" - } - }, - curve: { - serializedName: "crv", - type: { - name: "String" - } - } - } - } -}; - -export const SecretProperties: coreHttp.CompositeMapper = { - serializedName: "SecretProperties", - type: { - name: "Composite", - className: "SecretProperties", - modelProperties: { - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - } - } - } -}; - -export const SubjectAlternativeNames: coreHttp.CompositeMapper = { - serializedName: "SubjectAlternativeNames", - type: { - name: "Composite", - className: "SubjectAlternativeNames", - modelProperties: { - emails: { - serializedName: "emails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - dnsNames: { - serializedName: "dns_names", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - upns: { - serializedName: "upns", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const X509CertificateProperties: coreHttp.CompositeMapper = { - serializedName: "X509CertificateProperties", - type: { - name: "Composite", - className: "X509CertificateProperties", - modelProperties: { - subject: { - serializedName: "subject", - type: { - name: "String" - } - }, - ekus: { - serializedName: "ekus", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - subjectAlternativeNames: { - serializedName: "sans", - type: { - name: "Composite", - className: "SubjectAlternativeNames" - } - }, - keyUsage: { - serializedName: "key_usage", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - validityInMonths: { - serializedName: "validity_months", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const Trigger: coreHttp.CompositeMapper = { - serializedName: "Trigger", - type: { - name: "Composite", - className: "Trigger", - modelProperties: { - lifetimePercentage: { - serializedName: "lifetime_percentage", - constraints: { - InclusiveMaximum: 99, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - daysBeforeExpiry: { - serializedName: "days_before_expiry", - type: { - name: "Number" - } - } - } - } -}; - -export const Action: coreHttp.CompositeMapper = { - serializedName: "Action", - type: { - name: "Composite", - className: "Action", - modelProperties: { - actionType: { - serializedName: "action_type", - type: { - name: "Enum", - allowedValues: ["EmailContacts", "AutoRenew"] - } - } - } - } -}; - -export const LifetimeAction: coreHttp.CompositeMapper = { - serializedName: "LifetimeAction", - type: { - name: "Composite", - className: "LifetimeAction", - modelProperties: { - trigger: { - serializedName: "trigger", - type: { - name: "Composite", - className: "Trigger" - } - }, - action: { - serializedName: "action", - type: { - name: "Composite", - className: "Action" - } - } - } - } -}; - -export const IssuerParameters: coreHttp.CompositeMapper = { - serializedName: "IssuerParameters", - type: { - name: "Composite", - className: "IssuerParameters", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - certificateType: { - serializedName: "cty", - type: { - name: "String" - } - }, - certificateTransparency: { - serializedName: "cert_transparency", - type: { - name: "Boolean" - } - } - } - } -}; - -export const CertificatePolicy: coreHttp.CompositeMapper = { - serializedName: "CertificatePolicy", - type: { - name: "Composite", - className: "CertificatePolicy", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - keyProperties: { - serializedName: "key_props", - type: { - name: "Composite", - className: "KeyProperties" - } - }, - secretProperties: { - serializedName: "secret_props", - type: { - name: "Composite", - className: "SecretProperties" - } - }, - x509CertificateProperties: { - serializedName: "x509_props", - type: { - name: "Composite", - className: "X509CertificateProperties" - } - }, - lifetimeActions: { - serializedName: "lifetime_actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LifetimeAction" - } - } - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - } - } - } -}; - -export const CertificateBundle: coreHttp.CompositeMapper = { - serializedName: "CertificateBundle", - type: { - name: "Composite", - className: "CertificateBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - sid: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - x509Thumbprint: { - readOnly: true, - serializedName: "x5t", - type: { - name: "Base64Url" - } - }, - policy: { - readOnly: true, - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - cer: { - serializedName: "cer", - type: { - name: "ByteArray" - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedCertificateBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateBundle", - type: { - name: "Composite", - className: "DeletedCertificateBundle", - modelProperties: { - ...CertificateBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const DeletedCertificateItem: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateItem", - type: { - name: "Composite", - className: "DeletedCertificateItem", - modelProperties: { - ...CertificateItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const ErrorModel: coreHttp.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - }, - innerError: { - readOnly: true, - serializedName: "innererror", - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - } -}; - -export const CertificateOperation: coreHttp.CompositeMapper = { - serializedName: "CertificateOperation", - type: { - name: "Composite", - className: "CertificateOperation", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - csr: { - serializedName: "csr", - type: { - name: "ByteArray" - } - }, - cancellationRequested: { - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - statusDetails: { - serializedName: "status_details", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - requestId: { - serializedName: "request_id", - type: { - name: "String" - } - } - } - } -}; - -export const IssuerCredentials: coreHttp.CompositeMapper = { - serializedName: "IssuerCredentials", - type: { - name: "Composite", - className: "IssuerCredentials", - modelProperties: { - accountId: { - serializedName: "account_id", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - } - } - } -}; - -export const AdministratorDetails: coreHttp.CompositeMapper = { - serializedName: "AdministratorDetails", - type: { - name: "Composite", - className: "AdministratorDetails", - modelProperties: { - firstName: { - serializedName: "first_name", - type: { - name: "String" - } - }, - lastName: { - serializedName: "last_name", - type: { - name: "String" - } - }, - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const OrganizationDetails: coreHttp.CompositeMapper = { - serializedName: "OrganizationDetails", - type: { - name: "Composite", - className: "OrganizationDetails", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - adminDetails: { - serializedName: "admin_details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdministratorDetails" - } - } - } - } - } - } -}; - -export const IssuerAttributes: coreHttp.CompositeMapper = { - serializedName: "IssuerAttributes", - type: { - name: "Composite", - className: "IssuerAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const IssuerBundle: coreHttp.CompositeMapper = { - serializedName: "IssuerBundle", - type: { - name: "Composite", - className: "IssuerBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const Contact: coreHttp.CompositeMapper = { - serializedName: "Contact", - type: { - name: "Composite", - className: "Contact", - modelProperties: { - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const Contacts: coreHttp.CompositeMapper = { - serializedName: "Contacts", - type: { - name: "Composite", - className: "Contacts", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - contactList: { - serializedName: "contacts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Contact" - } - } - } - } - } - } -}; - -export const KeyCreateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyCreateParameters", - type: { - name: "Composite", - className: "KeyCreateParameters", - modelProperties: { - kty: { - required: true, - serializedName: "kty", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", - type: { - name: "Number" - } - }, - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - curve: { - serializedName: "crv", - type: { - name: "String" - } - } - } - } -}; - -export const KeyImportParameters: coreHttp.CompositeMapper = { - serializedName: "KeyImportParameters", - type: { - name: "Composite", - className: "KeyImportParameters", - modelProperties: { - hsm: { - serializedName: "Hsm", - type: { - name: "Boolean" - } - }, - key: { - required: true, - serializedName: "key", - type: { - name: "Composite", - className: "JsonWebKey" - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyOperationsParameters: coreHttp.CompositeMapper = { - serializedName: "KeyOperationsParameters", - type: { - name: "Composite", - className: "KeyOperationsParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeySignParameters: coreHttp.CompositeMapper = { - serializedName: "KeySignParameters", - type: { - name: "Composite", - className: "KeySignParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyParameters: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyParameters", - type: { - name: "Composite", - className: "KeyVerifyParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - digest: { - required: true, - serializedName: "digest", - type: { - name: "Base64Url" - } - }, - signature: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyUpdateParameters", - type: { - name: "Composite", - className: "KeyUpdateParameters", - modelProperties: { - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "KeyRestoreParameters", - type: { - name: "Composite", - className: "KeyRestoreParameters", - modelProperties: { - keyBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const SecretSetParameters: coreHttp.CompositeMapper = { - serializedName: "SecretSetParameters", - type: { - name: "Composite", - className: "SecretSetParameters", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - } - } - } -}; - -export const SecretUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SecretUpdateParameters", - type: { - name: "Composite", - className: "SecretUpdateParameters", - modelProperties: { - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateCreateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateCreateParameters", - type: { - name: "Composite", - className: "CertificateCreateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateImportParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateImportParameters", - type: { - name: "Composite", - className: "CertificateImportParameters", - modelProperties: { - base64EncodedCertificate: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - }, - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateUpdateParameters", - type: { - name: "Composite", - className: "CertificateUpdateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateMergeParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateMergeParameters", - type: { - name: "Composite", - className: "CertificateMergeParameters", - modelProperties: { - x509Certificates: { - required: true, - serializedName: "x5c", - type: { - name: "Sequence", - element: { - type: { - name: "ByteArray" - } - } - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateIssuerSetParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerSetParameters", - type: { - name: "Composite", - className: "CertificateIssuerSetParameters", - modelProperties: { - provider: { - required: true, - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateIssuerUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerUpdateParameters", - type: { - name: "Composite", - className: "CertificateIssuerUpdateParameters", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateOperationUpdateParameter: coreHttp.CompositeMapper = { - serializedName: "CertificateOperationUpdateParameter", - type: { - name: "Composite", - className: "CertificateOperationUpdateParameter", - modelProperties: { - cancellationRequested: { - required: true, - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyOperationResult: coreHttp.CompositeMapper = { - serializedName: "KeyOperationResult", - type: { - name: "Composite", - className: "KeyOperationResult", - modelProperties: { - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - result: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyResult: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyResult", - type: { - name: "Composite", - className: "KeyVerifyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyListResult: coreHttp.CompositeMapper = { - serializedName: "KeyListResult", - type: { - name: "Composite", - className: "KeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedKeyListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyListResult", - type: { - name: "Composite", - className: "DeletedKeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedKeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SecretListResult: coreHttp.CompositeMapper = { - serializedName: "SecretListResult", - type: { - name: "Composite", - className: "SecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedSecretListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretListResult", - type: { - name: "Composite", - className: "DeletedSecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedSecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateListResult", - type: { - name: "Composite", - className: "CertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedCertificateListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateListResult", - type: { - name: "Composite", - className: "DeletedCertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedCertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateIssuerListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerListResult", - type: { - name: "Composite", - className: "CertificateIssuerListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateIssuerItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const BackupKeyResult: coreHttp.CompositeMapper = { - serializedName: "BackupKeyResult", - type: { - name: "Composite", - className: "BackupKeyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupSecretResult: coreHttp.CompositeMapper = { - serializedName: "BackupSecretResult", - type: { - name: "Composite", - className: "BackupSecretResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupStorageResult: coreHttp.CompositeMapper = { - serializedName: "BackupStorageResult", - type: { - name: "Composite", - className: "BackupStorageResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const PendingCertificateSigningRequestResult: coreHttp.CompositeMapper = { - serializedName: "PendingCertificateSigningRequestResult", - type: { - name: "Composite", - className: "PendingCertificateSigningRequestResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const StorageAccountAttributes: coreHttp.CompositeMapper = { - serializedName: "StorageAccountAttributes", - type: { - name: "Composite", - className: "StorageAccountAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } - } - } - } -}; - -export const StorageBundle: coreHttp.CompositeMapper = { - serializedName: "StorageBundle", - type: { - name: "Composite", - className: "StorageBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - readOnly: true, - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - readOnly: true, - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - readOnly: true, - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedStorageBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageBundle", - type: { - name: "Composite", - className: "DeletedStorageBundle", - modelProperties: { - ...StorageBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const StorageAccountCreateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountCreateParameters", - type: { - name: "Composite", - className: "StorageAccountCreateParameters", - modelProperties: { - resourceId: { - required: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - required: true, - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - required: true, - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - storageAccountAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StorageAccountUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountUpdateParameters", - type: { - name: "Composite", - className: "StorageAccountUpdateParameters", - modelProperties: { - activeKeyName: { - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - storageAccountAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StorageAccountRegenerteKeyParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountRegenerteKeyParameters", - type: { - name: "Composite", - className: "StorageAccountRegenerteKeyParameters", - modelProperties: { - keyName: { - required: true, - serializedName: "keyName", - type: { - name: "String" - } - } - } - } -}; - -export const StorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "StorageAccountItem", - type: { - name: "Composite", - className: "StorageAccountItem", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedStorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageAccountItem", - type: { - name: "Composite", - className: "DeletedStorageAccountItem", - modelProperties: { - ...StorageAccountItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const StorageListResult: coreHttp.CompositeMapper = { - serializedName: "StorageListResult", - type: { - name: "Composite", - className: "StorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedStorageListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageListResult", - type: { - name: "Composite", - className: "DeletedStorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedStorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + serializedName: "alg", + constraints: { + MinLength: 1 + }, type: { name: "String" } - } - } - } -}; - -export const SasDefinitionAttributes: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionAttributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } }, - updated: { - readOnly: true, - serializedName: "updated", + digest: { + required: true, + serializedName: "digest", type: { - name: "UnixTime" + name: "Base64Url" } }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + signature: { + required: true, + serializedName: "value", type: { - name: "String" + name: "Base64Url" } } } } }; -export const SasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionBundle", +export const KeyUpdateParameters: coreHttp.CompositeMapper = { + serializedName: "KeyUpdateParameters", type: { name: "Composite", - className: "SasDefinitionBundle", + className: "KeyUpdateParameters", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - secretId: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - templateUri: { - readOnly: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - readOnly: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - readOnly: true, - serializedName: "validityPeriod", + keyOps: { + serializedName: "key_ops", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - attributes: { - readOnly: true, + keyAttributes: { serializedName: "attributes", type: { name: "Composite", - className: "SasDefinitionAttributes" + className: "KeyAttributes" } }, tags: { - readOnly: true, serializedName: "tags", type: { name: "Dictionary", @@ -2773,117 +602,69 @@ export const SasDefinitionBundle: coreHttp.CompositeMapper = { } }; -export const DeletedSasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionBundle", +export const KeyRestoreParameters: coreHttp.CompositeMapper = { + serializedName: "KeyRestoreParameters", type: { name: "Composite", - className: "DeletedSasDefinitionBundle", + className: "KeyRestoreParameters", modelProperties: { - ...SasDefinitionBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", + keyBundleBackup: { + required: true, + serializedName: "value", type: { - name: "UnixTime" + name: "Base64Url" } } } } }; -export const SasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionItem", +export const KeyOperationResult: coreHttp.CompositeMapper = { + serializedName: "KeyOperationResult", type: { name: "Composite", - className: "SasDefinitionItem", + className: "KeyOperationResult", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - secretId: { + kid: { readOnly: true, - serializedName: "sid", + serializedName: "kid", type: { name: "String" } }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { + result: { readOnly: true, - serializedName: "tags", + serializedName: "value", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Base64Url" } } } } }; -export const DeletedSasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionItem", +export const KeyVerifyResult: coreHttp.CompositeMapper = { + serializedName: "KeyVerifyResult", type: { name: "Composite", - className: "DeletedSasDefinitionItem", + className: "KeyVerifyResult", modelProperties: { - ...SasDefinitionItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { + value: { readOnly: true, - serializedName: "deletedDate", + serializedName: "value", type: { - name: "UnixTime" + name: "Boolean" } } } } }; -export const SasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionListResult", +export const KeyListResult: coreHttp.CompositeMapper = { + serializedName: "KeyListResult", type: { name: "Composite", - className: "SasDefinitionListResult", + className: "KeyListResult", modelProperties: { value: { readOnly: true, @@ -2893,7 +674,7 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "SasDefinitionItem" + className: "KeyItem" } } } @@ -2909,11 +690,11 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { } }; -export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionListResult", +export const DeletedKeyListResult: coreHttp.CompositeMapper = { + serializedName: "DeletedKeyListResult", type: { name: "Composite", - className: "DeletedSasDefinitionListResult", + className: "DeletedKeyListResult", modelProperties: { value: { readOnly: true, @@ -2923,7 +704,7 @@ export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "DeletedSasDefinitionItem" + className: "DeletedKeyItem" } } } @@ -2939,95 +720,49 @@ export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { } }; -export const SasDefinitionCreateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionCreateParameters", +export const BackupKeyResult: coreHttp.CompositeMapper = { + serializedName: "BackupKeyResult", type: { name: "Composite", - className: "SasDefinitionCreateParameters", + className: "BackupKeyResult", modelProperties: { - templateUri: { - required: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - required: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - required: true, - serializedName: "validityPeriod", - type: { - name: "String" - } - }, - sasDefinitionAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", + value: { + readOnly: true, + serializedName: "value", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Base64Url" } } } } }; -export const SasDefinitionUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionUpdateParameters", +export const ErrorModel: coreHttp.CompositeMapper = { + serializedName: "Error", type: { name: "Composite", - className: "SasDefinitionUpdateParameters", + className: "ErrorModel", modelProperties: { - templateUri: { - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - serializedName: "sasType", + code: { + readOnly: true, + serializedName: "code", type: { name: "String" } }, - validityPeriod: { - serializedName: "validityPeriod", + message: { + readOnly: true, + serializedName: "message", type: { name: "String" } }, - sasDefinitionAttributes: { - serializedName: "attributes", + innerError: { + readOnly: true, + serializedName: "innererror", type: { name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + className: "ErrorModel" } } } @@ -3051,37 +786,3 @@ export const KeyVaultError: coreHttp.CompositeMapper = { } } }; - -export const CertificateRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateRestoreParameters", - type: { - name: "Composite", - className: "CertificateRestoreParameters", - modelProperties: { - certificateBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupCertificateResult: coreHttp.CompositeMapper = { - serializedName: "BackupCertificateResult", - type: { - name: "Composite", - className: "BackupCertificateResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; diff --git a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts index 7c92c284d8ee..180e2f4a7508 100644 --- a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts +++ b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts @@ -20,58 +20,6 @@ export const apiVersion: coreHttp.OperationQueryParameter = { } } }; -export const certificateName0: coreHttp.OperationURLParameter = { - parameterPath: "certificateName", - mapper: { - required: true, - serializedName: "certificate-name", - type: { - name: "String" - } - } -}; -export const certificateName1: coreHttp.OperationURLParameter = { - parameterPath: "certificateName", - mapper: { - required: true, - serializedName: "certificate-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const certificateVersion: coreHttp.OperationURLParameter = { - parameterPath: "certificateVersion", - mapper: { - required: true, - serializedName: "certificate-version", - type: { - name: "String" - } - } -}; -export const includePending: coreHttp.OperationQueryParameter = { - parameterPath: ["options", "includePending"], - mapper: { - serializedName: "includePending", - type: { - name: "Boolean" - } - } -}; -export const issuerName: coreHttp.OperationURLParameter = { - parameterPath: "issuerName", - mapper: { - required: true, - serializedName: "issuer-name", - type: { - name: "String" - } - } -}; export const keyName0: coreHttp.OperationURLParameter = { parameterPath: "keyName", mapper: { @@ -118,75 +66,6 @@ export const maxresults: coreHttp.OperationQueryParameter = { } } }; -export const sasDefinitionName: coreHttp.OperationURLParameter = { - parameterPath: "sasDefinitionName", - mapper: { - required: true, - serializedName: "sas-definition-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; -export const secretName0: coreHttp.OperationURLParameter = { - parameterPath: "secretName", - mapper: { - required: true, - serializedName: "secret-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const secretName1: coreHttp.OperationURLParameter = { - parameterPath: "secretName", - mapper: { - required: true, - serializedName: "secret-name", - type: { - name: "String" - } - } -}; -export const secretVersion: coreHttp.OperationURLParameter = { - parameterPath: "secretVersion", - mapper: { - required: true, - serializedName: "secret-version", - type: { - name: "String" - } - } -}; -export const storageAccountName0: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; -export const storageAccountName1: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - type: { - name: "String" - } - } -}; export const vaultBaseUrl: coreHttp.OperationURLParameter = { parameterPath: "vaultBaseUrl", mapper: { diff --git a/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts b/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts index f040ddb5fcc1..908e22d08535 100644 --- a/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts +++ b/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts @@ -63,7 +63,7 @@ export class CryptographyClient { options && options.version ? options.version : this.version ? this.version : "", this.setParentSpan(span, requestOptions) ); - return key.key!; + return key.key! as JsonWebKey; } else { return this.key; } diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 9bc4ff5157cf..a7735eb7dab8 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -1132,10 +1132,10 @@ export class KeyClient { delete keyBundle.attributes; let resultObject: KeyVaultKey & DeletedKey = { - key: keyBundle.key, + key: keyBundle.key as JsonWebKey, id: keyBundle.key ? keyBundle.key.kid : undefined, name: parsedId.name, - keyOperations: keyBundle.key ? keyBundle.key.keyOps : undefined, + keyOperations: keyBundle.key ? (keyBundle.key.keyOps as KeyOperation[]) : undefined, keyType: keyBundle.key ? keyBundle.key.kty : undefined, properties: { id: keyBundle.key ? keyBundle.key.kid : undefined, diff --git a/sdk/keyvault/keyvault-keys/swagger/README.md b/sdk/keyvault/keyvault-keys/swagger/README.md new file mode 100644 index 000000000000..8fa14604fda6 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/swagger/README.md @@ -0,0 +1,17 @@ +# KeyVault Keys Swagger Configuration + +> see https://aka.ms/autorest + +``` yaml +typescript: + package-name: "@azure/keyvault-keys" +use-extension: + "@microsoft.azure/autorest.typescript": "~5.0.1" +azure-arm: false +generate-metadata: false +add-credentials: true +license-header: MICROSOFT_MIT_NO_VERSION +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.1/keys.json +output-folder: ../ +source-code-folder-path: ./src/core +``` diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index a7e078b760a8..9f2628ec04ed 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -61,6 +61,7 @@ "lint:terminal": "eslint package.json tsconfig.json --ext .ts", "pack": "npm pack 2>&1", "prebuild": "npm run clean", + "regenerate": "npx autorest swagger/README.md --typescript", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", "test:node": "npm run clean && npm run build:test && npm run unit-test:node", "test": "npm run clean && npm run build:test && npm run unit-test", diff --git a/sdk/keyvault/keyvault-secrets/review/keyvault-secrets.api.md b/sdk/keyvault/keyvault-secrets/review/keyvault-secrets.api.md index c2402c02287d..661f3de807e2 100644 --- a/sdk/keyvault/keyvault-secrets/review/keyvault-secrets.api.md +++ b/sdk/keyvault/keyvault-secrets/review/keyvault-secrets.api.md @@ -36,7 +36,7 @@ export interface DeletedSecret { } // @public -export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription"; +export type DeletionRecoveryLevel = "Purgeable" | "Recoverable+Purgeable" | "Recoverable" | "Recoverable+ProtectedSubscription" | "CustomizedRecoverable+Purgeable" | "CustomizedRecoverable" | "CustomizedRecoverable+ProtectedSubscription"; // @public export interface GetDeletedSecretOptions extends coreHttp.OperationOptions { diff --git a/sdk/keyvault/keyvault-secrets/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-secrets/src/core/keyVaultClient.ts index 5ef6d256b678..0a9100322e4b 100644 --- a/sdk/keyvault/keyvault-secrets/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-secrets/src/core/keyVaultClient.ts @@ -30,5874 +30,686 @@ class KeyVaultClient extends KeyVaultClientContext { } /** - * 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 + * 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. - * @summary Creates a new key, stores it, then returns key parameters and attributes to the client. + * @summary Sets a secret in a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param secretName The name of the secret. + * @param value The value of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createKey( + setSecret( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - options?: Models.KeyVaultClientCreateKeyOptionalParams - ): Promise; + secretName: string, + value: string, + options?: Models.KeyVaultClientSetSecretOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param secretName The name of the secret. + * @param value The value of the secret. * @param callback The callback */ - createKey( + setSecret( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - callback: coreHttp.ServiceCallback + secretName: string, + value: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name for the new key. The system will generate the version name for the new - * key. - * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param secretName The name of the secret. + * @param value The value of the secret. * @param options The optional parameters * @param callback The callback */ - createKey( + setSecret( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, - options: Models.KeyVaultClientCreateKeyOptionalParams, - callback: coreHttp.ServiceCallback + secretName: string, + value: string, + options: Models.KeyVaultClientSetSecretOptionalParams, + callback: coreHttp.ServiceCallback ): void; - createKey( + setSecret( vaultBaseUrl: string, - keyName: string, - kty: Models.JsonWebKeyType, + secretName: string, + value: string, options?: - | Models.KeyVaultClientCreateKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientSetSecretOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - kty, + secretName, + value, options }, - createKeyOperationSpec, + setSecretOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Imports an externally created key, stores it, and returns key parameters and attributes - * to the client. + * 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. + * @summary Deletes a secret from a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param secretName The name of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - importKey( + deleteSecret( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - options?: Models.KeyVaultClientImportKeyOptionalParams - ): Promise; + secretName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param secretName The name of the secret. * @param callback The callback */ - importKey( + deleteSecret( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - callback: coreHttp.ServiceCallback + secretName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName Name for the imported key. - * @param key The Json web key + * @param secretName The name of the secret. * @param options The optional parameters * @param callback The callback */ - importKey( + deleteSecret( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - options: Models.KeyVaultClientImportKeyOptionalParams, - callback: coreHttp.ServiceCallback + secretName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - importKey( + deleteSecret( vaultBaseUrl: string, - keyName: string, - key: Models.JsonWebKey, - options?: - | Models.KeyVaultClientImportKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - key, + secretName, options }, - importKeyOperationSpec, + deleteSecretOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Deletes a key of any type from storage in Azure Key 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. This operation requires the secrets/set permission. + * @summary Updates the attributes associated with a specified secret in a given key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteKey( + updateSecret( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; + secretName: string, + secretVersion: string, + options?: Models.KeyVaultClientUpdateSecretOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param callback The callback */ - deleteKey( + updateSecret( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + secretName: string, + secretVersion: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to delete. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param options The optional parameters * @param callback The callback */ - deleteKey( + updateSecret( vaultBaseUrl: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + secretName: string, + secretVersion: string, + options: Models.KeyVaultClientUpdateSecretOptionalParams, + callback: coreHttp.ServiceCallback ): void; - deleteKey( + updateSecret( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + secretVersion: string, + options?: + | Models.KeyVaultClientUpdateSecretOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + secretName, + secretVersion, options }, - deleteKeyOperationSpec, + updateSecretOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @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. + * The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires + * the secrets/get permission. + * @summary Get a specified secret from a given key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateKey( + getSecret( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: Models.KeyVaultClientUpdateKeyOptionalParams - ): Promise; + secretName: string, + secretVersion: string, + options?: coreHttp.RequestOptionsBase + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param callback The callback */ - updateKey( + getSecret( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - callback: coreHttp.ServiceCallback + secretName: string, + secretVersion: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of key to update. - * @param keyVersion The version of the key to update. + * @param secretName The name of the secret. + * @param secretVersion The version of the secret. * @param options The optional parameters * @param callback The callback */ - updateKey( + getSecret( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options: Models.KeyVaultClientUpdateKeyOptionalParams, - callback: coreHttp.ServiceCallback + secretName: string, + secretVersion: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback ): void; - updateKey( + getSecret( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: - | Models.KeyVaultClientUpdateKeyOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + secretVersion: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, + secretName, + secretVersion, options }, - updateKeyOperationSpec, + getSecretOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Gets the public part of a stored 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. + * @summary List secrets in a specified key vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKey( + getSecrets( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; + options?: Models.KeyVaultClientGetSecretsOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param callback The callback */ - getKey( + getSecrets( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key to get. - * @param keyVersion Adding the version parameter retrieves a specific version of a key. * @param options The optional parameters * @param callback The callback */ - getKey( + getSecrets( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + options: Models.KeyVaultClientGetSecretsOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getKey( + getSecrets( vaultBaseUrl: string, - keyName: string, - keyVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + options?: + | Models.KeyVaultClientGetSecretsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, - keyVersion, options }, - getKeyOperationSpec, + getSecretsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * The full key identifier, attributes, and tags are provided in the response. This operation - * requires the keys/list permission. - * @summary Retrieves a list of individual key versions with the same key name. + * 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. + * @summary List all versions of the specified secret. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKeyVersions( + getSecretVersions( vaultBaseUrl: string, - keyName: string, - options?: Models.KeyVaultClientGetKeyVersionsOptionalParams - ): Promise; + secretName: string, + options?: Models.KeyVaultClientGetSecretVersionsOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param callback The callback */ - getKeyVersions( + getSecretVersions( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + secretName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param options The optional parameters * @param callback The callback */ - getKeyVersions( + getSecretVersions( vaultBaseUrl: string, - keyName: string, - options: Models.KeyVaultClientGetKeyVersionsOptionalParams, - callback: coreHttp.ServiceCallback + secretName: string, + options: Models.KeyVaultClientGetSecretVersionsOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getKeyVersions( + getSecretVersions( vaultBaseUrl: string, - keyName: string, + secretName: string, options?: - | Models.KeyVaultClientGetKeyVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientGetSecretVersionsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + secretName, options }, - getKeyVersionsOperationSpec, + getSecretVersionsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary List keys in 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. + * @summary Lists deleted secrets for the specified vault. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKeys( + getDeletedSecrets( vaultBaseUrl: string, - options?: Models.KeyVaultClientGetKeysOptionalParams - ): Promise; + options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param callback The callback */ - getKeys(vaultBaseUrl: string, callback: coreHttp.ServiceCallback): void; + getDeletedSecrets( + vaultBaseUrl: string, + callback: coreHttp.ServiceCallback + ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param options The optional parameters * @param callback The callback */ - getKeys( + getDeletedSecrets( vaultBaseUrl: string, - options: Models.KeyVaultClientGetKeysOptionalParams, - callback: coreHttp.ServiceCallback + options: Models.KeyVaultClientGetDeletedSecretsOptionalParams, + callback: coreHttp.ServiceCallback ): void; - getKeys( + getDeletedSecrets( vaultBaseUrl: string, options?: - | Models.KeyVaultClientGetKeysOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + | Models.KeyVaultClientGetDeletedSecretsOptionalParams + | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, options }, - getKeysOperationSpec, + getDeletedSecretsOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Requests that a backup of the specified key be downloaded to the client. + * The Get Deleted Secret operation returns the specified deleted secret along with its attributes. + * This operation requires the secrets/get permission. + * @summary Gets the specified deleted secret. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - backupKey( + getDeletedSecret( vaultBaseUrl: string, - keyName: string, + secretName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param callback The callback */ - backupKey( + getDeletedSecret( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + secretName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the secret. * @param options The optional parameters * @param callback The callback */ - backupKey( + getDeletedSecret( vaultBaseUrl: string, - keyName: string, + secretName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - backupKey( + getDeletedSecret( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + secretName, options }, - backupKeyOperationSpec, + getDeletedSecretOperationSpec, callback - ) as Promise; + ) as Promise; } /** - * 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. - * @summary Restores a backed up key to a vault. + * 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. + * @summary Permanently deletes the specified secret. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param secretName The name of the secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - restoreKey( + purgeDeletedSecret( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, + secretName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param secretName The name of the secret. * @param callback The callback */ - restoreKey( + purgeDeletedSecret( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback + secretName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyBundleBackup The backup blob associated with a key bundle. + * @param secretName The name of the secret. * @param options The optional parameters * @param callback The callback */ - restoreKey( + purgeDeletedSecret( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, + secretName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - restoreKey( + purgeDeletedSecret( vaultBaseUrl: string, - keyBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyBundleBackup, + secretName, options }, - restoreKeyOperationSpec, + purgeDeletedSecretOperationSpec, callback - ) as Promise; - } - - /** - * 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/encrypt permission. - * @summary Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key - * vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param [options] The optional parameters - * @returns Promise - */ - encrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param callback The callback - */ - encrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param options The optional parameters - * @param callback The callback - */ - encrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - encrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, - options - }, - encryptOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Decrypts a single block of encrypted data. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param [options] The optional parameters - * @returns Promise - */ - decrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param callback The callback - */ - decrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param options The optional parameters - * @param callback The callback - */ - decrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - decrypt( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, - options - }, - decryptOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Creates a signature from a digest using the specified key. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value - * @param [options] The optional parameters - * @returns Promise - */ - sign( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value - * @param callback The callback - */ - sign( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param value - * @param options The optional parameters - * @param callback The callback - */ - sign( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - sign( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, - options - }, - signOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Verifies a signature using a specified key. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. - * @param [options] The optional parameters - * @returns Promise - */ - verify( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. - * @param callback The callback - */ - verify( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param 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', 'ES256K' - * @param digest The digest used for signing. - * @param signature The signature to be verified. - * @param options The optional parameters - * @param callback The callback - */ - verify( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - verify( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeySignatureAlgorithm, - digest: Uint8Array, - signature: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - digest, - signature, - options - }, - verifyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Wraps a symmetric key using a specified key. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param [options] The optional parameters - * @returns Promise - */ - wrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param callback The callback - */ - wrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param options The optional parameters - * @param callback The callback - */ - wrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - wrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, - options - }, - wrapKeyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Unwraps a symmetric key using the specified key that was initially used for wrapping - * that key. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param [options] The optional parameters - * @returns Promise - */ - unwrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param callback The callback - */ - unwrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. - * @param keyVersion The version of the key. - * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', - * 'RSA1_5' - * @param value - * @param options The optional parameters - * @param callback The callback - */ - unwrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - unwrapKey( - vaultBaseUrl: string, - keyName: string, - keyVersion: string, - algorithm: Models.JsonWebKeyEncryptionAlgorithm, - value: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - keyVersion, - algorithm, - value, - options - }, - unwrapKeyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists the deleted keys in the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedKeys( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedKeysOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedKeys( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedKeys( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedKeysOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedKeys( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedKeysOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedKeysOperationSpec, - callback - ) as Promise; + ); } /** - * 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. - * @summary Gets the public part of a deleted key. + * 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. + * @summary Recovers the deleted secret to the latest version. * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the deleted secret. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getDeletedKey( + recoverDeletedSecret( vaultBaseUrl: string, - keyName: string, + secretName: string, options?: coreHttp.RequestOptionsBase - ): Promise; + ): Promise; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the deleted secret. * @param callback The callback */ - getDeletedKey( + recoverDeletedSecret( vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback + secretName: string, + callback: coreHttp.ServiceCallback ): void; /** * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key. + * @param secretName The name of the deleted secret. * @param options The optional parameters * @param callback The callback */ - getDeletedKey( + recoverDeletedSecret( vaultBaseUrl: string, - keyName: string, + secretName: string, options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback + callback: coreHttp.ServiceCallback ): void; - getDeletedKey( + recoverDeletedSecret( vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { + secretName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultBaseUrl, - keyName, + secretName, options }, - getDeletedKeyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified key. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedKey( - vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key - * @param callback The callback - */ - purgeDeletedKey( - vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the key - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedKey( - vaultBaseUrl: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedKey( - vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - options - }, - purgeDeletedKeyOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted key to its latest version. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedKey( - vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. - * @param callback The callback - */ - recoverDeletedKey( - vaultBaseUrl: string, - keyName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param keyName The name of the deleted key. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedKey( - vaultBaseUrl: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedKey( - vaultBaseUrl: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - keyName, - options - }, - recoverDeletedKeyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Sets a secret in a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options?: Models.KeyVaultClientSetSecretOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param callback The callback - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param value The value of the secret. - * @param options The optional parameters - * @param callback The callback - */ - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options: Models.KeyVaultClientSetSecretOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setSecret( - vaultBaseUrl: string, - secretName: string, - value: string, - options?: - | Models.KeyVaultClientSetSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - value, - options - }, - setSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes a secret from a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - deleteSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Updates the attributes associated with a specified secret in a given key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: Models.KeyVaultClientUpdateSecretOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param callback The callback - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param options The optional parameters - * @param callback The callback - */ - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options: Models.KeyVaultClientUpdateSecretOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: - | Models.KeyVaultClientUpdateSecretOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - secretVersion, - options - }, - updateSecretOperationSpec, - callback - ) as Promise; - } - - /** - * The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires - * the secrets/get permission. - * @summary Get a specified secret from a given key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param callback The callback - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param secretVersion The version of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getSecret( - vaultBaseUrl: string, - secretName: string, - secretVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - secretVersion, - options - }, - getSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary List secrets in a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getSecrets( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetSecretsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getSecrets( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getSecrets( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetSecretsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSecrets( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getSecretsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary List all versions of the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options?: Models.KeyVaultClientGetSecretVersionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options: Models.KeyVaultClientGetSecretVersionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSecretVersions( - vaultBaseUrl: string, - secretName: string, - options?: - | Models.KeyVaultClientGetSecretVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - getSecretVersionsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted secrets for the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSecrets( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedSecrets( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSecrets( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedSecretsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSecrets( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedSecretsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedSecretsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted Secret operation returns the specified deleted secret along with its attributes. - * This operation requires the secrets/get permission. - * @summary Gets the specified deleted secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - getDeletedSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - purgeDeletedSecretOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted secret to the latest version. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the deleted secret. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - recoverDeletedSecretOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Backs up the specified secret. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param [options] The optional parameters - * @returns Promise - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretName The name of the secret. - * @param options The optional parameters - * @param callback The callback - */ - backupSecret( - vaultBaseUrl: string, - secretName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupSecret( - vaultBaseUrl: string, - secretName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretName, - options - }, - backupSecretOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up secret, and all its versions, to a vault. This operation requires the - * secrets/restore permission. - * @summary Restores a backed up secret to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param secretBundleBackup The backup blob associated with a secret bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreSecret( - vaultBaseUrl: string, - secretBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - secretBundleBackup, - options - }, - restoreSecretOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificates operation returns the set of certificates resources in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List certificates in a specified key vault - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes a certificate from a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Sets the certificate contacts for the specified key vault. This operation requires the - * certificates/managecontacts permission. - * @summary Sets the certificate contacts for the specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param contacts The contacts for the key vault certificate. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - setCertificateContacts( - vaultBaseUrl: string, - contacts: Models.Contacts, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - contacts, - options - }, - setCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateContacts operation returns the set of certificate contact resources in the - * specified key vault. This operation requires the certificates/managecontacts permission. - * @summary Lists the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes the certificate contacts for a specified key vault certificate. This operation requires - * the certificates/managecontacts permission. - * @summary Deletes the certificate contacts for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateContacts( - vaultBaseUrl: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateContacts( - vaultBaseUrl: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - deleteCertificateContactsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuers operation returns the set of certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary List certificate issuers for a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuers( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetCertificateIssuersOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuers( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetCertificateIssuersOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuers( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetCertificateIssuersOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getCertificateIssuersOperationSpec, - callback - ) as Promise; - } - - /** - * The SetCertificateIssuer operation adds or updates the specified certificate issuer. This - * operation requires the certificates/setissuers permission. - * @summary Sets the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param [options] The optional parameters - * @returns Promise - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: Models.KeyVaultClientSetCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param provider The issuer provider. - * @param options The optional parameters - * @param callback The callback - */ - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options: Models.KeyVaultClientSetCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - provider: string, - options?: - | Models.KeyVaultClientSetCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - provider, - options - }, - setCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer - * entity. This operation requires the certificates/setissuers permission. - * @summary Updates the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: Models.KeyVaultClientUpdateCertificateIssuerOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: - | Models.KeyVaultClientUpdateCertificateIssuerOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - updateCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateIssuer operation returns the specified certificate issuer resources in the - * specified key vault. This operation requires the certificates/manageissuers/getissuers - * permission. - * @summary Lists the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - getCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from - * the vault. This operation requires the certificates/manageissuers/deleteissuers permission. - * @summary Deletes the specified certificate issuer. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param issuerName The name of the issuer. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateIssuer( - vaultBaseUrl: string, - issuerName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - issuerName, - options - }, - deleteCertificateIssuerOperationSpec, - callback - ) as Promise; - } - - /** - * If this is the first version, the certificate resource is created. This operation requires the - * certificates/create permission. - * @summary Creates a new certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientCreateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientCreateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - createCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientCreateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - createCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Imports a certificate into a specified key vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param [options] The optional parameters - * @returns Promise - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: Models.KeyVaultClientImportCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param base64EncodedCertificate Base64 encoded representation of the certificate object to - * import. This certificate needs to contain the private key. - * @param options The optional parameters - * @param callback The callback - */ - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options: Models.KeyVaultClientImportCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - importCertificate( - vaultBaseUrl: string, - certificateName: string, - base64EncodedCertificate: string, - options?: - | Models.KeyVaultClientImportCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - base64EncodedCertificate, - options - }, - importCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificateVersions operation returns the versions of a certificate in the specified key - * vault. This operation requires the certificates/list permission. - * @summary List the versions of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: Models.KeyVaultClientGetCertificateVersionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options: Models.KeyVaultClientGetCertificateVersionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getCertificateVersions( - vaultBaseUrl: string, - certificateName: string, - options?: - | Models.KeyVaultClientGetCertificateVersionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateVersionsOperationSpec, - callback - ) as Promise; - } - - /** - * The GetCertificatePolicy operation returns the specified certificate policy resources in the - * specified key vault. This operation requires the certificates/get permission. - * @summary Lists the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in a given key vault. - * @param options The optional parameters - * @param callback The callback - */ - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * Set specified members in the certificate policy. Leave others as null. This operation requires - * the certificates/update permission. - * @summary Updates the policy for a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificatePolicy The policy for the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificatePolicy( - vaultBaseUrl: string, - certificateName: string, - certificatePolicy: Models.CertificatePolicy, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificatePolicy, - options - }, - updateCertificatePolicyOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Updates the specified attributes associated with the given certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: Models.KeyVaultClientUpdateCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given key vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: Models.KeyVaultClientUpdateCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: - | Models.KeyVaultClientUpdateCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - updateCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specific certificate. This operation requires the certificates/get - * permission. - * @summary Gets information about a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate in the given vault. - * @param certificateVersion The version of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificate( - vaultBaseUrl: string, - certificateName: string, - certificateVersion: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - certificateVersion, - options - }, - getCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Updates a certificate creation operation that is already in progress. This operation requires - * the certificates/update permission. - * @summary Updates a certificate operation. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param cancellationRequested Indicates if cancellation was requested on the certificate - * operation. - * @param options The optional parameters - * @param callback The callback - */ - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - updateCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - cancellationRequested: boolean, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - cancellationRequested, - options - }, - updateCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * Gets the creation operation associated with a specified certificate. This operation requires the - * certificates/get permission. - * @summary Gets the creation operation of a certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Deletes the creation operation for a specific certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteCertificateOperation( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - deleteCertificateOperationOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Merges a certificate or a certificate chain with a key pair existing on the server. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param [options] The optional parameters - * @returns Promise - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: Models.KeyVaultClientMergeCertificateOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param x509Certificates The certificate or the certificate chain to merge. - * @param options The optional parameters - * @param callback The callback - */ - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options: Models.KeyVaultClientMergeCertificateOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - mergeCertificate( - vaultBaseUrl: string, - certificateName: string, - x509Certificates: Uint8Array[], - options?: - | Models.KeyVaultClientMergeCertificateOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - x509Certificates, - options - }, - mergeCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified certificate be downloaded to the client. All versions of - * the certificate will be downloaded. This operation requires the certificates/backup permission. - * @summary Backs up the specified certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param [options] The optional parameters - * @returns Promise - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate. - * @param options The optional parameters - * @param callback The callback - */ - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - backupCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up certificate, and all its versions, to a vault. This operation requires the - * certificates/restore permission. - * @summary Restores a backed up certificate to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param [options] The optional parameters - * @returns Promise - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateBundleBackup The backup blob associated with a certificate bundle. - * @param options The optional parameters - * @param callback The callback - */ - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreCertificate( - vaultBaseUrl: string, - certificateBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateBundleBackup, - options - }, - restoreCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists the deleted certificates in the specified vault currently available for recovery. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificates( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedCertificatesOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificates( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedCertificatesOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificates( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedCertificatesOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedCertificatesOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Retrieves information about the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - getDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified deleted certificate. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the certificate - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - purgeDeletedCertificateOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted certificate back to its current version under /certificates. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param certificateName The name of the deleted certificate - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedCertificate( - vaultBaseUrl: string, - certificateName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - certificateName, - options - }, - recoverDeletedCertificateOperationSpec, - callback - ) as Promise; - } - - /** - * List storage accounts managed by the specified key vault. This operation requires the - * storage/list permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted storage accounts for the specified vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccounts( - vaultBaseUrl: string, - options: Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccounts( - vaultBaseUrl: string, - options?: - | Models.KeyVaultClientGetDeletedStorageAccountsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - options - }, - getDeletedStorageAccountsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted Storage Account operation returns the specified deleted storage account along - * with its attributes. This operation requires the storage/get permission. - * @summary Gets the specified deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Permanently deletes the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - purgeDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - purgeDeletedStorageAccountOperationSpec, - callback - ); - } - - /** - * 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. - * @summary Recovers the deleted storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - recoverDeletedStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Requests that a backup of the specified storage account be downloaded to the client. This - * operation requires the storage/backup permission. - * @summary Backs up the specified storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - backupStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - backupStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Restores a backed up storage account to a vault. This operation requires the storage/restore - * permission. - * @summary Restores a backed up storage account to a vault. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param [options] The optional parameters - * @returns Promise - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageBundleBackup The backup blob associated with a storage account. - * @param options The optional parameters - * @param callback The callback - */ - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - restoreStorageAccount( - vaultBaseUrl: string, - storageBundleBackup: Uint8Array, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageBundleBackup, - options - }, - restoreStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a storage account. This operation requires the storage/delete permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - deleteStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a specified storage account. This operation requires the storage/get - * permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new storage account. This operation requires the storage/set permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param [options] The optional parameters - * @returns Promise - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: Models.KeyVaultClientSetStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param resourceId Storage account resource id. - * @param activeKeyName Current active storage account key name. - * @param autoRegenerateKey whether keyvault should manage the storage account for the user. - * @param options The optional parameters - * @param callback The callback - */ - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options: Models.KeyVaultClientSetStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - resourceId: string, - activeKeyName: string, - autoRegenerateKey: boolean, - options?: - | Models.KeyVaultClientSetStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - resourceId, - activeKeyName, - autoRegenerateKey, - options - }, - setStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given storage account. This operation - * requires the storage/set/update permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientUpdateStorageAccountOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientUpdateStorageAccountOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateStorageAccount( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientUpdateStorageAccountOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - updateStorageAccountOperationSpec, - callback - ) as Promise; - } - - /** - * Regenerates the specified key value for the given storage account. This operation requires the - * storage/regeneratekey permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param [options] The optional parameters - * @returns Promise - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param keyName The storage account key name. - * @param options The optional parameters - * @param callback The callback - */ - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - regenerateStorageAccountKey( - vaultBaseUrl: string, - storageAccountName: string, - keyName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - keyName, - options - }, - regenerateStorageAccountKeyOperationSpec, - callback - ) as Promise; - } - - /** - * List storage SAS definitions for the given storage account. This operation requires the - * storage/listsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Lists deleted SAS definitions for the specified vault and storage account. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options: Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinitions( - vaultBaseUrl: string, - storageAccountName: string, - options?: - | Models.KeyVaultClientGetDeletedSasDefinitionsOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - options - }, - getDeletedSasDefinitionsOperationSpec, - callback - ) as Promise; - } - - /** - * The Get Deleted SAS Definition operation returns the specified deleted SAS definition along with - * its attributes. This operation requires the storage/getsas permission. - * @summary Gets the specified deleted sas definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * 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. - * @summary Recovers the deleted SAS definition. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - recoverDeletedSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - recoverDeletedSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Deletes a SAS definition from a specified storage account. This operation requires the - * storage/deletesas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - deleteSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | coreHttp.RequestOptionsBase - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - deleteSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Gets information about a SAS definition for the specified storage account. This operation - * requires the storage/getsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: coreHttp.RequestOptionsBase, - callback: coreHttp.ServiceCallback - ): void; - getSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - getSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Creates or updates a new SAS definition for the specified storage account. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: Models.KeyVaultClientSetSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param 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 sasType The type of SAS token the SAS definition will create. Possible values include: - * 'account', 'service' - * @param validityPeriod The validity period of SAS tokens created according to the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options: Models.KeyVaultClientSetSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - setSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - templateUri: string, - sasType: Models.SasTokenType, - validityPeriod: string, - options?: - | Models.KeyVaultClientSetSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - templateUri, - sasType, - validityPeriod, - options - }, - setSasDefinitionOperationSpec, - callback - ) as Promise; - } - - /** - * Updates the specified attributes associated with the given SAS definition. This operation - * requires the storage/setsas permission. - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param [options] The optional parameters - * @returns Promise - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: Models.KeyVaultClientUpdateSasDefinitionOptionalParams - ): Promise; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - callback: coreHttp.ServiceCallback - ): void; - /** - * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. - * @param storageAccountName The name of the storage account. - * @param sasDefinitionName The name of the SAS definition. - * @param options The optional parameters - * @param callback The callback - */ - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options: Models.KeyVaultClientUpdateSasDefinitionOptionalParams, - callback: coreHttp.ServiceCallback - ): void; - updateSasDefinition( - vaultBaseUrl: string, - storageAccountName: string, - sasDefinitionName: string, - options?: - | Models.KeyVaultClientUpdateSasDefinitionOptionalParams - | coreHttp.ServiceCallback, - callback?: coreHttp.ServiceCallback - ): Promise { - return this.sendOperationRequest( - { - vaultBaseUrl, - storageAccountName, - sasDefinitionName, - options - }, - updateSasDefinitionOperationSpec, - callback - ) as Promise; - } -} - -// Operation Specifications -const serializer = new coreHttp.Serializer(Mappers); -const createKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - kty: "kty", - keySize: ["options", "keySize"], - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"], - curve: ["options", "curve"] - }, - mapper: { - ...Mappers.KeyCreateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - hsm: ["options", "hsm"], - key: "key", - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "keys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyOps: ["options", "keyOps"], - keyAttributes: ["options", "keyAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.KeyUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/{key-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeyVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys/{key-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "keys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupKeyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyBundleBackup: "keyBundleBackup" - }, - mapper: { - ...Mappers.KeyRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const encryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/encrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const decryptOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/decrypt", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const signOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/sign", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeySignParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const verifyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/verify", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - digest: "digest", - signature: "signature" - }, - mapper: { - ...Mappers.KeyVerifyParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyVerifyResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const wrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/wrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const unwrapKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "keys/{key-name}/{key-version}/unwrapkey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - algorithm: "algorithm", - value: "value" - }, - mapper: { - ...Mappers.KeyOperationsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.KeyOperationResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedKeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedkeys/{key-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedkeys/{key-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.KeyBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - value: "value", - tags: ["options", "tags"], - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"] - }, - mapper: { - ...Mappers.SecretSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "secrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - contentType: ["options", "contentType"], - secretAttributes: ["options", "secretAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SecretUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/{secret-version}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getSecretVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "secrets/{secret-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedSecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedsecrets/{secret-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedsecrets/{secret-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/{secret-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupSecretResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreSecretOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "secrets/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - secretBundleBackup: "secretBundleBackup" - }, - mapper: { - ...Mappers.SecretRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SecretBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificatesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "contacts", - mapper: { - ...Mappers.Contacts, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateContactsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/contacts", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.Contacts - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuersOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateIssuerListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: "provider", - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerSetParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - provider: ["options", "provider"], - credentials: ["options", "credentials"], - organizationDetails: ["options", "organizationDetails"], - attributes: ["options", "attributes"] - }, - mapper: { - ...Mappers.CertificateIssuerUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateIssuerOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/issuers/{issuer-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.issuerName], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.IssuerBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const createCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/create", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateCreateParameters, - required: true - } - }, - responses: { - 202: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const importCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/import", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName1], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - base64EncodedCertificate: "base64EncodedCertificate", - password: ["options", "password"], - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateImportParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateVersionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/versions", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/policy", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificatePolicyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/policy", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: "certificatePolicy", - mapper: { - ...Mappers.CertificatePolicy, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificatePolicy - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificatePolicy: ["options", "certificatePolicy"], - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/{certificate-version}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.certificateName0, - Parameters.certificateVersion - ], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const updateCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - cancellationRequested: "cancellationRequested" - }, - mapper: { - ...Mappers.CertificateOperationUpdateParameter, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const deleteCertificateOperationOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "certificates/{certificate-name}/pending", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateOperation - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const mergeCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/pending/merge", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - x509Certificates: "x509Certificates", - certificateAttributes: ["options", "certificateAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.CertificateMergeParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const backupCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/{certificate-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupCertificateResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const restoreCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "certificates/restore", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - certificateBundleBackup: "certificateBundleBackup" - }, - mapper: { - ...Mappers.CertificateRestoreParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedCertificatesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedcertificates", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.includePending, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedCertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedcertificates/{certificate-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const recoverDeletedCertificateOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedcertificates/{certificate-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.certificateName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.CertificateBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getStorageAccountsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.StorageListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage", - urlParameters: [Parameters.vaultBaseUrl], - queryParameters: [Parameters.maxresults, Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedStorageListResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedStorageBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const purgeDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "deletedstorage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; + recoverDeletedSecretOperationSpec, + callback + ) as Promise; + } -const recoverDeletedStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/recover", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.StorageBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; + /** + * 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. + * @summary Backs up the specified secret. + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretName The name of the secret. + * @param [options] The optional parameters + * @returns Promise + */ + backupSecret( + vaultBaseUrl: string, + secretName: string, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretName The name of the secret. + * @param callback The callback + */ + backupSecret( + vaultBaseUrl: string, + secretName: string, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretName The name of the secret. + * @param options The optional parameters + * @param callback The callback + */ + backupSecret( + vaultBaseUrl: string, + secretName: string, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + backupSecret( + vaultBaseUrl: string, + secretName: string, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.sendOperationRequest( + { + vaultBaseUrl, + secretName, + options + }, + backupSecretOperationSpec, + callback + ) as Promise; + } -const backupStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "storage/{storage-account-name}/backup", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName1], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.BackupStorageResult - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; + /** + * Restores a backed up secret, and all its versions, to a vault. This operation requires the + * secrets/restore permission. + * @summary Restores a backed up secret to a vault. + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretBundleBackup The backup blob associated with a secret bundle. + * @param [options] The optional parameters + * @returns Promise + */ + restoreSecret( + vaultBaseUrl: string, + secretBundleBackup: Uint8Array, + options?: coreHttp.RequestOptionsBase + ): Promise; + /** + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretBundleBackup The backup blob associated with a secret bundle. + * @param callback The callback + */ + restoreSecret( + vaultBaseUrl: string, + secretBundleBackup: Uint8Array, + callback: coreHttp.ServiceCallback + ): void; + /** + * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. + * @param secretBundleBackup The backup blob associated with a secret bundle. + * @param options The optional parameters + * @param callback The callback + */ + restoreSecret( + vaultBaseUrl: string, + secretBundleBackup: Uint8Array, + options: coreHttp.RequestOptionsBase, + callback: coreHttp.ServiceCallback + ): void; + restoreSecret( + vaultBaseUrl: string, + secretBundleBackup: Uint8Array, + options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, + callback?: coreHttp.ServiceCallback + ): Promise { + return this.sendOperationRequest( + { + vaultBaseUrl, + secretBundleBackup, + options + }, + restoreSecretOperationSpec, + callback + ) as Promise; + } +} -const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "storage/restore", - urlParameters: [Parameters.vaultBaseUrl], +// Operation Specifications +const serializer = new coreHttp.Serializer(Mappers); +const setSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "secrets/{secret-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName0], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - storageBundleBackup: "storageBundleBackup" + value: "value", + tags: ["options", "tags"], + contentType: ["options", "contentType"], + secretAttributes: ["options", "secretAttributes"] }, mapper: { - ...Mappers.StorageRestoreParameters, + ...Mappers.SecretSetParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.SecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5906,60 +718,14 @@ const restoreStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteStorageAccountOperationSpec: coreHttp.OperationSpec = { +const deleteSecretOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.DeletedStorageBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const getStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], - queryParameters: [Parameters.apiVersion], - responses: { - 200: { - bodyMapper: Mappers.StorageBundle - }, - default: { - bodyMapper: Mappers.KeyVaultError - } - }, - serializer -}; - -const setStorageAccountOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "secrets/{secret-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - resourceId: "resourceId", - activeKeyName: "activeKeyName", - autoRegenerateKey: "autoRegenerateKey", - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.StorageAccountCreateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.DeletedSecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5968,27 +734,25 @@ const setStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { +const updateSecretOperationSpec: coreHttp.OperationSpec = { httpMethod: "PATCH", - path: "storage/{storage-account-name}", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "secrets/{secret-name}/{secret-version}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - activeKeyName: ["options", "activeKeyName"], - autoRegenerateKey: ["options", "autoRegenerateKey"], - regenerationPeriod: ["options", "regenerationPeriod"], - storageAccountAttributes: ["options", "storageAccountAttributes"], + contentType: ["options", "contentType"], + secretAttributes: ["options", "secretAttributes"], tags: ["options", "tags"] }, mapper: { - ...Mappers.StorageAccountUpdateParameters, + ...Mappers.SecretUpdateParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.SecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -5997,23 +761,14 @@ const updateStorageAccountOperationSpec: coreHttp.OperationSpec = { serializer }; -const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "storage/{storage-account-name}/regeneratekey", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], +const getSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "secrets/{secret-name}/{secret-version}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1, Parameters.secretVersion], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - keyName: "keyName" - }, - mapper: { - ...Mappers.StorageAccountRegenerteKeyParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.StorageBundle + bodyMapper: Mappers.SecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6022,14 +777,14 @@ const regenerateStorageAccountKeyOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionsOperationSpec: coreHttp.OperationSpec = { +const getSecretsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "storage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "secrets", + urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionListResult + bodyMapper: Mappers.SecretListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6038,14 +793,14 @@ const getSasDefinitionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { +const getSecretVersionsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas", - urlParameters: [Parameters.vaultBaseUrl, Parameters.storageAccountName0], + path: "secrets/{secret-name}/versions", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionListResult + bodyMapper: Mappers.SecretListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6054,18 +809,14 @@ const getDeletedSasDefinitionsOperationSpec: coreHttp.OperationSpec = { serializer }; -const getDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { +const getDeletedSecretsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], - queryParameters: [Parameters.apiVersion], + path: "deletedsecrets", + urlParameters: [Parameters.vaultBaseUrl], + queryParameters: [Parameters.maxresults, Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle + bodyMapper: Mappers.DeletedSecretListResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6074,18 +825,14 @@ const getDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "deletedstorage/{storage-account-name}/sas/{sas-definition-name}/recover", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const getDeletedSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "deletedsecrets/{secret-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.DeletedSecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6094,19 +841,13 @@ const recoverDeletedSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { +const purgeDeletedSecretOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], + path: "deletedsecrets/{secret-name}", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.apiVersion], responses: { - 200: { - bodyMapper: Mappers.DeletedSasDefinitionBundle - }, + 204: {}, default: { bodyMapper: Mappers.KeyVaultError } @@ -6114,18 +855,14 @@ const deleteSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const recoverDeletedSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "deletedsecrets/{secret-name}/recover", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.apiVersion], responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.SecretBundle }, default: { bodyMapper: Mappers.KeyVaultError @@ -6134,31 +871,14 @@ const getSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const backupSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "secrets/{secret-name}/backup", + urlParameters: [Parameters.vaultBaseUrl, Parameters.secretName1], queryParameters: [Parameters.apiVersion], - requestBody: { - parameterPath: { - templateUri: "templateUri", - sasType: "sasType", - validityPeriod: "validityPeriod", - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] - }, - mapper: { - ...Mappers.SasDefinitionCreateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.BackupSecretResult }, default: { bodyMapper: Mappers.KeyVaultError @@ -6167,31 +887,23 @@ const setSasDefinitionOperationSpec: coreHttp.OperationSpec = { serializer }; -const updateSasDefinitionOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PATCH", - path: "storage/{storage-account-name}/sas/{sas-definition-name}", - urlParameters: [ - Parameters.vaultBaseUrl, - Parameters.storageAccountName0, - Parameters.sasDefinitionName - ], +const restoreSecretOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "secrets/restore", + urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.apiVersion], requestBody: { parameterPath: { - templateUri: ["options", "templateUri"], - sasType: ["options", "sasType"], - validityPeriod: ["options", "validityPeriod"], - sasDefinitionAttributes: ["options", "sasDefinitionAttributes"], - tags: ["options", "tags"] + secretBundleBackup: "secretBundleBackup" }, mapper: { - ...Mappers.SasDefinitionUpdateParameters, + ...Mappers.SecretRestoreParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.SasDefinitionBundle + bodyMapper: Mappers.SecretBundle }, default: { bodyMapper: Mappers.KeyVaultError diff --git a/sdk/keyvault/keyvault-secrets/src/core/models/index.ts b/sdk/keyvault/keyvault-secrets/src/core/models/index.ts index de2ee71d0230..5d2371824d01 100644 --- a/sdk/keyvault/keyvault-secrets/src/core/models/index.ts +++ b/sdk/keyvault/keyvault-secrets/src/core/models/index.ts @@ -37,187 +37,22 @@ export interface Attributes { } /** - * As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 - */ -export interface JsonWebKey { - /** - * Key identifier. - */ - kid?: string; - /** - * JsonWebKey Key Type (kty), as defined in - * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - */ - kty?: JsonWebKeyType; - keyOps?: string[]; - /** - * RSA modulus. - */ - n?: Uint8Array; - /** - * RSA public exponent. - */ - e?: Uint8Array; - /** - * RSA private exponent, or the D component of an EC private key. - */ - d?: Uint8Array; - /** - * RSA private key parameter. - */ - dp?: Uint8Array; - /** - * RSA private key parameter. - */ - dq?: Uint8Array; - /** - * RSA private key parameter. - */ - qi?: Uint8Array; - /** - * RSA secret prime. - */ - p?: Uint8Array; - /** - * RSA secret prime, with p < q. - */ - q?: Uint8Array; - /** - * Symmetric key. - */ - k?: Uint8Array; - /** - * HSM Token, used with 'Bring Your Own Key'. - */ - t?: Uint8Array; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - crv?: JsonWebKeyCurveName; - /** - * X component of an EC public key. - */ - x?: Uint8Array; - /** - * Y component of an EC public key. - */ - y?: Uint8Array; -} - -/** - * The attributes of a key managed by the key vault service. - */ -export interface KeyAttributes extends Attributes { - /** - * Reflects the deletion recovery level currently in effect for keys in the current vault. If it - * contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only - * the system can purge the key, at the end of the retention interval. Possible values include: - * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A KeyBundle consisting of a WebKey plus its attributes. - */ -export interface KeyBundle { - /** - * The Json web key. - */ - key?: JsonWebKey; - /** - * The key management attributes. - */ - attributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * The key item containing key metadata. - */ -export interface KeyItem { - /** - * Key identifier. - */ - kid?: string; - /** - * The key management attributes. - */ - attributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, - * then managed will be true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managed?: boolean; -} - -/** - * A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info - */ -export interface DeletedKeyBundle extends KeyBundle { - /** - * The url of the recovery object, used to identify and recover the deleted key. - */ - recoveryId?: string; - /** - * The time when the key is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the key was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The deleted key item containing the deleted key metadata and information about deletion. + * The secret management attributes. */ -export interface DeletedKeyItem extends KeyItem { - /** - * The url of the recovery object, used to identify and recover the deleted key. - */ - recoveryId?: string; - /** - * The time when the key is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; +export interface SecretAttributes extends Attributes { /** - * The time when the key was deleted, in UTC + * softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, + * otherwise 0. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly deletedDate?: Date; -} - -/** - * The secret management attributes. - */ -export interface SecretAttributes extends Attributes { + readonly recoverableDays?: number; /** * Reflects the deletion recovery level currently in effect for secrets in the current vault. If * it contains 'Purgeable', the secret can be permanently deleted by a privileged user; * otherwise, only the system can purge the secret, at the end of the retention interval. * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' + * 'Recoverable+ProtectedSubscription', 'CustomizedRecoverable+Purgeable', + * 'CustomizedRecoverable', 'CustomizedRecoverable+ProtectedSubscription' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recoveryLevel?: DeletionRecoveryLevel; @@ -340,95 +175,6 @@ export interface SecretRestoreParameters { secretBundleBackup: Uint8Array; } -/** - * The secret restore parameters. - */ -export interface StorageRestoreParameters { - /** - * The backup blob associated with a storage account. - */ - storageBundleBackup: Uint8Array; -} - -/** - * The certificate management attributes. - */ -export interface CertificateAttributes extends Attributes { - /** - * Reflects the deletion recovery level currently in effect for certificates in the current - * vault. If it contains 'Purgeable', the certificate can be permanently deleted by a privileged - * user; otherwise, only the system can purge the certificate, at the end of the retention - * interval. Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * The certificate item containing certificate metadata. - */ -export interface CertificateItem { - /** - * Certificate identifier. - */ - id?: string; - /** - * The certificate management attributes. - */ - attributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Thumbprint of the certificate. - */ - x509Thumbprint?: Uint8Array; -} - -/** - * The certificate issuer item containing certificate issuer metadata. - */ -export interface CertificateIssuerItem { - /** - * Certificate Identifier. - */ - id?: string; - /** - * The issuer provider. - */ - provider?: string; -} - -/** - * Properties of the key pair backing a certificate. - */ -export interface KeyProperties { - /** - * Indicates if the private key can be exported. - */ - exportable?: boolean; - /** - * The type of key pair to be used for the certificate. Possible values include: 'EC', 'EC-HSM', - * 'RSA', 'RSA-HSM', 'oct' - */ - keyType?: JsonWebKeyType; - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; - /** - * Indicates if the same key pair will be used on certificate renewal. - */ - reuseKey?: boolean; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - /** * Properties of the key backing a certificate. */ @@ -440,3233 +186,210 @@ export interface SecretProperties { } /** - * The subject alternate names of a X509 object. - */ -export interface SubjectAlternativeNames { - /** - * Email addresses. - */ - emails?: string[]; - /** - * Domain names. - */ - dnsNames?: string[]; - /** - * User principal names. - */ - upns?: string[]; -} - -/** - * Properties of the X509 component of a certificate. - */ -export interface X509CertificateProperties { - /** - * The subject name. Should be a valid X509 distinguished Name. - */ - subject?: string; - /** - * The enhanced key usage. - */ - ekus?: string[]; - /** - * The subject alternative names. - */ - subjectAlternativeNames?: SubjectAlternativeNames; - /** - * List of key usages. - */ - keyUsage?: KeyUsageType[]; - /** - * The duration that the certificate is valid in months. - */ - validityInMonths?: number; -} - -/** - * A condition to be satisfied for an action to be executed. - */ -export interface Trigger { - /** - * Percentage of lifetime at which to trigger. Value should be between 1 and 99. - */ - lifetimePercentage?: number; - /** - * Days before expiry to attempt renewal. Value should be between 1 and validity_in_months - * multiplied by 27. If validity_in_months is 36, then value should be between 1 and 972 (36 * - * 27). - */ - daysBeforeExpiry?: number; -} - -/** - * The action that will be executed. - */ -export interface Action { - /** - * The type of the action. Possible values include: 'EmailContacts', 'AutoRenew' - */ - actionType?: ActionType; -} - -/** - * Action and its trigger that will be performed by Key Vault over the lifetime of a certificate. + * The secret set parameters. */ -export interface LifetimeAction { - /** - * The condition that will execute the action. - */ - trigger?: Trigger; +export interface SecretSetParameters { /** - * The action that will be executed. + * The value of the secret. */ - action?: Action; -} - -/** - * Parameters for the issuer of the X509 component of a certificate. - */ -export interface IssuerParameters { + value: string; /** - * Name of the referenced issuer object or reserved names; for example, 'Self' or 'Unknown'. + * Application specific metadata in the form of key-value pairs. */ - name?: string; + tags?: { [propertyName: string]: string }; /** - * Type of certificate to be requested from the issuer provider. + * Type of the secret value such as a password. */ - certificateType?: string; + contentType?: string; /** - * Indicates if the certificates generated under this policy should be published to certificate - * transparency logs. + * The secret management attributes. */ - certificateTransparency?: boolean; + secretAttributes?: SecretAttributes; } /** - * Management policy for a certificate. + * The secret update parameters. */ -export interface CertificatePolicy { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Properties of the key backing a certificate. - */ - keyProperties?: KeyProperties; - /** - * Properties of the secret backing a certificate. - */ - secretProperties?: SecretProperties; - /** - * Properties of the X509 component of a certificate. - */ - x509CertificateProperties?: X509CertificateProperties; +export interface SecretUpdateParameters { /** - * Actions that will be performed by Key Vault over the lifetime of a certificate. + * Type of the secret value such as a password. */ - lifetimeActions?: LifetimeAction[]; + contentType?: string; /** - * Parameters for the issuer of the X509 component of a certificate. + * The secret management attributes. */ - issuerParameters?: IssuerParameters; + secretAttributes?: SecretAttributes; /** - * The certificate attributes. + * Application specific metadata in the form of key-value pairs. */ - attributes?: CertificateAttributes; + tags?: { [propertyName: string]: string }; } /** - * A certificate bundle consists of a certificate (X509) plus its attributes. - */ -export interface CertificateBundle { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The key id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * The secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sid?: string; - /** - * Thumbprint of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly x509Thumbprint?: Uint8Array; - /** - * The management policy. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly policy?: CertificatePolicy; - /** - * CER contents of x509 certificate. - */ - cer?: Uint8Array; - /** - * The content type of the secret. - */ - contentType?: string; - /** - * The certificate attributes. - */ - attributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs - */ - tags?: { [propertyName: string]: string }; -} - -/** - * A Deleted Certificate consisting of its previous id, attributes and its tags, as well as - * information on when it will be purged. - */ -export interface DeletedCertificateBundle extends CertificateBundle { - /** - * The url of the recovery object, used to identify and recover the deleted certificate. - */ - recoveryId?: string; - /** - * The time when the certificate is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the certificate was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The deleted certificate item containing metadata about the deleted certificate. - */ -export interface DeletedCertificateItem extends CertificateItem { - /** - * The url of the recovery object, used to identify and recover the deleted certificate. - */ - recoveryId?: string; - /** - * The time when the certificate is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the certificate was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The key vault server error. - */ -export interface ErrorModel { - /** - * The error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * The error message. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly innerError?: ErrorModel; -} - -/** - * A certificate operation is returned in case of asynchronous requests. - */ -export interface CertificateOperation { - /** - * The certificate id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Parameters for the issuer of the X509 component of a certificate. - */ - issuerParameters?: IssuerParameters; - /** - * The certificate signing request (CSR) that is being used in the certificate operation. - */ - csr?: Uint8Array; - /** - * Indicates if cancellation was requested on the certificate operation. - */ - cancellationRequested?: boolean; - /** - * Status of the certificate operation. - */ - status?: string; - /** - * The status details of the certificate operation. - */ - statusDetails?: string; - /** - * Error encountered, if any, during the certificate operation. - */ - error?: ErrorModel; - /** - * Location which contains the result of the certificate operation. - */ - target?: string; - /** - * Identifier for the certificate operation. - */ - requestId?: string; -} - -/** - * The credentials to be used for the certificate issuer. - */ -export interface IssuerCredentials { - /** - * The user name/account name/account id. - */ - accountId?: string; - /** - * The password/secret/account key. - */ - password?: string; -} - -/** - * Details of the organization administrator of the certificate issuer. - */ -export interface AdministratorDetails { - /** - * First name. - */ - firstName?: string; - /** - * Last name. - */ - lastName?: string; - /** - * Email address. - */ - emailAddress?: string; - /** - * Phone number. - */ - phone?: string; -} - -/** - * Details of the organization of the certificate issuer. - */ -export interface OrganizationDetails { - /** - * Id of the organization. - */ - id?: string; - /** - * Details of the organization administrator. - */ - adminDetails?: AdministratorDetails[]; -} - -/** - * The attributes of an issuer managed by the Key Vault service. - */ -export interface IssuerAttributes { - /** - * Determines whether the issuer is enabled. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; -} - -/** - * The issuer for Key Vault certificate. - */ -export interface IssuerBundle { - /** - * Identifier for the issuer object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The contact information for the vault certificates. - */ -export interface Contact { - /** - * Email address. - */ - emailAddress?: string; - /** - * Name. - */ - name?: string; - /** - * Phone number. - */ - phone?: string; -} - -/** - * The contacts for the vault certificates. - */ -export interface Contacts { - /** - * Identifier for the contacts collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The contact list for the vault certificates. - */ - contactList?: Contact[]; -} - -/** - * The key create parameters. - */ -export interface KeyCreateParameters { - /** - * The type of key to create. For valid values, see JsonWebKeyType. Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - */ - kty: JsonWebKeyType; - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - -/** - * The key import parameters. - */ -export interface KeyImportParameters { - /** - * Whether to import as a hardware key (HSM) or software key. - */ - hsm?: boolean; - /** - * The Json web key - */ - key: JsonWebKey; - /** - * The key management attributes. - */ - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key operations parameters. - */ -export interface KeyOperationsParameters { - /** - * algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - */ - algorithm: JsonWebKeyEncryptionAlgorithm; - value: Uint8Array; -} - -/** - * The key operations parameters. - */ -export interface KeySignParameters { - /** - * 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', 'ES256K' - */ - algorithm: JsonWebKeySignatureAlgorithm; - value: Uint8Array; -} - -/** - * The key verify parameters. - */ -export interface KeyVerifyParameters { - /** - * 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', 'ES256K' - */ - algorithm: JsonWebKeySignatureAlgorithm; - /** - * The digest used for signing. - */ - digest: Uint8Array; - /** - * The signature to be verified. - */ - signature: Uint8Array; -} - -/** - * The key update parameters. - */ -export interface KeyUpdateParameters { - /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. - */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key restore parameters. - */ -export interface KeyRestoreParameters { - /** - * The backup blob associated with a key bundle. - */ - keyBundleBackup: Uint8Array; -} - -/** - * The secret set parameters. - */ -export interface SecretSetParameters { - /** - * The value of the secret. - */ - value: string; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * The secret update parameters. - */ -export interface SecretUpdateParameters { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate create parameters. - */ -export interface CertificateCreateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate import parameters. - */ -export interface CertificateImportParameters { - /** - * Base64 encoded representation of the certificate object to import. This certificate needs to - * contain the private key. - */ - base64EncodedCertificate: string; - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate update parameters. - */ -export interface CertificateUpdateParameters { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate merge parameters - */ -export interface CertificateMergeParameters { - /** - * The certificate or the certificate chain to merge. - */ - x509Certificates: Uint8Array[]; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The certificate issuer set parameters. - */ -export interface CertificateIssuerSetParameters { - /** - * The issuer provider. - */ - provider: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The certificate issuer update parameters. - */ -export interface CertificateIssuerUpdateParameters { - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * The certificate operation update parameters. - */ -export interface CertificateOperationUpdateParameter { - /** - * Indicates if cancellation was requested on the certificate operation. - */ - cancellationRequested: boolean; -} - -/** - * The key operation result. - */ -export interface KeyOperationResult { - /** - * Key identifier - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kid?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly result?: Uint8Array; -} - -/** - * The key verify result. - */ -export interface KeyVerifyResult { - /** - * True if the signature is verified, otherwise false. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: boolean; -} - -/** - * The key list result. - */ -export interface KeyListResult { - /** - * A response message containing a list of keys in the key vault along with a link to the next - * page of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: KeyItem[]; - /** - * The URL to get the next set of keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * A list of keys that have been deleted in this vault. - */ -export interface DeletedKeyListResult { - /** - * A response message containing a list of deleted keys in the vault along with a link to the - * next page of deleted keys - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedKeyItem[]; - /** - * The URL to get the next set of deleted keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The secret list result. - */ -export interface SecretListResult { - /** - * A response message containing a list of secrets in the key vault along with a link to the next - * page of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SecretItem[]; - /** - * The URL to get the next set of secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted secret list result - */ -export interface DeletedSecretListResult { - /** - * A response message containing a list of the deleted secrets in the vault along with a link to - * the next page of deleted secrets - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSecretItem[]; - /** - * The URL to get the next set of deleted secrets. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The certificate list result. - */ -export interface CertificateListResult { - /** - * A response message containing a list of certificates in the key vault along with a link to the - * next page of certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: CertificateItem[]; - /** - * The URL to get the next set of certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * A list of certificates that have been deleted in this vault. - */ -export interface DeletedCertificateListResult { - /** - * A response message containing a list of deleted certificates in the vault along with a link to - * the next page of deleted certificates - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedCertificateItem[]; - /** - * The URL to get the next set of deleted certificates. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The certificate issuer list result. - */ -export interface CertificateIssuerListResult { - /** - * A response message containing a list of certificate issuers in the key vault along with a link - * to the next page of certificate issuers. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: CertificateIssuerItem[]; - /** - * The URL to get the next set of certificate issuers. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The backup key result, containing the backup blob. - */ -export interface BackupKeyResult { - /** - * The backup blob containing the backed up key. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The backup secret result, containing the backup blob. - */ -export interface BackupSecretResult { - /** - * The backup blob containing the backed up secret. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The backup storage result, containing the backup blob. - */ -export interface BackupStorageResult { - /** - * The backup blob containing the backed up storage account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * The pending certificate signing request result. - */ -export interface PendingCertificateSigningRequestResult { - /** - * The pending certificate signing request as Base64 encoded string. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: string; -} - -/** - * The storage account management attributes. - */ -export interface StorageAccountAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; - /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A Storage account bundle consists of key vault storage account details plus its attributes. - */ -export interface StorageBundle { - /** - * The storage account id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The storage account resource id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * The current active storage account key name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly regenerationPeriod?: string; - /** - * The storage account attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted storage account bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedStorageBundle extends StorageBundle { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage account create parameters. - */ -export interface StorageAccountCreateParameters { - /** - * Storage account resource id. - */ - resourceId: string; - /** - * Current active storage account key name. - */ - activeKeyName: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The storage account update parameters. - */ -export interface StorageAccountUpdateParameters { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The storage account key regenerate parameters. - */ -export interface StorageAccountRegenerteKeyParameters { - /** - * The storage account key name. - */ - keyName: string; -} - -/** - * The storage account item containing storage account metadata. - */ -export interface StorageAccountItem { - /** - * Storage identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * The storage account management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted storage account item containing metadata about the deleted storage account. - */ -export interface DeletedStorageAccountItem extends StorageAccountItem { - /** - * The url of the recovery object, used to identify and recover the deleted storage account. - */ - recoveryId?: string; - /** - * The time when the storage account is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the storage account was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage accounts list result. - */ -export interface StorageListResult { - /** - * A response message containing a list of storage accounts in the key vault along with a link to - * the next page of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: StorageAccountItem[]; - /** - * The URL to get the next set of storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted storage account list result - */ -export interface DeletedStorageListResult { - /** - * A response message containing a list of the deleted storage accounts in the vault along with a - * link to the next page of deleted storage accounts - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedStorageAccountItem[]; - /** - * The URL to get the next set of deleted storage accounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition management attributes. - */ -export interface SasDefinitionAttributes { - /** - * the enabled state of the object. - */ - enabled?: boolean; - /** - * Creation time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly created?: Date; - /** - * Last updated time in UTC. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updated?: Date; - /** - * 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' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recoveryLevel?: DeletionRecoveryLevel; -} - -/** - * A SAS definition bundle consists of key vault SAS definition details plus its attributes. - */ -export interface SasDefinitionBundle { - /** - * The SAS definition id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * 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. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly validityPeriod?: string; - /** - * The SAS definition attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * A deleted SAS definition bundle consisting of its previous id, attributes and its tags, as well - * as information on when it will be purged. - */ -export interface DeletedSasDefinitionBundle extends SasDefinitionBundle { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The SAS definition item containing storage SAS definition metadata. - */ -export interface SasDefinitionItem { - /** - * The storage SAS identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The storage account SAS definition secret id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secretId?: string; - /** - * The SAS definition management attributes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly attributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * The deleted SAS definition item containing metadata about the deleted SAS definition. - */ -export interface DeletedSasDefinitionItem extends SasDefinitionItem { - /** - * The url of the recovery object, used to identify and recover the deleted SAS definition. - */ - recoveryId?: string; - /** - * The time when the SAS definition is scheduled to be purged, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduledPurgeDate?: Date; - /** - * The time when the SAS definition was deleted, in UTC - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletedDate?: Date; -} - -/** - * The storage account SAS definition list result. - */ -export interface SasDefinitionListResult { - /** - * A response message containing a list of SAS definitions along with a link to the next page of - * SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: SasDefinitionItem[]; - /** - * The URL to get the next set of SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The deleted SAS definition list result - */ -export interface DeletedSasDefinitionListResult { - /** - * A response message containing a list of the deleted SAS definitions in the vault along with a - * link to the next page of deleted sas definitions - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: DeletedSasDefinitionItem[]; - /** - * The URL to get the next set of deleted SAS definitions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - -/** - * The SAS definition create parameters. - */ -export interface SasDefinitionCreateParameters { - /** - * 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. - */ - templateUri: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The SAS definition update parameters. - */ -export interface SasDefinitionUpdateParameters { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * The key vault error exception. - */ -export interface KeyVaultError { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; -} - -/** - * The certificate restore parameters. - */ -export interface CertificateRestoreParameters { - /** - * The backup blob associated with a certificate bundle. - */ - certificateBundleBackup: Uint8Array; -} - -/** - * The backup certificate result, containing the backup blob. - */ -export interface BackupCertificateResult { - /** - * The backup blob containing the backed up certificate. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: Uint8Array; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key size in bits. For example: 2048, 3072, or 4096 for RSA. - */ - keySize?: number; - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: - * 'P-256', 'P-384', 'P-521', 'P-256K' - */ - curve?: JsonWebKeyCurveName; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Whether to import as a hardware key (HSM) or software key. - */ - hsm?: boolean; - /** - * The key management attributes. - */ - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateKeyOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Json web key operations. For more information on possible key operations, see - * JsonWebKeyOperation. - */ - keyOps?: JsonWebKeyOperation[]; - keyAttributes?: KeyAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeyVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSecretOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Type of the secret value such as a password. - */ - contentType?: string; - /** - * The secret management attributes. - */ - secretAttributes?: SecretAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSecretVersionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified, the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSecretsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificatesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateIssuersOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateIssuerOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The issuer provider. - */ - provider?: string; - /** - * The credentials to be used for the issuer. - */ - credentials?: IssuerCredentials; - /** - * Details of the organization as provided to the issuer. - */ - organizationDetails?: OrganizationDetails; - /** - * Attributes of the issuer object. - */ - attributes?: IssuerAttributes; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientCreateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientImportCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * If the private key in base64EncodedCertificate is encrypted, the password used for encryption. - */ - password?: string; - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetCertificateVersionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The management policy for the certificate. - */ - certificatePolicy?: CertificatePolicy; - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientMergeCertificateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the certificate (optional). - */ - certificateAttributes?: CertificateAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedCertificatesOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; - /** - * Specifies whether to include certificates which are not completely provisioned. - */ - includePending?: boolean; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedStorageAccountsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetStorageAccountOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateStorageAccountOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * The current active storage account key name. - */ - activeKeyName?: string; - /** - * whether keyvault should manage the storage account for the user. - */ - autoRegenerateKey?: boolean; - /** - * The key regeneration time duration specified in ISO-8601 format. - */ - regenerationPeriod?: string; - /** - * The attributes of the storage account. - */ - storageAccountAttributes?: StorageAccountAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetSasDefinitionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientGetDeletedSasDefinitionsOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * Maximum number of results to return in a page. If not specified the service will return up to - * 25 results. - */ - maxresults?: number; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientSetSasDefinitionOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface KeyVaultClientUpdateSasDefinitionOptionalParams - extends coreHttp.RequestOptionsBase { - /** - * 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. - */ - templateUri?: string; - /** - * The type of SAS token the SAS definition will create. Possible values include: 'account', - * 'service' - */ - sasType?: SasTokenType; - /** - * The validity period of SAS tokens created according to the SAS definition. - */ - validityPeriod?: string; - /** - * The attributes of the SAS definition. - */ - sasDefinitionAttributes?: SasDefinitionAttributes; - /** - * Application specific metadata in the form of key-value pairs. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Defines values for JsonWebKeyType. - * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - * @readonly - * @enum {string} - */ -export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; - -/** - * Defines values for JsonWebKeyCurveName. - * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; - -/** - * Defines values for DeletionRecoveryLevel. - * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', - * 'Recoverable+ProtectedSubscription' - * @readonly - * @enum {string} - */ -export type DeletionRecoveryLevel = - | "Purgeable" - | "Recoverable+Purgeable" - | "Recoverable" - | "Recoverable+ProtectedSubscription"; - -/** - * Defines values for KeyUsageType. - * Possible values include: 'digitalSignature', 'nonRepudiation', 'keyEncipherment', - * 'dataEncipherment', 'keyAgreement', 'keyCertSign', 'cRLSign', 'encipherOnly', 'decipherOnly' - * @readonly - * @enum {string} - */ -export type KeyUsageType = - | "digitalSignature" - | "nonRepudiation" - | "keyEncipherment" - | "dataEncipherment" - | "keyAgreement" - | "keyCertSign" - | "cRLSign" - | "encipherOnly" - | "decipherOnly"; - -/** - * Defines values for ActionType. - * Possible values include: 'EmailContacts', 'AutoRenew' - * @readonly - * @enum {string} - */ -export type ActionType = "EmailContacts" | "AutoRenew"; - -/** - * Defines values for JsonWebKeyOperation. - * Possible values include: 'encrypt', 'decrypt', 'sign', 'verify', 'wrapKey', 'unwrapKey' - * @readonly - * @enum {string} - */ -export type JsonWebKeyOperation = - | "encrypt" - | "decrypt" - | "sign" - | "verify" - | "wrapKey" - | "unwrapKey"; - -/** - * Defines values for JsonWebKeyEncryptionAlgorithm. - * Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - * @readonly - * @enum {string} - */ -export type JsonWebKeyEncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"; - -/** - * Defines values for JsonWebKeySignatureAlgorithm. - * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', - * 'ES256', 'ES384', 'ES512', 'ES256K' - * @readonly - * @enum {string} - */ -export type JsonWebKeySignatureAlgorithm = - | "PS256" - | "PS384" - | "PS512" - | "RS256" - | "RS384" - | "RS512" - | "RSNULL" - | "ES256" - | "ES384" - | "ES512" - | "ES256K"; - -/** - * Defines values for SasTokenType. - * Possible values include: 'account', 'service' - * @readonly - * @enum {string} - */ -export type SasTokenType = "account" | "service"; - -/** - * Contains response data for the createKey operation. - */ -export type CreateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the importKey operation. - */ -export type ImportKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the deleteKey operation. - */ -export type DeleteKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the updateKey operation. - */ -export type UpdateKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKey operation. - */ -export type GetKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the getKeyVersions operation. - */ -export type GetKeyVersionsResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the getKeys operation. - */ -export type GetKeysResponse = KeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyListResult; - }; -}; - -/** - * Contains response data for the backupKey operation. - */ -export type BackupKeyResponse = BackupKeyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupKeyResult; - }; -}; - -/** - * Contains response data for the restoreKey operation. - */ -export type RestoreKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the encrypt operation. - */ -export type EncryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the decrypt operation. - */ -export type DecryptResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the sign operation. - */ -export type SignResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the verify operation. - */ -export type VerifyResponse = KeyVerifyResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyVerifyResult; - }; -}; - -/** - * Contains response data for the wrapKey operation. - */ -export type WrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the unwrapKey operation. - */ -export type UnwrapKeyResponse = KeyOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyOperationResult; - }; -}; - -/** - * Contains response data for the getDeletedKeys operation. - */ -export type GetDeletedKeysResponse = DeletedKeyListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyListResult; - }; -}; - -/** - * Contains response data for the getDeletedKey operation. - */ -export type GetDeletedKeyResponse = DeletedKeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedKeyBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedKey operation. - */ -export type RecoverDeletedKeyResponse = KeyBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyBundle; - }; -}; - -/** - * Contains response data for the setSecret operation. - */ -export type SetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the deleteSecret operation. - */ -export type DeleteSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the updateSecret operation. - */ -export type UpdateSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecret operation. - */ -export type GetSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getSecrets operation. - */ -export type GetSecretsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getSecretVersions operation. - */ -export type GetSecretVersionsResponse = SecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecrets operation. - */ -export type GetDeletedSecretsResponse = DeletedSecretListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretListResult; - }; -}; - -/** - * Contains response data for the getDeletedSecret operation. - */ -export type GetDeletedSecretResponse = DeletedSecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedSecretBundle; - }; -}; - -/** - * Contains response data for the recoverDeletedSecret operation. - */ -export type RecoverDeletedSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the backupSecret operation. - */ -export type BackupSecretResponse = BackupSecretResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupSecretResult; - }; -}; - -/** - * Contains response data for the restoreSecret operation. - */ -export type RestoreSecretResponse = SecretBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SecretBundle; - }; -}; - -/** - * Contains response data for the getCertificates operation. - */ -export type GetCertificatesResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the deleteCertificate operation. - */ -export type DeleteCertificateResponse = DeletedCertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateBundle; - }; -}; - -/** - * Contains response data for the setCertificateContacts operation. - */ -export type SetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateContacts operation. - */ -export type GetCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the deleteCertificateContacts operation. - */ -export type DeleteCertificateContactsResponse = Contacts & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Contacts; - }; -}; - -/** - * Contains response data for the getCertificateIssuers operation. - */ -export type GetCertificateIssuersResponse = CertificateIssuerListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateIssuerListResult; - }; -}; - -/** - * Contains response data for the setCertificateIssuer operation. - */ -export type SetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the updateCertificateIssuer operation. - */ -export type UpdateCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the getCertificateIssuer operation. - */ -export type GetCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the deleteCertificateIssuer operation. - */ -export type DeleteCertificateIssuerResponse = IssuerBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IssuerBundle; - }; -}; - -/** - * Contains response data for the createCertificate operation. - */ -export type CreateCertificateResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the importCertificate operation. - */ -export type ImportCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getCertificateVersions operation. - */ -export type GetCertificateVersionsResponse = CertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateListResult; - }; -}; - -/** - * Contains response data for the getCertificatePolicy operation. - */ -export type GetCertificatePolicyResponse = CertificatePolicy & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; - -/** - * Contains response data for the updateCertificatePolicy operation. - */ -export type UpdateCertificatePolicyResponse = CertificatePolicy & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificatePolicy; - }; -}; - -/** - * Contains response data for the updateCertificate operation. - */ -export type UpdateCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getCertificate operation. - */ -export type GetCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the updateCertificateOperation operation. - */ -export type UpdateCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the getCertificateOperation operation. - */ -export type GetCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the deleteCertificateOperation operation. - */ -export type DeleteCertificateOperationResponse = CertificateOperation & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateOperation; - }; -}; - -/** - * Contains response data for the mergeCertificate operation. - */ -export type MergeCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the backupCertificate operation. - */ -export type BackupCertificateResponse = BackupCertificateResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupCertificateResult; - }; -}; - -/** - * Contains response data for the restoreCertificate operation. - */ -export type RestoreCertificateResponse = CertificateBundle & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; - -/** - * Contains response data for the getDeletedCertificates operation. - */ -export type GetDeletedCertificatesResponse = DeletedCertificateListResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateListResult; - }; -}; - -/** - * Contains response data for the getDeletedCertificate operation. + * The secret list result. */ -export type GetDeletedCertificateResponse = DeletedCertificateBundle & { +export interface SecretListResult { /** - * The underlying HTTP response. + * A response message containing a list of secrets in the key vault along with a link to the next + * page of secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedCertificateBundle; - }; -}; + readonly value?: SecretItem[]; + /** + * The URL to get the next set of secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} /** - * Contains response data for the recoverDeletedCertificate operation. + * The deleted secret list result */ -export type RecoverDeletedCertificateResponse = CertificateBundle & { +export interface DeletedSecretListResult { /** - * The underlying HTTP response. + * A response message containing a list of the deleted secrets in the vault along with a link to + * the next page of deleted secrets + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CertificateBundle; - }; -}; + readonly value?: DeletedSecretItem[]; + /** + * The URL to get the next set of deleted secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} /** - * Contains response data for the getStorageAccounts operation. + * The backup secret result, containing the backup blob. */ -export type GetStorageAccountsResponse = StorageListResult & { +export interface BackupSecretResult { /** - * The underlying HTTP response. + * The backup blob containing the backed up secret. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageListResult; - }; -}; + readonly value?: Uint8Array; +} /** - * Contains response data for the getDeletedStorageAccounts operation. + * The key vault server error. */ -export type GetDeletedStorageAccountsResponse = DeletedStorageListResult & { +export interface ErrorModel { /** - * The underlying HTTP response. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedStorageListResult; - }; -}; + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly innerError?: ErrorModel; +} /** - * Contains response data for the getDeletedStorageAccount operation. + * The key vault error exception. */ -export type GetDeletedStorageAccountResponse = DeletedStorageBundle & { +export interface KeyVaultError { /** - * The underlying HTTP response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedStorageBundle; - }; -}; + readonly error?: ErrorModel; +} /** - * Contains response data for the recoverDeletedStorageAccount operation. + * Optional Parameters. */ -export type RecoverDeletedStorageAccountResponse = StorageBundle & { +export interface KeyVaultClientSetSecretOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Application specific metadata in the form of key-value pairs. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageBundle; - }; -}; + tags?: { [propertyName: string]: string }; + /** + * Type of the secret value such as a password. + */ + contentType?: string; + /** + * The secret management attributes. + */ + secretAttributes?: SecretAttributes; +} /** - * Contains response data for the backupStorageAccount operation. + * Optional Parameters. */ -export type BackupStorageAccountResponse = BackupStorageResult & { +export interface KeyVaultClientUpdateSecretOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Type of the secret value such as a password. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupStorageResult; - }; -}; + contentType?: string; + /** + * The secret management attributes. + */ + secretAttributes?: SecretAttributes; + /** + * Application specific metadata in the form of key-value pairs. + */ + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the restoreStorageAccount operation. + * Optional Parameters. */ -export type RestoreStorageAccountResponse = StorageBundle & { +export interface KeyVaultClientGetSecretsOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified, the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageBundle; - }; -}; + maxresults?: number; +} /** - * Contains response data for the deleteStorageAccount operation. + * Optional Parameters. */ -export type DeleteStorageAccountResponse = DeletedStorageBundle & { +export interface KeyVaultClientGetSecretVersionsOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified, the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DeletedStorageBundle; - }; -}; + maxresults?: number; +} /** - * Contains response data for the getStorageAccount operation. + * Optional Parameters. */ -export type GetStorageAccountResponse = StorageBundle & { +export interface KeyVaultClientGetDeletedSecretsOptionalParams extends coreHttp.RequestOptionsBase { /** - * The underlying HTTP response. + * Maximum number of results to return in a page. If not specified the service will return up to + * 25 results. */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + maxresults?: number; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageBundle; - }; -}; +/** + * Defines values for DeletionRecoveryLevel. + * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription', 'CustomizedRecoverable+Purgeable', 'CustomizedRecoverable', + * 'CustomizedRecoverable+ProtectedSubscription' + * @readonly + * @enum {string} + */ +export type DeletionRecoveryLevel = + | "Purgeable" + | "Recoverable+Purgeable" + | "Recoverable" + | "Recoverable+ProtectedSubscription" + | "CustomizedRecoverable+Purgeable" + | "CustomizedRecoverable" + | "CustomizedRecoverable+ProtectedSubscription"; /** - * Contains response data for the setStorageAccount operation. + * Contains response data for the setSecret operation. */ -export type SetStorageAccountResponse = StorageBundle & { +export type SetSecretResponse = SecretBundle & { /** * The underlying HTTP response. */ @@ -3679,14 +402,14 @@ export type SetStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: SecretBundle; }; }; /** - * Contains response data for the updateStorageAccount operation. + * Contains response data for the deleteSecret operation. */ -export type UpdateStorageAccountResponse = StorageBundle & { +export type DeleteSecretResponse = DeletedSecretBundle & { /** * The underlying HTTP response. */ @@ -3699,14 +422,14 @@ export type UpdateStorageAccountResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: DeletedSecretBundle; }; }; /** - * Contains response data for the regenerateStorageAccountKey operation. + * Contains response data for the updateSecret operation. */ -export type RegenerateStorageAccountKeyResponse = StorageBundle & { +export type UpdateSecretResponse = SecretBundle & { /** * The underlying HTTP response. */ @@ -3719,14 +442,14 @@ export type RegenerateStorageAccountKeyResponse = StorageBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: StorageBundle; + parsedBody: SecretBundle; }; }; /** - * Contains response data for the getSasDefinitions operation. + * Contains response data for the getSecret operation. */ -export type GetSasDefinitionsResponse = SasDefinitionListResult & { +export type GetSecretResponse = SecretBundle & { /** * The underlying HTTP response. */ @@ -3739,14 +462,14 @@ export type GetSasDefinitionsResponse = SasDefinitionListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionListResult; + parsedBody: SecretBundle; }; }; /** - * Contains response data for the getDeletedSasDefinitions operation. + * Contains response data for the getSecrets operation. */ -export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & { +export type GetSecretsResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -3759,14 +482,14 @@ export type GetDeletedSasDefinitionsResponse = DeletedSasDefinitionListResult & /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionListResult; + parsedBody: SecretListResult; }; }; /** - * Contains response data for the getDeletedSasDefinition operation. + * Contains response data for the getSecretVersions operation. */ -export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type GetSecretVersionsResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -3779,14 +502,14 @@ export type GetDeletedSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: SecretListResult; }; }; /** - * Contains response data for the recoverDeletedSasDefinition operation. + * Contains response data for the getDeletedSecrets operation. */ -export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { +export type GetDeletedSecretsResponse = DeletedSecretListResult & { /** * The underlying HTTP response. */ @@ -3799,14 +522,14 @@ export type RecoverDeletedSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: DeletedSecretListResult; }; }; /** - * Contains response data for the deleteSasDefinition operation. + * Contains response data for the getDeletedSecret operation. */ -export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { +export type GetDeletedSecretResponse = DeletedSecretBundle & { /** * The underlying HTTP response. */ @@ -3819,14 +542,14 @@ export type DeleteSasDefinitionResponse = DeletedSasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedSasDefinitionBundle; + parsedBody: DeletedSecretBundle; }; }; /** - * Contains response data for the getSasDefinition operation. + * Contains response data for the recoverDeletedSecret operation. */ -export type GetSasDefinitionResponse = SasDefinitionBundle & { +export type RecoverDeletedSecretResponse = SecretBundle & { /** * The underlying HTTP response. */ @@ -3839,14 +562,14 @@ export type GetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: SecretBundle; }; }; /** - * Contains response data for the setSasDefinition operation. + * Contains response data for the backupSecret operation. */ -export type SetSasDefinitionResponse = SasDefinitionBundle & { +export type BackupSecretResponse = BackupSecretResult & { /** * The underlying HTTP response. */ @@ -3859,14 +582,14 @@ export type SetSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: BackupSecretResult; }; }; /** - * Contains response data for the updateSasDefinition operation. + * Contains response data for the restoreSecret operation. */ -export type UpdateSasDefinitionResponse = SasDefinitionBundle & { +export type RestoreSecretResponse = SecretBundle & { /** * The underlying HTTP response. */ @@ -3879,6 +602,6 @@ export type UpdateSasDefinitionResponse = SasDefinitionBundle & { /** * The response body as parsed JSON or XML */ - parsedBody: SasDefinitionBundle; + parsedBody: SecretBundle; }; }; diff --git a/sdk/keyvault/keyvault-secrets/src/core/models/mappers.ts b/sdk/keyvault/keyvault-secrets/src/core/models/mappers.ts index 69c3d78908ad..4f664073f3d4 100644 --- a/sdk/keyvault/keyvault-secrets/src/core/models/mappers.ts +++ b/sdk/keyvault/keyvault-secrets/src/core/models/mappers.ts @@ -50,124 +50,20 @@ export const Attributes: coreHttp.CompositeMapper = { } }; -export const JsonWebKey: coreHttp.CompositeMapper = { - serializedName: "JsonWebKey", +export const SecretAttributes: coreHttp.CompositeMapper = { + serializedName: "SecretAttributes", type: { name: "Composite", - className: "JsonWebKey", + className: "SecretAttributes", modelProperties: { - kid: { - serializedName: "kid", - type: { - name: "String" - } - }, - kty: { - serializedName: "kty", - type: { - name: "String" - } - }, - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - n: { - serializedName: "n", - type: { - name: "Base64Url" - } - }, - e: { - serializedName: "e", - type: { - name: "Base64Url" - } - }, - d: { - serializedName: "d", - type: { - name: "Base64Url" - } - }, - dp: { - serializedName: "dp", - type: { - name: "Base64Url" - } - }, - dq: { - serializedName: "dq", - type: { - name: "Base64Url" - } - }, - qi: { - serializedName: "qi", - type: { - name: "Base64Url" - } - }, - p: { - serializedName: "p", - type: { - name: "Base64Url" - } - }, - q: { - serializedName: "q", - type: { - name: "Base64Url" - } - }, - k: { - serializedName: "k", - type: { - name: "Base64Url" - } - }, - t: { - serializedName: "key_hsm", - type: { - name: "Base64Url" - } - }, - crv: { - serializedName: "crv", - type: { - name: "String" - } - }, - x: { - serializedName: "x", + ...Attributes.type.modelProperties, + recoverableDays: { + readOnly: true, + serializedName: "recoverableDays", type: { - name: "Base64Url" + name: "Number" } }, - y: { - serializedName: "y", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyAttributes: coreHttp.CompositeMapper = { - serializedName: "KeyAttributes", - type: { - name: "Composite", - className: "KeyAttributes", - modelProperties: { - ...Attributes.type.modelProperties, recoveryLevel: { nullable: false, readOnly: true, @@ -180,24 +76,35 @@ export const KeyAttributes: coreHttp.CompositeMapper = { } }; -export const KeyBundle: coreHttp.CompositeMapper = { - serializedName: "KeyBundle", +export const SecretBundle: coreHttp.CompositeMapper = { + serializedName: "SecretBundle", type: { name: "Composite", - className: "KeyBundle", + className: "SecretBundle", modelProperties: { - key: { - serializedName: "key", + value: { + serializedName: "value", type: { - name: "Composite", - className: "JsonWebKey" + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" } }, attributes: { serializedName: "attributes", type: { name: "Composite", - className: "KeyAttributes" + className: "SecretAttributes" } }, tags: { @@ -211,6 +118,13 @@ export const KeyBundle: coreHttp.CompositeMapper = { } } }, + kid: { + readOnly: true, + serializedName: "kid", + type: { + name: "String" + } + }, managed: { readOnly: true, serializedName: "managed", @@ -222,14 +136,14 @@ export const KeyBundle: coreHttp.CompositeMapper = { } }; -export const KeyItem: coreHttp.CompositeMapper = { - serializedName: "KeyItem", +export const SecretItem: coreHttp.CompositeMapper = { + serializedName: "SecretItem", type: { name: "Composite", - className: "KeyItem", + className: "SecretItem", modelProperties: { - kid: { - serializedName: "kid", + id: { + serializedName: "id", type: { name: "String" } @@ -238,7 +152,7 @@ export const KeyItem: coreHttp.CompositeMapper = { serializedName: "attributes", type: { name: "Composite", - className: "KeyAttributes" + className: "SecretAttributes" } }, tags: { @@ -252,6 +166,12 @@ export const KeyItem: coreHttp.CompositeMapper = { } } }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, managed: { readOnly: true, serializedName: "managed", @@ -263,13 +183,13 @@ export const KeyItem: coreHttp.CompositeMapper = { } }; -export const DeletedKeyBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyBundle", +export const DeletedSecretBundle: coreHttp.CompositeMapper = { + serializedName: "DeletedSecretBundle", type: { name: "Composite", - className: "DeletedKeyBundle", + className: "DeletedSecretBundle", modelProperties: { - ...KeyBundle.type.modelProperties, + ...SecretBundle.type.modelProperties, recoveryId: { serializedName: "recoveryId", type: { @@ -294,13 +214,13 @@ export const DeletedKeyBundle: coreHttp.CompositeMapper = { } }; -export const DeletedKeyItem: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyItem", +export const DeletedSecretItem: coreHttp.CompositeMapper = { + serializedName: "DeletedSecretItem", type: { name: "Composite", - className: "DeletedKeyItem", + className: "DeletedSecretItem", modelProperties: { - ...KeyItem.type.modelProperties, + ...SecretItem.type.modelProperties, recoveryId: { serializedName: "recoveryId", type: { @@ -325,54 +245,50 @@ export const DeletedKeyItem: coreHttp.CompositeMapper = { } }; -export const SecretAttributes: coreHttp.CompositeMapper = { - serializedName: "SecretAttributes", +export const SecretRestoreParameters: coreHttp.CompositeMapper = { + serializedName: "SecretRestoreParameters", type: { name: "Composite", - className: "SecretAttributes", + className: "SecretRestoreParameters", modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", + secretBundleBackup: { + required: true, + serializedName: "value", type: { - name: "String" + name: "Base64Url" } } } } }; -export const SecretBundle: coreHttp.CompositeMapper = { - serializedName: "SecretBundle", +export const SecretProperties: coreHttp.CompositeMapper = { + serializedName: "SecretProperties", type: { name: "Composite", - className: "SecretBundle", + className: "SecretProperties", modelProperties: { - value: { - serializedName: "value", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, contentType: { serializedName: "contentType", type: { name: "String" } - }, - attributes: { - serializedName: "attributes", + } + } + } +}; + +export const SecretSetParameters: coreHttp.CompositeMapper = { + serializedName: "SecretSetParameters", + type: { + name: "Composite", + className: "SecretSetParameters", + modelProperties: { + value: { + required: true, + serializedName: "value", type: { - name: "Composite", - className: "SecretAttributes" + name: "String" } }, tags: { @@ -386,37 +302,36 @@ export const SecretBundle: coreHttp.CompositeMapper = { } } }, - kid: { - readOnly: true, - serializedName: "kid", + contentType: { + serializedName: "contentType", type: { name: "String" } }, - managed: { - readOnly: true, - serializedName: "managed", + secretAttributes: { + serializedName: "attributes", type: { - name: "Boolean" + name: "Composite", + className: "SecretAttributes" } } } } }; -export const SecretItem: coreHttp.CompositeMapper = { - serializedName: "SecretItem", +export const SecretUpdateParameters: coreHttp.CompositeMapper = { + serializedName: "SecretUpdateParameters", type: { name: "Composite", - className: "SecretItem", + className: "SecretUpdateParameters", modelProperties: { - id: { - serializedName: "id", + contentType: { + serializedName: "contentType", type: { name: "String" } }, - attributes: { + secretAttributes: { serializedName: "attributes", type: { name: "Composite", @@ -433,2457 +348,46 @@ export const SecretItem: coreHttp.CompositeMapper = { } } } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - managed: { - readOnly: true, - serializedName: "managed", - type: { - name: "Boolean" - } } } } }; -export const DeletedSecretBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretBundle", +export const SecretListResult: coreHttp.CompositeMapper = { + serializedName: "SecretListResult", type: { name: "Composite", - className: "DeletedSecretBundle", + className: "SecretListResult", modelProperties: { - ...SecretBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { + value: { readOnly: true, - serializedName: "scheduledPurgeDate", + serializedName: "value", type: { - name: "UnixTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecretItem" + } + } } }, - deletedDate: { + nextLink: { readOnly: true, - serializedName: "deletedDate", + serializedName: "nextLink", type: { - name: "UnixTime" + name: "String" } } } } }; -export const DeletedSecretItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretItem", - type: { - name: "Composite", - className: "DeletedSecretItem", - modelProperties: { - ...SecretItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const SecretRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "SecretRestoreParameters", - type: { - name: "Composite", - className: "SecretRestoreParameters", - modelProperties: { - secretBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const StorageRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "StorageRestoreParameters", - type: { - name: "Composite", - className: "StorageRestoreParameters", - modelProperties: { - storageBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const CertificateAttributes: coreHttp.CompositeMapper = { - serializedName: "CertificateAttributes", - type: { - name: "Composite", - className: "CertificateAttributes", - modelProperties: { - ...Attributes.type.modelProperties, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateItem: coreHttp.CompositeMapper = { - serializedName: "CertificateItem", - type: { - name: "Composite", - className: "CertificateItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - x509Thumbprint: { - serializedName: "x5t", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const CertificateIssuerItem: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerItem", - type: { - name: "Composite", - className: "CertificateIssuerItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - provider: { - serializedName: "provider", - type: { - name: "String" - } - } - } - } -}; - -export const KeyProperties: coreHttp.CompositeMapper = { - serializedName: "KeyProperties", - type: { - name: "Composite", - className: "KeyProperties", - modelProperties: { - exportable: { - serializedName: "exportable", - type: { - name: "Boolean" - } - }, - keyType: { - serializedName: "kty", - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", - type: { - name: "Number" - } - }, - reuseKey: { - serializedName: "reuse_key", - type: { - name: "Boolean" - } - }, - curve: { - serializedName: "crv", - type: { - name: "String" - } - } - } - } -}; - -export const SecretProperties: coreHttp.CompositeMapper = { - serializedName: "SecretProperties", - type: { - name: "Composite", - className: "SecretProperties", - modelProperties: { - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - } - } - } -}; - -export const SubjectAlternativeNames: coreHttp.CompositeMapper = { - serializedName: "SubjectAlternativeNames", - type: { - name: "Composite", - className: "SubjectAlternativeNames", - modelProperties: { - emails: { - serializedName: "emails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - dnsNames: { - serializedName: "dns_names", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - upns: { - serializedName: "upns", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const X509CertificateProperties: coreHttp.CompositeMapper = { - serializedName: "X509CertificateProperties", - type: { - name: "Composite", - className: "X509CertificateProperties", - modelProperties: { - subject: { - serializedName: "subject", - type: { - name: "String" - } - }, - ekus: { - serializedName: "ekus", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - subjectAlternativeNames: { - serializedName: "sans", - type: { - name: "Composite", - className: "SubjectAlternativeNames" - } - }, - keyUsage: { - serializedName: "key_usage", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - validityInMonths: { - serializedName: "validity_months", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const Trigger: coreHttp.CompositeMapper = { - serializedName: "Trigger", - type: { - name: "Composite", - className: "Trigger", - modelProperties: { - lifetimePercentage: { - serializedName: "lifetime_percentage", - constraints: { - InclusiveMaximum: 99, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - daysBeforeExpiry: { - serializedName: "days_before_expiry", - type: { - name: "Number" - } - } - } - } -}; - -export const Action: coreHttp.CompositeMapper = { - serializedName: "Action", - type: { - name: "Composite", - className: "Action", - modelProperties: { - actionType: { - serializedName: "action_type", - type: { - name: "Enum", - allowedValues: ["EmailContacts", "AutoRenew"] - } - } - } - } -}; - -export const LifetimeAction: coreHttp.CompositeMapper = { - serializedName: "LifetimeAction", - type: { - name: "Composite", - className: "LifetimeAction", - modelProperties: { - trigger: { - serializedName: "trigger", - type: { - name: "Composite", - className: "Trigger" - } - }, - action: { - serializedName: "action", - type: { - name: "Composite", - className: "Action" - } - } - } - } -}; - -export const IssuerParameters: coreHttp.CompositeMapper = { - serializedName: "IssuerParameters", - type: { - name: "Composite", - className: "IssuerParameters", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - certificateType: { - serializedName: "cty", - type: { - name: "String" - } - }, - certificateTransparency: { - serializedName: "cert_transparency", - type: { - name: "Boolean" - } - } - } - } -}; - -export const CertificatePolicy: coreHttp.CompositeMapper = { - serializedName: "CertificatePolicy", - type: { - name: "Composite", - className: "CertificatePolicy", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - keyProperties: { - serializedName: "key_props", - type: { - name: "Composite", - className: "KeyProperties" - } - }, - secretProperties: { - serializedName: "secret_props", - type: { - name: "Composite", - className: "SecretProperties" - } - }, - x509CertificateProperties: { - serializedName: "x509_props", - type: { - name: "Composite", - className: "X509CertificateProperties" - } - }, - lifetimeActions: { - serializedName: "lifetime_actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LifetimeAction" - } - } - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - } - } - } -}; - -export const CertificateBundle: coreHttp.CompositeMapper = { - serializedName: "CertificateBundle", - type: { - name: "Composite", - className: "CertificateBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - sid: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - x509Thumbprint: { - readOnly: true, - serializedName: "x5t", - type: { - name: "Base64Url" - } - }, - policy: { - readOnly: true, - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - cer: { - serializedName: "cer", - type: { - name: "ByteArray" - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedCertificateBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateBundle", - type: { - name: "Composite", - className: "DeletedCertificateBundle", - modelProperties: { - ...CertificateBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const DeletedCertificateItem: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateItem", - type: { - name: "Composite", - className: "DeletedCertificateItem", - modelProperties: { - ...CertificateItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const ErrorModel: coreHttp.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } - }, - innerError: { - readOnly: true, - serializedName: "innererror", - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - } -}; - -export const CertificateOperation: coreHttp.CompositeMapper = { - serializedName: "CertificateOperation", - type: { - name: "Composite", - className: "CertificateOperation", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - issuerParameters: { - serializedName: "issuer", - type: { - name: "Composite", - className: "IssuerParameters" - } - }, - csr: { - serializedName: "csr", - type: { - name: "ByteArray" - } - }, - cancellationRequested: { - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - statusDetails: { - serializedName: "status_details", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - requestId: { - serializedName: "request_id", - type: { - name: "String" - } - } - } - } -}; - -export const IssuerCredentials: coreHttp.CompositeMapper = { - serializedName: "IssuerCredentials", - type: { - name: "Composite", - className: "IssuerCredentials", - modelProperties: { - accountId: { - serializedName: "account_id", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - } - } - } -}; - -export const AdministratorDetails: coreHttp.CompositeMapper = { - serializedName: "AdministratorDetails", - type: { - name: "Composite", - className: "AdministratorDetails", - modelProperties: { - firstName: { - serializedName: "first_name", - type: { - name: "String" - } - }, - lastName: { - serializedName: "last_name", - type: { - name: "String" - } - }, - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const OrganizationDetails: coreHttp.CompositeMapper = { - serializedName: "OrganizationDetails", - type: { - name: "Composite", - className: "OrganizationDetails", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - adminDetails: { - serializedName: "admin_details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdministratorDetails" - } - } - } - } - } - } -}; - -export const IssuerAttributes: coreHttp.CompositeMapper = { - serializedName: "IssuerAttributes", - type: { - name: "Composite", - className: "IssuerAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const IssuerBundle: coreHttp.CompositeMapper = { - serializedName: "IssuerBundle", - type: { - name: "Composite", - className: "IssuerBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const Contact: coreHttp.CompositeMapper = { - serializedName: "Contact", - type: { - name: "Composite", - className: "Contact", - modelProperties: { - emailAddress: { - serializedName: "email", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - phone: { - serializedName: "phone", - type: { - name: "String" - } - } - } - } -}; - -export const Contacts: coreHttp.CompositeMapper = { - serializedName: "Contacts", - type: { - name: "Composite", - className: "Contacts", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - contactList: { - serializedName: "contacts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Contact" - } - } - } - } - } - } -}; - -export const KeyCreateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyCreateParameters", - type: { - name: "Composite", - className: "KeyCreateParameters", - modelProperties: { - kty: { - required: true, - serializedName: "kty", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - keySize: { - serializedName: "key_size", - type: { - name: "Number" - } - }, - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - curve: { - serializedName: "crv", - type: { - name: "String" - } - } - } - } -}; - -export const KeyImportParameters: coreHttp.CompositeMapper = { - serializedName: "KeyImportParameters", - type: { - name: "Composite", - className: "KeyImportParameters", - modelProperties: { - hsm: { - serializedName: "Hsm", - type: { - name: "Boolean" - } - }, - key: { - required: true, - serializedName: "key", - type: { - name: "Composite", - className: "JsonWebKey" - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyOperationsParameters: coreHttp.CompositeMapper = { - serializedName: "KeyOperationsParameters", - type: { - name: "Composite", - className: "KeyOperationsParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeySignParameters: coreHttp.CompositeMapper = { - serializedName: "KeySignParameters", - type: { - name: "Composite", - className: "KeySignParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyParameters: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyParameters", - type: { - name: "Composite", - className: "KeyVerifyParameters", - modelProperties: { - algorithm: { - required: true, - serializedName: "alg", - constraints: { - MinLength: 1 - }, - type: { - name: "String" - } - }, - digest: { - required: true, - serializedName: "digest", - type: { - name: "Base64Url" - } - }, - signature: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "KeyUpdateParameters", - type: { - name: "Composite", - className: "KeyUpdateParameters", - modelProperties: { - keyOps: { - serializedName: "key_ops", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - keyAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "KeyAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KeyRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "KeyRestoreParameters", - type: { - name: "Composite", - className: "KeyRestoreParameters", - modelProperties: { - keyBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const SecretSetParameters: coreHttp.CompositeMapper = { - serializedName: "SecretSetParameters", - type: { - name: "Composite", - className: "SecretSetParameters", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - } - } - } -}; - -export const SecretUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SecretUpdateParameters", - type: { - name: "Composite", - className: "SecretUpdateParameters", - modelProperties: { - contentType: { - serializedName: "contentType", - type: { - name: "String" - } - }, - secretAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SecretAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateCreateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateCreateParameters", - type: { - name: "Composite", - className: "CertificateCreateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateImportParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateImportParameters", - type: { - name: "Composite", - className: "CertificateImportParameters", - modelProperties: { - base64EncodedCertificate: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - password: { - serializedName: "pwd", - type: { - name: "String" - } - }, - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateUpdateParameters", - type: { - name: "Composite", - className: "CertificateUpdateParameters", - modelProperties: { - certificatePolicy: { - serializedName: "policy", - type: { - name: "Composite", - className: "CertificatePolicy" - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateMergeParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateMergeParameters", - type: { - name: "Composite", - className: "CertificateMergeParameters", - modelProperties: { - x509Certificates: { - required: true, - serializedName: "x5c", - type: { - name: "Sequence", - element: { - type: { - name: "ByteArray" - } - } - } - }, - certificateAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "CertificateAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CertificateIssuerSetParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerSetParameters", - type: { - name: "Composite", - className: "CertificateIssuerSetParameters", - modelProperties: { - provider: { - required: true, - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateIssuerUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerUpdateParameters", - type: { - name: "Composite", - className: "CertificateIssuerUpdateParameters", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - credentials: { - serializedName: "credentials", - type: { - name: "Composite", - className: "IssuerCredentials" - } - }, - organizationDetails: { - serializedName: "org_details", - type: { - name: "Composite", - className: "OrganizationDetails" - } - }, - attributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "IssuerAttributes" - } - } - } - } -}; - -export const CertificateOperationUpdateParameter: coreHttp.CompositeMapper = { - serializedName: "CertificateOperationUpdateParameter", - type: { - name: "Composite", - className: "CertificateOperationUpdateParameter", - modelProperties: { - cancellationRequested: { - required: true, - serializedName: "cancellation_requested", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyOperationResult: coreHttp.CompositeMapper = { - serializedName: "KeyOperationResult", - type: { - name: "Composite", - className: "KeyOperationResult", - modelProperties: { - kid: { - readOnly: true, - serializedName: "kid", - type: { - name: "String" - } - }, - result: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const KeyVerifyResult: coreHttp.CompositeMapper = { - serializedName: "KeyVerifyResult", - type: { - name: "Composite", - className: "KeyVerifyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Boolean" - } - } - } - } -}; - -export const KeyListResult: coreHttp.CompositeMapper = { - serializedName: "KeyListResult", - type: { - name: "Composite", - className: "KeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedKeyListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedKeyListResult", - type: { - name: "Composite", - className: "DeletedKeyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedKeyItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SecretListResult: coreHttp.CompositeMapper = { - serializedName: "SecretListResult", - type: { - name: "Composite", - className: "SecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedSecretListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSecretListResult", - type: { - name: "Composite", - className: "DeletedSecretListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedSecretItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateListResult", - type: { - name: "Composite", - className: "CertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedCertificateListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedCertificateListResult", - type: { - name: "Composite", - className: "DeletedCertificateListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedCertificateItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CertificateIssuerListResult: coreHttp.CompositeMapper = { - serializedName: "CertificateIssuerListResult", - type: { - name: "Composite", - className: "CertificateIssuerListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateIssuerItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const BackupKeyResult: coreHttp.CompositeMapper = { - serializedName: "BackupKeyResult", - type: { - name: "Composite", - className: "BackupKeyResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupSecretResult: coreHttp.CompositeMapper = { - serializedName: "BackupSecretResult", - type: { - name: "Composite", - className: "BackupSecretResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupStorageResult: coreHttp.CompositeMapper = { - serializedName: "BackupStorageResult", - type: { - name: "Composite", - className: "BackupStorageResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const PendingCertificateSigningRequestResult: coreHttp.CompositeMapper = { - serializedName: "PendingCertificateSigningRequestResult", - type: { - name: "Composite", - className: "PendingCertificateSigningRequestResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const StorageAccountAttributes: coreHttp.CompositeMapper = { - serializedName: "StorageAccountAttributes", - type: { - name: "Composite", - className: "StorageAccountAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } - } - } - } -}; - -export const StorageBundle: coreHttp.CompositeMapper = { - serializedName: "StorageBundle", - type: { - name: "Composite", - className: "StorageBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - readOnly: true, - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - readOnly: true, - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - readOnly: true, - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedStorageBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageBundle", - type: { - name: "Composite", - className: "DeletedStorageBundle", - modelProperties: { - ...StorageBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const StorageAccountCreateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountCreateParameters", - type: { - name: "Composite", - className: "StorageAccountCreateParameters", - modelProperties: { - resourceId: { - required: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - activeKeyName: { - required: true, - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - required: true, - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - storageAccountAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StorageAccountUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountUpdateParameters", - type: { - name: "Composite", - className: "StorageAccountUpdateParameters", - modelProperties: { - activeKeyName: { - serializedName: "activeKeyName", - type: { - name: "String" - } - }, - autoRegenerateKey: { - serializedName: "autoRegenerateKey", - type: { - name: "Boolean" - } - }, - regenerationPeriod: { - serializedName: "regenerationPeriod", - type: { - name: "String" - } - }, - storageAccountAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StorageAccountRegenerteKeyParameters: coreHttp.CompositeMapper = { - serializedName: "StorageAccountRegenerteKeyParameters", - type: { - name: "Composite", - className: "StorageAccountRegenerteKeyParameters", - modelProperties: { - keyName: { - required: true, - serializedName: "keyName", - type: { - name: "String" - } - } - } - } -}; - -export const StorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "StorageAccountItem", - type: { - name: "Composite", - className: "StorageAccountItem", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "StorageAccountAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedStorageAccountItem: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageAccountItem", - type: { - name: "Composite", - className: "DeletedStorageAccountItem", - modelProperties: { - ...StorageAccountItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const StorageListResult: coreHttp.CompositeMapper = { - serializedName: "StorageListResult", - type: { - name: "Composite", - className: "StorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DeletedStorageListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedStorageListResult", - type: { - name: "Composite", - className: "DeletedStorageListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedStorageAccountItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SasDefinitionAttributes: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionAttributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - created: { - readOnly: true, - serializedName: "created", - type: { - name: "UnixTime" - } - }, - updated: { - readOnly: true, - serializedName: "updated", - type: { - name: "UnixTime" - } - }, - recoveryLevel: { - nullable: false, - readOnly: true, - serializedName: "recoveryLevel", - type: { - name: "String" - } - } - } - } -}; - -export const SasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionBundle", - type: { - name: "Composite", - className: "SasDefinitionBundle", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - secretId: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - templateUri: { - readOnly: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - readOnly: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - readOnly: true, - serializedName: "validityPeriod", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedSasDefinitionBundle: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionBundle", - type: { - name: "Composite", - className: "DeletedSasDefinitionBundle", - modelProperties: { - ...SasDefinitionBundle.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const SasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionItem", - type: { - name: "Composite", - className: "SasDefinitionItem", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - secretId: { - readOnly: true, - serializedName: "sid", - type: { - name: "String" - } - }, - attributes: { - readOnly: true, - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeletedSasDefinitionItem: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionItem", - type: { - name: "Composite", - className: "DeletedSasDefinitionItem", - modelProperties: { - ...SasDefinitionItem.type.modelProperties, - recoveryId: { - serializedName: "recoveryId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", - type: { - name: "UnixTime" - } - }, - deletedDate: { - readOnly: true, - serializedName: "deletedDate", - type: { - name: "UnixTime" - } - } - } - } -}; - -export const SasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionListResult", +export const DeletedSecretListResult: coreHttp.CompositeMapper = { + serializedName: "DeletedSecretListResult", type: { name: "Composite", - className: "SasDefinitionListResult", + className: "DeletedSecretListResult", modelProperties: { value: { readOnly: true, @@ -2893,7 +397,7 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "SasDefinitionItem" + className: "DeletedSecretItem" } } } @@ -2909,125 +413,49 @@ export const SasDefinitionListResult: coreHttp.CompositeMapper = { } }; -export const DeletedSasDefinitionListResult: coreHttp.CompositeMapper = { - serializedName: "DeletedSasDefinitionListResult", +export const BackupSecretResult: coreHttp.CompositeMapper = { + serializedName: "BackupSecretResult", type: { name: "Composite", - className: "DeletedSasDefinitionListResult", + className: "BackupSecretResult", modelProperties: { value: { readOnly: true, serializedName: "value", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedSasDefinitionItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const SasDefinitionCreateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionCreateParameters", - type: { - name: "Composite", - className: "SasDefinitionCreateParameters", - modelProperties: { - templateUri: { - required: true, - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - required: true, - serializedName: "sasType", - type: { - name: "String" - } - }, - validityPeriod: { - required: true, - serializedName: "validityPeriod", - type: { - name: "String" - } - }, - sasDefinitionAttributes: { - serializedName: "attributes", - type: { - name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Base64Url" } } } } }; -export const SasDefinitionUpdateParameters: coreHttp.CompositeMapper = { - serializedName: "SasDefinitionUpdateParameters", +export const ErrorModel: coreHttp.CompositeMapper = { + serializedName: "Error", type: { name: "Composite", - className: "SasDefinitionUpdateParameters", + className: "ErrorModel", modelProperties: { - templateUri: { - serializedName: "templateUri", - type: { - name: "String" - } - }, - sasType: { - serializedName: "sasType", + code: { + readOnly: true, + serializedName: "code", type: { name: "String" } }, - validityPeriod: { - serializedName: "validityPeriod", + message: { + readOnly: true, + serializedName: "message", type: { name: "String" } }, - sasDefinitionAttributes: { - serializedName: "attributes", + innerError: { + readOnly: true, + serializedName: "innererror", type: { name: "Composite", - className: "SasDefinitionAttributes" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + className: "ErrorModel" } } } @@ -3051,37 +479,3 @@ export const KeyVaultError: coreHttp.CompositeMapper = { } } }; - -export const CertificateRestoreParameters: coreHttp.CompositeMapper = { - serializedName: "CertificateRestoreParameters", - type: { - name: "Composite", - className: "CertificateRestoreParameters", - modelProperties: { - certificateBundleBackup: { - required: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; - -export const BackupCertificateResult: coreHttp.CompositeMapper = { - serializedName: "BackupCertificateResult", - type: { - name: "Composite", - className: "BackupCertificateResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Base64Url" - } - } - } - } -}; diff --git a/sdk/keyvault/keyvault-secrets/src/core/models/parameters.ts b/sdk/keyvault/keyvault-secrets/src/core/models/parameters.ts index 7c92c284d8ee..2d3778b15915 100644 --- a/sdk/keyvault/keyvault-secrets/src/core/models/parameters.ts +++ b/sdk/keyvault/keyvault-secrets/src/core/models/parameters.ts @@ -20,91 +20,6 @@ export const apiVersion: coreHttp.OperationQueryParameter = { } } }; -export const certificateName0: coreHttp.OperationURLParameter = { - parameterPath: "certificateName", - mapper: { - required: true, - serializedName: "certificate-name", - type: { - name: "String" - } - } -}; -export const certificateName1: coreHttp.OperationURLParameter = { - parameterPath: "certificateName", - mapper: { - required: true, - serializedName: "certificate-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const certificateVersion: coreHttp.OperationURLParameter = { - parameterPath: "certificateVersion", - mapper: { - required: true, - serializedName: "certificate-version", - type: { - name: "String" - } - } -}; -export const includePending: coreHttp.OperationQueryParameter = { - parameterPath: ["options", "includePending"], - mapper: { - serializedName: "includePending", - type: { - name: "Boolean" - } - } -}; -export const issuerName: coreHttp.OperationURLParameter = { - parameterPath: "issuerName", - mapper: { - required: true, - serializedName: "issuer-name", - type: { - name: "String" - } - } -}; -export const keyName0: coreHttp.OperationURLParameter = { - parameterPath: "keyName", - mapper: { - required: true, - serializedName: "key-name", - constraints: { - Pattern: /^[0-9a-zA-Z-]+$/ - }, - type: { - name: "String" - } - } -}; -export const keyName1: coreHttp.OperationURLParameter = { - parameterPath: "keyName", - mapper: { - required: true, - serializedName: "key-name", - type: { - name: "String" - } - } -}; -export const keyVersion: coreHttp.OperationURLParameter = { - parameterPath: "keyVersion", - mapper: { - required: true, - serializedName: "key-version", - type: { - name: "String" - } - } -}; export const maxresults: coreHttp.OperationQueryParameter = { parameterPath: ["options", "maxresults"], mapper: { @@ -118,19 +33,6 @@ export const maxresults: coreHttp.OperationQueryParameter = { } } }; -export const sasDefinitionName: coreHttp.OperationURLParameter = { - parameterPath: "sasDefinitionName", - mapper: { - required: true, - serializedName: "sas-definition-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; export const secretName0: coreHttp.OperationURLParameter = { parameterPath: "secretName", mapper: { @@ -164,29 +66,6 @@ export const secretVersion: coreHttp.OperationURLParameter = { } } }; -export const storageAccountName0: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - constraints: { - Pattern: /^[0-9a-zA-Z]+$/ - }, - type: { - name: "String" - } - } -}; -export const storageAccountName1: coreHttp.OperationURLParameter = { - parameterPath: "storageAccountName", - mapper: { - required: true, - serializedName: "storage-account-name", - type: { - name: "String" - } - } -}; export const vaultBaseUrl: coreHttp.OperationURLParameter = { parameterPath: "vaultBaseUrl", mapper: { diff --git a/sdk/keyvault/keyvault-secrets/swagger/README.md b/sdk/keyvault/keyvault-secrets/swagger/README.md new file mode 100644 index 000000000000..15eadbd178ff --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/swagger/README.md @@ -0,0 +1,17 @@ +# KeyVault Secrets Swagger Configuration + +> see https://aka.ms/autorest + +``` yaml +typescript: + package-name: "@azure/keyvault-secrets" +use-extension: + "@microsoft.azure/autorest.typescript": "~5.0.1" +azure-arm: false +generate-metadata: false +add-credentials: true +license-header: MICROSOFT_MIT_NO_VERSION +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.1/secrets.json +output-folder: ../ +source-code-folder-path: ./src/core +```