Package com.ngrok.services

# Class SshUserCertificates.CreateCallBuilder

java.lang.Object
com.ngrok.services.SshUserCertificates.CreateCallBuilder

Enclosing class:
  SshUserCertificates

public class SshUserCertificates.CreateCallBuilder extends Object
A builder object encapsulating state for an unsent Create API call.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SshUserCertificate`
  `blockingCall()`
  Initiates the API call and blocks until it returns.
  `CompletionStage<SshUserCertificate>`
  `call()`
  Initiates the API call asynchronously.
  `SshUserCertificates.CreateCallBuilder`
  `criticalOptions(Map<String,String> criticalOptions)`
  A map of critical options included in the certificate.
  `SshUserCertificates.CreateCallBuilder`
  `criticalOptions(Optional<Map<String,String>> criticalOptions)`
  A map of critical options included in the certificate.
  `SshUserCertificates.CreateCallBuilder`
  `description(String description)`
  human-readable description of this SSH User Certificate.
  `SshUserCertificates.CreateCallBuilder`
  `description(Optional<String> description)`
  human-readable description of this SSH User Certificate.
  `SshUserCertificates.CreateCallBuilder`
  `extensions(Map<String,String> extensions)`
  A map of extensions included in the certificate.
  `SshUserCertificates.CreateCallBuilder`
  `extensions(Optional<Map<String,String>> extensions)`
  A map of extensions included in the certificate.
  `SshUserCertificates.CreateCallBuilder`
  `metadata(String metadata)`
  arbitrary user-defined machine-readable data of this SSH User Certificate.
  `SshUserCertificates.CreateCallBuilder`
  `metadata(Optional<String> metadata)`
  arbitrary user-defined machine-readable data of this SSH User Certificate.
  `SshUserCertificates.CreateCallBuilder`
  `principals(List<String> principals)`
  the list of principals included in the ssh user certificate.
  `SshUserCertificates.CreateCallBuilder`
  `principals(Optional<List<String>> principals)`
  the list of principals included in the ssh user certificate.
  `SshUserCertificates.CreateCallBuilder`
  `validAfter(OffsetDateTime validAfter)`
  The time when the user certificate becomes valid, in RFC 3339 format.
  `SshUserCertificates.CreateCallBuilder`
  `validAfter(Optional<OffsetDateTime> validAfter)`
  The time when the user certificate becomes valid, in RFC 3339 format.
  `SshUserCertificates.CreateCallBuilder`
  `validUntil(OffsetDateTime validUntil)`
  The time when this host certificate becomes invalid, in RFC 3339 format.
  `SshUserCertificates.CreateCallBuilder`
  `validUntil(Optional<OffsetDateTime> validUntil)`
  The time when this host certificate becomes invalid, in RFC 3339 format.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### principals

    public SshUserCertificates.CreateCallBuilder principals(List<String> principals)
    the list of principals included in the ssh user certificate. This is the list of usernames that the certificate holder may sign in as on a machine authorizing the signing certificate authority. Dangerously, if no principals are specified, this certificate may be used to log in as any user.
    Parameters:
      `principals` - the value of the principals parameter as a `List` of `String`
    Returns:
      the call builder instance

  - ### principals

    public SshUserCertificates.CreateCallBuilder principals(Optional<List<String>> principals)
    the list of principals included in the ssh user certificate. This is the list of usernames that the certificate holder may sign in as on a machine authorizing the signing certificate authority. Dangerously, if no principals are specified, this certificate may be used to log in as any user.
    Parameters:
      `principals` - the value of the principals parameter as an `Optional` of `List` of `String`
    Returns:
      the call builder instance

  - ### criticalOptions

    public SshUserCertificates.CreateCallBuilder criticalOptions(Map<String,String> criticalOptions)
    A map of critical options included in the certificate. Only two critical options are currently defined by OpenSSH: `force-command` and `source-address`. See the OpenSSH certificate protocol spec for additional details.
    Parameters:
      `criticalOptions` - the value of the critical_options parameter as a `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### criticalOptions

    public SshUserCertificates.CreateCallBuilder criticalOptions(Optional<Map<String,String>> criticalOptions)
    A map of critical options included in the certificate. Only two critical options are currently defined by OpenSSH: `force-command` and `source-address`. See the OpenSSH certificate protocol spec for additional details.
    Parameters:
      `criticalOptions` - the value of the critical_options parameter as an `Optional` of `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### extensions

    public SshUserCertificates.CreateCallBuilder extensions(Map<String,String> extensions)
    A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map: `{"permit-pty": "", "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions. See the OpenSSH certificate protocol spec for additional details.
    Parameters:
      `extensions` - the value of the extensions parameter as a `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### extensions

    public SshUserCertificates.CreateCallBuilder extensions(Optional<Map<String,String>> extensions)
    A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map: `{"permit-pty": "", "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions. See the OpenSSH certificate protocol spec for additional details.
    Parameters:
      `extensions` - the value of the extensions parameter as an `Optional` of `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### validAfter

    public SshUserCertificates.CreateCallBuilder validAfter(OffsetDateTime validAfter)
    The time when the user 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

    public SshUserCertificates.CreateCallBuilder validAfter(Optional<OffsetDateTime> validAfter)
    The time when the user 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 SshUserCertificates.CreateCallBuilder validUntil(OffsetDateTime validUntil)
    The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of 24 hours 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

    public SshUserCertificates.CreateCallBuilder validUntil(Optional<OffsetDateTime> validUntil)
    The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of 24 hours 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 SshUserCertificates.CreateCallBuilder description(String description)
    human-readable description of this SSH User Certificate. optional, max 255 bytes.
    Parameters:
      `description` - the value of the description parameter as a `String`
    Returns:
      the call builder instance

  - ### description

    public SshUserCertificates.CreateCallBuilder description(Optional<String> description)
    human-readable description of this SSH User 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 SshUserCertificates.CreateCallBuilder metadata(String metadata)
    arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes.
    Parameters:
      `metadata` - the value of the metadata parameter as a `String`
    Returns:
      the call builder instance

  - ### metadata

    public SshUserCertificates.CreateCallBuilder metadata(Optional<String> metadata)
    arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes.
    Parameters:
      `metadata` - the value of the metadata parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### call

    public CompletionStage<SshUserCertificate> call()
    Initiates the API call asynchronously.
    Returns:
      a `CompletionStage` of `SshUserCertificate`

  - ### blockingCall

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