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 related resources for a list of resources from a resource scan. 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 ListResourceScanRelatedResourcesAsync.

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

Syntax

C#
public abstract ListResourceScanRelatedResourcesResponse ListResourceScanRelatedResources(
         ListResourceScanRelatedResourcesRequest request
)

Parameters

request
Type: Amazon.CloudFormation.Model.ListResourceScanRelatedResourcesRequest

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

Return Value


The response from the ListResourceScanRelatedResources 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 related to the passed in resources

To list resource scan related resources


var client = new AmazonCloudFormationClient();
var response = client.ListResourceScanRelatedResources(new ListResourceScanRelatedResourcesRequest 
{
    ResourceScanId = "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1",
    Resources = new List<ScannedResourceIdentifier> {
        new ScannedResourceIdentifier {
            ResourceIdentifier = new Dictionary<string, string> {
                { "BucketName", "jazz-bucket" }
            },
            ResourceType = "AWS::S3::Bucket"
        },
        new ScannedResourceIdentifier {
            ResourceIdentifier = new Dictionary<string, string> {
                { "DhcpOptionsId", "random-id123" }
            },
            ResourceType = "AWS::EC2::DHCPOptions"
        }
    }
});

List<ScannedResource> relatedResources = response.RelatedResources;

            

Version Information

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

See Also