SshClient
Source: src/services/ssh.ts
Signature
Section titled “Signature”SshClient(transport: Leap0Transport)Overview
Section titled “Overview”Manages SSH access credentials for a sandbox.
Throws
Section titled “Throws”Leap0Error: If API calls or response validation fail.
Methods
Section titled “Methods”createAccess
Section titled “createAccess”async createAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<SshAccess>Creates SSH credentials for a sandbox.
Parameters
Section titled “Parameters”sandbox: Sandbox ID or sandbox-like object.options: Optional request settings such as timeout and query params.
Returns
Section titled “Returns”- The generated SSH access payload.
deleteAccess
Section titled “deleteAccess”async deleteAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<void>Deletes the active SSH credentials for a sandbox.
Parameters
Section titled “Parameters”sandbox: Sandbox ID or sandbox-like object.options: Optional request settings such as timeout and query params.
validateAccess
Section titled “validateAccess”async validateAccess(sandbox: SandboxRef, accessId: string, password: string, options: RequestOptions = {}): Promise<SshValidation>Verifies a previously issued SSH credential pair.
Parameters
Section titled “Parameters”sandbox: Sandbox ID or sandbox-like object.accessId: The SSH access ID to validate.password: The password returned when the access credential was created.options: Optional request settings such as timeout and query params.
Returns
Section titled “Returns”- The validation result.
regenerateAccess
Section titled “regenerateAccess”async regenerateAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<SshAccess>Rotates SSH credentials for a sandbox.
Parameters
Section titled “Parameters”sandbox: Sandbox ID or sandbox-like object.options: Optional request settings such as timeout and query params.
Returns
Section titled “Returns”- The newly generated SSH access payload.