Class CfnAutomationRule

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.98.0 (build 00b106d)", date="2024-05-08T21:35:13.794Z") @Stability(Stable) public class CfnAutomationRule extends CfnResource implements IInspectable, ITaggableV2
The AWS::SecurityHub::AutomationRule resource specifies an automation rule based on input parameters.

For more information, see Automation rules in the AWS Security Hub User Guide .

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.*;
 Object id;
 Object updatedBy;
 CfnAutomationRule cfnAutomationRule = CfnAutomationRule.Builder.create(this, "MyCfnAutomationRule")
         .actions(List.of(AutomationRulesActionProperty.builder()
                 .findingFieldsUpdate(AutomationRulesFindingFieldsUpdateProperty.builder()
                         .confidence(123)
                         .criticality(123)
                         .note(NoteUpdateProperty.builder()
                                 .text("text")
                                 .updatedBy(updatedBy)
                                 .build())
                         .relatedFindings(List.of(RelatedFindingProperty.builder()
                                 .id(id)
                                 .productArn("productArn")
                                 .build()))
                         .severity(SeverityUpdateProperty.builder()
                                 .label("label")
                                 .normalized(123)
                                 .product(123)
                                 .build())
                         .types(List.of("types"))
                         .userDefinedFields(Map.of(
                                 "userDefinedFieldsKey", "userDefinedFields"))
                         .verificationState("verificationState")
                         .workflow(WorkflowUpdateProperty.builder()
                                 .status("status")
                                 .build())
                         .build())
                 .type("type")
                 .build()))
         .criteria(AutomationRulesFindingFiltersProperty.builder()
                 .awsAccountId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .companyName(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .complianceAssociatedStandardsId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .complianceSecurityControlId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .complianceStatus(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .confidence(List.of(NumberFilterProperty.builder()
                         .eq(123)
                         .gte(123)
                         .lte(123)
                         .build()))
                 .createdAt(List.of(DateFilterProperty.builder()
                         .dateRange(DateRangeProperty.builder()
                                 .unit("unit")
                                 .value(123)
                                 .build())
                         .end("end")
                         .start("start")
                         .build()))
                 .criticality(List.of(NumberFilterProperty.builder()
                         .eq(123)
                         .gte(123)
                         .lte(123)
                         .build()))
                 .description(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .firstObservedAt(List.of(DateFilterProperty.builder()
                         .dateRange(DateRangeProperty.builder()
                                 .unit("unit")
                                 .value(123)
                                 .build())
                         .end("end")
                         .start("start")
                         .build()))
                 .generatorId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .id(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .lastObservedAt(List.of(DateFilterProperty.builder()
                         .dateRange(DateRangeProperty.builder()
                                 .unit("unit")
                                 .value(123)
                                 .build())
                         .end("end")
                         .start("start")
                         .build()))
                 .noteText(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .noteUpdatedAt(List.of(DateFilterProperty.builder()
                         .dateRange(DateRangeProperty.builder()
                                 .unit("unit")
                                 .value(123)
                                 .build())
                         .end("end")
                         .start("start")
                         .build()))
                 .noteUpdatedBy(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .productArn(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .productName(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .recordState(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .relatedFindingsId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .relatedFindingsProductArn(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .resourceDetailsOther(List.of(MapFilterProperty.builder()
                         .comparison("comparison")
                         .key("key")
                         .value("value")
                         .build()))
                 .resourceId(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .resourcePartition(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .resourceRegion(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .resourceTags(List.of(MapFilterProperty.builder()
                         .comparison("comparison")
                         .key("key")
                         .value("value")
                         .build()))
                 .resourceType(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .severityLabel(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .sourceUrl(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .title(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .type(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .updatedAt(List.of(DateFilterProperty.builder()
                         .dateRange(DateRangeProperty.builder()
                                 .unit("unit")
                                 .value(123)
                                 .build())
                         .end("end")
                         .start("start")
                         .build()))
                 .userDefinedFields(List.of(MapFilterProperty.builder()
                         .comparison("comparison")
                         .key("key")
                         .value("value")
                         .build()))
                 .verificationState(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .workflowStatus(List.of(StringFilterProperty.builder()
                         .comparison("comparison")
                         .value("value")
                         .build()))
                 .build())
         .description("description")
         .isTerminal(false)
         .ruleName("ruleName")
         .ruleOrder(123)
         .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

    • CfnAutomationRule

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

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

      @Stability(Stable) public CfnAutomationRule(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnAutomationRuleProps 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.
    • CfnAutomationRule

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

    • 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()
      A timestamp that indicates when the rule was created.

      Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format . The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z .

    • getAttrCreatedBy

      @Stability(Stable) @NotNull public String getAttrCreatedBy()
      The principal that created the rule.

      For example, arn:aws:sts::123456789012:assumed-role/Developer-Role/JaneDoe .

    • getAttrRuleArn

      @Stability(Stable) @NotNull public String getAttrRuleArn()
      The Amazon Resource Name (ARN) of the automation rule that you create.

      For example, arn:aws:securityhub:us-east-1:123456789012:automation-rule/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 .

    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      A timestamp that indicates when the rule was most recently updated.

      Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format . The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z .

    • 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) @Nullable public Object getActions()
      One or more actions to update finding fields if a finding matches the conditions specified in Criteria .
    • setActions

      @Stability(Stable) public void setActions(@Nullable IResolvable value)
      One or more actions to update finding fields if a finding matches the conditions specified in Criteria .
    • setActions

      @Stability(Stable) public void setActions(@Nullable List<Object> value)
      One or more actions to update finding fields if a finding matches the conditions specified in Criteria .
    • getCriteria

      @Stability(Stable) @Nullable public Object getCriteria()
      A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings. If a rule is enabled and a finding matches the criteria specified in this parameter, Security Hub applies the rule action to the finding.
    • setCriteria

      @Stability(Stable) public void setCriteria(@Nullable IResolvable value)
      A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings. If a rule is enabled and a finding matches the criteria specified in this parameter, Security Hub applies the rule action to the finding.
    • setCriteria

      @Stability(Stable) public void setCriteria(@Nullable CfnAutomationRule.AutomationRulesFindingFiltersProperty value)
      A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings. If a rule is enabled and a finding matches the criteria specified in this parameter, Security Hub applies the rule action to the finding.
    • getDescription

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

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the rule.
    • getIsTerminal

      @Stability(Stable) @Nullable public Object getIsTerminal()
      Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
    • setIsTerminal

      @Stability(Stable) public void setIsTerminal(@Nullable Boolean value)
      Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
    • setIsTerminal

      @Stability(Stable) public void setIsTerminal(@Nullable IResolvable value)
      Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
    • getRuleName

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

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

      @Stability(Stable) @Nullable public Number getRuleOrder()
      An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
    • setRuleOrder

      @Stability(Stable) public void setRuleOrder(@Nullable Number value)
      An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
    • getRuleStatus

      @Stability(Stable) @Nullable public String getRuleStatus()
      Whether the rule is active after it is created.
    • setRuleStatus

      @Stability(Stable) public void setRuleStatus(@Nullable String value)
      Whether the rule is active after it is created.
    • getTags

      @Stability(Stable) @Nullable public Map<String,String> getTags()
      User-defined tags associated with an automation rule.
    • setTags

      @Stability(Stable) public void setTags(@Nullable Map<String,String> value)
      User-defined tags associated with an automation rule.