DescribePullThroughCacheRules - Amazon Elastic Container Registry
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Returns the pull through cache rules for a registry.

Request Syntax

{ "ecrRepositoryPrefixes": [ "string" ], "maxResults": number, "nextToken": "string", "registryId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


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.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 2. Maximum length of 20.

Pattern: [a-z0-9]+(?:[._-][a-z0-9]+)*

Required: No


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.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No


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: String

Required: No


The Amazon 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: String

Pattern: [0-9]{12}

Required: No

Response Syntax

{ "nextToken": "string", "pullThroughCacheRules": [ { "createdAt": number, "ecrRepositoryPrefix": "string", "registryId": "string", "upstreamRegistryUrl": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


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.

Type: String


The details of the pull through cache rules.

Type: Array of PullThroughCacheRule objects


For information about the errors that are common to all actions, see Common Errors.


The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400


The pull through cache rule was not found. Specify a valid pull through cache rule and try again.

HTTP Status Code: 400


These errors are usually caused by a server-side issue.

HTTP Status Code: 500


There was an exception validating this request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: