{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Credentials",
  "/properties/Instances",
  "/properties/SapInstanceNumber",
  "/properties/Sid",
  "/properties/DatabaseArn",
  "/properties/ComponentsInfo"
 ],
 "definitions": {
  "ComponentInfo": {
   "properties": {
    "ComponentType": {
     "enum": [
      "HANA",
      "HANA_NODE",
      "ABAP",
      "ASCS",
      "DIALOG",
      "WEBDISP",
      "WD",
      "ERS"
     ],
     "type": "string"
    },
    "Ec2InstanceId": {
     "pattern": "^i-[\\w\\d]{8}$|^i-[\\w\\d]{17}$",
     "type": "string"
    },
    "Sid": {
     "pattern": "[A-Z][A-Z0-9]{2}",
     "type": "string"
    }
   },
   "type": "object"
  },
  "Credential": {
   "additionalProperties": false,
   "properties": {
    "CredentialType": {
     "enum": [
      "ADMIN"
     ],
     "type": "string"
    },
    "DatabaseName": {
     "pattern": "^(?=.{1,100}$).*",
     "type": "string"
    },
    "SecretId": {
     "pattern": "^(?=.{1,100}$).*",
     "type": "string"
    }
   },
   "type": "object"
  },
  "Instance": {
   "pattern": "^i-[\\w\\d]{8}$|^i-[\\w\\d]{17}$",
   "type": "string"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "ApplicationId": {
   "pattern": "[\\w\\d\\.-]{1,60}",
   "type": "string"
  },
  "ApplicationType": {
   "enum": [
    "HANA",
    "SAP_ABAP"
   ],
   "type": "string"
  },
  "Arn": {
   "pattern": "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$",
   "type": "string"
  },
  "ComponentsInfo": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/ComponentInfo"
   },
   "minItems": 1,
   "type": "array"
  },
  "Credentials": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Credential"
   },
   "minItems": 1,
   "type": "array"
  },
  "DatabaseArn": {
   "pattern": "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$",
   "type": "string"
  },
  "Instances": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Instance"
   },
   "minItems": 1,
   "type": "array"
  },
  "SapInstanceNumber": {
   "pattern": "[0-9]{2}",
   "type": "string"
  },
  "Sid": {
   "pattern": "[A-Z][A-Z0-9]{2}",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/Arn"
 ],
 "required": [
  "ApplicationId",
  "ApplicationType"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::SystemsManagerSAP::Application",
 "writeOnlyProperties": [
  "/properties/Credentials",
  "/properties/Instances",
  "/properties/SapInstanceNumber",
  "/properties/Sid",
  "/properties/DatabaseArn",
  "/properties/ComponentsInfo"
 ]
}
