{
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/ImagePipelineExecutionSettings"
 ],
 "createOnlyProperties": [
  "/properties/ImageRecipeArn",
  "/properties/ContainerRecipeArn",
  "/properties/InfrastructureConfigurationArn",
  "/properties/Workflows",
  "/properties/DistributionConfigurationArn",
  "/properties/ImageTestsConfiguration",
  "/properties/ImageScanningConfiguration",
  "/properties/EnhancedImageMetadataEnabled"
 ],
 "definitions": {
  "DeletionSettings": {
   "additionalProperties": false,
   "properties": {
    "ExecutionRole": {
     "type": "string"
    }
   },
   "required": [
    "ExecutionRole"
   ],
   "type": "object"
  },
  "EcrConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ContainerTags": {
     "insertionOrder": true,
     "items": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
     },
     "type": "array"
    },
    "RepositoryName": {
     "maxLength": 1024,
     "minLength": 1,
     "type": "string"
    }
   },
   "type": "object"
  },
  "ImageLoggingConfiguration": {
   "additionalProperties": false,
   "properties": {
    "LogGroupName": {
     "format": "AWS::Logs::LogGroup.Name",
     "maxLength": 512,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9\\-_/\\.]{1,512}$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "ImagePipelineExecutionSettings": {
   "additionalProperties": false,
   "properties": {
    "DeploymentId": {
     "type": "string"
    },
    "OnUpdate": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "ImageScanningConfiguration": {
   "additionalProperties": false,
   "properties": {
    "EcrConfiguration": {
     "$ref": "#/definitions/EcrConfiguration"
    },
    "ImageScanningEnabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "ImageTestsConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ImageTestsEnabled": {
     "type": "boolean"
    },
    "TimeoutMinutes": {
     "maximum": 1440,
     "minimum": 60,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "LatestVersion": {
   "additionalProperties": false,
   "properties": {
    "Arn": {
     "type": "string"
    },
    "Major": {
     "type": "string"
    },
    "Minor": {
     "type": "string"
    },
    "Patch": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "WorkflowConfiguration": {
   "additionalProperties": false,
   "properties": {
    "OnFailure": {
     "enum": [
      "CONTINUE",
      "ABORT"
     ],
     "type": "string"
    },
    "ParallelGroup": {
     "maxLength": 100,
     "minLength": 1,
     "pattern": "^[A-Za-z0-9][A-Za-z0-9-_+#]{0,99}$",
     "type": "string"
    },
    "Parameters": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/WorkflowParameter"
     },
     "minItems": 1,
     "type": "array"
    },
    "WorkflowArn": {
     "pattern": "^arn:aws(?:-[a-z]+)*:imagebuilder:[a-z]{2,}(?:-[a-z]+)+-[0-9]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):workflow/(build|test|distribution)/[a-z0-9-_]+/(?:(?:([0-9]+|x)\\.([0-9]+|x)\\.([0-9]+|x))|(?:[0-9]+\\.[0-9]+\\.[0-9]+/[0-9]+))$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "WorkflowParameter": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "[^\\x00]+",
     "type": "string"
    },
    "Value": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/WorkflowParameterValue"
     },
     "type": "array"
    }
   },
   "type": "object"
  },
  "WorkflowParameterValue": {
   "pattern": "[^\\x00]*",
   "type": "string"
  }
 },
 "oneOf": [
  {
   "required": [
    "ContainerRecipeArn",
    "InfrastructureConfigurationArn"
   ]
  },
  {
   "required": [
    "ImageRecipeArn",
    "InfrastructureConfigurationArn"
   ]
  },
  {
   "required": [
    "ImagePipelineExecutionSettings"
   ]
  }
 ],
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "Arn": {
   "type": "string"
  },
  "ContainerRecipeArn": {
   "pattern": "^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):container-recipe/[a-z0-9-_]+/(?:[0-9]+|x)\\.(?:[0-9]+|x)\\.(?:[0-9]+|x)$",
   "type": "string"
  },
  "DeletionSettings": {
   "$ref": "#/definitions/DeletionSettings"
  },
  "DistributionConfigurationArn": {
   "pattern": "^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):distribution-configuration/[a-z0-9-_]+$",
   "type": "string"
  },
  "EnhancedImageMetadataEnabled": {
   "type": "boolean"
  },
  "ExecutionRole": {
   "maxLength": 2048,
   "minLength": 1,
   "pattern": "^(?:arn:aws(?:-[a-z]+)*:iam::[0-9]{12}:role/)?[a-zA-Z_0-9+=,.@\\-_/]+$",
   "type": "string"
  },
  "ImageId": {
   "format": "AWS::EC2::Image.Id",
   "type": "string"
  },
  "ImagePipelineExecutionSettings": {
   "$ref": "#/definitions/ImagePipelineExecutionSettings",
   "dependencies": {
    "ImagePipelineExecutionSettings": {
     "oneOf": [
      {
       "required": [
        "ImageRecipeArn"
       ]
      },
      {
       "required": [
        "ContainerRecipeArn"
       ]
      },
      {
       "required": [
        "InfrastructureConfigurationArn"
       ]
      },
      {
       "required": [
        "Workflows"
       ]
      },
      {
       "required": [
        "DistributionConfigurationArn"
       ]
      },
      {
       "required": [
        "ImageTestsConfiguration"
       ]
      },
      {
       "required": [
        "ImageScanningConfiguration"
       ]
      },
      {
       "required": [
        "EnhancedImageMetadataEnabled"
       ]
      },
      {
       "required": [
        "ImportDiskImageSettings"
       ]
      }
     ]
    }
   }
  },
  "ImageRecipeArn": {
   "pattern": "^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):image-recipe/[a-z0-9-_]+/(?:[0-9]+|x)\\.(?:[0-9]+|x)\\.(?:[0-9]+|x)$",
   "type": "string"
  },
  "ImageScanningConfiguration": {
   "$ref": "#/definitions/ImageScanningConfiguration"
  },
  "ImageTestsConfiguration": {
   "$ref": "#/definitions/ImageTestsConfiguration"
  },
  "ImageUri": {
   "type": "string"
  },
  "InfrastructureConfigurationArn": {
   "pattern": "^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):infrastructure-configuration/[a-z0-9-_]+$",
   "type": "string"
  },
  "LatestVersion": {
   "$ref": "#/definitions/LatestVersion"
  },
  "LoggingConfiguration": {
   "$ref": "#/definitions/ImageLoggingConfiguration"
  },
  "Name": {
   "type": "string"
  },
  "Tags": {
   "additionalProperties": false,
   "patternProperties": {
    ".{1,}": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Workflows": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/WorkflowConfiguration"
   },
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/Arn",
  "/properties/Name",
  "/properties/ImageId",
  "/properties/ImageUri",
  "/properties/LatestVersion",
  "/properties/LatestVersion/Arn",
  "/properties/LatestVersion/Major",
  "/properties/LatestVersion/Minor",
  "/properties/LatestVersion/Patch"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-imagebuilder",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::ImageBuilder::Image",
 "writeOnlyProperties": [
  "/properties/DeletionSettings",
  "/properties/ImagePipelineExecutionSettings"
 ]
}
