Class CfnArchiveRule

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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:01.895Z") @Stability(Stable) public class CfnArchiveRule extends CfnResource implements IInspectable, IArchiveRuleRef
Creates an archive rule for the specified analyzer.

Archive rules automatically archive new findings that meet the criteria you define when you create the rule.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.accessanalyzer.*;
 CfnArchiveRule cfnArchiveRule = CfnArchiveRule.Builder.create(this, "MyCfnArchiveRule")
         .analyzerName("analyzerName")
         .filter(Map.of(
                 "filterKey", FilterItemsProperty.builder()
                         .contains(List.of("contains"))
                         .eq(List.of("eq"))
                         .exists(false)
                         .neq(List.of("neq"))
                         .build()))
         .ruleName("ruleName")
         .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

    • CfnArchiveRule

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

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

      @Stability(Stable) public CfnArchiveRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnArchiveRuleProps props)
      Create a new AWS::AccessAnalyzer::ArchiveRule.

      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. This parameter is required.
  • Method Details

    • arnForArchiveRule

      @Stability(Stable) @NotNull public static String arnForArchiveRule(@NotNull IArchiveRuleRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnArchiveRule

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

      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.
    • getArchiveRuleRef

      @Stability(Stable) @NotNull public ArchiveRuleReference getArchiveRuleRef()
      A reference to a ArchiveRule resource.
      Specified by:
      getArchiveRuleRef in interface IArchiveRuleRef
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the archive rule.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The time at which the archive rule was created.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The time at which the archive rule was last updated.
    • 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
    • getAnalyzerName

      @Stability(Stable) @NotNull public String getAnalyzerName()
      The name of the analyzer for the archive rule.
    • setAnalyzerName

      @Stability(Stable) public void setAnalyzerName(@NotNull String value)
      The name of the analyzer for the archive rule.
    • getFilter

      @Stability(Stable) @NotNull public Object getFilter()
      The criteria for the archive rule.

      Returns union: either IResolvable or Mapinvalid input: '<'String, either IResolvable or CfnArchiveRule.FilterItemsProperty>

    • setFilter

      @Stability(Stable) public void setFilter(@NotNull IResolvable value)
      The criteria for the archive rule.
    • setFilter

      @Stability(Stable) public void setFilter(@NotNull Map<String,Object> value)
      The criteria for the archive rule.
    • getRuleName

      @Stability(Stable) @NotNull public String getRuleName()
      The name of the archive rule.
    • setRuleName

      @Stability(Stable) public void setRuleName(@NotNull String value)
      The name of the archive rule.