# ReplicationRuleProperty

An array of objects representing the replication destinations and repository filters for a replication configuration.

- Source: Generated at build time
- Type last changed: v2.278.0 · 20 Nov 2026

## 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 replicationRuleProperty: ecr.CfnReplicationConfiguration.ReplicationRuleProperty = {
  destinations: [{
    region: 'region',
    registryId: 'registryId',
  }],

  // the properties below are optional
  deleteReplication: {
    enabled: false,
  },
  repositoryFilters: [{
    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

replication_rule_property = ecr.CfnReplicationConfiguration.ReplicationRuleProperty(
    destinations=[ecr.CfnReplicationConfiguration.ReplicationDestinationProperty(
        region="region",
        registry_id="registryId"
    )],

    # the properties below are optional
    delete_replication=ecr.CfnReplicationConfiguration.DeleteReplicationProperty(
        enabled=False
    ),
    repository_filters=[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.*;

ReplicationRuleProperty replicationRuleProperty = ReplicationRuleProperty.builder()
        .destinations(List.of(ReplicationDestinationProperty.builder()
                .region("region")
                .registryId("registryId")
                .build()))

        // the properties below are optional
        .deleteReplication(DeleteReplicationProperty.builder()
                .enabled(false)
                .build())
        .repositoryFilters(List.of(RepositoryFilterProperty.builder()
                .filter("filter")
                .filterType("filterType")
                .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.ECR;

var replicationRuleProperty = new ReplicationRuleProperty {
    Destinations = new [] { new ReplicationDestinationProperty {
        Region = "region",
        RegistryId = "registryId"
    } },

    // the properties below are optional
    DeleteReplication = new DeleteReplicationProperty {
        Enabled = false
    },
    RepositoryFilters = new [] { 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"

replicationRuleProperty := &ReplicationRuleProperty{
	Destinations: []interface{}{
		&ReplicationDestinationProperty{
			Region: jsii.String("region"),
			RegistryId: jsii.String("registryId"),
		},
	},

	// the properties below are optional
	DeleteReplication: &DeleteReplicationProperty{
		Enabled: jsii.Boolean(false),
	},
	RepositoryFilters: []interface{}{
		&RepositoryFilterProperty{
			Filter: jsii.String("filter"),
			FilterType: jsii.String("filterType"),
		},
	},
}
```

## Properties

- `deleteReplication`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicationConfiguration.DeleteReplicationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.CfnReplicationConfiguration.DeleteReplicationProperty.html)

- `destinations`: [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) | [CfnReplicationConfiguration.ReplicationDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.CfnReplicationConfiguration.ReplicationDestinationProperty.html)[] (required) — An array of objects representing the destination for a replication rule.

- `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) | [CfnReplicationConfiguration.RepositoryFilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.CfnReplicationConfiguration.RepositoryFilterProperty.html)[] — An array of objects representing the filters for a replication rule.

  Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
