Class CfnAutomationRule
The AWS::SecurityHub::AutomationRule
resource specifies an automation rule based on input parameters.
Inherited Members
Namespace: Amazon.CDK.AWS.SecurityHub
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAutomationRule : CfnResource, IInspectable, ITaggableV2
Syntax (vb)
Public Class CfnAutomationRule
Inherits CfnResource
Implements IInspectable, ITaggableV2
Remarks
For more information, see Automation rules in the AWS Security Hub User Guide .
CloudformationResource: AWS::SecurityHub::AutomationRule
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SecurityHub;
var id;
var updatedBy;
var cfnAutomationRule = new CfnAutomationRule(this, "MyCfnAutomationRule", new CfnAutomationRuleProps {
Actions = new [] { new AutomationRulesActionProperty {
FindingFieldsUpdate = new AutomationRulesFindingFieldsUpdateProperty {
Confidence = 123,
Criticality = 123,
Note = new NoteUpdateProperty {
Text = "text",
UpdatedBy = updatedBy
},
RelatedFindings = new [] { new RelatedFindingProperty {
Id = id,
ProductArn = "productArn"
} },
Severity = new SeverityUpdateProperty {
Label = "label",
Normalized = 123,
Product = 123
},
Types = new [] { "types" },
UserDefinedFields = new Dictionary<string, string> {
{ "userDefinedFieldsKey", "userDefinedFields" }
},
VerificationState = "verificationState",
Workflow = new WorkflowUpdateProperty {
Status = "status"
}
},
Type = "type"
} },
Criteria = new AutomationRulesFindingFiltersProperty {
AwsAccountId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
CompanyName = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ComplianceAssociatedStandardsId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ComplianceSecurityControlId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ComplianceStatus = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
Confidence = new [] { new NumberFilterProperty {
Eq = 123,
Gte = 123,
Lte = 123
} },
CreatedAt = new [] { new DateFilterProperty {
DateRange = new DateRangeProperty {
Unit = "unit",
Value = 123
},
End = "end",
Start = "start"
} },
Criticality = new [] { new NumberFilterProperty {
Eq = 123,
Gte = 123,
Lte = 123
} },
Description = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
FirstObservedAt = new [] { new DateFilterProperty {
DateRange = new DateRangeProperty {
Unit = "unit",
Value = 123
},
End = "end",
Start = "start"
} },
GeneratorId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
Id = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
LastObservedAt = new [] { new DateFilterProperty {
DateRange = new DateRangeProperty {
Unit = "unit",
Value = 123
},
End = "end",
Start = "start"
} },
NoteText = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
NoteUpdatedAt = new [] { new DateFilterProperty {
DateRange = new DateRangeProperty {
Unit = "unit",
Value = 123
},
End = "end",
Start = "start"
} },
NoteUpdatedBy = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ProductArn = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ProductName = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
RecordState = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
RelatedFindingsId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
RelatedFindingsProductArn = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ResourceDetailsOther = new [] { new MapFilterProperty {
Comparison = "comparison",
Key = "key",
Value = "value"
} },
ResourceId = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ResourcePartition = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ResourceRegion = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
ResourceTags = new [] { new MapFilterProperty {
Comparison = "comparison",
Key = "key",
Value = "value"
} },
ResourceType = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
SeverityLabel = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
SourceUrl = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
Title = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
Type = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
UpdatedAt = new [] { new DateFilterProperty {
DateRange = new DateRangeProperty {
Unit = "unit",
Value = 123
},
End = "end",
Start = "start"
} },
UserDefinedFields = new [] { new MapFilterProperty {
Comparison = "comparison",
Key = "key",
Value = "value"
} },
VerificationState = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} },
WorkflowStatus = new [] { new StringFilterProperty {
Comparison = "comparison",
Value = "value"
} }
},
Description = "description",
IsTerminal = false,
RuleName = "ruleName",
RuleOrder = 123,
RuleStatus = "ruleStatus",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
});
Synopsis
Constructors
CfnAutomationRule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAutomationRule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAutomationRule(Construct, String, ICfnAutomationRuleProps) |
Properties
Actions | One or more actions to update finding fields if a finding matches the conditions specified in |
AttrCreatedAt | A timestamp that indicates when the rule was created. |
AttrCreatedBy | The principal that created the rule. |
AttrRuleArn | The Amazon Resource Name (ARN) of the automation rule that you create. |
AttrUpdatedAt | A timestamp that indicates when the rule was most recently updated. |
CdkTagManager | Tag Manager which manages the tags for this resource. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Criteria | 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. |
Description | A description of the rule. |
IsTerminal | Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. |
RuleName | The name of the rule. |
RuleOrder | An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. |
RuleStatus | Whether the rule is active after it is created. |
Tags | User-defined tags associated with an automation rule. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAutomationRule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAutomationRule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAutomationRule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAutomationRule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAutomationRule(Construct, String, ICfnAutomationRuleProps)
public CfnAutomationRule(Construct scope, string id, ICfnAutomationRuleProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAutomationRuleProps
Resource properties.
Properties
Actions
One or more actions to update finding fields if a finding matches the conditions specified in Criteria
.
public virtual object Actions { get; set; }
Property Value
System.Object
AttrCreatedAt
A timestamp that indicates when the rule was created.
public virtual string AttrCreatedAt { get; }
Property Value
System.String
Remarks
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
.
CloudformationAttribute: CreatedAt
AttrCreatedBy
The principal that created the rule.
public virtual string AttrCreatedBy { get; }
Property Value
System.String
Remarks
For example, arn:aws:sts::123456789012:assumed-role/Developer-Role/JaneDoe
.
CloudformationAttribute: CreatedBy
AttrRuleArn
The Amazon Resource Name (ARN) of the automation rule that you create.
public virtual string AttrRuleArn { get; }
Property Value
System.String
Remarks
For example, arn:aws:securityhub:us-east-1:123456789012:automation-rule/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
.
CloudformationAttribute: RuleArn
AttrUpdatedAt
A timestamp that indicates when the rule was most recently updated.
public virtual string AttrUpdatedAt { get; }
Property Value
System.String
Remarks
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
.
CloudformationAttribute: UpdatedAt
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Criteria
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.
public virtual object Criteria { get; set; }
Property Value
System.Object
Description
A description of the rule.
public virtual string Description { get; set; }
Property Value
System.String
IsTerminal
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
public virtual object IsTerminal { get; set; }
Property Value
System.Object
RuleName
The name of the rule.
public virtual string RuleName { get; set; }
Property Value
System.String
RuleOrder
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
public virtual Nullable<double> RuleOrder { get; set; }
Property Value
System.Nullable<System.Double>
RuleStatus
Whether the rule is active after it is created.
public virtual string RuleStatus { get; set; }
Property Value
System.String
Tags
User-defined tags associated with an automation rule.
public virtual IDictionary<string, string> Tags { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>