Starts a replication backfill for a registry. A replication backfill replicates a registry's existing images that match its replication configuration to the specified destination. Use the DescribeReplicationBackfillResults operation to monitor the progress of a replication backfill, and to retrieve its per-image results after it reaches a terminal status.
The destination must already be configured in the registry's replication configuration.
Only one replication backfill can be in progress for a given destination Region at a time. Starting a replication backfill for a destination Region that already has one in progress fails with a ReplicationBackfillInProgressException. In addition, a registry can have at most 10 replication backfills in progress at once. Starting a replication backfill that would exceed this limit fails with a LimitExceededException.
Parameters:
-
registry_id
(Optional[RegistryId], default:
None
)
–
The Amazon Web Services account ID associated with the registry from which to start the replication backfill. If you do not specify a registry, the default registry is assumed.
-
destination
(ReplicationDestination)
–
The destination Region and registry to which the images are replicated.
Raises:
-
InvalidParameterException
–
The specified parameter is invalid. Review the available parameters for the API request.
-
LimitExceededException
–
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR service quotas in the Amazon Elastic Container Registry User Guide.
-
ReplicationBackfillInProgressException
–
A replication backfill is already in progress for the specified destination Region. This occurs because only one replication backfill can be in progress for a given destination Region at a time. Wait for the in progress backfill to reach a terminal status, or stop it with the StopReplicationBackfill operation, before starting another one.
-
ServerException
–
These errors are usually caused by a server-side issue.
-
ValidationException
–
There was an exception validating this request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_ecr/_services/ecr.py
| def start_replication_backfill(
self,
destination: "capo_ecr.types.replication_destination.ReplicationDestination",
*,
config_overrides: Optional[ECRClientConfig] = None,
registry_id: Optional["capo_ecr.types.registry_id.RegistryId"] = None,
) -> "capo_ecr.types.start_replication_backfill_response.StartReplicationBackfillResponse":
"""<p>Starts a replication backfill for a registry. A replication backfill replicates a registry's existing images that match its replication configuration to the specified destination. Use the <a>DescribeReplicationBackfillResults</a> operation to monitor the progress of a replication backfill, and to retrieve its per-image results after it reaches a terminal status.</p> <note> <p>The destination must already be configured in the registry's replication configuration.</p> </note> <note> <p>Only one replication backfill can be in progress for a given destination Region at a time. Starting a replication backfill for a destination Region that already has one in progress fails with a <code>ReplicationBackfillInProgressException</code>. In addition, a registry can have at most 10 replication backfills in progress at once. Starting a replication backfill that would exceed this limit fails with a <code>LimitExceededException</code>.</p> </note>
Args:
registry_id: <p>The Amazon Web Services account ID associated with the registry from which to start the replication backfill. If you do not specify a registry, the default registry is assumed.</p>
destination: <p>The destination Region and registry to which the images are replicated.</p>
Raises:
capo_ecr.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
capo_ecr.errors.limit_exceeded_exception.LimitExceededException: <p>The operation did not succeed because it would have exceeded a service limit for your account. For more information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html">Amazon ECR service quotas</a> in the Amazon Elastic Container Registry User Guide.</p>
capo_ecr.errors.replication_backfill_in_progress_exception.ReplicationBackfillInProgressException: <p>A replication backfill is already in progress for the specified destination Region. This occurs because only one replication backfill can be in progress for a given destination Region at a time. Wait for the in progress backfill to reach a terminal status, or stop it with the <a>StopReplicationBackfill</a> operation, before starting another one.</p>
capo_ecr.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
capo_ecr.errors.validation_exception.ValidationException: <p>There was an exception validating this request.</p>
capo_ecr.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ecr.types.start_replication_backfill_request.StartReplicationBackfillRequest]",
) -> OperationResponse[
"capo_ecr.types.start_replication_backfill_response.StartReplicationBackfillResponse"
]:
import capo_ecr._operations.amazon_ec2_container_registry_v20150921.start_replication_backfill
output, http_response = (
capo_ecr._operations.amazon_ec2_container_registry_v20150921.start_replication_backfill.start_replication_backfill(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartReplicationBackfill")
)
input_: capo_ecr.types.start_replication_backfill_request.StartReplicationBackfillRequest = {
"destination": destination
}
if registry_id is not None:
input_["registry_id"] = registry_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|