Class: Infrawrench::AccountsPreflightNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AccountsPreflightNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.accounts.preflight
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Probe credentials before creating an account.
-
#initialize(transport) ⇒ AccountsPreflightNamespace
constructor
private
A new instance of AccountsPreflightNamespace.
-
#post_org_org_id_accounts_id_preflight(id:, org_id: nil, request_options: nil) ⇒ Hash
Re-run credential preflight on a stored account.
Constructor Details
#initialize(transport) ⇒ AccountsPreflightNamespace
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 AccountsPreflightNamespace.
150 151 152 |
# File 'lib/infrawrench/client.rb', line 150 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Probe credentials before creating an account
Runs the plugin's per-capability permission checks against the submitted credentials. Nothing is stored — use it from the add-account flow before committing.
Requires permission: accounts:write.
POST /api/org/orgId/accounts/preflight
Raises on 400: Bad request
Raises on 404: Not found
174 175 176 177 178 179 180 181 182 |
# File 'lib/infrawrench/client.rb', line 174 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/accounts/preflight", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#post_org_org_id_accounts_id_preflight(id:, org_id: nil, request_options: nil) ⇒ Hash
Re-run credential preflight on a stored account
Requires permission: accounts:write.
POST /api/org/orgId/accounts/id/preflight
Raises on 400: Bad request
Raises on 404: Not found
200 201 202 203 204 205 206 207 |
# File 'lib/infrawrench/client.rb', line 200 def post_org_org_id_accounts_id_preflight(id:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/accounts/{id}/preflight", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |