:doc:`ECRPublic <../../ecr-public>` / Client / get_repository_policy

*********************
get_repository_policy
*********************



.. py:method:: ECRPublic.Client.get_repository_policy(**kwargs)

  

  Retrieves the repository policy for the specified repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-public-2020-10-30/GetRepositoryPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_repository_policy(
        registryId='string',
        repositoryName='string'
    )
    
  :type registryId: string
  :param registryId: 

    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.

    

  
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository with the policy to retrieve.

    

  
  
  :rtype: 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**
  
  *   :py:class:`ECRPublic.Client.exceptions.ServerException`

  
  *   :py:class:`ECRPublic.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECRPublic.Client.exceptions.RepositoryNotFoundException`

  
  *   :py:class:`ECRPublic.Client.exceptions.RepositoryPolicyNotFoundException`

  
  *   :py:class:`ECRPublic.Client.exceptions.UnsupportedCommandException`

  