Class: Infrawrench::AccountsPluginsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AccountsPluginsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.accounts.plugins
Instance Method Summary collapse
-
#initialize(transport) ⇒ AccountsPluginsNamespace
constructor
private
A new instance of AccountsPluginsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List installed plugins and their credential fields.
-
#policy_template(plugin_id:, org_id: nil, capabilities: nil, request_options: nil) ⇒ Hash
Generate a least-privilege credential template for a plugin.
Constructor Details
#initialize(transport) ⇒ AccountsPluginsNamespace
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 AccountsPluginsNamespace.
486 487 488 |
# File 'lib/infrawrench/client.rb', line 486 def initialize(transport) @transport = transport end |
Instance Method Details
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List installed plugins and their credential fields
Requires permission: accounts:read.
GET /api/org/orgId/accounts/plugins
502 503 504 505 506 507 508 509 |
# File 'lib/infrawrench/client.rb', line 502 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/accounts/plugins", path_params: { "orgId" => org_id }, request_options: ) end |
#policy_template(plugin_id:, org_id: nil, capabilities: nil, request_options: nil) ⇒ Hash
Generate a least-privilege credential template for a plugin
Returns the paste-ready credential document (IAM policy JSON, custom role
YAML, token template…) scoped to the requested capability ids. Omitting
capabilities (or sending it empty) selects every declared capability;
any unknown capability id is rejected with 400. 400 also for plugins that
don't provide a template.
Requires permission: accounts:read.
GET /api/org/orgId/accounts/plugins/pluginId/policy-template
Raises on 400: Bad request
Raises on 404: Not found
535 536 537 538 539 540 541 542 543 |
# File 'lib/infrawrench/client.rb', line 535 def policy_template(plugin_id:, org_id: nil, capabilities: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/accounts/plugins/{pluginId}/policy-template", path_params: { "orgId" => org_id, "pluginId" => plugin_id }, query: { "capabilities" => capabilities }, request_options: ) end |