Package com.ngrok.services
Class SshCredentials.CreateCallBuilder
java.lang.Object
com.ngrok.services.SshCredentials.CreateCallBuilder
- Enclosing class:
- SshCredentials
A builder object encapsulating state for an unsent Create API call.
-
Method Summary
Modifier and TypeMethodDescriptionoptional list of ACL rules.optional list of ACL rules.Initiates the API call and blocks until it returns.call()
Initiates the API call asynchronously.description
(String description) human-readable description of who or what will use the ssh credential to authenticate.description
(Optional<String> description) human-readable description of who or what will use the ssh credential to authenticate.arbitrary user-defined machine-readable data of this ssh credential.arbitrary user-defined machine-readable data of this ssh credential.
-
Method Details
-
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 aString
- Returns:
- the call builder instance
-
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.- 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 credential. Optional, max 4096 bytes. -
acl
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is thebind
rule. Thebind
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 rulebind: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 ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. -
acl
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is thebind
rule. Thebind
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 rulebind: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 ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. -
call
Initiates the API call asynchronously.- Returns:
- a
CompletionStage
ofSshCredential
-
blockingCall
Initiates the API call and blocks until it returns.- Returns:
SshCredential
- Throws:
InterruptedException
- if the thread was interrupted during the call
-