Class: Infrawrench::WorkflowsScheduleNamespace
- Inherits:
-
Object
- Object
- Infrawrench::WorkflowsScheduleNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.workflows.schedule
Instance Method Summary collapse
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a workflow's cron schedule.
-
#get(id:, org_id: nil, request_options: nil) ⇒ Hash
Get a workflow's cron schedule.
-
#initialize(transport) ⇒ WorkflowsScheduleNamespace
constructor
private
A new instance of WorkflowsScheduleNamespace.
-
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Create or replace a workflow's cron schedule.
Constructor Details
#initialize(transport) ⇒ WorkflowsScheduleNamespace
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 WorkflowsScheduleNamespace.
6725 6726 6727 |
# File 'lib/infrawrench/client.rb', line 6725 def initialize(transport) @transport = transport end |
Instance Method Details
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a workflow's cron schedule
Reverts the workflow's trigger to manual and clears the pending fire time. A no-op when the trigger is not cron.
Requires permission: dashboards:write.
DELETE /api/org/orgId/workflows/id/schedule
Raises on 404: Not found
6746 6747 6748 6749 6750 6751 6752 6753 |
# File 'lib/infrawrench/client.rb', line 6746 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/workflows/{id}/schedule", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#get(id:, org_id: nil, request_options: nil) ⇒ Hash
Get a workflow's cron schedule
The schedule view of the workflow's trigger, with the next few computed
fire times. schedule is null when the workflow is triggered some other
way (manual, git, budget).
Requires permission: dashboards:read.
GET /api/org/orgId/workflows/id/schedule
Raises on 404: Not found
6774 6775 6776 6777 6778 6779 6780 6781 |
# File 'lib/infrawrench/client.rb', line 6774 def get(id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/workflows/{id}/schedule", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Create or replace a workflow's cron schedule
Sets the workflow's trigger to cron with the given expression and timezone, validating both, and computes the next fire time. The workflow fires at the schedule's next occurrence — never immediately on save.
Requires permission: dashboards:write.
PUT /api/org/orgId/workflows/id/schedule
Raises on 400: Bad request
Raises on 404: Not found
6805 6806 6807 6808 6809 6810 6811 6812 6813 |
# File 'lib/infrawrench/client.rb', line 6805 def update(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/workflows/{id}/schedule", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |