Class: Harbor1Client::ScannersApi
- Inherits:
-
Object
- Object
- Harbor1Client::ScannersApi
- Defined in:
- lib/harbor1_client/api/scanners_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) ⇒ ScannersApi
constructor
A new instance of ScannersApi.
-
#projects_project_id_scanner_candidates_get(project_id, opts = {}) ⇒ Array<ScannerRegistration>
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.
-
#projects_project_id_scanner_candidates_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.
-
#projects_project_id_scanner_get(project_id, opts = {}) ⇒ ScannerRegistration
Get project level scanner Get the scanner registration of the specified project.
-
#projects_project_id_scanner_get_with_http_info(project_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Get project level scanner Get the scanner registration of the specified project.
-
#projects_project_id_scanner_put(project_id, payload, opts = {}) ⇒ nil
Configure scanner for the specified project Set one of the system configured scanner registration as the indepndent scanner of the specified project.
-
#projects_project_id_scanner_put_with_http_info(project_id, payload, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Configure scanner for the specified project Set one of the system configured scanner registration as the indepndent scanner of the specified project.
-
#scanners_get(opts = {}) ⇒ Array<ScannerRegistration>
List scanner registrations Returns a list of currently configured scanner registrations.
-
#scanners_get_with_http_info(opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>
List scanner registrations Returns a list of currently configured scanner registrations.
-
#scanners_ping_post(settings, opts = {}) ⇒ nil
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.
-
#scanners_ping_post_with_http_info(settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.
-
#scanners_post(registration, opts = {}) ⇒ nil
Create a scanner registration Creats a new scanner registration with the given data.
-
#scanners_post_with_http_info(registration, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a scanner registration Creats a new scanner registration with the given data.
-
#scanners_registration_id_delete(registration_id, opts = {}) ⇒ ScannerRegistration
Delete a scanner registration Deletes the specified scanner registration.
-
#scanners_registration_id_delete_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Delete a scanner registration Deletes the specified scanner registration.
-
#scanners_registration_id_get(registration_id, opts = {}) ⇒ ScannerRegistration
Get a scanner registration details Retruns the details of the specified scanner registration.
-
#scanners_registration_id_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Get a scanner registration details Retruns the details of the specified scanner registration.
-
#scanners_registration_id_metadata_get(registration_id, opts = {}) ⇒ ScannerAdapterMetadata
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.
-
#scanners_registration_id_metadata_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerAdapterMetadata, Fixnum, Hash)>
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.
-
#scanners_registration_id_patch(registration_id, payload, opts = {}) ⇒ nil
Set system default scanner registration Set the specified scanner registration as the system default one.
-
#scanners_registration_id_patch_with_http_info(registration_id, payload, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set system default scanner registration Set the specified scanner registration as the system default one.
-
#scanners_registration_id_put(registration_id, registration, opts = {}) ⇒ nil
Update a scanner registration Updates the specified scanner registration.
-
#scanners_registration_id_put_with_http_info(registration_id, registration, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a scanner registration Updates the specified scanner registration.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ScannersApi
Returns a new instance of ScannersApi.
19 20 21 |
# File 'lib/harbor1_client/api/scanners_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/scanners_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#projects_project_id_scanner_candidates_get(project_id, opts = {}) ⇒ Array<ScannerRegistration>
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.
27 28 29 30 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 27 def projects_project_id_scanner_candidates_get(project_id, opts = {}) data, _status_code, _headers = projects_project_id_scanner_candidates_get_with_http_info(project_id, opts) data end |
#projects_project_id_scanner_candidates_get_with_http_info(project_id, opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>
Get scanner registration candidates for configurating project level scanner Retrieve the system configured scanner registrations as candidates of setting project level scanner.
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 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 37 def projects_project_id_scanner_candidates_get_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.projects_project_id_scanner_candidates_get ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ScannersApi.projects_project_id_scanner_candidates_get" end # resource path local_var_path = '/projects/{project_id}/scanner/candidates'.sub('{' + 'project_id' + '}', project_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<ScannerRegistration>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#projects_project_id_scanner_candidates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#projects_project_id_scanner_get(project_id, opts = {}) ⇒ ScannerRegistration
Get project level scanner Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.
81 82 83 84 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 81 def projects_project_id_scanner_get(project_id, opts = {}) data, _status_code, _headers = projects_project_id_scanner_get_with_http_info(project_id, opts) data end |
#projects_project_id_scanner_get_with_http_info(project_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Get project level scanner Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.
91 92 93 94 95 96 97 98 99 100 101 102 103 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 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 91 def projects_project_id_scanner_get_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.projects_project_id_scanner_get ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ScannersApi.projects_project_id_scanner_get" end # resource path local_var_path = '/projects/{project_id}/scanner'.sub('{' + 'project_id' + '}', project_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 => 'ScannerRegistration') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#projects_project_id_scanner_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#projects_project_id_scanner_put(project_id, payload, opts = {}) ⇒ nil
Configure scanner for the specified project Set one of the system configured scanner registration as the indepndent scanner of the specified project.
136 137 138 139 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 136 def projects_project_id_scanner_put(project_id, payload, opts = {}) projects_project_id_scanner_put_with_http_info(project_id, payload, opts) nil end |
#projects_project_id_scanner_put_with_http_info(project_id, payload, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Configure scanner for the specified project Set one of the system configured scanner registration as the indepndent scanner of the specified project.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 147 def projects_project_id_scanner_put_with_http_info(project_id, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.projects_project_id_scanner_put ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ScannersApi.projects_project_id_scanner_put" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling ScannersApi.projects_project_id_scanner_put" end # resource path local_var_path = '/projects/{project_id}/scanner'.sub('{' + 'project_id' + '}', project_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(payload) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, 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: ScannersApi#projects_project_id_scanner_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_get(opts = {}) ⇒ Array<ScannerRegistration>
List scanner registrations Returns a list of currently configured scanner registrations.
193 194 195 196 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 193 def scanners_get(opts = {}) data, _status_code, _headers = scanners_get_with_http_info(opts) data end |
#scanners_get_with_http_info(opts = {}) ⇒ Array<(Array<ScannerRegistration>, Fixnum, Hash)>
List scanner registrations Returns a list of currently configured scanner registrations.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 202 def scanners_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_get ...' end # resource path local_var_path = '/scanners' # 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<ScannerRegistration>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#scanners_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_ping_post(settings, opts = {}) ⇒ nil
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.
242 243 244 245 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 242 def scanners_ping_post(settings, opts = {}) scanners_ping_post_with_http_info(settings, opts) nil end |
#scanners_ping_post_with_http_info(settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Tests scanner registration settings Pings scanner adapter to test endpoint URL and authorization settings.
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 289 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 252 def scanners_ping_post_with_http_info(settings, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_ping_post ...' end # verify the required parameter 'settings' is set if @api_client.config.client_side_validation && settings.nil? fail ArgumentError, "Missing the required parameter 'settings' when calling ScannersApi.scanners_ping_post" end # resource path local_var_path = '/scanners/ping' # 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(settings) 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: ScannersApi#scanners_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_post(registration, opts = {}) ⇒ nil
Create a scanner registration Creats a new scanner registration with the given data.
295 296 297 298 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 295 def scanners_post(registration, opts = {}) scanners_post_with_http_info(registration, opts) nil end |
#scanners_post_with_http_info(registration, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a scanner registration Creats a new scanner registration with the given data.
305 306 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 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 305 def scanners_post_with_http_info(registration, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_post ...' end # verify the required parameter 'registration' is set if @api_client.config.client_side_validation && registration.nil? fail ArgumentError, "Missing the required parameter 'registration' when calling ScannersApi.scanners_post" end # resource path local_var_path = '/scanners' # 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(registration) 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: ScannersApi#scanners_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_registration_id_delete(registration_id, opts = {}) ⇒ ScannerRegistration
Delete a scanner registration Deletes the specified scanner registration.
348 349 350 351 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 348 def scanners_registration_id_delete(registration_id, opts = {}) data, _status_code, _headers = scanners_registration_id_delete_with_http_info(registration_id, opts) data end |
#scanners_registration_id_delete_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Delete a scanner registration Deletes the specified scanner registration.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 358 def scanners_registration_id_delete_with_http_info(registration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_registration_id_delete ...' end # verify the required parameter 'registration_id' is set if @api_client.config.client_side_validation && registration_id.nil? fail ArgumentError, "Missing the required parameter 'registration_id' when calling ScannersApi.scanners_registration_id_delete" end # resource path local_var_path = '/scanners/{registration_id}'.sub('{' + 'registration_id' + '}', registration_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(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ScannerRegistration') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#scanners_registration_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_registration_id_get(registration_id, opts = {}) ⇒ ScannerRegistration
Get a scanner registration details Retruns the details of the specified scanner registration.
402 403 404 405 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 402 def scanners_registration_id_get(registration_id, opts = {}) data, _status_code, _headers = scanners_registration_id_get_with_http_info(registration_id, opts) data end |
#scanners_registration_id_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerRegistration, Fixnum, Hash)>
Get a scanner registration details Retruns the details of the specified scanner registration.
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 412 def scanners_registration_id_get_with_http_info(registration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_registration_id_get ...' end # verify the required parameter 'registration_id' is set if @api_client.config.client_side_validation && registration_id.nil? fail ArgumentError, "Missing the required parameter 'registration_id' when calling ScannersApi.scanners_registration_id_get" end # resource path local_var_path = '/scanners/{registration_id}'.sub('{' + 'registration_id' + '}', registration_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 => 'ScannerRegistration') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#scanners_registration_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_registration_id_metadata_get(registration_id, opts = {}) ⇒ ScannerAdapterMetadata
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.
456 457 458 459 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 456 def (registration_id, opts = {}) data, _status_code, _headers = (registration_id, opts) data end |
#scanners_registration_id_metadata_get_with_http_info(registration_id, opts = {}) ⇒ Array<(ScannerAdapterMetadata, Fixnum, Hash)>
Get the metadata of the specified scanner registration Get the metadata of the specified scanner registration, including the capabilities and customzied properties.
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 466 def (registration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_registration_id_metadata_get ...' end # verify the required parameter 'registration_id' is set if @api_client.config.client_side_validation && registration_id.nil? fail ArgumentError, "Missing the required parameter 'registration_id' when calling ScannersApi.scanners_registration_id_metadata_get" end # resource path local_var_path = '/scanners/{registration_id}/metadata'.sub('{' + 'registration_id' + '}', registration_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 => 'ScannerAdapterMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScannersApi#scanners_registration_id_metadata_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_registration_id_patch(registration_id, payload, opts = {}) ⇒ nil
Set system default scanner registration Set the specified scanner registration as the system default one.
511 512 513 514 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 511 def scanners_registration_id_patch(registration_id, payload, opts = {}) scanners_registration_id_patch_with_http_info(registration_id, payload, opts) nil end |
#scanners_registration_id_patch_with_http_info(registration_id, payload, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set system default scanner registration Set the specified scanner registration as the system default one.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 522 def scanners_registration_id_patch_with_http_info(registration_id, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_registration_id_patch ...' end # verify the required parameter 'registration_id' is set if @api_client.config.client_side_validation && registration_id.nil? fail ArgumentError, "Missing the required parameter 'registration_id' when calling ScannersApi.scanners_registration_id_patch" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling ScannersApi.scanners_registration_id_patch" end # resource path local_var_path = '/scanners/{registration_id}'.sub('{' + 'registration_id' + '}', registration_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(payload) 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: ScannersApi#scanners_registration_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scanners_registration_id_put(registration_id, registration, opts = {}) ⇒ nil
Update a scanner registration Updates the specified scanner registration.
570 571 572 573 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 570 def scanners_registration_id_put(registration_id, registration, opts = {}) scanners_registration_id_put_with_http_info(registration_id, registration, opts) nil end |
#scanners_registration_id_put_with_http_info(registration_id, registration, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a scanner registration Updates the specified scanner registration.
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
# File 'lib/harbor1_client/api/scanners_api.rb', line 581 def scanners_registration_id_put_with_http_info(registration_id, registration, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScannersApi.scanners_registration_id_put ...' end # verify the required parameter 'registration_id' is set if @api_client.config.client_side_validation && registration_id.nil? fail ArgumentError, "Missing the required parameter 'registration_id' when calling ScannersApi.scanners_registration_id_put" end # verify the required parameter 'registration' is set if @api_client.config.client_side_validation && registration.nil? fail ArgumentError, "Missing the required parameter 'registration' when calling ScannersApi.scanners_registration_id_put" end # resource path local_var_path = '/scanners/{registration_id}'.sub('{' + 'registration_id' + '}', registration_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(registration) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, 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: ScannersApi#scanners_registration_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |