# ScanningRuleProperty

The scanning rules associated with the registry.

- Source: Generated at build time
- Type last changed: v2.194.0 · 2 May 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr as ecr } from 'aws-cdk-lib';
const scanningRuleProperty: ecr.CfnRegistryScanningConfiguration.ScanningRuleProperty = {
  repositoryFilters: [{
    filter: 'filter',
    filterType: 'filterType',
  }],
  scanFrequency: 'scanFrequency',
};
```

Python:

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

scanning_rule_property = ecr.CfnRegistryScanningConfiguration.ScanningRuleProperty(
    repository_filters=[ecr.CfnRegistryScanningConfiguration.RepositoryFilterProperty(
        filter="filter",
        filter_type="filterType"
    )],
    scan_frequency="scanFrequency"
)
```

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.ecr.*;

ScanningRuleProperty scanningRuleProperty = ScanningRuleProperty.builder()
        .repositoryFilters(List.of(RepositoryFilterProperty.builder()
                .filter("filter")
                .filterType("filterType")
                .build()))
        .scanFrequency("scanFrequency")
        .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.ECR;

var scanningRuleProperty = new ScanningRuleProperty {
    RepositoryFilters = new [] { new RepositoryFilterProperty {
        Filter = "filter",
        FilterType = "filterType"
    } },
    ScanFrequency = "scanFrequency"
};
```

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"

scanningRuleProperty := &ScanningRuleProperty{
	RepositoryFilters: []interface{}{
		&RepositoryFilterProperty{
			Filter: jsii.String("filter"),
			FilterType: jsii.String("filterType"),
		},
	},
	ScanFrequency: jsii.String("scanFrequency"),
}
```

## Properties

- `repositoryFilters`: [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) | [CfnRegistryScanningConfiguration.RepositoryFilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.CfnRegistryScanningConfiguration.RepositoryFilterProperty.html)[] (required) — The details of a scanning repository filter.

  For more information on how to use filters, see [Using filters](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html#image-scanning-filters) in the *Amazon Elastic Container Registry User Guide* .

- `scanFrequency`: string (required) — The frequency that scans are performed at for a private registry.

  When the `ENHANCED` scan type is specified, the supported scan frequencies are `CONTINUOUS_SCAN` and `SCAN_ON_PUSH` . When the `BASIC` scan type is specified, the `SCAN_ON_PUSH` scan frequency is supported. If scan on push is not specified, then the `MANUAL` scan frequency is set by default.
