Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.
Parameters:
-
ecr_repository_prefix
(PullThroughCacheRuleRepositoryPrefix)
–
The repository name prefix associated with the pull through cache rule.
-
registry_id
(Optional[RegistryId], default:
None
)
–
The registry ID associated with 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 validate_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.validate_pull_through_cache_rule_response.ValidatePullThroughCacheRuleResponse":
"""<p>Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.</p>
Args:
ecr_repository_prefix: <p>The repository name prefix associated with the pull through cache rule.</p>
registry_id: <p>The registry ID associated with 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.validate_pull_through_cache_rule_request.ValidatePullThroughCacheRuleRequest]",
) -> AsyncOperationResponse[
"capo_ecr.types.validate_pull_through_cache_rule_response.ValidatePullThroughCacheRuleResponse"
]:
import capo_ecr._operations.amazon_ec2_container_registry_v20150921.validate_pull_through_cache_rule
(
output,
http_response,
) = await capo_ecr._operations.amazon_ec2_container_registry_v20150921.validate_pull_through_cache_rule.async_validate_pull_through_cache_rule(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ValidatePullThroughCacheRule")
)
input_: capo_ecr.types.validate_pull_through_cache_rule_request.ValidatePullThroughCacheRuleRequest = {
"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
|