Class: Infrawrench::EnvironmentsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::EnvironmentsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.environments
Instance Attribute Summary collapse
-
#instances ⇒ EnvironmentsInstancesNamespace
readonly
client.environments.instances. -
#settings ⇒ EnvironmentsSettingsNamespace
readonly
client.environments.settings. -
#templates ⇒ EnvironmentsTemplatesNamespace
readonly
client.environments.templates.
Instance Method Summary collapse
-
#capture(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Preview a template capture.
-
#initialize(transport) ⇒ EnvironmentsNamespace
constructor
private
A new instance of EnvironmentsNamespace.
Constructor Details
#initialize(transport) ⇒ EnvironmentsNamespace
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 EnvironmentsNamespace.
7375 7376 7377 7378 7379 7380 |
# File 'lib/infrawrench/client.rb', line 7375 def initialize(transport) @transport = transport @instances = EnvironmentsInstancesNamespace.new(@transport) @settings = EnvironmentsSettingsNamespace.new(@transport) @templates = EnvironmentsTemplatesNamespace.new(@transport) end |
Instance Attribute Details
#instances ⇒ EnvironmentsInstancesNamespace (readonly)
Returns client.environments.instances.
7367 7368 7369 |
# File 'lib/infrawrench/client.rb', line 7367 def instances @instances end |
#settings ⇒ EnvironmentsSettingsNamespace (readonly)
Returns client.environments.settings.
7369 7370 7371 |
# File 'lib/infrawrench/client.rb', line 7369 def settings @settings end |
#templates ⇒ EnvironmentsTemplatesNamespace (readonly)
Returns client.environments.templates.
7371 7372 7373 |
# File 'lib/infrawrench/client.rb', line 7371 def templates @templates end |
Instance Method Details
#capture(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Preview a template capture
Turn a selection of live resources into a draft template. Persists
nothing — the editor shows the draft so the user can choose which fields
to vary before saving. The shape of every member comes from the plugin's
own getCreateConfig: a captured value with no matching create field is
dropped, and a resource type the plugin cannot create is reported in
skipped with a reason rather than silently omitted. Recorded output
references whose target is also in the selection are preserved as output
field values; a value that is exactly another selected resource's external
id becomes a member-id.
Requires permission: resources:read.
POST /api/org/orgId/environments/capture
Raises on 400: Bad request
Raises on 404: Not found
7409 7410 7411 7412 7413 7414 7415 7416 7417 |
# File 'lib/infrawrench/client.rb', line 7409 def capture(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/environments/capture", path_params: { "orgId" => org_id }, body: body, request_options: ) end |