SSH Key Usage

class SSHKeyUsage(api)

Bases: _ClientWorkBase

create(name, limit_cache_size=50000, log_threshold='Info', attributes=None, get_if_already_exists=True)
Parameters
  • name (str) – The name of the client work.

  • limit_cache_size (int) – maximum items in the cache

  • log_threshold (str) – Set the logging level (defaults to INFO)

  • attributes (dict) – Additional attributes to apply to the object.

  • get_if_already_exists (bool) – If the objects already exists, just return it as is.

Returns

Config Object of the client work.

delete(work)

Deletes the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

disable(work)

Disables the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

enable(work)

Enables the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

get(name, raise_error_if_not_exists=True)
Parameters
  • name (str) – The name of the client work.

  • raise_error_if_not_exists (bool) – Raise an exception if the client work does not exist.

Returns

Config Object of the client work.

list()

Lists all client work.

Returns

List of Config Object of all client work.

schedule(work, start_time=None, daily=False, hourly=False, on_receipt=False, every_x_minutes=None, randomize_minutes=0)

Note

Only one of daily, hourly, on_receipt, or every_x_minutes can be set.

Schedules the SSH KeyUsage work to run.

Parameters
  • work (Union[config.Object, str]) – Config Object or name of the client work.

  • start_time (int) – The 24-hour UTC hour format (i.e. 20 = 8PM UTC) for the job to start.

  • daily (bool) – Runs the client work daily

  • hourly (bool) – Runs the client work hourly

  • on_receipt (bool) – Runs the client work on_receipt

  • every_x_minutes (int) – Runs the client work every: 1, 5, 15 or 30 minutes

  • randomize_minutes (int) – Randomize the given minutes for agent to send data back to the server

unschedule(work)

Removes any scheduling for the client work, but does not delete the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.