Class: Infrawrench::WorkflowSecretsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::WorkflowSecretsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.workflow_secrets
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create workflow secret metadata.
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a workflow secret.
-
#initialize(transport) ⇒ WorkflowSecretsNamespace
constructor
private
A new instance of WorkflowSecretsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List reusable workflow secrets.
-
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update workflow secret metadata.
-
#value(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Write a workflow secret value.
Constructor Details
#initialize(transport) ⇒ WorkflowSecretsNamespace
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 WorkflowSecretsNamespace.
16275 16276 16277 |
# File 'lib/infrawrench/client.rb', line 16275 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create workflow secret metadata
Creates metadata without a value. Write the value separately through the write-only value endpoint.
Requires permission: secrets:write.
POST /api/org/orgId/workflow-secrets
Raises on 400: Bad request
Raises on 409: Conflict
16298 16299 16300 16301 16302 16303 16304 16305 16306 |
# File 'lib/infrawrench/client.rb', line 16298 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/workflow-secrets", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a workflow secret
Also removes every workflow assignment through database cascades.
Requires permission: secrets:write.
DELETE /api/org/orgId/workflow-secrets/id
Raises on 404: Not found
16324 16325 16326 16327 16328 16329 16330 16331 |
# File 'lib/infrawrench/client.rb', line 16324 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/workflow-secrets/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List reusable workflow secrets
Returns metadata and hasValue only; plaintext values are never returned.
Requires permission: secrets:read.
GET /api/org/orgId/workflow-secrets
16347 16348 16349 16350 16351 16352 16353 16354 |
# File 'lib/infrawrench/client.rb', line 16347 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/workflow-secrets", path_params: { "orgId" => org_id }, request_options: ) end |
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update workflow secret metadata
Requires permission: secrets:write.
PATCH /api/org/orgId/workflow-secrets/id
Raises on 400: Bad request
Raises on 404: Not found
Raises on 409: Conflict
16375 16376 16377 16378 16379 16380 16381 16382 16383 |
# File 'lib/infrawrench/client.rb', line 16375 def update(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PATCH", path: "/api/org/{orgId}/workflow-secrets/{id}", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |
#value(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Write a workflow secret value
Write-only. The response contains metadata and hasValue, never the supplied plaintext.
Requires permission: secrets:write.
PUT /api/org/orgId/workflow-secrets/id/value
Raises on 400: Bad request
Raises on 404: Not found
16405 16406 16407 16408 16409 16410 16411 16412 16413 |
# File 'lib/infrawrench/client.rb', line 16405 def value(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/workflow-secrets/{id}/value", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |