ValidatePullThroughCacheRule - Amazon Elastic Container Registry

ValidatePullThroughCacheRule

Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the AWS Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.

Request Syntax

{ "ecrRepositoryPrefix": "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.

ecrRepositoryPrefix

The repository name prefix associated with the pull through cache rule.

Type: String

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

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

Required: Yes

registryId

The registry ID associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No

Response Syntax

{ "credentialArn": "string", "ecrRepositoryPrefix": "string", "failure": "string", "isValid": boolean, "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.

credentialArn

The Amazon Resource Name (ARN) of the AWS Secrets Manager secret associated with the pull through cache rule.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 612.

Pattern: ^arn:aws:secretsmanager:[a-zA-Z0-9-:]+:secret:ecr\-pullthroughcache\/[a-zA-Z0-9\/_+=.@-]+$

ecrRepositoryPrefix

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

Type: String

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

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

failure

The reason the validation failed. For more details about possible causes and how to address them, see Using pull through cache rules in the Amazon Elastic Container Registry User Guide.

Type: String

isValid

Whether or not the pull through cache rule was validated. If true, Amazon ECR was able to reach the upstream registry and authentication was successful. If false, there was an issue and validation failed. The failure reason indicates the cause.

Type: Boolean

registryId

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

upstreamRegistryUrl

The upstream registry URL associated with the pull through cache rule.

Type: String

Errors

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

InvalidParameterException

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

HTTP Status Code: 400

PullThroughCacheRuleNotFoundException

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

HTTP Status Code: 400

ServerException

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

HTTP Status Code: 500

ValidationException

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 AWS SDKs, see the following: