ECR / Client / create_pull_through_cache_rule
create_pull_through_cache_rule#
- ECR.Client.create_pull_through_cache_rule(**kwargs)#
Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an external public registry in your Amazon ECR private registry.
See also: AWS API Documentation
Request Syntax
response = client.create_pull_through_cache_rule( ecrRepositoryPrefix='string', upstreamRegistryUrl='string', registryId='string' )
- Parameters:
ecrRepositoryPrefix (string) –
[REQUIRED]
The repository name prefix to use when caching images from the source registry.
upstreamRegistryUrl (string) –
[REQUIRED]
The registry URL of the upstream public registry to use as the source for the pull through cache rule.
registryId (string) – The Amazon Web Services account ID associated with the registry to create the pull through cache rule for. If you do not specify a registry, the default registry is assumed.
- Return type:
dict
- Returns:
Response Syntax
{ 'ecrRepositoryPrefix': 'string', 'upstreamRegistryUrl': 'string', 'createdAt': datetime(2015, 1, 1), 'registryId': 'string' }
Response Structure
(dict) –
ecrRepositoryPrefix (string) –
The Amazon ECR repository prefix associated with the pull through cache rule.
upstreamRegistryUrl (string) –
The upstream registry URL associated with the pull through cache rule.
createdAt (datetime) –
The date and time, in JavaScript date format, when the pull through cache rule was created.
registryId (string) –
The registry ID associated with the request.
Exceptions
ECR.Client.exceptions.ServerException
ECR.Client.exceptions.InvalidParameterException
ECR.Client.exceptions.ValidationException
ECR.Client.exceptions.PullThroughCacheRuleAlreadyExistsException
ECR.Client.exceptions.UnsupportedUpstreamRegistryException
ECR.Client.exceptions.LimitExceededException