{
  "typeName" : "AWS::ECR::PublicRepository",
  "description" : "The AWS::ECR::PublicRepository resource specifies an Amazon Elastic Container Public Registry (Amazon Public ECR) repository, where users can push and pull Docker images. For more information, see https://docs.aws.amazon.com/AmazonECR",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ecr.git",
  "definitions" : {
    "RegistryId" : {
      "type" : "string",
      "description" : "The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed. ",
      "minLength" : 12,
      "maxLength" : 12,
      "pattern" : "^[0-9]{12}$"
    },
    "RepositoryDescription" : {
      "type" : "string",
      "description" : "The description of the public repository.",
      "maxLength" : 1024
    },
    "OperatingSystemList" : {
      "type" : "array",
      "maxItems" : 50,
      "uniqueItems" : true,
      "insertionOrder" : false,
      "description" : "Select the operating systems that the images in your repository are compatible with.",
      "items" : {
        "$ref" : "#/definitions/OperatingSystem"
      }
    },
    "OperatingSystem" : {
      "type" : "string",
      "description" : "The name of the operating system.",
      "maxLength" : 50,
      "minLength" : 1
    },
    "ArchitectureList" : {
      "type" : "array",
      "maxItems" : 50,
      "uniqueItems" : true,
      "insertionOrder" : false,
      "description" : "Select the system architectures that the images in your repository are compatible with.",
      "items" : {
        "$ref" : "#/definitions/Architecture"
      }
    },
    "Architecture" : {
      "type" : "string",
      "description" : "The name of the architecture.",
      "maxLength" : 50,
      "minLength" : 1
    },
    "UsageText" : {
      "type" : "string",
      "description" : "Provide detailed information about how to use the images in the repository. This provides context, support information, and additional usage details for users of the repository.",
      "maxLength" : 10240
    },
    "AboutText" : {
      "type" : "string",
      "description" : "Provide a detailed description of the repository. Identify what is included in the repository, any licensing details, or other relevant information.",
      "maxLength" : 10240
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "minLength" : 1,
          "maxLength" : 127
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "minLength" : 1,
          "maxLength" : 255
        }
      },
      "required" : [ "Value", "Key" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "RepositoryName" : {
      "type" : "string",
      "description" : "The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the repository name. For more information, see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html.",
      "minLength" : 2,
      "maxLength" : 256,
      "pattern" : "^(?=.{2,256}$)((?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*)$"
    },
    "RepositoryPolicyText" : {
      "type" : [ "object", "string" ],
      "description" : "The JSON repository policy text to apply to the repository. For more information, see https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicyExamples.html in the Amazon Elastic Container Registry User Guide. "
    },
    "Arn" : {
      "type" : "string"
    },
    "RepositoryCatalogData" : {
      "type" : "object",
      "description" : "The CatalogData property type specifies Catalog data for ECR Public Repository. For information about Catalog Data, see <link>",
      "properties" : {
        "RepositoryDescription" : {
          "$ref" : "#/definitions/RepositoryDescription"
        },
        "Architectures" : {
          "$ref" : "#/definitions/ArchitectureList"
        },
        "OperatingSystems" : {
          "$ref" : "#/definitions/OperatingSystemList"
        },
        "AboutText" : {
          "$ref" : "#/definitions/AboutText"
        },
        "UsageText" : {
          "$ref" : "#/definitions/UsageText"
        }
      },
      "additionalProperties" : false
    },
    "Tags" : {
      "type" : "array",
      "maxItems" : 50,
      "uniqueItems" : true,
      "insertionOrder" : false,
      "description" : "An array of key-value pairs to apply to this resource.",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "createOnlyProperties" : [ "/properties/RepositoryName" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "primaryIdentifier" : [ "/properties/RepositoryName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "ecr-public:CreateRepository", "ecr-public:SetRepositoryPolicy", "ecr-public:PutRepositoryCatalogData", "ecr-public:TagResource" ]
    },
    "read" : {
      "permissions" : [ "ecr-public:DescribeRepositories", "ecr-public:GetRepositoryPolicy", "ecr-public:GetRepositoryCatalogData", "ecr-public:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "ecr-public:SetRepositoryPolicy", "ecr-public:DeleteRepositoryPolicy", "ecr-public:PutRepositoryCatalogData", "ecr-public:TagResource", "ecr-public:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "ecr-public:DeleteRepository" ]
    },
    "list" : {
      "permissions" : [ "ecr-public:DescribeRepositories" ]
    }
  },
  "additionalProperties" : false
}