Skip to main content

resource_scan_related_resources

Creates, updates, deletes, gets or lists a resource_scan_related_resources resource.

Overview

Nameresource_scan_related_resources
TypeResource
Idaws.cloudformation.resource_scan_related_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
managed_by_stackbooleanIf true, the resource is managed by a CloudFormation stack.
resource_identifierstringA 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_typestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_resource_scan_related_resourcesselectResourceScanId, Resources, regionNextToken, MaxResultsLists the related resources for a list of resources from a resource scan. 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.

NameDatatypeDescription
ResourceScanIdstringThe Amazon Resource Name (ARN) of the resource scan.
ResourcesarrayThe list of resources for which you want to get the related resources. Up to 100 resources can be provided.
regionstringAWS region (default: us-east-1)
MaxResultsintegerIf 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 ListResourceScanRelatedResources API action will return up to 100 results in each response. The maximum value is 100.
NextTokenstringThe token for the next set of items to return. (You received this token from a previous call.)

SELECT examples

Lists the related resources for a list of resources from a resource scan. 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_related_resources
WHERE ResourceScanId = '{{ ResourceScanId }}' -- required
AND Resources = '{{ Resources }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;