Inspector2 / Client / list_on_demand_scans
list_on_demand_scans¶
- Inspector2.Client.list_on_demand_scans(**kwargs)¶
Lists the on-demand scans for a resource.
See also: AWS API Documentation
Request Syntax
response = client.list_on_demand_scans( resourceId='string', resourceType='AMI', maxResults=123, nextToken='string' )
- Parameters:
resourceId (string) –
[REQUIRED]
The ID of the resource whose on-demand scans are being listed.
resourceType (string) –
[REQUIRED]
The type of the resource whose on-demand scans are being listed.
maxResults (integer) – The maximum number of results to return in a single page of the response.
nextToken (string) – A pagination token from a previous response used to retrieve the next page of results.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'scanId': 'string', 'resourceId': 'string', 'resourceType': 'AMI', 'scanStatus': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED', 'scanStatusReason': 'ACCESS_DENIED'|'INTERNAL_ERROR'|'STORAGE_LIMIT_EXCEEDED'|'EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED'|'UNSUPPORTED_OS'|'RESOURCE_TERMINATED', 'startedAt': datetime(2015, 1, 1), 'completedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) –
items (list) –
The list of on-demand scans that match the request.
(dict) –
Details of a single on-demand scan of a resource.
scanId (string) –
The unique identifier of the on-demand scan.
resourceId (string) –
The ID of the resource that was scanned.
resourceType (string) –
The type of the resource that was scanned.
scanStatus (string) –
The current status of the on-demand scan.
scanStatusReason (string) –
The reason associated with the current on-demand scan status.
startedAt (datetime) –
The date and time, in ISO 8601 format, when the on-demand scan started.
completedAt (datetime) –
The date and time, in ISO 8601 format, when the on-demand scan completed. This field is absent if the scan has not completed.
nextToken (string) –
A pagination token to use in a subsequent request to retrieve the next page of results. This field is absent when there are no more results.
Exceptions