ecr.repositories.update

Change visibility, tag immutability or description

PATCH /ecr/api/repositories/{id}IAM ecr:UpdateRepositoryChanges stateDestructive

Only the fields given change. Public is reversible on purpose. tagMutability "immutable" refuses a push that would move an existing tag to a different image (re-pushing the same image is fine); tagMutabilityExclusions are * globs, e.g. ["latest"], that stay mutable.

Request syntax

PATCH /ecr/api/repositories/{id}
{
  "visibility": "enum",
  "tagMutability": "enum",
  "tagMutabilityExclusions": "array of string",
  "description": "string",
  "storageQuotaBytes": "number"
}

Path parameters

  • idRequired

    string

    Constraints: uuid

Request body

  • visibilityOptional

    enum

    private: every pull needs a credential with ecr:PullImage. public: anyone can pull this repository’s images without credentials (read-only, and only the layers its own images reference). Unchanged when omitted; public is reversible at any time

    One of: private, public

  • tagMutabilityOptional

    enum

    immutable: a push that would move an existing tag to a different image is refused (re-pushing the same image is fine; deleting the tag is still allowed). Unchanged when omitted

    One of: mutable, immutable

  • tagMutabilityExclusionsOptional

    array of string

    Up to 10 tag patterns (letters, digits, _ . - and * as a glob, 1–128 characters) that stay mutable in an immutable repository, e.g. ["latest", "main-*"]. Replaces the list; unchanged when omitted

    Constraints: 1-128 chars, /^[A-Za-z0-9_.*-]+$/

  • descriptionOptional

    string

    Free text, up to 256 characters; null clears it; unchanged when omitted

    Constraints: max 256 chars

    May be null.

  • storageQuotaBytesOptional

    number

    Cap in bytes on every layer this repository holds, shared ones included: 1 MiB (1048576) to 1 PiB. null: no repository cap (the organization quota still applies). A push over it is refused; lowering it deletes nothing. Unchanged when omitted

    Constraints: integer, 1048576-1125899906842624

    May be null.

Response

200 with the repository as it now is: id, name, description, visibility, tagMutability, tagMutabilityExclusions, lifecycleMode, lifecyclePolicy, storageQuotaBytes, upstreamRuleId and upstreamName (set on a pull-through cache repository), createdForAppId, createdAt, updatedAt. 400 "Nothing to change" for an empty body; 404 for an unknown id.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow ecr:UpdateRepository on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud ecr repositories update id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ecr_repositories_update.