Class: Infrawrench::RunbooksGetNamespace

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

Overview

client.runbooks.get

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ RunbooksGetNamespace

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 RunbooksGetNamespace.

Parameters:



13099
13100
13101
# File 'lib/infrawrench/client.rb', line 13099

def initialize(transport)
  @transport = transport
end

Instance Method Details

#get(org_id: nil, request_options: nil) ⇒ Hash

List the organization's runbooks

Every runbook, with how many times each has been run and when it was last used. Reading takes resources:read: the person who can see the infrastructure is the person who will be woken up about it.

GET /api/org/orgId/runbooks

Parameters:

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

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

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

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

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

Returns:

  • (Hash)

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

Raises:



13116
13117
13118
13119
13120
13121
13122
13123
# File 'lib/infrawrench/client.rb', line 13116

def get(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/runbooks",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end

#get_org_org_id_runbooks_runbook_id(runbook_id:, org_id: nil, request_options: nil) ⇒ Hash

Get one runbook

GET /api/org/orgId/runbooks/runbookId

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.

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

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

  • runbook_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



13137
13138
13139
13140
13141
13142
13143
13144
# File 'lib/infrawrench/client.rb', line 13137

def get_org_org_id_runbooks_runbook_id(runbook_id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/runbooks/{runbookId}",
    path_params: { "orgId" => org_id, "runbookId" => runbook_id },
    request_options: request_options
  )
end