Class: Cadenya::Resources::BulkWorkspaceResources
- Inherits:
-
Object
- Object
- Cadenya::Resources::BulkWorkspaceResources
- Defined in:
- lib/cadenya/resources/bulk_workspace_resources.rb,
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.
Defined Under Namespace
Classes: Results
Instance Attribute Summary collapse
-
#results ⇒ Cadenya::Resources::BulkWorkspaceResources::Results
readonly
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
-
#apply(workspace_id, data:, request_options: {}) ⇒ Cadenya::Models::BulkWorkspaceApply
Asynchronously applies a declarative bundle of workspace resources.
-
#initialize(client:) ⇒ BulkWorkspaceResources
constructor
private
A new instance of BulkWorkspaceResources.
-
#list(workspace_id, bundle_key: nil, cursor: nil, limit: nil, sort_order: nil, state: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::BulkWorkspaceApply>
Lists past and in-flight bulk workspace apply operations in the workspace.
-
#retrieve(id, workspace_id:, request_options: {}) ⇒ Cadenya::Models::BulkWorkspaceApply
Some parameter documentations has been truncated, see Models::BulkWorkspaceResourceRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ BulkWorkspaceResources
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 BulkWorkspaceResources.
107 108 109 110 |
# File 'lib/cadenya/resources/bulk_workspace_resources.rb', line 107 def initialize(client:) @client = client @results = Cadenya::Resources::BulkWorkspaceResources::Results.new(client: client) end |
Instance Attribute Details
#results ⇒ Cadenya::Resources::BulkWorkspaceResources::Results (readonly)
Apply a declarative bundle of workspace resources — tool sets, memory layers, agents, variations, assignments, and schedules — in a single asynchronous operation.
13 14 15 |
# File 'lib/cadenya/resources/bulk_workspace_resources.rb', line 13 def results @results end |
Instance Method Details
#apply(workspace_id, data:, request_options: {}) ⇒ Cadenya::Models::BulkWorkspaceApply
Asynchronously applies a declarative bundle of workspace resources. Returns the operation immediately in PENDING; clients poll Get to track progress.
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/cadenya/resources/bulk_workspace_resources.rb', line 93 def apply(workspace_id, params) parsed, = Cadenya::BulkWorkspaceResourceApplyParams.dump_request(params) @client.request( method: :post, path: ["v1/workspaces/%1$s/bulk_workspace_applies", workspace_id], body: parsed, model: Cadenya::BulkWorkspaceApply, options: ) end |
#list(workspace_id, bundle_key: nil, cursor: nil, limit: nil, sort_order: nil, state: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::BulkWorkspaceApply>
Lists past and in-flight bulk workspace apply operations in the workspace.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/cadenya/resources/bulk_workspace_resources.rb', line 66 def list(workspace_id, params = {}) parsed, = Cadenya::BulkWorkspaceResourceListParams.dump_request(params) query = Cadenya::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["v1/workspaces/%1$s/bulk_workspace_applies", workspace_id], query: query.transform_keys(bundle_key: "bundleKey", sort_order: "sortOrder"), page: Cadenya::Internal::CursorPagination, model: Cadenya::BulkWorkspaceApply, options: ) end |
#retrieve(id, workspace_id:, request_options: {}) ⇒ Cadenya::Models::BulkWorkspaceApply
Some parameter documentations has been truncated, see Models::BulkWorkspaceResourceRetrieveParams for more details.
Retrieves a bulk workspace apply operation by ID.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/cadenya/resources/bulk_workspace_resources.rb', line 31 def retrieve(id, params) parsed, = Cadenya::BulkWorkspaceResourceRetrieveParams.dump_request(params) 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", workspace_id, id], model: Cadenya::BulkWorkspaceApply, options: ) end |