Class: Infrawrench::ResourcesManifestNamespace

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

Overview

client.resources.manifest

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ ResourcesManifestNamespace

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

Parameters:



2288
2289
2290
# File 'lib/infrawrench/client.rb', line 2288

def initialize(transport)
  @transport = transport
end

Instance Method Details

#create(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Apply an edited manifest to a resource

Requires permission: resources:write.

POST /api/org/orgId/resources/pluginId/typeId/manifest

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as ApplyManifestRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (apply_manifest_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



2310
2311
2312
2313
2314
2315
2316
2317
2318
# File 'lib/infrawrench/client.rb', line 2310

def create(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/manifest",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

#get(plugin_id:, type_id:, resource_id:, account_id:, org_id: nil, parent_resource_id: nil, request_options: nil) ⇒ Hash

Fetch the raw manifest (YAML/JSON) for a resource

Requires permission: resources:read.

GET /api/org/orgId/resources/pluginId/typeId/manifest

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.

  • plugin_id (String)
  • type_id (String)
  • resource_id (String)
  • account_id (String)
  • parent_resource_id (String, nil) (defaults to: nil)
  • request_options (Hash, nil) (defaults to: nil)

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • resource_id: (resource_id)
  • account_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • parent_resource_id: (resource_id, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
# File 'lib/infrawrench/client.rb', line 2340

def get(
  plugin_id:,
  type_id:,
  resource_id:,
  account_id:,
  org_id: nil,
  parent_resource_id: nil,
  request_options: nil
)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/manifest",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    query: {
      "resourceId" => resource_id,
      "accountId" => ,
      "parentResourceId" => parent_resource_id
    },
    request_options: request_options
  )
end