AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to ListResourceScanResourcesAsync.

Namespace: Amazon.CloudFormation
Assembly: AWSSDK.CloudFormation.dll
Version: 3.x.y.z

Syntax

C#
public abstract ListResourceScanResourcesResponse ListResourceScanResources(
         ListResourceScanResourcesRequest request
)

Parameters

request
Type: Amazon.CloudFormation.Model.ListResourceScanResourcesRequest

Container for the necessary parameters to execute the ListResourceScanResources service method.

Return Value


The response from the ListResourceScanResources service method, as returned by CloudFormation.

Exceptions

ExceptionCondition
ResourceScanInProgressException A resource scan is currently in progress. Only one can be run at a time for an account in a Region.
ResourceScanNotFoundException The resource scan was not found.

Examples

This example lists the resources in your resource scan

To list the resources in your resource scan


var client = new AmazonCloudFormationClient();
var response = client.ListResourceScanResources(new ListResourceScanResourcesRequest 
{
    ResourceScanId = "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1"
});

string nextToken = response.NextToken;
List<ScannedResource> resources = response.Resources;

            

This example lists the resources in your resource scan filtering only the resources that start with the passed in prefix

To list the resources in your resource scan for specific resource type


var client = new AmazonCloudFormationClient();
var response = client.ListResourceScanResources(new ListResourceScanResourcesRequest 
{
    ResourceScanId = "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1",
    ResourceTypePrefix = "AWS::S3"
});

string nextToken = response.NextToken;
List<ScannedResource> resources = response.Resources;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also