{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-imagebuilder-image.json",
  "title": "AWSImageBuilderImageProperties",
  "description": "Resource schema for AWS::ImageBuilder::Image. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-imagebuilder.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-imagebuilder-image.json",
    "sourceSha256": "c552bfd5cd81db92c38d02f958f64eb5e5379941a80fe8eca5fff8da46379ab8"
  },
  "type": "object",
  "properties": {
    "ImageTestsConfiguration": {
      "description": "The image tests configuration used when creating this image.",
      "$ref": "#/$defs/ImageTestsConfiguration"
    },
    "ImageRecipeArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed."
    },
    "ContainerRecipeArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested."
    },
    "DistributionConfigurationArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the distribution configuration."
    },
    "InfrastructureConfigurationArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the infrastructure configuration."
    },
    "EnhancedImageMetadataEnabled": {
      "description": "Collects additional information about the image being created, including the operating system (OS) version and package list.",
      "type": "boolean"
    },
    "ImageScanningConfiguration": {
      "description": "Contains settings for vulnerability scans.",
      "$ref": "#/$defs/ImageScanningConfiguration"
    },
    "Tags": {
      "description": "The tags associated with the image.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        ".{1,}": {
          "type": "string"
        }
      }
    }
  },
  "typeName": "AWS::ImageBuilder::Image",
  "tagging": {
    "taggable": false
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-imagebuilder.git",
  "createOnlyProperties": [
    "/properties/ImageRecipeArn",
    "/properties/ContainerRecipeArn",
    "/properties/InfrastructureConfigurationArn",
    "/properties/DistributionConfigurationArn",
    "/properties/ImageTestsConfiguration",
    "/properties/ImageScanningConfiguration",
    "/properties/EnhancedImageMetadataEnabled",
    "/properties/Tags"
  ],
  "additionalProperties": false,
  "$defs": {
    "ImageTestsConfiguration": {
      "description": "The image tests configuration used when creating this image.",
      "type": "object",
      "title": "AWSImageBuilderImageImageTestsConfigurationDefinition",
      "properties": {
        "ImageTestsEnabled": {
          "description": "ImageTestsEnabled",
          "type": "boolean"
        },
        "TimeoutMinutes": {
          "description": "TimeoutMinutes",
          "type": "integer",
          "minimum": 60,
          "maximum": 1440
        }
      },
      "additionalProperties": false
    },
    "ImageScanningConfiguration": {
      "description": "Contains settings for Image Builder image resource and container image scans.",
      "type": "object",
      "title": "AWSImageBuilderImageImageScanningConfigurationDefinition",
      "properties": {
        "EcrConfiguration": {
          "description": "Contains ECR settings for vulnerability scans.",
          "$ref": "#/$defs/EcrConfiguration"
        },
        "ImageScanningEnabled": {
          "description": "This sets whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "EcrConfiguration": {
      "description": "Settings for Image Builder to configure the ECR repository and output container images that are scanned.",
      "type": "object",
      "title": "AWSImageBuilderImageEcrConfigurationDefinition",
      "properties": {
        "ContainerTags": {
          "description": "Tags for Image Builder to apply the output container image that is scanned. Tags can help you identify and manage your scanned images.",
          "type": "array",
          "insertionOrder": true,
          "items": {
            "type": "string"
          }
        },
        "RepositoryName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository to use for vulnerability scans for your output container images."
        }
      },
      "additionalProperties": false
    }
  },
  "oneOf": [
    {
      "required": [
        "ContainerRecipeArn",
        "InfrastructureConfigurationArn"
      ]
    },
    {
      "required": [
        "ImageRecipeArn",
        "InfrastructureConfigurationArn"
      ]
    }
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/Name",
    "/properties/ImageId",
    "/properties/ImageUri"
  ]
}
