ECRPublic / Client / get_repository_policy

get_repository_policy#

ECRPublic.Client.get_repository_policy(**kwargs)#

Retrieves the repository policy for the specified repository.

See also: AWS API Documentation

Request Syntax

response = client.get_repository_policy(
    registryId='string',
    repositoryName='string'
)
Parameters:
  • registryId (string) – The Amazon Web Services account ID that’s associated with the public registry that contains the repository. If you do not specify a registry, the default public registry is assumed.

  • repositoryName (string) –

    [REQUIRED]

    The name of the repository with the policy to retrieve.

Return type:

dict

Returns:

Response Syntax

{
    'registryId': 'string',
    'repositoryName': 'string',
    'policyText': 'string'
}

Response Structure

  • (dict) –

    • registryId (string) –

      The registry ID that’s associated with the request.

    • repositoryName (string) –

      The repository name that’s associated with the request.

    • policyText (string) –

      The repository policy text that’s associated with the repository. The policy text will be in JSON format.

Exceptions

  • ECRPublic.Client.exceptions.ServerException

  • ECRPublic.Client.exceptions.InvalidParameterException

  • ECRPublic.Client.exceptions.RepositoryNotFoundException

  • ECRPublic.Client.exceptions.RepositoryPolicyNotFoundException

  • ECRPublic.Client.exceptions.UnsupportedCommandException