Class: SmplkitGeneratedClient::Jobs::RetryPoliciesApi
- Inherits:
-
Object
- Object
- SmplkitGeneratedClient::Jobs::RetryPoliciesApi
- Defined in:
- lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_retry_policy(retry_policy_create_request, opts = {}) ⇒ RetryPolicyResponse
Create Retry Policy Create a retry policy for this account.
-
#create_retry_policy_with_http_info(retry_policy_create_request, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Create Retry Policy Create a retry policy for this account.
-
#delete_retry_policy(policy_id, opts = {}) ⇒ nil
Delete Retry Policy Delete a retry policy.
-
#delete_retry_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Retry Policy Delete a retry policy.
-
#get_retry_policy(policy_id, opts = {}) ⇒ RetryPolicyResponse
Get Retry Policy Retrieve a single retry policy by its id.
-
#get_retry_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Get Retry Policy Retrieve a single retry policy by its id.
-
#initialize(api_client = ApiClient.default) ⇒ RetryPoliciesApi
constructor
A new instance of RetryPoliciesApi.
-
#list_retry_policies(opts = {}) ⇒ RetryPolicyListResponse
List Retry Policies List this account’s retry policies.
-
#list_retry_policies_with_http_info(opts = {}) ⇒ Array<(RetryPolicyListResponse, Integer, Hash)>
List Retry Policies List this account's retry policies.
-
#update_retry_policy(policy_id, retry_policy_request, opts = {}) ⇒ RetryPolicyResponse
Update Retry Policy Replace an existing retry policy.
-
#update_retry_policy_with_http_info(policy_id, retry_policy_request, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Update Retry Policy Replace an existing retry policy.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RetryPoliciesApi
Returns a new instance of RetryPoliciesApi.
19 20 21 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_retry_policy(retry_policy_create_request, opts = {}) ⇒ RetryPolicyResponse
Create Retry Policy 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.
27 28 29 30 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 27 def create_retry_policy(retry_policy_create_request, opts = {}) data, _status_code, _headers = create_retry_policy_with_http_info(retry_policy_create_request, opts) data end |
#create_retry_policy_with_http_info(retry_policy_create_request, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Create Retry Policy 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.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 37 def create_retry_policy_with_http_info(retry_policy_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetryPoliciesApi.create_retry_policy ...' end # verify the required parameter 'retry_policy_create_request' is set if @api_client.config.client_side_validation && retry_policy_create_request.nil? fail ArgumentError, "Missing the required parameter 'retry_policy_create_request' when calling RetryPoliciesApi.create_retry_policy" end # resource path local_var_path = '/api/v1/retry-policies' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_policy_create_request) # return_type return_type = opts[:debug_return_type] || 'RetryPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RetryPoliciesApi.create_retry_policy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetryPoliciesApi#create_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_retry_policy(policy_id, opts = {}) ⇒ nil
Delete Retry Policy 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.
95 96 97 98 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 95 def delete_retry_policy(policy_id, opts = {}) delete_retry_policy_with_http_info(policy_id, opts) nil end |
#delete_retry_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Retry Policy 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.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 105 def delete_retry_policy_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetryPoliciesApi.delete_retry_policy ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.delete_retry_policy" end # resource path local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RetryPoliciesApi.delete_retry_policy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetryPoliciesApi#delete_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_retry_policy(policy_id, opts = {}) ⇒ RetryPolicyResponse
Get Retry Policy Retrieve a single retry policy by its id. ‘Default` returns the built-in do-not-retry policy.
156 157 158 159 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 156 def get_retry_policy(policy_id, opts = {}) data, _status_code, _headers = get_retry_policy_with_http_info(policy_id, opts) data end |
#get_retry_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Get Retry Policy Retrieve a single retry policy by its id. `Default` returns the built-in do-not-retry policy.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 166 def get_retry_policy_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetryPoliciesApi.get_retry_policy ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.get_retry_policy" end # resource path local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RetryPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RetryPoliciesApi.get_retry_policy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetryPoliciesApi#get_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_retry_policies(opts = {}) ⇒ RetryPolicyListResponse
List Retry Policies 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`.
223 224 225 226 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 223 def list_retry_policies(opts = {}) data, _status_code, _headers = list_retry_policies_with_http_info(opts) data end |
#list_retry_policies_with_http_info(opts = {}) ⇒ Array<(RetryPolicyListResponse, Integer, Hash)>
List Retry Policies 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`.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 237 def list_retry_policies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetryPoliciesApi.list_retry_policies ...' end allowable_values = ["created_at", "-created_at", "name", "-name", "updated_at", "-updated_at"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/retry-policies' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RetryPolicyListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RetryPoliciesApi.list_retry_policies", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetryPoliciesApi#list_retry_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_retry_policy(policy_id, retry_policy_request, opts = {}) ⇒ RetryPolicyResponse
Update Retry Policy Replace an existing retry policy. Every writable field is overwritten. The built-in ‘Default` policy cannot be modified.
296 297 298 299 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 296 def update_retry_policy(policy_id, retry_policy_request, opts = {}) data, _status_code, _headers = update_retry_policy_with_http_info(policy_id, retry_policy_request, opts) data end |
#update_retry_policy_with_http_info(policy_id, retry_policy_request, opts = {}) ⇒ Array<(RetryPolicyResponse, Integer, Hash)>
Update Retry Policy Replace an existing retry policy. Every writable field is overwritten. The built-in `Default` policy cannot be modified.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/retry_policies_api.rb', line 307 def update_retry_policy_with_http_info(policy_id, retry_policy_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetryPoliciesApi.update_retry_policy ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? fail ArgumentError, "Missing the required parameter 'policy_id' when calling RetryPoliciesApi.update_retry_policy" end # verify the required parameter 'retry_policy_request' is set if @api_client.config.client_side_validation && retry_policy_request.nil? fail ArgumentError, "Missing the required parameter 'retry_policy_request' when calling RetryPoliciesApi.update_retry_policy" end # resource path local_var_path = '/api/v1/retry-policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_policy_request) # return_type return_type = opts[:debug_return_type] || 'RetryPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RetryPoliciesApi.update_retry_policy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetryPoliciesApi#update_retry_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |