Constructor.
the command
Optionaldata: anyoptional data to associate with the command
Get the command.
the command
Get the optional data.
the data, or undefined
Get this object as a standard JSON encoded string value.
This method calls Domain.SshCommand#toJsonObject and then turns that into a JSON string.
the JSON encoded string
Get this object in standard JSON form.
An example result looks like this:
{
"cmd": "attach-ssh",
"data": {"foo": "bar"}
}
If the data value has a toJsonObject() function, that will be invoked
and used in the result. Otherwise the data value will be included as-is.
an object, ready for JSON encoding
StaticattachCreate a new attach-ssh command instance
a pre-computed SNWS2 authorization header, which must match
exactly a GET request to the /solaruser/api/v1/sec/nodes/meta/:nodeId
path using the provided authorization date and, node ID.
the date used in the authorization value
the SSH username to use
the SSH password to use
OptionalterminalSettings: SshTerminalSettingsoptional terminal settings to use
StaticfromParse a JSON string into a Domain.SshCommand instance.
The JSON must be encoded the same way Domain.SshCommand#toJsonEncoding does.
the JSON to parse
OptionaldataDecodeFn: (obj: any) => anyan optional function to decode the obj.data property with
the new instance, or undefined if json is undefined
StaticfromCreate a new instance from an object in standard JSON form.
The object must be in the same style as Domain.SshCommand#toJsonObject produces.
the object in standard JSON form
OptionaldataDecodeFn: (obj: any) => anyan optional function to decode the obj.data property with
the new instance, or undefined if obj is undefined
A command with data.