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.
14750 14751 14752 |
# File 'lib/infrawrench/client.rb', line 14750 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
14773 14774 14775 14776 14777 14778 14779 14780 14781 |
# File 'lib/infrawrench/client.rb', line 14773 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
14799 14800 14801 14802 14803 14804 14805 14806 |
# File 'lib/infrawrench/client.rb', line 14799 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
14822 14823 14824 14825 14826 14827 14828 14829 |
# File 'lib/infrawrench/client.rb', line 14822 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
14850 14851 14852 14853 14854 14855 14856 14857 14858 |
# File 'lib/infrawrench/client.rb', line 14850 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
14880 14881 14882 14883 14884 14885 14886 14887 14888 |
# File 'lib/infrawrench/client.rb', line 14880 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 |