Package com.ngrok.definitions
Class SshCredential
java.lang.Object
com.ngrok.definitions.SshCredential
A class encapsulating the
SshCredential
resource.-
Constructor Summary
ConstructorDescriptionSshCredential
(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, List<String> acl) Creates a new instance ofSshCredential
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAcl()
optional list of ACL rules.timestamp when the ssh credential was created, RFC 3339 formathuman-readable description of who or what will use the ssh credential to authenticate.getId()
unique ssh credential resource identifierarbitrary user-defined machine-readable data of this ssh credential.the PEM-encoded public key of the SSH keypair that will be used to authenticategetUri()
URI of the ssh credential API resourceint
hashCode()
toString()
-
Constructor Details
-
SshCredential
public SshCredential(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, List<String> acl) Creates a new instance ofSshCredential
.- Parameters:
id
- unique ssh credential resource identifieruri
- URI of the ssh credential API resourcecreatedAt
- timestamp when the ssh credential was created, RFC 3339 formatdescription
- 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.publicKey
- the PEM-encoded public key of the SSH keypair that will be used to authenticateacl
- 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.
-
-
Method Details
-
getId
unique ssh credential resource identifier- Returns:
- the value of the property as a
String
-
getUri
URI of the ssh credential API resource- Returns:
- the value of the property as a
URI
-
getCreatedAt
timestamp when the ssh credential was created, RFC 3339 format- Returns:
- the value of the property as a
OffsetDateTime
-
getDescription
human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.- Returns:
- the value of the property as a
String
-
getMetadata
arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.- Returns:
- the value of the property as a
String
-
getPublicKey
the PEM-encoded public key of the SSH keypair that will be used to authenticate- Returns:
- the value of the property as a
String
-
getAcl
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. -
equals
-
hashCode
public int hashCode() -
toString
-