smplkit 3.0.117 → 3.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb +364 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb +5 -2
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job.rb +12 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_environment.rb +12 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_on.rb +185 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy.rb +396 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_create_resource.rb +237 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_list_response.rb +193 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_resource.rb +186 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/retry_policy_response.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run.rb +15 -4
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_meta.rb +1 -1
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_retry.rb +193 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client.rb +10 -0
- data/lib/smplkit/_generated/jobs/spec/api/retry_policies_api_spec.rb +100 -0
- data/lib/smplkit/_generated/jobs/spec/api/runs_api_spec.rb +2 -1
- data/lib/smplkit/_generated/jobs/spec/models/job_environment_spec.rb +6 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_spec.rb +6 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_on_spec.rb +46 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_create_resource_spec.rb +52 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_response_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/retry_policy_spec.rb +94 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_retry_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_spec.rb +7 -1
- metadata +21 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04fadfa766349cc993a30eed1a237b3791ec4185ba19fe7e654260126c4b7f85
|
|
4
|
+
data.tar.gz: a7ce4b99c41b98fcddb8926d10cfa74cd61e00873b65ad736c48ec48b1a194d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ce5ce6b39a7d00c08a38c1219382522b5cc4e9e974bd68b0aec564519ca061fd227af19fca822c94b2c12bd9035bafb993fa966bc8867d077e12ff769812568
|
|
7
|
+
data.tar.gz: b8049752ea39cfa22aa158ced47f31a40d018c572f6927bd4243c133e60d83d97032a3c7f7a269894aaf52cf5fe784f44c4ff568856f837b0a5f5fcab153e9a8
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Jobs API
|
|
3
|
+
|
|
4
|
+
#Scheduled HTTP job execution API for smplkit.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SmplkitGeneratedClient::Jobs
|
|
16
|
+
class RetryPoliciesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Retry Policy
|
|
23
|
+
# Create a retry policy for this account. The caller supplies the policy's id as `data.id`. Ids are unique within an account and immutable. `Default` is reserved for the built-in policy and cannot be created.
|
|
24
|
+
# @param retry_policy_create_request [RetryPolicyCreateRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [RetryPolicyResponse]
|
|
27
|
+
def create_retry_policy(retry_policy_create_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_retry_policy_with_http_info(retry_policy_create_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Retry Policy
|
|
33
|
+
# Create a retry policy for this account. The caller supplies the policy's id as `data.id`. Ids are unique within an account and immutable. `Default` is reserved for the built-in policy and cannot be created.
|
|
34
|
+
# @param retry_policy_create_request [RetryPolicyCreateRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(RetryPolicyResponse, Integer, Hash)>] RetryPolicyResponse data, response status code and response headers
|
|
37
|
+
def create_retry_policy_with_http_info(retry_policy_create_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: RetryPoliciesApi.create_retry_policy ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'retry_policy_create_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && retry_policy_create_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'retry_policy_create_request' when calling RetryPoliciesApi.create_retry_policy"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/v1/retry-policies'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_policy_create_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'RetryPolicyResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"RetryPoliciesApi.create_retry_policy",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: RetryPoliciesApi#create_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete Retry Policy
|
|
91
|
+
# Delete a retry policy. The built-in `Default` policy cannot be deleted (`403`). A policy still referenced by any job — at the base level or in a per-environment override — cannot be deleted (`409`); the error lists the referencing job ids under `meta.referencing_jobs` so they can be reassigned to `Default` first.
|
|
92
|
+
# @param policy_id [String]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def delete_retry_policy(policy_id, opts = {})
|
|
96
|
+
delete_retry_policy_with_http_info(policy_id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Retry Policy
|
|
101
|
+
# Delete a retry policy. The built-in `Default` policy cannot be deleted (`403`). A policy still referenced by any job — at the base level or in a per-environment override — cannot be deleted (`409`); the error lists the referencing job ids under `meta.referencing_jobs` so they can be reassigned to `Default` first.
|
|
102
|
+
# @param policy_id [String]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def delete_retry_policy_with_http_info(policy_id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: RetryPoliciesApi.delete_retry_policy ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'policy_id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.delete_retry_policy"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type]
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"RetryPoliciesApi.delete_retry_policy",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: RetryPoliciesApi#delete_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get Retry Policy
|
|
152
|
+
# Retrieve a single retry policy by its id. `Default` returns the built-in do-not-retry policy.
|
|
153
|
+
# @param policy_id [String]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [RetryPolicyResponse]
|
|
156
|
+
def get_retry_policy(policy_id, opts = {})
|
|
157
|
+
data, _status_code, _headers = get_retry_policy_with_http_info(policy_id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get Retry Policy
|
|
162
|
+
# Retrieve a single retry policy by its id. `Default` returns the built-in do-not-retry policy.
|
|
163
|
+
# @param policy_id [String]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(RetryPolicyResponse, Integer, Hash)>] RetryPolicyResponse data, response status code and response headers
|
|
166
|
+
def get_retry_policy_with_http_info(policy_id, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: RetryPoliciesApi.get_retry_policy ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'policy_id' is set
|
|
171
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.get_retry_policy"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s))
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
184
|
+
|
|
185
|
+
# form parameters
|
|
186
|
+
form_params = opts[:form_params] || {}
|
|
187
|
+
|
|
188
|
+
# http body (model)
|
|
189
|
+
post_body = opts[:debug_body]
|
|
190
|
+
|
|
191
|
+
# return_type
|
|
192
|
+
return_type = opts[:debug_return_type] || 'RetryPolicyResponse'
|
|
193
|
+
|
|
194
|
+
# auth_names
|
|
195
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
196
|
+
|
|
197
|
+
new_options = opts.merge(
|
|
198
|
+
:operation => :"RetryPoliciesApi.get_retry_policy",
|
|
199
|
+
:header_params => header_params,
|
|
200
|
+
:query_params => query_params,
|
|
201
|
+
:form_params => form_params,
|
|
202
|
+
:body => post_body,
|
|
203
|
+
:auth_names => auth_names,
|
|
204
|
+
:return_type => return_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug "API called: RetryPoliciesApi#get_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
210
|
+
end
|
|
211
|
+
return data, status_code, headers
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# List Retry Policies
|
|
215
|
+
# List this account's retry policies. Default sort is `name` ascending. Sort by `name`, `created_at`, or `updated_at` (prefix `-` for descending). The built-in `Default` policy is not included here — it always exists and is retrievable at `/retry-policies/Default`.
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @option opts [String] :filter_name Case-insensitive substring match on the policy `name` (matches when the name contains the given text).
|
|
218
|
+
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `created_at`, `-created_at`, `name`, `-name`, `updated_at`, `-updated_at`. (default to 'name')
|
|
219
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
220
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
221
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
222
|
+
# @return [RetryPolicyListResponse]
|
|
223
|
+
def list_retry_policies(opts = {})
|
|
224
|
+
data, _status_code, _headers = list_retry_policies_with_http_info(opts)
|
|
225
|
+
data
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# List Retry Policies
|
|
229
|
+
# List this account's retry policies. Default sort is `name` ascending. Sort by `name`, `created_at`, or `updated_at` (prefix `-` for descending). The built-in `Default` policy is not included here — it always exists and is retrievable at `/retry-policies/Default`.
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @option opts [String] :filter_name Case-insensitive substring match on the policy `name` (matches when the name contains the given text).
|
|
232
|
+
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `created_at`, `-created_at`, `name`, `-name`, `updated_at`, `-updated_at`. (default to 'name')
|
|
233
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
234
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
235
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
236
|
+
# @return [Array<(RetryPolicyListResponse, Integer, Hash)>] RetryPolicyListResponse data, response status code and response headers
|
|
237
|
+
def list_retry_policies_with_http_info(opts = {})
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: RetryPoliciesApi.list_retry_policies ...'
|
|
240
|
+
end
|
|
241
|
+
allowable_values = ["created_at", "-created_at", "name", "-name", "updated_at", "-updated_at"]
|
|
242
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
243
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
244
|
+
end
|
|
245
|
+
# resource path
|
|
246
|
+
local_var_path = '/api/v1/retry-policies'
|
|
247
|
+
|
|
248
|
+
# query parameters
|
|
249
|
+
query_params = opts[:query_params] || {}
|
|
250
|
+
query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
|
|
251
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
252
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
253
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
254
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
255
|
+
|
|
256
|
+
# header parameters
|
|
257
|
+
header_params = opts[:header_params] || {}
|
|
258
|
+
# HTTP header 'Accept' (if needed)
|
|
259
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
260
|
+
|
|
261
|
+
# form parameters
|
|
262
|
+
form_params = opts[:form_params] || {}
|
|
263
|
+
|
|
264
|
+
# http body (model)
|
|
265
|
+
post_body = opts[:debug_body]
|
|
266
|
+
|
|
267
|
+
# return_type
|
|
268
|
+
return_type = opts[:debug_return_type] || 'RetryPolicyListResponse'
|
|
269
|
+
|
|
270
|
+
# auth_names
|
|
271
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
272
|
+
|
|
273
|
+
new_options = opts.merge(
|
|
274
|
+
:operation => :"RetryPoliciesApi.list_retry_policies",
|
|
275
|
+
:header_params => header_params,
|
|
276
|
+
:query_params => query_params,
|
|
277
|
+
:form_params => form_params,
|
|
278
|
+
:body => post_body,
|
|
279
|
+
:auth_names => auth_names,
|
|
280
|
+
:return_type => return_type
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
284
|
+
if @api_client.config.debugging
|
|
285
|
+
@api_client.config.logger.debug "API called: RetryPoliciesApi#list_retry_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
+
end
|
|
287
|
+
return data, status_code, headers
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Update Retry Policy
|
|
291
|
+
# Replace an existing retry policy. Every writable field is overwritten. The built-in `Default` policy cannot be modified.
|
|
292
|
+
# @param policy_id [String]
|
|
293
|
+
# @param retry_policy_request [RetryPolicyRequest]
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @return [RetryPolicyResponse]
|
|
296
|
+
def update_retry_policy(policy_id, retry_policy_request, opts = {})
|
|
297
|
+
data, _status_code, _headers = update_retry_policy_with_http_info(policy_id, retry_policy_request, opts)
|
|
298
|
+
data
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Update Retry Policy
|
|
302
|
+
# Replace an existing retry policy. Every writable field is overwritten. The built-in `Default` policy cannot be modified.
|
|
303
|
+
# @param policy_id [String]
|
|
304
|
+
# @param retry_policy_request [RetryPolicyRequest]
|
|
305
|
+
# @param [Hash] opts the optional parameters
|
|
306
|
+
# @return [Array<(RetryPolicyResponse, Integer, Hash)>] RetryPolicyResponse data, response status code and response headers
|
|
307
|
+
def update_retry_policy_with_http_info(policy_id, retry_policy_request, opts = {})
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug 'Calling API: RetryPoliciesApi.update_retry_policy ...'
|
|
310
|
+
end
|
|
311
|
+
# verify the required parameter 'policy_id' is set
|
|
312
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
313
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.update_retry_policy"
|
|
314
|
+
end
|
|
315
|
+
# verify the required parameter 'retry_policy_request' is set
|
|
316
|
+
if @api_client.config.client_side_validation && retry_policy_request.nil?
|
|
317
|
+
fail ArgumentError, "Missing the required parameter 'retry_policy_request' when calling RetryPoliciesApi.update_retry_policy"
|
|
318
|
+
end
|
|
319
|
+
# resource path
|
|
320
|
+
local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s))
|
|
321
|
+
|
|
322
|
+
# query parameters
|
|
323
|
+
query_params = opts[:query_params] || {}
|
|
324
|
+
|
|
325
|
+
# header parameters
|
|
326
|
+
header_params = opts[:header_params] || {}
|
|
327
|
+
# HTTP header 'Accept' (if needed)
|
|
328
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
329
|
+
# HTTP header 'Content-Type'
|
|
330
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
|
|
331
|
+
if !content_type.nil?
|
|
332
|
+
header_params['Content-Type'] = content_type
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# form parameters
|
|
336
|
+
form_params = opts[:form_params] || {}
|
|
337
|
+
|
|
338
|
+
# http body (model)
|
|
339
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_policy_request)
|
|
340
|
+
|
|
341
|
+
# return_type
|
|
342
|
+
return_type = opts[:debug_return_type] || 'RetryPolicyResponse'
|
|
343
|
+
|
|
344
|
+
# auth_names
|
|
345
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
346
|
+
|
|
347
|
+
new_options = opts.merge(
|
|
348
|
+
:operation => :"RetryPoliciesApi.update_retry_policy",
|
|
349
|
+
:header_params => header_params,
|
|
350
|
+
:query_params => query_params,
|
|
351
|
+
:form_params => form_params,
|
|
352
|
+
:body => post_body,
|
|
353
|
+
:auth_names => auth_names,
|
|
354
|
+
:return_type => return_type
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
358
|
+
if @api_client.config.debugging
|
|
359
|
+
@api_client.config.logger.debug "API called: RetryPoliciesApi#update_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
360
|
+
end
|
|
361
|
+
return data, status_code, headers
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
end
|
|
@@ -146,11 +146,12 @@ module SmplkitGeneratedClient::Jobs
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# List Runs
|
|
149
|
-
# List runs for this account (cursor paginated). Default sort is `-created_at` (newest first). Sort by `created_at`, `started_at`, `finished_at`, `scheduled_for`, `status`, `job`, or `total_duration_ms`, ascending or descending (prefix `-` for descending). Keep the same `sort` value across paginated requests so the cursor stays consistent. Runs that have not reached the relevant lifecycle point (`started_at`, `finished_at`, `scheduled_for`, `total_duration_ms` unset) sort to the end regardless of direction. Filters compose with AND: - `filter[job]={id}` — a single job's run history. - `filter[status]` — one state or a comma-separated list (any-of). - `filter[environment]` — one environment key or a comma-separated list (any-of); omitted covers every environment you can access. - `filter[created_at]` / `filter[started_at]` / `filter[finished_at]` / `filter[scheduled_for]` — half-open `[start,end)` date ranges (see each parameter for the interval syntax). Set `last_run_only=true` to collapse the result to the last completed run for each job-and-environment combination. \"Completed\" means a terminal state — succeeded, failed, or canceled; in-flight runs (pending or running) are not included, so a job that is mid-run still surfaces its previous completed result and a combination with no completed run yet returns nothing. The filters above still apply, evaluated before the collapse, so each row is the most recent completed run in its group that also satisfies them.
|
|
149
|
+
# List runs for this account (cursor paginated). Default sort is `-created_at` (newest first). Sort by `created_at`, `started_at`, `finished_at`, `scheduled_for`, `status`, `job`, or `total_duration_ms`, ascending or descending (prefix `-` for descending). Keep the same `sort` value across paginated requests so the cursor stays consistent. Runs that have not reached the relevant lifecycle point (`started_at`, `finished_at`, `scheduled_for`, `total_duration_ms` unset) sort to the end regardless of direction. Filters compose with AND: - `filter[job]={id}` — a single job's run history. - `filter[status]` — one state or a comma-separated list (any-of). - `filter[trigger]` — one trigger (`SCHEDULE`, `MANUAL`, `RERUN`, `RETRY`) or a comma-separated list of them (any-of). - `filter[environment]` — one environment key or a comma-separated list (any-of); omitted covers every environment you can access. - `filter[created_at]` / `filter[started_at]` / `filter[finished_at]` / `filter[scheduled_for]` — half-open `[start,end)` date ranges (see each parameter for the interval syntax). Set `last_run_only=true` to collapse the result to the last completed run for each job-and-environment combination. \"Completed\" means a terminal state — succeeded, failed, or canceled; in-flight runs (pending or running) are not included, so a job that is mid-run still surfaces its previous completed result and a combination with no completed run yet returns nothing. The filters above still apply, evaluated before the collapse, so each row is the most recent completed run in its group that also satisfies them.
|
|
150
150
|
# @param [Hash] opts the optional parameters
|
|
151
151
|
# @option opts [String] :filter_job
|
|
152
152
|
# @option opts [String] :filter_status Restrict to runs in the given lifecycle state. One of `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELED`, or a comma-separated list of them to match any (e.g. `SUCCEEDED,FAILED`).
|
|
153
153
|
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access.
|
|
154
|
+
# @option opts [String] :filter_trigger Restrict to runs with the given trigger. One of `SCHEDULE`, `MANUAL`, `RERUN`, `RETRY`, or a comma-separated list of them to match any (e.g. `SCHEDULE,RETRY` to see a job's automatic runs).
|
|
154
155
|
# @option opts [String] :filter_created_at Restrict to runs whose `created_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
155
156
|
# @option opts [String] :filter_started_at Restrict to runs whose `started_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
156
157
|
# @option opts [String] :filter_finished_at Restrict to runs whose `finished_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
@@ -166,11 +167,12 @@ module SmplkitGeneratedClient::Jobs
|
|
|
166
167
|
end
|
|
167
168
|
|
|
168
169
|
# List Runs
|
|
169
|
-
# List runs for this account (cursor paginated). Default sort is `-created_at` (newest first). Sort by `created_at`, `started_at`, `finished_at`, `scheduled_for`, `status`, `job`, or `total_duration_ms`, ascending or descending (prefix `-` for descending). Keep the same `sort` value across paginated requests so the cursor stays consistent. Runs that have not reached the relevant lifecycle point (`started_at`, `finished_at`, `scheduled_for`, `total_duration_ms` unset) sort to the end regardless of direction. Filters compose with AND: - `filter[job]={id}` — a single job's run history. - `filter[status]` — one state or a comma-separated list (any-of). - `filter[environment]` — one environment key or a comma-separated list (any-of); omitted covers every environment you can access. - `filter[created_at]` / `filter[started_at]` / `filter[finished_at]` / `filter[scheduled_for]` — half-open `[start,end)` date ranges (see each parameter for the interval syntax). Set `last_run_only=true` to collapse the result to the last completed run for each job-and-environment combination. \"Completed\" means a terminal state — succeeded, failed, or canceled; in-flight runs (pending or running) are not included, so a job that is mid-run still surfaces its previous completed result and a combination with no completed run yet returns nothing. The filters above still apply, evaluated before the collapse, so each row is the most recent completed run in its group that also satisfies them.
|
|
170
|
+
# List runs for this account (cursor paginated). Default sort is `-created_at` (newest first). Sort by `created_at`, `started_at`, `finished_at`, `scheduled_for`, `status`, `job`, or `total_duration_ms`, ascending or descending (prefix `-` for descending). Keep the same `sort` value across paginated requests so the cursor stays consistent. Runs that have not reached the relevant lifecycle point (`started_at`, `finished_at`, `scheduled_for`, `total_duration_ms` unset) sort to the end regardless of direction. Filters compose with AND: - `filter[job]={id}` — a single job's run history. - `filter[status]` — one state or a comma-separated list (any-of). - `filter[trigger]` — one trigger (`SCHEDULE`, `MANUAL`, `RERUN`, `RETRY`) or a comma-separated list of them (any-of). - `filter[environment]` — one environment key or a comma-separated list (any-of); omitted covers every environment you can access. - `filter[created_at]` / `filter[started_at]` / `filter[finished_at]` / `filter[scheduled_for]` — half-open `[start,end)` date ranges (see each parameter for the interval syntax). Set `last_run_only=true` to collapse the result to the last completed run for each job-and-environment combination. \"Completed\" means a terminal state — succeeded, failed, or canceled; in-flight runs (pending or running) are not included, so a job that is mid-run still surfaces its previous completed result and a combination with no completed run yet returns nothing. The filters above still apply, evaluated before the collapse, so each row is the most recent completed run in its group that also satisfies them.
|
|
170
171
|
# @param [Hash] opts the optional parameters
|
|
171
172
|
# @option opts [String] :filter_job
|
|
172
173
|
# @option opts [String] :filter_status Restrict to runs in the given lifecycle state. One of `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELED`, or a comma-separated list of them to match any (e.g. `SUCCEEDED,FAILED`).
|
|
173
174
|
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access.
|
|
175
|
+
# @option opts [String] :filter_trigger Restrict to runs with the given trigger. One of `SCHEDULE`, `MANUAL`, `RERUN`, `RETRY`, or a comma-separated list of them to match any (e.g. `SCHEDULE,RETRY` to see a job's automatic runs).
|
|
174
176
|
# @option opts [String] :filter_created_at Restrict to runs whose `created_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
175
177
|
# @option opts [String] :filter_started_at Restrict to runs whose `started_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
176
178
|
# @option opts [String] :filter_finished_at Restrict to runs whose `finished_at` falls in a half-open `[start,end)` interval. Bounds are ISO-8601 timestamps; `*` leaves a bound open. The leading bracket is `[` (inclusive) or `(` (exclusive) and the trailing bracket is `]` (inclusive) or `)` (exclusive). Example: `[2026-06-01T00:00:00Z,2026-06-08T00:00:00Z)` selects the first week of June; `[2026-06-01T00:00:00Z,*)` is everything from then onward.
|
|
@@ -200,6 +202,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
200
202
|
query_params[:'filter[job]'] = opts[:'filter_job'] if !opts[:'filter_job'].nil?
|
|
201
203
|
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
|
202
204
|
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
205
|
+
query_params[:'filter[trigger]'] = opts[:'filter_trigger'] if !opts[:'filter_trigger'].nil?
|
|
203
206
|
query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
|
|
204
207
|
query_params[:'filter[started_at]'] = opts[:'filter_started_at'] if !opts[:'filter_started_at'].nil?
|
|
205
208
|
query_params[:'filter[finished_at]'] = opts[:'filter_finished_at'] if !opts[:'filter_finished_at'].nil?
|
|
@@ -40,6 +40,9 @@ module SmplkitGeneratedClient::Jobs
|
|
|
40
40
|
# How overlapping runs are handled. `ALLOW` (the only value today) permits them.
|
|
41
41
|
attr_accessor :concurrency_policy
|
|
42
42
|
|
|
43
|
+
# The base retry policy for failed runs — the `id` of a retry policy (or the built-in `Default`), overridable per environment. Omit (or send `null`) to use `Default`, which never retries — so a job that sets nothing behaves exactly as before retries existed.
|
|
44
|
+
attr_accessor :retry_policy
|
|
45
|
+
|
|
43
46
|
# How the job runs, derived from its base `schedule`: `recurring` for a cron schedule (fires on a repeating cadence), `manual` for no schedule (never auto-fires; runs only when triggered), or `one_off` for a `now` or datetime schedule (runs a single time, then is spent).
|
|
44
47
|
attr_accessor :kind
|
|
45
48
|
|
|
@@ -88,6 +91,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
88
91
|
:'configuration' => :'configuration',
|
|
89
92
|
:'environments' => :'environments',
|
|
90
93
|
:'concurrency_policy' => :'concurrency_policy',
|
|
94
|
+
:'retry_policy' => :'retry_policy',
|
|
91
95
|
:'kind' => :'kind',
|
|
92
96
|
:'created_at' => :'created_at',
|
|
93
97
|
:'updated_at' => :'updated_at',
|
|
@@ -117,6 +121,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
117
121
|
:'configuration' => :'JobHttpConfiguration',
|
|
118
122
|
:'environments' => :'Hash<String, JobEnvironment>',
|
|
119
123
|
:'concurrency_policy' => :'String',
|
|
124
|
+
:'retry_policy' => :'String',
|
|
120
125
|
:'kind' => :'String',
|
|
121
126
|
:'created_at' => :'Time',
|
|
122
127
|
:'updated_at' => :'Time',
|
|
@@ -131,6 +136,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
131
136
|
:'description',
|
|
132
137
|
:'schedule',
|
|
133
138
|
:'timezone',
|
|
139
|
+
:'retry_policy',
|
|
134
140
|
:'kind',
|
|
135
141
|
:'created_at',
|
|
136
142
|
:'updated_at',
|
|
@@ -197,6 +203,10 @@ module SmplkitGeneratedClient::Jobs
|
|
|
197
203
|
self.concurrency_policy = 'ALLOW'
|
|
198
204
|
end
|
|
199
205
|
|
|
206
|
+
if attributes.key?(:'retry_policy')
|
|
207
|
+
self.retry_policy = attributes[:'retry_policy']
|
|
208
|
+
end
|
|
209
|
+
|
|
200
210
|
if attributes.key?(:'kind')
|
|
201
211
|
self.kind = attributes[:'kind']
|
|
202
212
|
end
|
|
@@ -345,6 +355,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
345
355
|
configuration == o.configuration &&
|
|
346
356
|
environments == o.environments &&
|
|
347
357
|
concurrency_policy == o.concurrency_policy &&
|
|
358
|
+
retry_policy == o.retry_policy &&
|
|
348
359
|
kind == o.kind &&
|
|
349
360
|
created_at == o.created_at &&
|
|
350
361
|
updated_at == o.updated_at &&
|
|
@@ -361,7 +372,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
361
372
|
# Calculates hash code according to all attributes.
|
|
362
373
|
# @return [Integer] Hash code
|
|
363
374
|
def hash
|
|
364
|
-
[name, description, type, schedule, timezone, configuration, environments, concurrency_policy, kind, created_at, updated_at, deleted_at, version].hash
|
|
375
|
+
[name, description, type, schedule, timezone, configuration, environments, concurrency_policy, retry_policy, kind, created_at, updated_at, deleted_at, version].hash
|
|
365
376
|
end
|
|
366
377
|
|
|
367
378
|
# Builds the object from hash
|
|
@@ -28,6 +28,9 @@ module SmplkitGeneratedClient::Jobs
|
|
|
28
28
|
# Per-environment HTTP request override. Omit to inherit the job's base `configuration`. When present, it fully replaces the base configuration for runs in this environment.
|
|
29
29
|
attr_accessor :configuration
|
|
30
30
|
|
|
31
|
+
# Per-environment retry-policy override — the `id` of a retry policy (or `Default`). Omit to inherit the job's base `retry_policy`. When present, runs in this environment retry according to this policy instead of the base.
|
|
32
|
+
attr_accessor :retry_policy
|
|
33
|
+
|
|
31
34
|
# The next scheduled fire time in this environment. `null` when the environment is not enabled, or once a one-off run has fired.
|
|
32
35
|
attr_accessor :next_run_at
|
|
33
36
|
|
|
@@ -38,6 +41,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
38
41
|
:'schedule' => :'schedule',
|
|
39
42
|
:'timezone' => :'timezone',
|
|
40
43
|
:'configuration' => :'configuration',
|
|
44
|
+
:'retry_policy' => :'retry_policy',
|
|
41
45
|
:'next_run_at' => :'next_run_at'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
@@ -59,6 +63,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
59
63
|
:'schedule' => :'String',
|
|
60
64
|
:'timezone' => :'String',
|
|
61
65
|
:'configuration' => :'JobHttpConfiguration',
|
|
66
|
+
:'retry_policy' => :'String',
|
|
62
67
|
:'next_run_at' => :'Time'
|
|
63
68
|
}
|
|
64
69
|
end
|
|
@@ -69,6 +74,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
69
74
|
:'schedule',
|
|
70
75
|
:'timezone',
|
|
71
76
|
:'configuration',
|
|
77
|
+
:'retry_policy',
|
|
72
78
|
:'next_run_at'
|
|
73
79
|
])
|
|
74
80
|
end
|
|
@@ -107,6 +113,10 @@ module SmplkitGeneratedClient::Jobs
|
|
|
107
113
|
self.configuration = attributes[:'configuration']
|
|
108
114
|
end
|
|
109
115
|
|
|
116
|
+
if attributes.key?(:'retry_policy')
|
|
117
|
+
self.retry_policy = attributes[:'retry_policy']
|
|
118
|
+
end
|
|
119
|
+
|
|
110
120
|
if attributes.key?(:'next_run_at')
|
|
111
121
|
self.next_run_at = attributes[:'next_run_at']
|
|
112
122
|
end
|
|
@@ -136,6 +146,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
136
146
|
schedule == o.schedule &&
|
|
137
147
|
timezone == o.timezone &&
|
|
138
148
|
configuration == o.configuration &&
|
|
149
|
+
retry_policy == o.retry_policy &&
|
|
139
150
|
next_run_at == o.next_run_at
|
|
140
151
|
end
|
|
141
152
|
|
|
@@ -148,7 +159,7 @@ module SmplkitGeneratedClient::Jobs
|
|
|
148
159
|
# Calculates hash code according to all attributes.
|
|
149
160
|
# @return [Integer] Hash code
|
|
150
161
|
def hash
|
|
151
|
-
[enabled, schedule, timezone, configuration, next_run_at].hash
|
|
162
|
+
[enabled, schedule, timezone, configuration, retry_policy, next_run_at].hash
|
|
152
163
|
end
|
|
153
164
|
|
|
154
165
|
# Builds the object from hash
|