---
title: "POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules"
method: POST
path: "/#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules"
---

# POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules

`POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules`

Returns the pull through cache rules for a registry.

## Query parameters

- `maxResults` string
- `nextToken` string

## Headers

- `X-Amz-Target` 'AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules', required

## Request body

- DescribePullThroughCacheRulesRequest
  - `registryId` string — 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.
  - `ecrRepositoryPrefixes` PullThroughCacheRuleRepositoryPrefix[] — 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.
  - `nextToken` string — The <code>nextToken</code> value returned from a previous paginated <code>DescribePullThroughCacheRulesRequest</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is null when there are no more results to return.
  - `maxResults` integer — The maximum number of pull through cache rules returned by <code>DescribePullThroughCacheRulesRequest</code> in paginated output. When this parameter is used, <code>DescribePullThroughCacheRulesRequest</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribePullThroughCacheRulesRequest</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribePullThroughCacheRulesRequest</code> returns up to 100 results and a <code>nextToken</code> value, if applicable.

## Response `200`

Success

- DescribePullThroughCacheRulesResponse
  - `pullThroughCacheRules` PullThroughCacheRule[] — The details of the pull through cache rules.
    - `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` string, date-time — 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.
  - `nextToken` string — The <code>nextToken</code> value to include in a future <code>DescribePullThroughCacheRulesRequest</code> request. When the results of a <code>DescribePullThroughCacheRulesRequest</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

## Other responses

- `480` — ServerException
- `481` — InvalidParameterException
- `482` — ValidationException
- `483` — PullThroughCacheRuleNotFoundException

---

[API](https://skmtc.net/aws/apis/ecr.md) · [All operations](https://skmtc.net/aws/apis/ecr/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/ecr/versions/965cbb14e137/schema)
