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.
14804 14805 14806 |
# File 'lib/infrawrench/client.rb', line 14804 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
14827 14828 14829 14830 14831 14832 14833 14834 14835 |
# File 'lib/infrawrench/client.rb', line 14827 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
14853 14854 14855 14856 14857 14858 14859 14860 |
# File 'lib/infrawrench/client.rb', line 14853 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
14876 14877 14878 14879 14880 14881 14882 14883 |
# File 'lib/infrawrench/client.rb', line 14876 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
14904 14905 14906 14907 14908 14909 14910 14911 14912 |
# File 'lib/infrawrench/client.rb', line 14904 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
14934 14935 14936 14937 14938 14939 14940 14941 14942 |
# File 'lib/infrawrench/client.rb', line 14934 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 |