/// <summary> /// Initializes a new instance of the CertificateImportParameters /// class. /// </summary> /// <param name="base64EncodedCertificate">Base64 encoded /// representation of the certificate object to import. This /// certificate needs to contain the private key.</param> /// <param name="password">If the private key in /// base64EncodedCertificate is encrypted, the password used for /// encryption</param> /// <param name="certificatePolicy">The management policy for the /// certificate</param> /// <param name="certificateAttributes">The attributes of the /// certificate (optional)</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> public CertificateImportParameters(string base64EncodedCertificate, string password = default(string), CertificatePolicy certificatePolicy = default(CertificatePolicy), CertificateAttributes certificateAttributes = default(CertificateAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { Base64EncodedCertificate = base64EncodedCertificate; Password = password; CertificatePolicy = certificatePolicy; CertificateAttributes = certificateAttributes; Tags = tags; }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Base64EncodedCertificate == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Base64EncodedCertificate"); } if (CertificatePolicy != null) { CertificatePolicy.Validate(); } }
/// <summary> /// Initializes a new instance of the CertificateBundle class. /// </summary> /// <param name="id">The certificate id</param> /// <param name="kid">The key id</param> /// <param name="sid">The secret id</param> /// <param name="x509Thumbprint">Thumbprint of the certificate.</param> /// <param name="policy">The management policy.</param> /// <param name="cer">CER contents of x509 certificate.</param> /// <param name="contentType">The content type of the secret</param> /// <param name="attributes">The certificate attributes.</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> public CertificateBundle(string id = default(string), string kid = default(string), string sid = default(string), byte[] x509Thumbprint = default(byte[]), CertificatePolicy policy = default(CertificatePolicy), byte[] cer = default(byte[]), string contentType = default(string), CertificateAttributes attributes = default(CertificateAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { Id = id; Kid = kid; Sid = sid; X509Thumbprint = x509Thumbprint; Policy = policy; Cer = cer; ContentType = contentType; Attributes = attributes; Tags = tags; }
/// <summary> /// Initializes a new instance of the CertificateUpdateParameters /// class. /// </summary> /// <param name="certificatePolicy">The management policy for the /// certificate</param> /// <param name="certificateAttributes">The attributes of the /// certificate (optional)</param> /// <param name="tags">Application-specific metadata in the form of /// key-value pairs</param> public CertificateUpdateParameters(CertificatePolicy certificatePolicy = default(CertificatePolicy), CertificateAttributes certificateAttributes = default(CertificateAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>)) { CertificatePolicy = certificatePolicy; CertificateAttributes = certificateAttributes; Tags = tags; }
/// <summary> /// Initializes a new instance of the DeletedCertificateBundle class. /// </summary> /// <param name="id">The certificate id.</param> /// <param name="kid">The key id.</param> /// <param name="sid">The secret id.</param> /// <param name="x509Thumbprint">Thumbprint of the certificate.</param> /// <param name="policy">The management policy.</param> /// <param name="cer">CER contents of x509 certificate.</param> /// <param name="contentType">The content type of the secret.</param> /// <param name="attributes">The certificate attributes.</param> /// <param name="tags">Application specific metadata in the form of /// key-value pairs</param> /// <param name="recoveryId">The url of the recovery object, used to /// identify and recover the deleted certificate.</param> /// <param name="scheduledPurgeDate">The time when the certificate is /// scheduled to be purged, in UTC</param> /// <param name="deletedDate">The time when the certificate was /// deleted, in UTC</param> public DeletedCertificateBundle(string id = default(string), string kid = default(string), string sid = default(string), byte[] x509Thumbprint = default(byte[]), CertificatePolicy policy = default(CertificatePolicy), byte[] cer = default(byte[]), string contentType = default(string), CertificateAttributes attributes = default(CertificateAttributes), IDictionary <string, string> tags = default(IDictionary <string, string>), string recoveryId = default(string), System.DateTime?scheduledPurgeDate = default(System.DateTime?), System.DateTime?deletedDate = default(System.DateTime?)) : base(id, kid, sid, x509Thumbprint, policy, cer, contentType, attributes, tags) { RecoveryId = recoveryId; ScheduledPurgeDate = scheduledPurgeDate; DeletedDate = deletedDate; CustomInit(); }