resource_scans
Creates, updates, deletes, gets or lists a resource_scans resource.
Overview
| Name | resource_scans |
| Type | Resource |
| Id | aws.cloudformation.resource_scans |
Fields
The following fields are returned by SELECT queries:
- describe_resource_scan
- list_resource_scans
| Name | Datatype | Description |
|---|---|---|
types | string | An array of strings where each string represents an Amazon Web Services resource type you want to scan. Each string defines the resource type using the format AWS::ServiceName::ResourceType, for example, AWS::DynamoDB::Table. For the full list of supported resource types, see the Resource type support table in the CloudFormation User Guide. To scan all resource types within a service, you can use a wildcard, represented by an asterisk (). You can place an asterisk at only the end of the string, for example, AWS::S3::. |
| Name | Datatype | Description |
|---|---|---|
end_time | string | The time that the resource scan was finished. |
percentage_completed | number | The percentage of the resource scan that has been completed. |
resource_scan_id | string | The Amazon Resource Name (ARN) of the resource scan. |
scan_type | string | The scan type that has been completed. |
start_time | string | The time that the resource scan was started. |
status | string | Status of the resource scan. IN_PROGRESS The resource scan is still in progress. COMPLETE The resource scan is complete. EXPIRED The resource scan has expired. FAILED The resource scan has failed. |
status_reason | string | The reason for the resource scan status, providing more information if a failure happened. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resource_scan | select | ResourceScanId, region | Describes details of a resource scan. | |
list_resource_scans | select | region | NextToken, MaxResults, ScanTypeFilter | List the resource scans from newest to oldest. By default it will return up to 10 resource scans. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
ResourceScanId | string | The Amazon Resource Name (ARN) of the resource scan. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | If the number of available results exceeds this maximum, the response includes a NextToken value that you can use for the NextToken parameter to get the next set of results. The default value is 10. The maximum value is 100. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
ScanTypeFilter | string | The scan type that you want to get summary information about. The default is FULL. |
SELECT examples
- describe_resource_scan
- list_resource_scans
Describes details of a resource scan.
SELECT
types
FROM aws.cloudformation.resource_scans
WHERE ResourceScanId = '{{ ResourceScanId }}' -- required
AND region = '{{ region }}' -- required
;
List the resource scans from newest to oldest. By default it will return up to 10 resource scans.
SELECT
end_time,
percentage_completed,
resource_scan_id,
scan_type,
start_time,
status,
status_reason
FROM aws.cloudformation.resource_scans
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND ScanTypeFilter = '{{ ScanTypeFilter }}'
;