importKey(name, key, options) {
        let unflattenedOptions = {};
        if (options) {
            const { enabled, notBefore, expiresOn: expires, hardwareProtected: hsm } = options, remainingOptions = tslib.__rest(options, ["enabled", "notBefore", "expiresOn", "hardwareProtected"]);
            unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
                    enabled,
                    notBefore,
                    expires,
                    hsm
                } });
        }
        return withTrace$4(`importKey`, unflattenedOptions, async (updatedOptions) => {
            const response = await this.client.importKey(this.vaultUrl, name, key, updatedOptions);
            return getKeyFromKeyBundle(response);
        });
    }
/**
     * 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.
     *
     * Example usage:
     * ```ts
     * let client = new KeyClient(url, credentials);
     * // Key contents in myKeyContents
     * let result = await client.importKey("MyKey", myKeyContents);
     * ```
     * Imports an externally created key, stores it, and returns key parameters and properties
     * to the client.
     * @param name - Name for the imported key.
     * @param key - The JSON web key.
     * @param options - The optional parameters.
     */
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.


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 .
importKey(name, key, options) {
        let unflattenedOptions = {};
        if (options) {
            const { enabled, notBefore, expiresOn: expires, hardwareProtected: hsm } = options, remainingOptions = tslib.__rest(options, ["enabled", "notBefore", "expiresOn", "hardwareProtected"]);
            unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
                    enabled,
                    notBefore,
                    expires,
                    hsm
                } });
        }
        return withTrace$4(`importKey`, unflattenedOptions, async (updatedOptions) => {
            const response = await this.client.importKey(this.vaultUrl, name, key, updatedOptions);
            return getKeyFromKeyBundle(response);
        });
    }
importKey ( name , key , options ) { let unflattenedOptions = { } ; if ( options ) { const { enabled , notBefore , expiresOn : expires , hardwareProtected : hsm } = options , remainingOptions = tslib . __rest ( options , [ "enabled" , "notBefore" , "expiresOn" , "hardwareProtected" ] ) ; unflattenedOptions = Object . assign ( Object . assign ( { } , remainingOptions ) , { keyAttributes : { enabled , notBefore , expires , hsm } } ) ; } return withTrace$4 ( ` ` , unflattenedOptions , async ( updatedOptions ) => { const response = await this . client . importKey ( this . vaultUrl , name , key , updatedOptions ) ; return getKeyFromKeyBundle ( response ) ; } ) ; }
The import key operation may be used to import any key type into an Azure Key Vault.
The import key operation may be used to import any key type into an Azure Key Vault .