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.
7300 7301 7302 7303 7304 7305 |
# File 'lib/infrawrench/client.rb', line 7300 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.
7292 7293 7294 |
# File 'lib/infrawrench/client.rb', line 7292 def instances @instances end |
#settings ⇒ EnvironmentsSettingsNamespace (readonly)
Returns client.environments.settings.
7294 7295 7296 |
# File 'lib/infrawrench/client.rb', line 7294 def settings @settings end |
#templates ⇒ EnvironmentsTemplatesNamespace (readonly)
Returns client.environments.templates.
7296 7297 7298 |
# File 'lib/infrawrench/client.rb', line 7296 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
7334 7335 7336 7337 7338 7339 7340 7341 7342 |
# File 'lib/infrawrench/client.rb', line 7334 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 |