Class: Infrawrench::DependencyGraphNamespace

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

Overview

client.dependency_graph

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ DependencyGraphNamespace

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

Parameters:



2437
2438
2439
# File 'lib/infrawrench/client.rb', line 2437

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

The org's resource dependency graph, from synced cloud data and output references

Requires permission: resources:read.

GET /api/org/orgId/dependency-graph

Parameters:

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

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

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

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

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

Returns:

  • (Hash)

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

Raises:



2455
2456
2457
2458
2459
2460
2461
2462
2463
# File 'lib/infrawrench/client.rb', line 2455

def get(org_id: nil, resource_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/dependency-graph",
    path_params: { "orgId" => org_id },
    query: { "resourceId" => resource_id },
    request_options: request_options
  )
end