Class CfnAutomationRuleV2

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

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-04T12:43:15.520Z") @Stability(Stable) public class CfnAutomationRuleV2 extends CfnResource implements IInspectable, ITaggableV2
Creates a V2 automation rule.

This API is in private preview and subject to change.

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.securityhub.*;
 CfnAutomationRuleV2 cfnAutomationRuleV2 = CfnAutomationRuleV2.Builder.create(this, "MyCfnAutomationRuleV2")
         .actions(List.of(AutomationRulesActionV2Property.builder()
                 .type("type")
                 // the properties below are optional
                 .externalIntegrationConfiguration(ExternalIntegrationConfigurationProperty.builder()
                         .connectorArn("connectorArn")
                         .build())
                 .findingFieldsUpdate(AutomationRulesFindingFieldsUpdateV2Property.builder()
                         .comment("comment")
                         .severityId(123)
                         .statusId(123)
                         .build())
                 .build()))
         .criteria(CriteriaProperty.builder()
                 .ocsfFindingCriteria(OcsfFindingFiltersProperty.builder()
                         .compositeFilters(List.of(CompositeFilterProperty.builder()
                                 .booleanFilters(List.of(OcsfBooleanFilterProperty.builder()
                                         .fieldName("fieldName")
                                         .filter(BooleanFilterProperty.builder()
                                                 .value(false)
                                                 .build())
                                         .build()))
                                 .dateFilters(List.of(OcsfDateFilterProperty.builder()
                                         .fieldName("fieldName")
                                         .filter(DateFilterProperty.builder()
                                                 .dateRange(DateRangeProperty.builder()
                                                         .unit("unit")
                                                         .value(123)
                                                         .build())
                                                 .end("end")
                                                 .start("start")
                                                 .build())
                                         .build()))
                                 .mapFilters(List.of(OcsfMapFilterProperty.builder()
                                         .fieldName("fieldName")
                                         .filter(MapFilterProperty.builder()
                                                 .comparison("comparison")
                                                 .key("key")
                                                 .value("value")
                                                 .build())
                                         .build()))
                                 .numberFilters(List.of(OcsfNumberFilterProperty.builder()
                                         .fieldName("fieldName")
                                         .filter(NumberFilterProperty.builder()
                                                 .eq(123)
                                                 .gte(123)
                                                 .lte(123)
                                                 .build())
                                         .build()))
                                 .operator("operator")
                                 .stringFilters(List.of(OcsfStringFilterProperty.builder()
                                         .fieldName("fieldName")
                                         .filter(StringFilterProperty.builder()
                                                 .comparison("comparison")
                                                 .value("value")
                                                 .build())
                                         .build()))
                                 .build()))
                         .compositeOperator("compositeOperator")
                         .build())
                 .build())
         .description("description")
         .ruleName("ruleName")
         .ruleOrder(123)
         // the properties below are optional
         .ruleStatus("ruleStatus")
         .tags(Map.of(
                 "tagsKey", "tags"))
         .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

    • CfnAutomationRuleV2

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

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

      @Stability(Stable) public CfnAutomationRuleV2(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAutomationRuleV2Props props)
      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

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

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the V2 automation rule was created.
    • getAttrRuleArn

      @Stability(Stable) @NotNull public String getAttrRuleArn()
      The ARN of the V2 automation rule.
    • getAttrRuleId

      @Stability(Stable) @NotNull public String getAttrRuleId()
      The ID of the V2 automation rule.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the V2 automation rule was updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull public Object getActions()
      A list of actions to be performed when the rule criteria is met.
    • setActions

      @Stability(Stable) public void setActions(@NotNull IResolvable value)
      A list of actions to be performed when the rule criteria is met.
    • setActions

      @Stability(Stable) public void setActions(@NotNull List<Object> value)
      A list of actions to be performed when the rule criteria is met.
    • getCriteria

      @Stability(Stable) @NotNull public Object getCriteria()
      The filtering type and configuration of the automation rule.
    • setCriteria

      @Stability(Stable) public void setCriteria(@NotNull IResolvable value)
      The filtering type and configuration of the automation rule.
    • setCriteria

      @Stability(Stable) public void setCriteria(@NotNull CfnAutomationRuleV2.CriteriaProperty value)
      The filtering type and configuration of the automation rule.
    • getDescription

      @Stability(Stable) @NotNull public String getDescription()
      A description of the V2 automation rule.
    • setDescription

      @Stability(Stable) public void setDescription(@NotNull String value)
      A description of the V2 automation rule.
    • getRuleName

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

      @Stability(Stable) public void setRuleName(@NotNull String value)
      The name of the V2 automation rule.
    • getRuleOrder

      @Stability(Stable) @NotNull public Number getRuleOrder()
      The value for the rule priority.
    • setRuleOrder

      @Stability(Stable) public void setRuleOrder(@NotNull Number value)
      The value for the rule priority.
    • getRuleStatus

      @Stability(Stable) @Nullable public String getRuleStatus()
      The status of the V2 automation rule.
    • setRuleStatus

      @Stability(Stable) public void setRuleStatus(@Nullable String value)
      The status of the V2 automation rule.
    • getTags

      @Stability(Stable) @Nullable public Map<String,String> getTags()
      A list of key-value pairs associated with the V2 automation rule.
    • setTags

      @Stability(Stable) public void setTags(@Nullable Map<String,String> value)
      A list of key-value pairs associated with the V2 automation rule.