Class SshConfiguration

java.lang.Object
com.google.jenkins.plugins.computeengine.SshConfiguration
All Implemented Interfaces:
Describable<SshConfiguration>, Serializable

public class SshConfiguration extends Object implements Describable<SshConfiguration>, Serializable
Class to contain information needed to configure and access SSH Credential information if custom private SSH key option is selected. This avoids passing in several parameters between multiple classes and also isolates logic in accessing credentials.
See Also:
  • Constructor Details

    • SshConfiguration

      @DataBoundConstructor public SshConfiguration()
    • SshConfiguration

      public SshConfiguration(String customPrivateKeyCredentialsId)
  • Method Details

    • getCustomPrivateKeyCredentials

      public static com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey getCustomPrivateKeyCredentials(String id)
      Returns the SSH private key if a custom SSH Credential is selected.
      Parameters:
      id - private key id from selected credential
      Returns:
      SSH private key in plain text to use for SSH
    • getDescriptor

      public Descriptor<SshConfiguration> getDescriptor()
      Specified by:
      getDescriptor in interface Describable<SshConfiguration>
    • builder

      public static SshConfiguration.Builder builder()
    • getCustomPrivateKeyCredentialsId

      public String getCustomPrivateKeyCredentialsId()
    • setCustomPrivateKeyCredentialsId

      @DataBoundSetter public void setCustomPrivateKeyCredentialsId(String customPrivateKeyCredentialsId)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object