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.
15059 15060 15061 |
# File 'lib/infrawrench/client.rb', line 15059 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
15082 15083 15084 15085 15086 15087 15088 15089 15090 |
# File 'lib/infrawrench/client.rb', line 15082 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
15108 15109 15110 15111 15112 15113 15114 15115 |
# File 'lib/infrawrench/client.rb', line 15108 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
15131 15132 15133 15134 15135 15136 15137 15138 |
# File 'lib/infrawrench/client.rb', line 15131 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
15159 15160 15161 15162 15163 15164 15165 15166 15167 |
# File 'lib/infrawrench/client.rb', line 15159 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
15189 15190 15191 15192 15193 15194 15195 15196 15197 |
# File 'lib/infrawrench/client.rb', line 15189 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 |