resource_scan_resources
Creates, updates, deletes, gets or lists a resource_scan_resources resource.
Overview
| Name | resource_scan_resources |
| Type | Resource |
| Id | aws.cloudformation.resource_scan_resources |
Fields
The following fields are returned by SELECT queries:
- list_resource_scan_resources
| Name | Datatype | Description |
|---|---|---|
managed_by_stack | boolean | If true, the resource is managed by a CloudFormation stack. |
resource_identifier | string | A list of up to 256 key-value pairs that identifies for the scanned resource. The key is the name of one of the primary identifiers for the resource. (Primary identifiers are specified in the primaryIdentifier list in the resource schema.) The value is the value of that primary identifier. For example, for a AWS::DynamoDB::Table resource, the primary identifiers is TableName so the key-value pair could be "TableName": "MyDDBTable". For more information, see primaryIdentifier in the CloudFormation Command Line Interface (CLI) User Guide. |
resource_type | string | The type of the resource, such as AWS::DynamoDB::Table. For the list of supported resources, see Resource type support for imports and drift detection In the CloudFormation User Guide |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_resource_scan_resources | select | ResourceScanId, region | ResourceIdentifier, ResourceTypePrefix, TagKey, TagValue, NextToken, MaxResults | Lists the resources from a resource scan. The results can be filtered by resource identifier, resource type prefix, tag key, and tag value. Only resources that match all specified filters are returned. The response indicates whether each returned resource is already managed by CloudFormation. |
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. By default the ListResourceScanResources API action will return at most 100 results in each response. 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.) |
ResourceIdentifier | string | If specified, the returned resources will have the specified resource identifier (or one of them in the case where the resource has multiple identifiers). |
ResourceTypePrefix | string | If specified, the returned resources will be of any of the resource types with the specified prefix. |
TagKey | string | If specified, the returned resources will have a matching tag key. |
TagValue | string | If specified, the returned resources will have a matching tag value. |
SELECT examples
- list_resource_scan_resources
Lists the resources from a resource scan. The results can be filtered by resource identifier, resource type prefix, tag key, and tag value. Only resources that match all specified filters are returned. The response indicates whether each returned resource is already managed by CloudFormation.
SELECT
managed_by_stack,
resource_identifier,
resource_type
FROM aws.cloudformation.resource_scan_resources
WHERE ResourceScanId = '{{ ResourceScanId }}' -- required
AND region = '{{ region }}' -- required
AND ResourceIdentifier = '{{ ResourceIdentifier }}'
AND ResourceTypePrefix = '{{ ResourceTypePrefix }}'
AND TagKey = '{{ TagKey }}'
AND TagValue = '{{ TagValue }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;