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.
7429 7430 7431 7432 7433 7434 |
# File 'lib/infrawrench/client.rb', line 7429 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.
7421 7422 7423 |
# File 'lib/infrawrench/client.rb', line 7421 def instances @instances end |
#settings ⇒ EnvironmentsSettingsNamespace (readonly)
Returns client.environments.settings.
7423 7424 7425 |
# File 'lib/infrawrench/client.rb', line 7423 def settings @settings end |
#templates ⇒ EnvironmentsTemplatesNamespace (readonly)
Returns client.environments.templates.
7425 7426 7427 |
# File 'lib/infrawrench/client.rb', line 7425 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
7463 7464 7465 7466 7467 7468 7469 7470 7471 |
# File 'lib/infrawrench/client.rb', line 7463 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 |