# AnalysisRuleProperty

Contains information about analysis rules for the analyzer.

Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

- Source: Generated at build time
- Type last changed: v2.169.0 · 21 Nov 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_accessanalyzer as accessanalyzer } from 'aws-cdk-lib';
const analysisRuleProperty: accessanalyzer.CfnAnalyzer.AnalysisRuleProperty = {
  exclusions: [{
    accountIds: ['accountIds'],
    resourceTags: [[{
      key: 'key',
      value: 'value',
    }]],
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_accessanalyzer as accessanalyzer

analysis_rule_property = accessanalyzer.CfnAnalyzer.AnalysisRuleProperty(
    exclusions=[accessanalyzer.CfnAnalyzer.AnalysisRuleCriteriaProperty(
        account_ids=["accountIds"],
        resource_tags=[[CfnTag(
            key="key",
            value="value"
        )]]
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.accessanalyzer.*;

AnalysisRuleProperty analysisRuleProperty = AnalysisRuleProperty.builder()
        .exclusions(List.of(AnalysisRuleCriteriaProperty.builder()
                .accountIds(List.of("accountIds"))
                .resourceTags(List.of(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build())))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AccessAnalyzer;

var analysisRuleProperty = new AnalysisRuleProperty {
    Exclusions = new [] { new AnalysisRuleCriteriaProperty {
        AccountIds = new [] { "accountIds" },
        ResourceTags = new [] { new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } } }
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

analysisRuleProperty := &AnalysisRuleProperty{
	Exclusions: []interface{}{
		&AnalysisRuleCriteriaProperty{
			AccountIds: []*string{
				jsii.String("accountIds"),
			},
			ResourceTags: []interface{}{
				[]interface{}{
					&CfnTag{
						Key: jsii.String("key"),
						Value: jsii.String("value"),
					},
				},
			},
		},
	},
}
```

## Properties

- `exclusions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnalyzer.AnalysisRuleCriteriaProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_accessanalyzer.CfnAnalyzer.AnalysisRuleCriteriaProperty.html)[] — A list of rules for the analyzer containing criteria to exclude from analysis.

  Entities that meet the rule criteria will not generate findings.
