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.

Starts a scan of the resources in this account in this Region. You can the status of a scan using the ListResourceScans API action.

Note:

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

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

Syntax

C#
public abstract StartResourceScanResponse StartResourceScan(
         StartResourceScanRequest request
)

Parameters

request
Type: Amazon.CloudFormation.Model.StartResourceScanRequest

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

Return Value


The response from the StartResourceScan 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.
ResourceScanLimitExceededException The limit on resource scans has been exceeded. Reasons include: Exceeded the daily quota for resource scans. A resource scan recently failed. You must wait 10 minutes before starting a new resource scan. The last resource scan failed after exceeding 100,000 resources. When this happens, you must wait 24 hours before starting a new resource scan.

Examples

This example shows how to start a new resource scan

To start a resource scan


var client = new AmazonCloudFormationClient();
var response = client.StartResourceScan(new StartResourceScanRequest 
{
});

string resourceScanId = response.ResourceScanId;

            

Version Information

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

See Also