repository_policy#

Exec module for managing Amazon ECR repository policies.

async idem_aws.exec.aws.ecr.repository_policy.get(hub, ctx, name: str, resource_id: str, registry_id: str = None) Dict[str, Any][source]#

Retrieves the repository policy for the specified repository.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str) – The name of the ECR repository in Amazon Web Services.

  • registry_id (str, Optional) – The Amazon Web Services account ID associated with the registry that contains the repository to search. If you do not specify a registry, the default registry is assumed.

Returns:

Return the repository policy for the specified repository.

Return type:

Dict[str, Any]

Examples

Calling this exec module function from the cli:

idem exec aws.ecr.repository_policy.get name='idem_name' resource_id='ecr_repository_name'

Calling this exec module function from within a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.ecr.repository_policy.get
    - kwargs:
        name: 'idem_name'
        resource_id: 'ecr_repository_name'