Class CfnResourceScan

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IResourceScanRef, IEnvironmentAware, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:50:55.379Z") @Stability(Stable) public class CfnResourceScan extends CfnResource implements IInspectable, IResourceScanRef
Represents a CloudFormation resource scan that discovers existing AWS resources in an account and region.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 CfnResourceScan cfnResourceScan = CfnResourceScan.Builder.create(this, "MyCfnResourceScan")
         .scanFilters(List.of(ScanFilterProperty.builder()
                 .types(List.of("types"))
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnResourceScan

      protected CfnResourceScan(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnResourceScan

      protected CfnResourceScan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnResourceScan

      @Stability(Stable) public CfnResourceScan(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnResourceScanProps props)
      Create a new AWS::CloudFormation::ResourceScan.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnResourceScan

      @Stability(Stable) public CfnResourceScan(@NotNull software.constructs.Construct scope, @NotNull String id)
      Create a new AWS::CloudFormation::ResourceScan.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • arnForResourceScan

      @Stability(Stable) @NotNull public static String arnForResourceScan(@NotNull IResourceScanRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnResourceScan

      @Stability(Stable) @NotNull public static Boolean isCfnResourceScan(@NotNull Object x)
      Checks whether the given object is a CfnResourceScan.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrPercentageCompleted

      @Stability(Stable) @NotNull public IResolvable getAttrPercentageCompleted()
      The percentage of the resource scan that has been completed.
    • getAttrResourceScanId

      @Stability(Stable) @NotNull public String getAttrResourceScanId()
      The Amazon Resource Name (ARN) of the resource scan.
    • getAttrScanId

      @Stability(Stable) @NotNull public String getAttrScanId()
      The unique identifier portion of the resource scan ARN.
    • getAttrStartTime

      @Stability(Stable) @NotNull public String getAttrStartTime()
      The time that the resource scan was started.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      Status of the resource scan.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getResourceScanRef

      @Stability(Stable) @NotNull public ResourceScanReference getResourceScanRef()
      A reference to a ResourceScan resource.
      Specified by:
      getResourceScanRef in interface IResourceScanRef
    • getScanFilters

      @Stability(Stable) @Nullable public Object getScanFilters()
      The scan filters to use.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnResourceScan.ScanFilterProperty>

    • setScanFilters

      @Stability(Stable) public void setScanFilters(@Nullable IResolvable value)
      The scan filters to use.
    • setScanFilters

      @Stability(Stable) public void setScanFilters(@Nullable List<Object> value)
      The scan filters to use.