Class SshHostCertificates.CreateCallBuilder

java.lang.Object
com.ngrok.services.SshHostCertificates.CreateCallBuilder
Enclosing class:
SshHostCertificates

public class SshHostCertificates.CreateCallBuilder extends Object
A builder object encapsulating state for an unsent Create API call.
  • Method Details

    • principals

      public SshHostCertificates.CreateCallBuilder principals(List<String> principals)
      the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts.
      Parameters:
      principals - the value of the principals parameter as a List of String
      Returns:
      the call builder instance
    • principals

      public SshHostCertificates.CreateCallBuilder principals(Optional<List<String>> principals)
      the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts.
      Parameters:
      principals - the value of the principals parameter as an Optional of List of String
      Returns:
      the call builder instance
    • validAfter

      public SshHostCertificates.CreateCallBuilder validAfter(OffsetDateTime validAfter)
      The time when the host certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified.
      Parameters:
      validAfter - the value of the valid_after parameter as a OffsetDateTime
      Returns:
      the call builder instance
    • validAfter

      The time when the host certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified.
      Parameters:
      validAfter - the value of the valid_after parameter as an Optional of OffsetDateTime
      Returns:
      the call builder instance
    • validUntil

      public SshHostCertificates.CreateCallBuilder validUntil(OffsetDateTime validUntil)
      The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of one year in the future will be used. The OpenSSH certificates RFC calls this valid_before.
      Parameters:
      validUntil - the value of the valid_until parameter as a OffsetDateTime
      Returns:
      the call builder instance
    • validUntil

      The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of one year in the future will be used. The OpenSSH certificates RFC calls this valid_before.
      Parameters:
      validUntil - the value of the valid_until parameter as an Optional of OffsetDateTime
      Returns:
      the call builder instance
    • description

      public SshHostCertificates.CreateCallBuilder description(String description)
      human-readable description of this SSH Host Certificate. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as a String
      Returns:
      the call builder instance
    • description

      public SshHostCertificates.CreateCallBuilder description(Optional<String> description)
      human-readable description of this SSH Host Certificate. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as an Optional of String
      Returns:
      the call builder instance
    • metadata

      public SshHostCertificates.CreateCallBuilder metadata(String metadata)
      arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as a String
      Returns:
      the call builder instance
    • metadata

      arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as an Optional of String
      Returns:
      the call builder instance
    • call

      Initiates the API call asynchronously.
      Returns:
      a CompletionStage of SshHostCertificate
    • blockingCall

      public SshHostCertificate blockingCall() throws InterruptedException
      Initiates the API call and blocks until it returns.
      Returns:
      SshHostCertificate
      Throws:
      InterruptedException - if the thread was interrupted during the call