Skip to content

describe_pull_through_cache_rules async

describe_pull_through_cache_rules(
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
    ecr_repository_prefixes: Optional[PullThroughCacheRuleRepositoryPrefixList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribePullThroughCacheRulesResponse

Returns the pull through cache rules for a registry.

Parameters:

  • registry_id (Optional[RegistryId], default: None ) –

    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.

  • ecr_repository_prefixes (Optional[PullThroughCacheRuleRepositoryPrefixList], default: None ) –

    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.

  • next_token (Optional[NextToken], default: None ) –

    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.

  • max_results (Optional[MaxResults], default: None ) –

    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.

Raises:

Source code in docs_src/capo_ecr/_services/async_ecr.py
async def describe_pull_through_cache_rules(
    self,
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional["capo_ecr.types.registry_id.RegistryId"] = None,
    ecr_repository_prefixes: Optional[
        "capo_ecr.types.pull_through_cache_rule_repository_prefix_list.PullThroughCacheRuleRepositoryPrefixList"
    ] = None,
    next_token: Optional["capo_ecr.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ecr.types.max_results.MaxResults"] = None,
) -> "capo_ecr.types.describe_pull_through_cache_rules_response.DescribePullThroughCacheRulesResponse":
    """<p>Returns the pull through cache rules for a registry.</p>

    Args:
        registry_id: <p>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.</p>
        ecr_repository_prefixes: <p>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.</p>
        next_token: <p>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.</p>
        max_results: <p>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.</p>

    Raises:
        capo_ecr.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_ecr.errors.pull_through_cache_rule_not_found_exception.PullThroughCacheRuleNotFoundException: <p>The pull through cache rule was not found. Specify a valid pull through cache rule and try again.</p>
        capo_ecr.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_ecr.errors.validation_exception.ValidationException: <p>There was an exception validating this request.</p>
        capo_ecr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr.types.describe_pull_through_cache_rules_request.DescribePullThroughCacheRulesRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr.types.describe_pull_through_cache_rules_response.DescribePullThroughCacheRulesResponse"
    ]:
        import capo_ecr._operations.amazon_ec2_container_registry_v20150921.describe_pull_through_cache_rules

        (
            output,
            http_response,
        ) = await capo_ecr._operations.amazon_ec2_container_registry_v20150921.describe_pull_through_cache_rules.async_describe_pull_through_cache_rules(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePullThroughCacheRules")
    )
    input_: capo_ecr.types.describe_pull_through_cache_rules_request.DescribePullThroughCacheRulesRequest = {}
    if registry_id is not None:
        input_["registry_id"] = registry_id
    if ecr_repository_prefixes is not None:
        input_["ecr_repository_prefixes"] = ecr_repository_prefixes
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output