Class: Infrawrench::RunbooksRunsStepsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.runbooks.runs.steps

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ RunbooksRunsStepsNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RunbooksRunsStepsNamespace.

Parameters:



13151
13152
13153
# File 'lib/infrawrench/client.rb', line 13151

def initialize(transport)
  @transport = transport
end

Instance Method Details

#update(run_id:, step_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash

Tick a step

One targeted update on one row, so two responders working the same incident can tick different steps at the same moment without either losing the other's work.

A closed run refuses updates, and reopening is not offered: a run is a record of what happened. Start another run to record another attempt.

PATCH /api/org/orgId/runbooks/runs/runId/steps/stepId

Raises on 400: Bad request

Raises on 404: Not found

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • run_id (String)
  • step_id (String)
  • body (Hash, nil) (defaults to: nil)

    Request body, shaped as RunbookStepUpdate.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • run_id: (String)
  • step_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • body: (runbook_step_update, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as RunbookRun — see sig/infrawrench/sdk.rbs.

Raises:



13178
13179
13180
13181
13182
13183
13184
13185
13186
# File 'lib/infrawrench/client.rb', line 13178

def update(run_id:, step_id:, org_id: nil, body: nil, request_options: nil)
  @transport.request(
    http_method: "PATCH",
    path: "/api/org/{orgId}/runbooks/runs/{runId}/steps/{stepId}",
    path_params: { "orgId" => org_id, "runId" => run_id, "stepId" => step_id },
    body: body,
    request_options: request_options
  )
end