Class CfnAutomationRuleV2PropsMixin.StringFilterProperty
A string filter for filtering AWS Security Hub CSPM findings.
Inherited Members
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.SecurityHub
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnAutomationRuleV2PropsMixin.StringFilterProperty : CfnAutomationRuleV2PropsMixin.IStringFilterProperty
Syntax (vb)
Public Class CfnAutomationRuleV2PropsMixin.StringFilterProperty Implements CfnAutomationRuleV2PropsMixin.IStringFilterProperty
Remarks
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.CfnPropertyMixins.AWS.SecurityHub;
var stringFilterProperty = new StringFilterProperty {
Comparison = "comparison",
Value = "value"
};
Synopsis
Constructors
| StringFilterProperty() | A string filter for filtering AWS Security Hub CSPM findings. |
Properties
| Comparison | The condition to apply to a string value when filtering Security Hub CSPM findings. |
| Value | The string filter value. |
Constructors
StringFilterProperty()
A string filter for filtering AWS Security Hub CSPM findings.
public StringFilterProperty()
Remarks
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.CfnPropertyMixins.AWS.SecurityHub;
var stringFilterProperty = new StringFilterProperty {
Comparison = "comparison",
Value = "value"
};
Properties
Comparison
The condition to apply to a string value when filtering Security Hub CSPM findings.
public string? Comparison { get; set; }
Property Value
Remarks
To search for values that have the filter value, use one of the following comparison operators:
CONTAINS , EQUALS , and PREFIX filters on the same field are joined by OR . A finding matches if it matches any one of those filters. For example, the filters Title CONTAINS CloudFront OR Title CONTAINS CloudWatch match a finding that includes either CloudFront , CloudWatch , or both strings in the title.
To search for values that don’t have the filter value, use one of the following comparison operators:
NOT_CONTAINS , NOT_EQUALS , and PREFIX_NOT_EQUALS filters on the same field are joined by AND . A finding matches only if it matches all of those filters. For example, the filters Title NOT_CONTAINS CloudFront AND Title NOT_CONTAINS CloudWatch match a finding that excludes both CloudFront and CloudWatch in the title.
You can’t have both a CONTAINS filter and a NOT_CONTAINS filter on the same field. Similarly, you can't provide both an EQUALS filter and a NOT_EQUALS or PREFIX_NOT_EQUALS filter on the same field. Combining filters in this way returns an error. CONTAINS filters can only be used with other CONTAINS filters. NOT_CONTAINS filters can only be used with other NOT_CONTAINS filters.
You can combine PREFIX filters with NOT_EQUALS or PREFIX_NOT_EQUALS filters for the same field. Security Hub CSPM first processes the PREFIX filters, and then the NOT_EQUALS or PREFIX_NOT_EQUALS filters.
For example, for the following filters, Security Hub CSPM first identifies findings that have resource types that start with either AwsIam or AwsEc2 . It then excludes findings that have a resource type of AwsIamPolicy and findings that have a resource type of AwsEc2NetworkInterface .
CONTAINS and NOT_CONTAINS operators can be used only with automation rules V1. CONTAINS_WORD operator is only supported in GetFindingsV2 , GetFindingStatisticsV2 , GetResourcesV2 , and GetResourceStatisticsV2 APIs. For more information, see Automation rules in the AWS Security Hub CSPM User Guide .
Value
The string filter value.
public string? Value { get; set; }
Property Value
Remarks
Filter values are case sensitive. For example, the product name for control-based findings is Security Hub CSPM . If you provide security hub as the filter value, there's no match.