2020/12/08 - Amazon EC2 Container Registry - 5 new api methods
Changes Update ecr client to latest version
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.
See also: AWS API Documentation
Request Syntax
client.put_replication_configuration( replicationConfiguration={ 'rules': [ { 'destinations': [ { 'region': 'string', 'registryId': 'string' }, ] }, ] } )
dict
[REQUIRED]
An object representing the replication configuration for a registry.
rules (list) -- [REQUIRED]
An array of objects representing the replication rules for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
(dict) --
An array of objects representing the replication destinations for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
destinations (list) -- [REQUIRED]
An array of objects representing the details of a replication destination.
(dict) --
An array of objects representing the details of a replication destination.
region (string) -- [REQUIRED]
A Region to replicate to.
registryId (string) -- [REQUIRED]
The account ID of the destination registry to replicate to.
dict
Response Syntax
{ 'replicationConfiguration': { 'rules': [ { 'destinations': [ { 'region': 'string', 'registryId': 'string' }, ] }, ] } }
Response Structure
(dict) --
replicationConfiguration (dict) --
The contents of the replication configuration for the registry.
rules (list) --
An array of objects representing the replication rules for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
(dict) --
An array of objects representing the replication destinations for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
destinations (list) --
An array of objects representing the details of a replication destination.
(dict) --
An array of objects representing the details of a replication destination.
region (string) --
A Region to replicate to.
registryId (string) --
The account ID of the destination registry to replicate to.
Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
See also: AWS API Documentation
Request Syntax
client.describe_registry()
dict
Response Syntax
{ 'registryId': 'string', 'replicationConfiguration': { 'rules': [ { 'destinations': [ { 'region': 'string', 'registryId': 'string' }, ] }, ] } }
Response Structure
(dict) --
registryId (string) --
The ID of the registry.
replicationConfiguration (dict) --
The replication configuration for the registry.
rules (list) --
An array of objects representing the replication rules for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
(dict) --
An array of objects representing the replication destinations for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
destinations (list) --
An array of objects representing the details of a replication destination.
(dict) --
An array of objects representing the details of a replication destination.
region (string) --
A Region to replicate to.
registryId (string) --
The account ID of the destination registry to replicate to.
Deletes the registry permissions policy.
See also: AWS API Documentation
Request Syntax
client.delete_registry_policy()
dict
Response Syntax
{ 'registryId': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
policyText (string) --
The contents of the registry permissions policy that was deleted.
Retrieves the permissions policy for a registry.
See also: AWS API Documentation
Request Syntax
client.get_registry_policy()
dict
Response Syntax
{ 'registryId': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The ID of the registry.
policyText (string) --
The JSON text of the permissions policy for a registry.
Creates or updates the permissions policy for your registry.
A registry policy is used to specify permissions for another AWS account and is used when configuring cross-account replication. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
See also: AWS API Documentation
Request Syntax
client.put_registry_policy( policyText='string' )
string
[REQUIRED]
The JSON policy text to apply to your registry. The policy text follows the same format as IAM policy text. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
dict
Response Syntax
{ 'registryId': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The registry ID.
policyText (string) --
The JSON policy text for your registry.