Amazon ECR · JSON Structure

Amazon Ecr Repository Structure

Schema representing an Amazon Elastic Container Registry repository, which stores Docker container images and OCI artifacts.

Type: object Properties: 12 Required: 1
Amazon Web ServicesContainer ImagesContainer RegistryContainersDockerECROCI

Amazon ECR Repository is a JSON Structure definition published by Amazon ECR, describing 12 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

repositoryArn registryId repositoryName repositoryUri createdAt imageTagMutability imageScanningConfiguration encryptionConfiguration imageCount repositoryPolicy lifecyclePolicy tags

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-ecr/refs/heads/main/json-structure/amazon-ecr-repository-structure.json",
  "name": "Amazon ECR Repository",
  "description": "Schema representing an Amazon Elastic Container Registry repository, which stores Docker container images and OCI artifacts.",
  "type": "object",
  "properties": {
    "repositoryArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) that identifies the repository.",
      "pattern": "^arn:aws[a-zA-Z-]*:ecr:[a-z0-9-]+:[0-9]{12}:repository/.+$"
    },
    "registryId": {
      "type": "string",
      "description": "The AWS account ID associated with the registry that contains the repository.",
      "pattern": "^[0-9]{12}$"
    },
    "repositoryName": {
      "type": "string",
      "description": "The name of the repository.",
      "minLength": 2,
      "maxLength": 256,
      "pattern": "^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$"
    },
    "repositoryUri": {
      "type": "uri",
      "description": "The URI for the repository, used for docker pull and push operations."
    },
    "createdAt": {
      "type": "datetime",
      "description": "The date and time, in JavaScript date format, when the repository was created."
    },
    "imageTagMutability": {
      "type": "string",
      "description": "The tag mutability setting for the repository. When set to IMMUTABLE, all image tags within the repository are prevented from being overwritten.",
      "enum": [
        "MUTABLE",
        "IMMUTABLE"
      ],
      "default": "MUTABLE"
    },
    "imageScanningConfiguration": {
      "type": "object",
      "description": "The image scanning configuration for the repository.",
      "properties": {
        "scanOnPush": {
          "type": "boolean",
          "description": "The setting that determines whether images are scanned after being pushed to a repository.",
          "default": false
        }
      }
    },
    "encryptionConfiguration": {
      "type": "object",
      "description": "The encryption configuration for the repository.",
      "required": [
        "encryptionType"
      ],
      "properties": {
        "encryptionType": {
          "type": "string",
          "description": "The encryption type to use.",
          "enum": [
            "AES256",
            "KMS"
          ]
        },
        "kmsKey": {
          "type": "string",
          "description": "If you use the KMS encryption type, specify the KMS key to use for encryption."
        }
      }
    },
    "imageCount": {
      "type": "int32",
      "description": "The number of images in the repository.",
      "minimum": 0
    },
    "repositoryPolicy": {
      "type": "string",
      "description": "The JSON repository policy text associated with the repository."
    },
    "lifecyclePolicy": {
      "type": "object",
      "description": "The lifecycle policy for the repository.",
      "properties": {
        "lifecyclePolicyText": {
          "type": "string",
          "description": "The JSON lifecycle policy text."
        },
        "registryId": {
          "type": "string",
          "description": "The registry ID associated with the lifecycle policy."
        },
        "repositoryName": {
          "type": "string",
          "description": "The repository name associated with the lifecycle policy."
        },
        "lastEvaluatedAt": {
          "type": "datetime",
          "description": "The time stamp of the last time the lifecycle policy was run."
        }
      }
    },
    "tags": {
      "type": "array",
      "description": "The metadata tags applied to the repository.",
      "items": {
        "type": "object",
        "required": [
          "Key",
          "Value"
        ],
        "properties": {
          "Key": {
            "type": "string",
            "description": "The key of the tag.",
            "minLength": 1,
            "maxLength": 128
          },
          "Value": {
            "type": "string",
            "description": "The value of the tag.",
            "minLength": 0,
            "maxLength": 256
          }
        }
      }
    }
  },
  "required": [
    "repositoryName"
  ]
}