Package com.ngrok.services
Class SshHostCertificates.CreateCallBuilder
java.lang.Object
com.ngrok.services.SshHostCertificates.CreateCallBuilder
- Enclosing class:
- SshHostCertificates
A builder object encapsulating state for an unsent Create API call.
-
Method Summary
Modifier and TypeMethodDescriptionInitiates the API call and blocks until it returns.call()
Initiates the API call asynchronously.description
(String description) human-readable description of this SSH Host Certificate.description
(Optional<String> description) human-readable description of this SSH Host Certificate.arbitrary user-defined machine-readable data of this SSH Host Certificate.arbitrary user-defined machine-readable data of this SSH Host Certificate.principals
(List<String> principals) the list of principals included in the ssh host certificate.principals
(Optional<List<String>> principals) the list of principals included in the ssh host certificate.validAfter
(OffsetDateTime validAfter) The time when the host certificate becomes valid, in RFC 3339 format.validAfter
(Optional<OffsetDateTime> validAfter) The time when the host certificate becomes valid, in RFC 3339 format.validUntil
(OffsetDateTime validUntil) The time when this host certificate becomes invalid, in RFC 3339 format.validUntil
(Optional<OffsetDateTime> validUntil) The time when this host certificate becomes invalid, in RFC 3339 format.
-
Method Details
-
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. -
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. -
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 aOffsetDateTime
- 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 anOptional
ofOffsetDateTime
- 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 thisvalid_before
.- Parameters:
validUntil
- the value of the valid_until parameter as aOffsetDateTime
- 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 thisvalid_before
.- Parameters:
validUntil
- the value of the valid_until parameter as anOptional
ofOffsetDateTime
- Returns:
- the call builder instance
-
description
human-readable description of this SSH Host Certificate. optional, max 255 bytes.- Parameters:
description
- the value of the description parameter as aString
- Returns:
- the call builder instance
-
description
human-readable description of this SSH Host Certificate. optional, max 255 bytes. -
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 aString
- Returns:
- the call builder instance
-
metadata
arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes. -
call
Initiates the API call asynchronously.- Returns:
- a
CompletionStage
ofSshHostCertificate
-
blockingCall
Initiates the API call and blocks until it returns.- Returns:
SshHostCertificate
- Throws:
InterruptedException
- if the thread was interrupted during the call
-