Skip to content
v2.277.0

ScanningRuleProperty Struct ​

The scanning rules associated with the registry.

Example ​

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
# 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
// 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();
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"
};
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 ​

repositoryFiltersIResolvable | IResolvable | CfnRegistryScanningConfiguration.RepositoryFilterProperty[]repository_filterstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, RepositoryFilterProperty]]]repositoryFiltersIResolvableRepositoryFiltersIResolvableRepositoryFiltersinterface{}required#
The details of a scanning repository filter.

For more information on how to use filters, see Using filters in the Amazon Elastic Container Registry User Guide .

scanFrequencystringscan_frequencystrscanFrequencyStringScanFrequencystringScanFrequency*stringrequired#
The frequency that scans are performed at for a private registry.
notes

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.