ECR.Client.put_replication_configuration(**kwargs)¶Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see Using service-linked roles for Amazon ECR in the Amazon Elastic Container Registry User Guide .
Note
When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
See also: AWS API Documentation
Request Syntax
response = client.put_replication_configuration(
    replicationConfiguration={
        'rules': [
            {
                'destinations': [
                    {
                        'region': 'string',
                        'registryId': 'string'
                    },
                ],
                'repositoryFilters': [
                    {
                        'filter': 'string',
                        'filterType': 'PREFIX_MATCH'
                    },
                ]
            },
        ]
    }
)
[REQUIRED]
An object representing the replication configuration for a registry.
An array of objects representing the replication destinations and repository filters for a replication configuration.
An array of objects representing the replication destinations and repository filters for a replication configuration.
An array of objects representing the destination for a replication rule.
An array of objects representing the destination for a replication rule.
The Region to replicate to.
The Amazon Web Services account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
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.
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 repository filter is specified, all images in the repository are replicated.
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.
The repository filter type. The only supported value is PREFIX_MATCH , which is a repository name prefix specified with the filter parameter.
{
    'replicationConfiguration': {
        'rules': [
            {
                'destinations': [
                    {
                        'region': 'string',
                        'registryId': 'string'
                    },
                ],
                'repositoryFilters': [
                    {
                        'filter': 'string',
                        'filterType': 'PREFIX_MATCH'
                    },
                ]
            },
        ]
    }
}
Response Structure
The contents of the replication configuration for the registry.
An array of objects representing the replication destinations and repository filters for a replication configuration.
An array of objects representing the replication destinations and repository filters for a replication configuration.
An array of objects representing the destination for a replication rule.
An array of objects representing the destination for a replication rule.
The Region to replicate to.
The Amazon Web Services account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
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.
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 repository filter is specified, all images in the repository are replicated.
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.
The repository filter type. The only supported value is PREFIX_MATCH , which is a repository name prefix specified with the filter parameter.
Exceptions
ECR.Client.exceptions.ServerExceptionECR.Client.exceptions.InvalidParameterExceptionECR.Client.exceptions.ValidationException