Skip to content

delete_pull_through_cache_rule async

delete_pull_through_cache_rule(
    ecr_repository_prefix: PullThroughCacheRuleRepositoryPrefix,
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
) -> DeletePullThroughCacheRuleResponse

Deletes a pull through cache rule.

Parameters:

  • ecr_repository_prefix (PullThroughCacheRuleRepositoryPrefix) –

    The Amazon ECR repository prefix associated with the pull through cache rule to delete.

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

    The Amazon Web Services account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.

Raises:

Source code in docs_src/capo_ecr/_services/async_ecr.py
async def delete_pull_through_cache_rule(
    self,
    ecr_repository_prefix: "capo_ecr.types.pull_through_cache_rule_repository_prefix.PullThroughCacheRuleRepositoryPrefix",
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional["capo_ecr.types.registry_id.RegistryId"] = None,
) -> "capo_ecr.types.delete_pull_through_cache_rule_response.DeletePullThroughCacheRuleResponse":
    """<p>Deletes a pull through cache rule.</p>

    Args:
        ecr_repository_prefix: <p>The Amazon ECR repository prefix associated with the pull through cache rule to delete.</p>
        registry_id: <p>The Amazon Web Services account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.</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.delete_pull_through_cache_rule_request.DeletePullThroughCacheRuleRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr.types.delete_pull_through_cache_rule_response.DeletePullThroughCacheRuleResponse"
    ]:
        import capo_ecr._operations.amazon_ec2_container_registry_v20150921.delete_pull_through_cache_rule

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePullThroughCacheRule")
    )
    input_: capo_ecr.types.delete_pull_through_cache_rule_request.DeletePullThroughCacheRuleRequest = {
        "ecr_repository_prefix": ecr_repository_prefix
    }
    if registry_id is not None:
        input_["registry_id"] = registry_id

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