# RepositoryFilterProperty

The filter settings used with image replication.

Specifying a repository filter to a replication rule provides a method for controlling which repositories in a private registry are replicated. If no filters are added, the contents of all repositories are replicated.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 repositoryFilterProperty: ecr.CfnReplicationConfiguration.RepositoryFilterProperty = {
  filter: 'filter',
  filterType: 'filterType',
};
```

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

repository_filter_property = ecr.CfnReplicationConfiguration.RepositoryFilterProperty(
    filter="filter",
    filter_type="filterType"
)
```

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

RepositoryFilterProperty repositoryFilterProperty = RepositoryFilterProperty.builder()
        .filter("filter")
        .filterType("filterType")
        .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 repositoryFilterProperty = new RepositoryFilterProperty {
    Filter = "filter",
    FilterType = "filterType"
};
```

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"

repositoryFilterProperty := &RepositoryFilterProperty{
	Filter: jsii.String("filter"),
	FilterType: jsii.String("filterType"),
}
```

## Properties

- `filter`: string (required) — The repository filter details.

  When the `PREFIX_MATCH` filter type is specified, this value is required and should be the repository name prefix to configure replication for.

- `filterType`: string (required) — The repository filter type.

  The only supported value is `PREFIX_MATCH` , which is a repository name prefix specified with the `filter` parameter.
