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.
86 87 88 |
# File 'lib/infrawrench/client.rb', line 86 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
102 103 104 105 106 107 108 109 |
# File 'lib/infrawrench/client.rb', line 102 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
135 136 137 138 139 140 141 142 143 |
# File 'lib/infrawrench/client.rb', line 135 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 |