Class CfnAutomationRule
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggableV2,IAutomationRuleRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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.*;
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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceOne or more actions that AWS Security Hub takes when a finding matches the defined criteria of a rule.static interfaceIdentifies the finding fields that the automation rule action updates when a finding matches the defined criteria.static interfaceThe criteria that determine which findings a rule applies to.static final classA fluent builder forCfnAutomationRule.static interfaceA date filter for querying findings.static interfaceA date range for the date filter.static interfaceA map filter for filtering AWS Security Hub findings.static interfaceThe updated note.static interfaceA number filter for querying findings.static interfaceProvides details about a list of findings that the current finding relates to.static interfaceUpdates to the severity information for a finding.static interfaceA string filter for filtering AWS Security Hub findings.static interfaceUsed to update information about the investigation into the finding.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.securityhub.IAutomationRuleRef
IAutomationRuleRef.Jsii$Default, IAutomationRuleRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAutomationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAutomationRule(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.A reference to a AutomationRule resource.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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetActions(List<Object> value) One or more actions to update finding fields if a finding matches the conditions specified inCriteria.voidsetActions(IResolvable value) One or more actions to update finding fields if a finding matches the conditions specified inCriteria.voidsetCriteria(IResolvable value) A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings.voidA set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub uses to filter findings.voidsetDescription(String value) A description of the rule.voidsetIsTerminal(Boolean value) Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.voidsetIsTerminal(IResolvable value) Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.voidsetRuleName(String value) The name of the rule.voidsetRuleOrder(Number value) An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.voidsetRuleStatus(String value) Whether the rule is active after it is created.voidUser-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, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreatedAt
A timestamp that indicates when the rule was created.Uses the
date-timeformat 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-timeformat specified in RFC 3339 section 5.6, Internet Date/Time Format . The value cannot contain spaces. For example,2020-03-22T13:22:13.933Z. -
getAutomationRuleRef
A reference to a AutomationRule resource.- Specified by:
getAutomationRuleRefin interfaceIAutomationRuleRef
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getActions
One or more actions to update finding fields if a finding matches the conditions specified inCriteria.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnAutomationRule.AutomationRulesActionProperty> -
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.Returns union: either
IResolvableorCfnAutomationRule.AutomationRulesFindingFiltersProperty -
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.Returns union: either
BooleanorIResolvable -
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.
-