:doc:`ECR <../../ecr>` / Client / describe_pull_through_cache_rules

*********************************
describe_pull_through_cache_rules
*********************************



.. py:method:: ECR.Client.describe_pull_through_cache_rules(**kwargs)

  

  Returns the pull through cache rules for a registry.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribePullThroughCacheRules>`_  


  **Request Syntax**
  ::

    response = client.describe_pull_through_cache_rules(
        registryId='string',
        ecrRepositoryPrefixes=[
            'string',
        ],
        nextToken='string',
        maxResults=123
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID associated with the registry to return the pull through cache rules for. If you do not specify a registry, the default registry is assumed.

    

  
  :type ecrRepositoryPrefixes: list
  :param ecrRepositoryPrefixes: 

    The Amazon ECR repository prefixes associated with the pull through cache rules to return. If no repository prefix value is specified, all pull through cache rules are returned.

    

  
    - *(string) --* 

    

  :type nextToken: string
  :param nextToken: 

    The ``nextToken`` value returned from a previous paginated ``DescribePullThroughCacheRulesRequest`` request where ``maxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``nextToken`` value. This value is null when there are no more results to return.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of pull through cache rules returned by ``DescribePullThroughCacheRulesRequest`` in paginated output. When this parameter is used, ``DescribePullThroughCacheRulesRequest`` only returns ``maxResults`` results in a single page along with a ``nextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribePullThroughCacheRulesRequest`` request with the returned ``nextToken`` value. This value can be between 1 and 1000. If this parameter is not used, then ``DescribePullThroughCacheRulesRequest`` returns up to 100 results and a ``nextToken`` value, if applicable.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'pullThroughCacheRules': [
              {
                  'ecrRepositoryPrefix': 'string',
                  'upstreamRegistryUrl': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'registryId': 'string',
                  'credentialArn': 'string',
                  'customRoleArn': 'string',
                  'upstreamRepositoryPrefix': 'string',
                  'upstreamRegistry': 'ecr'|'ecr-public'|'quay'|'k8s'|'docker-hub'|'github-container-registry'|'azure-container-registry'|'gitlab-container-registry',
                  'updatedAt': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **pullThroughCacheRules** *(list) --* 

        The details of the pull through cache rules.

        
        

        - *(dict) --* 

          The details of a pull through cache rule.

          
          

          - **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 the pull through cache was created.

            
          

          - **registryId** *(string) --* 

            The Amazon Web Services account ID associated with the registry the pull through cache rule is associated with.

            
          

          - **credentialArn** *(string) --* 

            The ARN of the Secrets Manager secret associated with the pull through cache rule.

            
          

          - **customRoleArn** *(string) --* 

            The ARN of the IAM role associated with the pull through cache rule.

            
          

          - **upstreamRepositoryPrefix** *(string) --* 

            The upstream repository prefix associated with the pull through cache rule.

            
          

          - **upstreamRegistry** *(string) --* 

            The name of the upstream source registry associated with the pull through cache rule.

            
          

          - **updatedAt** *(datetime) --* 

            The date and time, in JavaScript date format, when the pull through cache rule was last updated.

            
      
    
      

      - **nextToken** *(string) --* 

        The ``nextToken`` value to include in a future ``DescribePullThroughCacheRulesRequest`` request. When the results of a ``DescribePullThroughCacheRulesRequest`` request exceed ``maxResults``, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`ECR.Client.exceptions.ServerException`

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

  
  *   :py:class:`ECR.Client.exceptions.ValidationException`

  
  *   :py:class:`ECR.Client.exceptions.PullThroughCacheRuleNotFoundException`

  