Class: Harbor1Client::RetentionApi
- Inherits:
-
Object
- Object
- Harbor1Client::RetentionApi
- Defined in:
- lib/harbor1_client/api/retention_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ RetentionApi
constructor
A new instance of RetentionApi.
-
#retentions_id_executions_eid_patch(id, eid, action, opts = {}) ⇒ nil
Stop a Retention job Stop a Retention job, only support "stop" action now.
-
#retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Stop a Retention job Stop a Retention job, only support "stop" action now.
-
#retentions_id_executions_eid_tasks_get(id, eid, opts = {}) ⇒ Array<RetentionExecutionTask>
Get Retention job tasks Get Retention job tasks, each repository as a task.
-
#retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts = {}) ⇒ Array<(Array<RetentionExecutionTask>, Fixnum, Hash)>
Get Retention job tasks Get Retention job tasks, each repository as a task.
-
#retentions_id_executions_eid_tasks_tid_get(id, eid, tid, opts = {}) ⇒ String
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.
-
#retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.
-
#retentions_id_executions_get(id, opts = {}) ⇒ Array<RetentionExecution>
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.
-
#retentions_id_executions_get_with_http_info(id, opts = {}) ⇒ Array<(Array<RetentionExecution>, Fixnum, Hash)>
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.
-
#retentions_id_executions_post(id, action, opts = {}) ⇒ nil
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.
-
#retentions_id_executions_post_with_http_info(id, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.
-
#retentions_id_get(id, opts = {}) ⇒ RetentionPolicy
Get Retention Policy Get Retention Policy.
-
#retentions_id_get_with_http_info(id, opts = {}) ⇒ Array<(RetentionPolicy, Fixnum, Hash)>
Get Retention Policy Get Retention Policy.
-
#retentions_metadatas_get(opts = {}) ⇒ RetentionMetadata
Get Retention Metadatas Get Retention Metadatas.
-
#retentions_metadatas_get_with_http_info(opts = {}) ⇒ Array<(RetentionMetadata, Fixnum, Hash)>
Get Retention Metadatas Get Retention Metadatas.
-
#retentions_post(policy, opts = {}) ⇒ nil
Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model.
-
#retentions_post_with_http_info(policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RetentionApi
Returns a new instance of RetentionApi.
19 20 21 |
# File 'lib/harbor1_client/api/retention_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/harbor1_client/api/retention_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#retentions_id_executions_eid_patch(id, eid, action, opts = {}) ⇒ nil
Stop a Retention job Stop a Retention job, only support "stop" action now.
29 30 31 32 |
# File 'lib/harbor1_client/api/retention_api.rb', line 29 def retentions_id_executions_eid_patch(id, eid, action, opts = {}) retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts) nil end |
#retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Stop a Retention job Stop a Retention job, only support "stop" action now.
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 |
# File 'lib/harbor1_client/api/retention_api.rb', line 41 def retentions_id_executions_eid_patch_with_http_info(id, eid, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_executions_eid_patch ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_executions_eid_patch" end # verify the required parameter 'eid' is set if @api_client.config.client_side_validation && eid.nil? fail ArgumentError, "Missing the required parameter 'eid' when calling RetentionApi.retentions_id_executions_eid_patch" end # verify the required parameter 'action' is set if @api_client.config.client_side_validation && action.nil? fail ArgumentError, "Missing the required parameter 'action' when calling RetentionApi.retentions_id_executions_eid_patch" end # resource path local_var_path = '/retentions/{id}/executions/{eid}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(action) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_executions_eid_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_id_executions_eid_tasks_get(id, eid, opts = {}) ⇒ Array<RetentionExecutionTask>
Get Retention job tasks Get Retention job tasks, each repository as a task.
93 94 95 96 |
# File 'lib/harbor1_client/api/retention_api.rb', line 93 def retentions_id_executions_eid_tasks_get(id, eid, opts = {}) data, _status_code, _headers = retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts) data end |
#retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts = {}) ⇒ Array<(Array<RetentionExecutionTask>, Fixnum, Hash)>
Get Retention job tasks Get Retention job tasks, each repository as a task.
104 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 |
# File 'lib/harbor1_client/api/retention_api.rb', line 104 def retentions_id_executions_eid_tasks_get_with_http_info(id, eid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_executions_eid_tasks_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_executions_eid_tasks_get" end # verify the required parameter 'eid' is set if @api_client.config.client_side_validation && eid.nil? fail ArgumentError, "Missing the required parameter 'eid' when calling RetentionApi.retentions_id_executions_eid_tasks_get" end # resource path local_var_path = '/retentions/{id}/executions/{eid}/tasks'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<RetentionExecutionTask>') if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_executions_eid_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_id_executions_eid_tasks_tid_get(id, eid, tid, opts = {}) ⇒ String
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.
154 155 156 157 |
# File 'lib/harbor1_client/api/retention_api.rb', line 154 def retentions_id_executions_eid_tasks_tid_get(id, eid, tid, opts = {}) data, _status_code, _headers = retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts) data end |
#retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get Retention job task log Get Retention job task log, tags ratain or deletion detail will be shown in a table.
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/harbor1_client/api/retention_api.rb', line 166 def retentions_id_executions_eid_tasks_tid_get_with_http_info(id, eid, tid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_executions_eid_tasks_tid_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_executions_eid_tasks_tid_get" end # verify the required parameter 'eid' is set if @api_client.config.client_side_validation && eid.nil? fail ArgumentError, "Missing the required parameter 'eid' when calling RetentionApi.retentions_id_executions_eid_tasks_tid_get" end # verify the required parameter 'tid' is set if @api_client.config.client_side_validation && tid.nil? fail ArgumentError, "Missing the required parameter 'tid' when calling RetentionApi.retentions_id_executions_eid_tasks_tid_get" end # resource path local_var_path = '/retentions/{id}/executions/{eid}/tasks/{tid}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'eid' + '}', eid.to_s).sub('{' + 'tid' + '}', tid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_executions_eid_tasks_tid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_id_executions_get(id, opts = {}) ⇒ Array<RetentionExecution>
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.
218 219 220 221 |
# File 'lib/harbor1_client/api/retention_api.rb', line 218 def retentions_id_executions_get(id, opts = {}) data, _status_code, _headers = retentions_id_executions_get_with_http_info(id, opts) data end |
#retentions_id_executions_get_with_http_info(id, opts = {}) ⇒ Array<(Array<RetentionExecution>, Fixnum, Hash)>
Get a Retention job Get a Retention job, job status may be delayed before job service schedule it up.
228 229 230 231 232 233 234 235 236 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 |
# File 'lib/harbor1_client/api/retention_api.rb', line 228 def retentions_id_executions_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_executions_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_executions_get" end # resource path local_var_path = '/retentions/{id}/executions'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<RetentionExecution>') if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_executions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_id_executions_post(id, action, opts = {}) ⇒ nil
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.
273 274 275 276 |
# File 'lib/harbor1_client/api/retention_api.rb', line 273 def retentions_id_executions_post(id, action, opts = {}) retentions_id_executions_post_with_http_info(id, action, opts) nil end |
#retentions_id_executions_post_with_http_info(id, action, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Trigger a Retention job Trigger a Retention job, if dry_run is True, nothing would be deleted actually.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/harbor1_client/api/retention_api.rb', line 284 def retentions_id_executions_post_with_http_info(id, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_executions_post ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_executions_post" end # verify the required parameter 'action' is set if @api_client.config.client_side_validation && action.nil? fail ArgumentError, "Missing the required parameter 'action' when calling RetentionApi.retentions_id_executions_post" end # resource path local_var_path = '/retentions/{id}/executions'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(action) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_executions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_id_get(id, opts = {}) ⇒ RetentionPolicy
Get Retention Policy Get Retention Policy.
331 332 333 334 |
# File 'lib/harbor1_client/api/retention_api.rb', line 331 def retentions_id_get(id, opts = {}) data, _status_code, _headers = retentions_id_get_with_http_info(id, opts) data end |
#retentions_id_get_with_http_info(id, opts = {}) ⇒ Array<(RetentionPolicy, Fixnum, Hash)>
Get Retention Policy Get Retention Policy.
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/harbor1_client/api/retention_api.rb', line 341 def retentions_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_id_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RetentionApi.retentions_id_get" end # resource path local_var_path = '/retentions/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RetentionPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_metadatas_get(opts = {}) ⇒ RetentionMetadata
Get Retention Metadatas Get Retention Metadatas.
384 385 386 387 |
# File 'lib/harbor1_client/api/retention_api.rb', line 384 def (opts = {}) data, _status_code, _headers = (opts) data end |
#retentions_metadatas_get_with_http_info(opts = {}) ⇒ Array<(RetentionMetadata, Fixnum, Hash)>
Get Retention Metadatas Get Retention Metadatas.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/harbor1_client/api/retention_api.rb', line 393 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_metadatas_get ...' end # resource path local_var_path = '/retentions/metadatas' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RetentionMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_metadatas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retentions_post(policy, opts = {}) ⇒ nil
Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when no retention policy binded to project yet.
433 434 435 436 |
# File 'lib/harbor1_client/api/retention_api.rb', line 433 def retentions_post(policy, opts = {}) retentions_post_with_http_info(policy, opts) nil end |
#retentions_post_with_http_info(policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create Retention Policy Create Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when no retention policy binded to project yet.
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/harbor1_client/api/retention_api.rb', line 443 def retentions_post_with_http_info(policy, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RetentionApi.retentions_post ...' end # verify the required parameter 'policy' is set if @api_client.config.client_side_validation && policy.nil? fail ArgumentError, "Missing the required parameter 'policy' when calling RetentionApi.retentions_post" end # resource path local_var_path = '/retentions' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(policy) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RetentionApi#retentions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |