/// <summary>
 /// Initializes a new instance of the <see cref="SshGenerationRequest"/> class.
 /// Use to request a new SSH Credential
 /// </summary>
 /// <param name="credentialName">Name of credential</param>
 /// <param name="parameters">Optional parameters (defaults to key length 2048 and no SSH Comment)</param>
 /// <param name="overwriteMode">Overwrite existing credential (default: no-overwrite)</param>
 public SshGenerationRequest(string credentialName, SshGenerationParameters parameters = null, OverwiteMode overwriteMode = OverwiteMode.converge)
 {
     Name       = credentialName;
     Type       = CredentialType.SSH;
     Parameters = parameters ?? _defaultParams;
     Mode       = overwriteMode;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SshGenerationRequest"/> class.
 /// Use to request a new SSH Credential
 /// </summary>
 /// <param name="credentialName">Name of credential</param>
 /// <param name="keyLength">Optional Key Length (default: 2048)</param>
 /// <param name="overwrite">Overwrite existing credential (default: false)</param>
 /// <param name="sshComment">SSH comment of generated credential value (optional)</param>
 public SshGenerationRequest(string credentialName, CertificateKeyLength keyLength = CertificateKeyLength.Length_2048, bool overwrite = false, string sshComment = null)
 {
     Name       = credentialName;
     Type       = CredentialType.SSH;
     Parameters = new SshGenerationParameters
     {
         KeyLength  = keyLength,
         SshComment = sshComment
     };
     Overwrite = overwrite;
 }