Package com.ngrok.services

# Class SshCredentials.CreateCallBuilder

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

Enclosing class:
  SshCredentials

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SshCredentials.CreateCallBuilder`
  `acl(List<String> acl)`
  optional list of ACL rules.
  `SshCredentials.CreateCallBuilder`
  `acl(Optional<List<String>> acl)`
  optional list of ACL rules.
  `SshCredential`
  `blockingCall()`
  Initiates the API call and blocks until it returns.
  `CompletionStage<SshCredential>`
  `call()`
  Initiates the API call asynchronously.
  `SshCredentials.CreateCallBuilder`
  `description(String description)`
  human-readable description of who or what will use the ssh credential to authenticate.
  `SshCredentials.CreateCallBuilder`
  `description(Optional<String> description)`
  human-readable description of who or what will use the ssh credential to authenticate.
  `SshCredentials.CreateCallBuilder`
  `metadata(String metadata)`
  arbitrary user-defined machine-readable data of this ssh credential.
  `SshCredentials.CreateCallBuilder`
  `metadata(Optional<String> metadata)`
  arbitrary user-defined machine-readable data of this ssh credential.

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

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

- ## Method Details

  - ### description

    public SshCredentials.CreateCallBuilder description(String description)
    human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
    Parameters:
      `description` - the value of the description parameter as a `String`
    Returns:
      the call builder instance

  - ### description

    public SshCredentials.CreateCallBuilder description(Optional<String> description)
    human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
    Parameters:
      `description` - the value of the description parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### metadata

    public SshCredentials.CreateCallBuilder metadata(String metadata)
    arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
    Parameters:
      `metadata` - the value of the metadata parameter as a `String`
    Returns:
      the call builder instance

  - ### metadata

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

  - ### acl

    public SshCredentials.CreateCallBuilder acl(List<String> 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.
    Parameters:
      `acl` - the value of the acl parameter as a `List` of `String`
    Returns:
      the call builder instance

  - ### acl

    public SshCredentials.CreateCallBuilder acl(Optional<List<String>> 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.
    Parameters:
      `acl` - the value of the acl parameter as an `Optional` of `List` of `String`
    Returns:
      the call builder instance

  - ### call

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

  - ### blockingCall

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