/// <summary> /// Initializes a new instance of the KeyBundle class. /// </summary> /// <param name="key">The Json web key</param> /// <param name="attributes">The key management attributes</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> /// <param name="managed">True if the key's lifetime is managed by key /// vault i.e. if this is a key backing a certificate, then managed /// will be true.</param> public KeyBundle(JsonWebKey key = default(JsonWebKey), KeyAttributes attributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), bool?managed = default(bool?)) { Key = key; Attributes = attributes; Tags = tags; Managed = managed; }
/// <summary> /// Initializes a new instance of the KeyImportParameters class. /// </summary> /// <param name="key">The Json web key</param> /// <param name="hsm">Whether to import as a hardware key (HSM) or /// software key</param> /// <param name="keyAttributes">The key management attributes</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> public KeyImportParameters(JsonWebKey key, bool?hsm = default(bool?), KeyAttributes keyAttributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { Hsm = hsm; Key = key; KeyAttributes = keyAttributes; Tags = tags; }
/// <summary> /// Initializes a new instance of the KeyItem class. /// </summary> /// <param name="kid">Key Identifier</param> /// <param name="attributes">The key management attributes</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> /// <param name="managed">True if the key's lifetime is managed by key /// vault i.e. if this is a key backing a certificate, then managed /// will be true.</param> public KeyItem(string kid = default(string), KeyAttributes attributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), bool?managed = default(bool?)) { Kid = kid; Attributes = attributes; Tags = tags; Managed = managed; }
/// <summary> /// Initializes a new instance of the KeyUpdateParameters class. /// </summary> /// <param name="keyOps">Json web key operations. For more information /// on possible key operations, see Microsoft.Azure.KeyVault.WebKey.JsonWebKeyOperation.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs.</param> public KeyUpdateParameters(IList <string> keyOps = default(IList <string>), KeyAttributes keyAttributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { KeyOps = keyOps; KeyAttributes = keyAttributes; Tags = tags; CustomInit(); }
/// <summary> /// Initializes a new instance of the KeyImportParameters class. /// </summary> /// <param name="key">The Json web key</param> /// <param name="hsm">Whether to import as a hardware key (HSM) or /// software key.</param> /// <param name="keyAttributes">The key management attributes.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs.</param> public KeyImportParameters(Microsoft.Azure.KeyVault.WebKey.JsonWebKey key, bool?hsm = default(bool?), KeyAttributes keyAttributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { Hsm = hsm; Key = key; KeyAttributes = keyAttributes; Tags = tags; CustomInit(); }
/// <summary> /// Initializes a new instance of the KeyBundle class. /// </summary> /// <param name="key">The Json web key.</param> /// <param name="attributes">The key management attributes.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs.</param> /// <param name="managed">True if the key's lifetime is managed by key /// vault. If this is a key backing a certificate, then managed will be /// true.</param> public KeyBundle(Microsoft.Azure.KeyVault.WebKey.JsonWebKey key = default(Microsoft.Azure.KeyVault.WebKey.JsonWebKey), KeyAttributes attributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), bool?managed = default(bool?)) { Key = key; Attributes = attributes; Tags = tags; Managed = managed; CustomInit(); }
/// <summary> /// Initializes a new instance of the DeletedKeyItem class. /// </summary> /// <param name="kid">Key identifier.</param> /// <param name="attributes">The key management attributes.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs.</param> /// <param name="managed">True if the key's lifetime is managed by key /// vault. If this is a key backing a certificate, then managed will be /// true.</param> /// <param name="recoveryId">The url of the recovery object, used to /// identify and recover the deleted key.</param> /// <param name="scheduledPurgeDate">The time when the key is scheduled /// to be purged, in UTC</param> /// <param name="deletedDate">The time when the key was deleted, in /// UTC</param> public DeletedKeyItem(string kid = default(string), KeyAttributes attributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), bool?managed = default(bool?), string recoveryId = default(string), System.DateTime?scheduledPurgeDate = default(System.DateTime?), System.DateTime?deletedDate = default(System.DateTime?)) : base(kid, attributes, tags, managed) { RecoveryId = recoveryId; ScheduledPurgeDate = scheduledPurgeDate; DeletedDate = deletedDate; CustomInit(); }
/// <summary> /// Initializes a new instance of the KeyCreateParameters class. /// </summary> /// <param name="kty">The type of key to create. Valid key types, see /// JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic /// Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', /// 'RSA-HSM', 'oct'</param> /// <param name="keySize">The key size in bytes. e.g. 1024 or /// 2048.</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> public KeyCreateParameters(string kty, int?keySize = default(int?), IList <string> keyOps = default(IList <string>), KeyAttributes keyAttributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { Kty = kty; KeySize = keySize; KeyOps = keyOps; KeyAttributes = keyAttributes; Tags = tags; }
/// <summary> /// New key identity using KeyVaultClient. /// </summary> /// <returns></returns> public static KeyIdentifier GenerateVaultKey(Vault vault, string keyName) { string vaultUri = vault.Properties.VaultUri; var attributes = new Microsoft.Azure.KeyVault.Models.KeyAttributes(); var createdKey = KeyVaultClient.CreateKeyAsync(vaultUri, keyName, Microsoft.Azure.KeyVault.WebKey.JsonWebKeyType.Rsa, keyOps: Microsoft.Azure.KeyVault.WebKey.JsonWebKeyOperation.AllOperations).GetAwaiter().GetResult(); return(new KeyIdentifier(createdKey.Key.Kid)); }
/// <summary> /// Initializes a new instance of the DeletedKeyBundle class. /// </summary> /// <param name="key">The Json web key.</param> /// <param name="attributes">The key management attributes.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs.</param> /// <param name="managed">True if the key's lifetime is managed by key /// vault. If this is a key backing a certificate, then managed will be /// true.</param> /// <param name="recoveryId">The url of the recovery object, used to /// identify and recover the deleted key.</param> /// <param name="scheduledPurgeDate">The time when the key is scheduled /// to be purged, in UTC</param> /// <param name="deletedDate">The time when the key was deleted, in /// UTC</param> public DeletedKeyBundle(Microsoft.Azure.KeyVault.WebKey.JsonWebKey key = default(Microsoft.Azure.KeyVault.WebKey.JsonWebKey), KeyAttributes attributes = default(KeyAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), bool?managed = default(bool?), string recoveryId = default(string), System.DateTime?scheduledPurgeDate = default(System.DateTime?), System.DateTime?deletedDate = default(System.DateTime?)) : base(key, attributes, tags, managed) { RecoveryId = recoveryId; ScheduledPurgeDate = scheduledPurgeDate; DeletedDate = deletedDate; CustomInit(); }