Class CfnAutomationRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.securityhub.CfnAutomationRule
- All Implemented Interfaces:
IInspectable
,ITaggableV2
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:56:05.979Z")
@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") .ruleName("ruleName") .ruleOrder(123) // the properties below are optional .isTerminal(false) .ruleStatus("ruleStatus") .tags(Map.of( "tagsKey", "tags")) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
One or more actions that AWS Security Hub takes when a finding matches the defined criteria of a rule.static interface
Identifies the finding fields that the automation rule action updates when a finding matches the defined criteria.static interface
The criteria that determine which findings a rule applies to.static final class
A fluent builder forCfnAutomationRule
.static interface
A date filter for querying findings.static interface
A date range for the date filter.static interface
A map filter for filtering AWS Security Hub findings.static interface
The updated note.static interface
A number filter for querying findings.static interface
Provides details about a list of findings that the current finding relates to.static interface
Updates to the severity information for a finding.static interface
A string filter for filtering AWS Security Hub findings.static interface
Used to update information about the investigation into the finding.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnAutomationRule
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAutomationRule
(software.amazon.jsii.JsiiObjectRef objRef) CfnAutomationRule
(software.constructs.Construct scope, String id, CfnAutomationRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionOne or more actions to update finding fields if a finding matches the conditions specified inCriteria
.A timestamp that indicates when the rule was created.The principal that created the rule.The Amazon Resource Name (ARN) of the automation rule that you create.A timestamp that indicates when the rule was most recently updated.Tag Manager which manages the tags for this resource.A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings.A description of the rule.Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.The name of the rule.An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.Whether the rule is active after it is created.getTags()
User-defined tags associated with an automation rule.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setActions
(List<Object> value) One or more actions to update finding fields if a finding matches the conditions specified inCriteria
.void
setActions
(IResolvable value) One or more actions to update finding fields if a finding matches the conditions specified inCriteria
.void
setCriteria
(IResolvable value) A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings.void
A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings.void
setDescription
(String value) A description of the rule.void
setIsTerminal
(Boolean value) Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.void
setIsTerminal
(IResolvable value) Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.void
setRuleName
(String value) The name of the rule.void
setRuleOrder
(Number value) An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.void
setRuleStatus
(String value) Whether the rule is active after it is created.void
User-defined tags associated with an automation rule.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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, @NotNull 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. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- 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 classCfnResource
- Parameters:
props
- This parameter is required.
-
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
The principal that created the rule.For example,
arn:aws:sts::123456789012:assumed-role/Developer-Role/JaneDoe
. -
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
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
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getActions
One or more actions to update finding fields if a finding matches the conditions specified inCriteria
. -
setActions
One or more actions to update finding fields if a finding matches the conditions specified inCriteria
. -
setActions
One or more actions to update finding fields if a finding matches the conditions specified inCriteria
. -
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
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(@NotNull 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
A description of the rule. -
setDescription
A description of the rule. -
getRuleName
The name of the rule. -
setRuleName
The name of the rule. -
getRuleOrder
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. -
setRuleOrder
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. -
getIsTerminal
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. -
setIsTerminal
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. -
setIsTerminal
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. -
getRuleStatus
Whether the rule is active after it is created. -
setRuleStatus
Whether the rule is active after it is created. -
getTags
User-defined tags associated with an automation rule. -
setTags
User-defined tags associated with an automation rule.
-