Class: Infrawrench::RunbooksRunsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::RunbooksRunsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.runbooks.runs
Instance Attribute Summary collapse
-
#steps ⇒ RunbooksRunsStepsNamespace
readonly
client.runbooks.runs.steps.
Instance Method Summary collapse
-
#close(run_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Close a run out.
-
#create(runbook_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Start performing a runbook.
-
#get(org_id: nil, runbook_id: nil, incident_id: nil, limit: nil, request_options: nil) ⇒ Hash
List runbook runs.
-
#get_org_org_id_runbooks_runs_run_id(run_id:, org_id: nil, request_options: nil) ⇒ Hash
Get one runbook run.
-
#initialize(transport) ⇒ RunbooksRunsNamespace
constructor
private
A new instance of RunbooksRunsNamespace.
Constructor Details
#initialize(transport) ⇒ RunbooksRunsNamespace
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 RunbooksRunsNamespace.
13196 13197 13198 13199 |
# File 'lib/infrawrench/client.rb', line 13196 def initialize(transport) @transport = transport @steps = RunbooksRunsStepsNamespace.new(@transport) end |
Instance Attribute Details
#steps ⇒ RunbooksRunsStepsNamespace (readonly)
Returns client.runbooks.runs.steps.
13192 13193 13194 |
# File 'lib/infrawrench/client.rb', line 13192 def steps @steps end |
Instance Method Details
#close(run_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Close a run out
Closing does not settle outstanding steps. A run completed with three steps still pending is a true and useful record — it says the incident ended before the checklist did — and quietly marking them done would erase the one thing a postmortem wants to know.
POST /api/org/orgId/runbooks/runs/runId/close
Raises on 400: Bad request
Raises on 404: Not found
Raises on 409: Conflict
13223 13224 13225 13226 13227 13228 13229 13230 13231 |
# File 'lib/infrawrench/client.rb', line 13223 def close(run_id:, org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/runbooks/runs/{runId}/close", path_params: { "orgId" => org_id, "runId" => run_id }, body: body, request_options: ) end |
#create(runbook_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Start performing a runbook
Copies every step's title and kind into the run, so the record of what somebody was asked to do survives the runbook being rewritten next week.
Takes resources:read, like ticking a step: performing a checklist is not
an act of configuration, and requiring an admin mid-incident is how a team
stops using it. Deliberately not deduplicated against a run already in
progress — performing the failover twice in one incident is a real thing,
and refusing the second would mean it goes unrecorded rather than not
happening.
POST /api/org/orgId/runbooks/runbookId/runs
Raises on 400: Bad request
Raises on 404: Not found
13258 13259 13260 13261 13262 13263 13264 13265 13266 |
# File 'lib/infrawrench/client.rb', line 13258 def create(runbook_id:, org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/runbooks/{runbookId}/runs", path_params: { "orgId" => org_id, "runbookId" => runbook_id }, body: body, request_options: ) end |
#get(org_id: nil, runbook_id: nil, incident_id: nil, limit: nil, request_options: nil) ⇒ Hash
List runbook runs
Newest first, optionally narrowed to one runbook or one incident.
GET /api/org/orgId/runbooks/runs
Raises on 400: Bad request
13284 13285 13286 13287 13288 13289 13290 13291 13292 |
# File 'lib/infrawrench/client.rb', line 13284 def get(org_id: nil, runbook_id: nil, incident_id: nil, limit: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/runbooks/runs", path_params: { "orgId" => org_id }, query: { "runbookId" => runbook_id, "incidentId" => incident_id, "limit" => limit }, request_options: ) end |
#get_org_org_id_runbooks_runs_run_id(run_id:, org_id: nil, request_options: nil) ⇒ Hash
Get one runbook run
GET /api/org/orgId/runbooks/runs/runId
Raises on 404: Not found
13306 13307 13308 13309 13310 13311 13312 13313 |
# File 'lib/infrawrench/client.rb', line 13306 def get_org_org_id_runbooks_runs_run_id(run_id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/runbooks/runs/{runId}", path_params: { "orgId" => org_id, "runId" => run_id }, request_options: ) end |