Class: Cadenya::Resources::BulkWorkspaceResources::Results

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/resources/bulk_workspace_resources/results.rb

Overview

Apply a declarative bundle of workspace resources — tool sets, memory layers, agents, variations, assignments, and schedules — in a single asynchronous operation.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Results

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

Parameters:



60
61
62
# File 'lib/cadenya/resources/bulk_workspace_resources/results.rb', line 60

def initialize(client:)
  @client = client
end

Instance Method Details

#list(bulk_workspace_apply_id, workspace_id:, action: nil, cursor: nil, limit: nil, sort_order: nil, type: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::BulkWorkspaceResources::BulkWorkspaceApplyResult>

Some parameter documentations has been truncated, see Models::BulkWorkspaceResources::ResultListParams for more details.

Lists each resource action recorded by a bulk workspace apply operation.

Parameters:

  • bulk_workspace_apply_id (String)

    Path param: Apply ID in canonical apply_… form.

  • workspace_id (String)

    Path param: Workspace ID.

  • action (Symbol, Cadenya::Models::BulkWorkspaceResources::ResultListParams::Action)

    Query param: Filter by action.

  • cursor (String)

    Query param: Pagination cursor from previous response

  • limit (Integer)

    Query param: Maximum number of results to return

  • sort_order (String)

    Query param: Sort order for results (asc or desc by creation time)

  • type (String)

    Query param: Filter by data.type discriminator (e.g., “toolSet”, “memoryEntry”).

  • request_options (Cadenya::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/cadenya/resources/bulk_workspace_resources/results.rb', line 36

def list(bulk_workspace_apply_id, params)
  parsed, options = Cadenya::BulkWorkspaceResources::ResultListParams.dump_request(params)
  query = Cadenya::Internal::Util.encode_query_params(parsed)
  workspace_id =
    parsed.delete(:workspace_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "v1/workspaces/%1$s/bulk_workspace_applies/%2$s/results",
      workspace_id,
      bulk_workspace_apply_id
    ],
    query: query.transform_keys(sort_order: "sortOrder"),
    page: Cadenya::Internal::CursorPagination,
    model: Cadenya::BulkWorkspaceResources::BulkWorkspaceApplyResult,
    options: options
  )
end