Class SshCredential

java.lang.Object
com.ngrok.definitions.SshCredential

public class SshCredential extends Object
A class encapsulating the SshCredential resource.
  • Constructor Details

    • SshCredential

      public SshCredential(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, List<String> acl)
      Creates a new instance of SshCredential.
      Parameters:
      id - unique ssh credential resource identifier
      uri - URI of the ssh credential API resource
      createdAt - timestamp when the ssh credential was created, RFC 3339 format
      description - human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
      metadata - arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
      publicKey - the PEM-encoded public key of the SSH keypair that will be used to authenticate
      acl - optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
  • Method Details

    • getId

      public String getId()
      unique ssh credential resource identifier
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the ssh credential API resource
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the ssh credential was created, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getDescription

      public String getDescription()
      human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
      Returns:
      the value of the property as a String
    • getPublicKey

      public String getPublicKey()
      the PEM-encoded public key of the SSH keypair that will be used to authenticate
      Returns:
      the value of the property as a String
    • getAcl

      public List<String> getAcl()
      optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
      Returns:
      the value of the property as a List of String
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object