@@ -33,7 +33,7 @@ def create_aws_on_demand_task(body, opts = {})
3333
3434 # Post an AWS on demand task.
3535 #
36- # Trigger the scan of an AWS resource with a high priority.
36+ # Trigger the scan of an AWS resource with a high priority. Agentless scanning must be activated for the AWS account containing the resource to scan.
3737 #
3838 # @param body [AwsOnDemandCreateRequest] The definition of the on demand task.
3939 # @param opts [Hash] the optional parameters
@@ -222,27 +222,32 @@ def delete_aws_scan_options_with_http_info(account_id, opts = {})
222222 return data , status_code , headers
223223 end
224224
225- # Get AWS On Demand tasks .
225+ # Get AWS On Demand task by id .
226226 #
227- # @see #list_aws_on_demand_tasks_with_http_info
228- def list_aws_on_demand_tasks ( opts = { } )
229- data , _status_code , _headers = list_aws_on_demand_tasks_with_http_info ( opts )
227+ # @see #get_aws_on_demand_task_with_http_info
228+ def get_aws_on_demand_task ( task_id , opts = { } )
229+ data , _status_code , _headers = get_aws_on_demand_task_with_http_info ( task_id , opts )
230230 data
231231 end
232232
233- # Get AWS On Demand tasks .
233+ # Get AWS On Demand task by id .
234234 #
235- # Fetches the most recent 1000 AWS on demand tasks .
235+ # Fetch the data of a specific on demand task .
236236 #
237+ # @param task_id [String] The UUID of the task.
237238 # @param opts [Hash] the optional parameters
238- # @return [Array<(AwsOnDemandListResponse , Integer, Hash)>] AwsOnDemandListResponse data, response status code and response headers
239- def list_aws_on_demand_tasks_with_http_info ( opts = { } )
239+ # @return [Array<(AwsOnDemandResponse , Integer, Hash)>] AwsOnDemandResponse data, response status code and response headers
240+ def get_aws_on_demand_task_with_http_info ( task_id , opts = { } )
240241
241242 if @api_client . config . debugging
242- @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.list_aws_on_demand_tasks ...'
243+ @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.get_aws_on_demand_task ...'
244+ end
245+ # verify the required parameter 'task_id' is set
246+ if @api_client . config . client_side_validation && task_id . nil?
247+ fail ArgumentError , "Missing the required parameter 'task_id' when calling AgentlessScanningAPI.get_aws_on_demand_task"
243248 end
244249 # resource path
245- local_var_path = '/api/v2/agentless_scanning/ondemand/aws'
250+ local_var_path = '/api/v2/agentless_scanning/ondemand/aws/{task_id}' . sub ( '{task_id}' , CGI . escape ( task_id . to_s ) . gsub ( '%2F' , '/' ) )
246251
247252 # query parameters
248253 query_params = opts [ :query_params ] || { }
@@ -259,13 +264,13 @@ def list_aws_on_demand_tasks_with_http_info(opts = {})
259264 post_body = opts [ :debug_body ]
260265
261266 # return_type
262- return_type = opts [ :debug_return_type ] || 'AwsOnDemandListResponse '
267+ return_type = opts [ :debug_return_type ] || 'AwsOnDemandResponse '
263268
264269 # auth_names
265270 auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
266271
267272 new_options = opts . merge (
268- :operation => :list_aws_on_demand_tasks ,
273+ :operation => :get_aws_on_demand_task ,
269274 :header_params => header_params ,
270275 :query_params => query_params ,
271276 :form_params => form_params ,
@@ -277,32 +282,32 @@ def list_aws_on_demand_tasks_with_http_info(opts = {})
277282
278283 data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
279284 if @api_client . config . debugging
280- @api_client . config . logger . debug "API called: AgentlessScanningAPI#list_aws_on_demand_tasks \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
285+ @api_client . config . logger . debug "API called: AgentlessScanningAPI#get_aws_on_demand_task \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
281286 end
282287 return data , status_code , headers
283288 end
284289
285- # Get AWS Scan Options .
290+ # Get AWS On Demand tasks .
286291 #
287- # @see #list_aws_scan_options_with_http_info
288- def list_aws_scan_options ( opts = { } )
289- data , _status_code , _headers = list_aws_scan_options_with_http_info ( opts )
292+ # @see #list_aws_on_demand_tasks_with_http_info
293+ def list_aws_on_demand_tasks ( opts = { } )
294+ data , _status_code , _headers = list_aws_on_demand_tasks_with_http_info ( opts )
290295 data
291296 end
292297
293- # Get AWS Scan Options .
298+ # Get AWS On Demand tasks .
294299 #
295- # Fetches the scan options configured for AWS accounts .
300+ # Fetches the most recent 1000 AWS on demand tasks .
296301 #
297302 # @param opts [Hash] the optional parameters
298- # @return [Array<(AwsScanOptionsListResponse , Integer, Hash)>] AwsScanOptionsListResponse data, response status code and response headers
299- def list_aws_scan_options_with_http_info ( opts = { } )
303+ # @return [Array<(AwsOnDemandListResponse , Integer, Hash)>] AwsOnDemandListResponse data, response status code and response headers
304+ def list_aws_on_demand_tasks_with_http_info ( opts = { } )
300305
301306 if @api_client . config . debugging
302- @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.list_aws_scan_options ...'
307+ @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.list_aws_on_demand_tasks ...'
303308 end
304309 # resource path
305- local_var_path = '/api/v2/agentless_scanning/accounts /aws'
310+ local_var_path = '/api/v2/agentless_scanning/ondemand /aws'
306311
307312 # query parameters
308313 query_params = opts [ :query_params ] || { }
@@ -319,13 +324,13 @@ def list_aws_scan_options_with_http_info(opts = {})
319324 post_body = opts [ :debug_body ]
320325
321326 # return_type
322- return_type = opts [ :debug_return_type ] || 'AwsScanOptionsListResponse '
327+ return_type = opts [ :debug_return_type ] || 'AwsOnDemandListResponse '
323328
324329 # auth_names
325330 auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
326331
327332 new_options = opts . merge (
328- :operation => :list_aws_scan_options ,
333+ :operation => :list_aws_on_demand_tasks ,
329334 :header_params => header_params ,
330335 :query_params => query_params ,
331336 :form_params => form_params ,
@@ -337,37 +342,32 @@ def list_aws_scan_options_with_http_info(opts = {})
337342
338343 data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
339344 if @api_client . config . debugging
340- @api_client . config . logger . debug "API called: AgentlessScanningAPI#list_aws_scan_options \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
345+ @api_client . config . logger . debug "API called: AgentlessScanningAPI#list_aws_on_demand_tasks \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
341346 end
342347 return data , status_code , headers
343348 end
344349
345- # Get AWS On Demand task by id .
350+ # Get AWS Scan Options .
346351 #
347- # @see #retrieve_aws_on_demand_task_with_http_info
348- def retrieve_aws_on_demand_task ( task_id , opts = { } )
349- data , _status_code , _headers = retrieve_aws_on_demand_task_with_http_info ( task_id , opts )
352+ # @see #list_aws_scan_options_with_http_info
353+ def list_aws_scan_options ( opts = { } )
354+ data , _status_code , _headers = list_aws_scan_options_with_http_info ( opts )
350355 data
351356 end
352357
353- # Get AWS On Demand task by id .
358+ # Get AWS Scan Options .
354359 #
355- # Fetch the data of a specific on demand task .
360+ # Fetches the scan options configured for AWS accounts .
356361 #
357- # @param task_id [String] The UUID of the task.
358362 # @param opts [Hash] the optional parameters
359- # @return [Array<(AwsOnDemandResponse , Integer, Hash)>] AwsOnDemandResponse data, response status code and response headers
360- def retrieve_aws_on_demand_task_with_http_info ( task_id , opts = { } )
363+ # @return [Array<(AwsScanOptionsListResponse , Integer, Hash)>] AwsScanOptionsListResponse data, response status code and response headers
364+ def list_aws_scan_options_with_http_info ( opts = { } )
361365
362366 if @api_client . config . debugging
363- @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.retrieve_aws_on_demand_task ...'
364- end
365- # verify the required parameter 'task_id' is set
366- if @api_client . config . client_side_validation && task_id . nil?
367- fail ArgumentError , "Missing the required parameter 'task_id' when calling AgentlessScanningAPI.retrieve_aws_on_demand_task"
367+ @api_client . config . logger . debug 'Calling API: AgentlessScanningAPI.list_aws_scan_options ...'
368368 end
369369 # resource path
370- local_var_path = '/api/v2/agentless_scanning/ondemand /aws/{task_id}' . sub ( '{task_id}' , CGI . escape ( task_id . to_s ) . gsub ( '%2F' , '/' ) )
370+ local_var_path = '/api/v2/agentless_scanning/accounts /aws'
371371
372372 # query parameters
373373 query_params = opts [ :query_params ] || { }
@@ -384,13 +384,13 @@ def retrieve_aws_on_demand_task_with_http_info(task_id, opts = {})
384384 post_body = opts [ :debug_body ]
385385
386386 # return_type
387- return_type = opts [ :debug_return_type ] || 'AwsOnDemandResponse '
387+ return_type = opts [ :debug_return_type ] || 'AwsScanOptionsListResponse '
388388
389389 # auth_names
390390 auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
391391
392392 new_options = opts . merge (
393- :operation => :retrieve_aws_on_demand_task ,
393+ :operation => :list_aws_scan_options ,
394394 :header_params => header_params ,
395395 :query_params => query_params ,
396396 :form_params => form_params ,
@@ -402,7 +402,7 @@ def retrieve_aws_on_demand_task_with_http_info(task_id, opts = {})
402402
403403 data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
404404 if @api_client . config . debugging
405- @api_client . config . logger . debug "API called: AgentlessScanningAPI#retrieve_aws_on_demand_task \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
405+ @api_client . config . logger . debug "API called: AgentlessScanningAPI#list_aws_scan_options \n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
406406 end
407407 return data , status_code , headers
408408 end
0 commit comments