Class: Infrawrench::WorkflowsSecretsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.workflows.secrets

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ WorkflowsSecretsNamespace

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 WorkflowsSecretsNamespace.

Parameters:



15044
15045
15046
# File 'lib/infrawrench/client.rb', line 15044

def initialize(transport)
  @transport = transport
end

Instance Method Details

#get(id:, org_id: nil, request_options: nil) ⇒ Hash

List a workflow's assigned secrets

Returns assigned ids and metadata only, never values.

Requires permission: secrets:read.

GET /api/org/orgId/workflows/id/secrets

Raises on 404: Not found

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • id (String)

    Workflow id

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as WorkflowSecretAssignment — see sig/infrawrench/sdk.rbs.

Raises:



15065
15066
15067
15068
15069
15070
15071
15072
# File 'lib/infrawrench/client.rb', line 15065

def get(id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/workflows/{id}/secrets",
    path_params: { "orgId" => org_id, "id" => id },
    request_options: request_options
  )
end

#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Replace a workflow's secret assignments

Requires permission: workflows:write.

PUT /api/org/orgId/workflows/id/secrets

Raises on 400: Bad request

Raises on 404: Not found

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • id (String)

    Workflow id

  • body (Hash)

    Request body, shaped as WorkflowSecretAssignmentInput.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • id: (String)
  • body: (workflow_secret_assignment_input)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as WorkflowSecretAssignment — see sig/infrawrench/sdk.rbs.

Raises:



15092
15093
15094
15095
15096
15097
15098
15099
15100
# File 'lib/infrawrench/client.rb', line 15092

def update(id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "PUT",
    path: "/api/org/{orgId}/workflows/{id}/secrets",
    path_params: { "orgId" => org_id, "id" => id },
    body: body,
    request_options: request_options
  )
end