{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/ActionType",
  "/properties/BudgetName"
 ],
 "definitions": {
  "ActionThreshold": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "enum": [
      "PERCENTAGE",
      "ABSOLUTE_VALUE"
     ],
     "type": "string"
    },
    "Value": {
     "type": "number"
    }
   },
   "required": [
    "Value",
    "Type"
   ],
   "type": "object"
  },
  "Definition": {
   "additionalProperties": false,
   "properties": {
    "IamActionDefinition": {
     "$ref": "#/definitions/IamActionDefinition"
    },
    "ScpActionDefinition": {
     "$ref": "#/definitions/ScpActionDefinition"
    },
    "SsmActionDefinition": {
     "$ref": "#/definitions/SsmActionDefinition"
    }
   },
   "type": "object"
  },
  "IamActionDefinition": {
   "additionalProperties": false,
   "properties": {
    "Groups": {
     "items": {
      "maxLength": 640,
      "minLength": 1,
      "pattern": "^([\\u0021-\\u007F]+\\u002F)?[\\w+=,.@-]+$",
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "PolicyArn": {
     "maxLength": 684,
     "minLength": 25,
     "pattern": "^arn:aws(-eusc|-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::(\\d{12}|aws):policy(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$",
     "type": "string"
    },
    "Roles": {
     "items": {
      "maxLength": 576,
      "minLength": 1,
      "pattern": "^([\\u0021-\\u007F]+\\u002F)?[\\w+=,.@-]+$",
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "Users": {
     "items": {
      "maxLength": 576,
      "minLength": 1,
      "pattern": "^([\\u0021-\\u007F]+\\u002F)?[\\w+=,.@-]+$",
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "PolicyArn"
   ],
   "type": "object"
  },
  "ResourceTag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "ScpActionDefinition": {
   "additionalProperties": false,
   "properties": {
    "PolicyId": {
     "maxLength": 130,
     "minLength": 10,
     "pattern": "^p-[0-9a-zA-Z_]{8,128}$",
     "type": "string"
    },
    "TargetIds": {
     "items": {
      "maxLength": 68,
      "minLength": 12,
      "pattern": "^(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$)|(\\d{12})",
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "PolicyId",
    "TargetIds"
   ],
   "type": "object"
  },
  "SsmActionDefinition": {
   "additionalProperties": false,
   "properties": {
    "InstanceIds": {
     "items": {
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^i-(\\w{8}|\\w{17})$|^[a-zA-Z]([\\w-]{0,61}\\w)?$",
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "Region": {
     "maxLength": 20,
     "minLength": 9,
     "pattern": "^\\w{2,4}-\\w+(-\\w+)?-\\d$",
     "type": "string"
    },
    "Subtype": {
     "enum": [
      "STOP_EC2_INSTANCES",
      "STOP_RDS_INSTANCES"
     ],
     "type": "string"
    }
   },
   "required": [
    "Subtype",
    "Region",
    "InstanceIds"
   ],
   "type": "object"
  },
  "Subscriber": {
   "additionalProperties": false,
   "properties": {
    "Address": {
     "maxLength": 2147483647,
     "minLength": 1,
     "pattern": "(.*[\\n\\r\\t\\f\\ ]?)*",
     "type": "string"
    },
    "Type": {
     "enum": [
      "SNS",
      "EMAIL"
     ],
     "type": "string"
    }
   },
   "required": [
    "Type",
    "Address"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/ActionId",
  "/properties/BudgetName"
 ],
 "properties": {
  "ActionId": {
   "type": "string"
  },
  "ActionThreshold": {
   "$ref": "#/definitions/ActionThreshold"
  },
  "ActionType": {
   "enum": [
    "APPLY_IAM_POLICY",
    "APPLY_SCP_POLICY",
    "RUN_SSM_DOCUMENTS"
   ],
   "type": "string"
  },
  "ApprovalModel": {
   "enum": [
    "AUTOMATIC",
    "MANUAL"
   ],
   "type": "string"
  },
  "BudgetName": {
   "maxLength": 100,
   "minLength": 1,
   "pattern": "^(?![^:\\\\]*/action/|(?i).*<script>.*</script>.*)[^:\\\\]+$",
   "type": "string"
  },
  "Definition": {
   "$ref": "#/definitions/Definition"
  },
  "ExecutionRoleArn": {
   "maxLength": 618,
   "minLength": 32,
   "pattern": "^arn:aws(-eusc|-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::\\d{12}:role(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$",
   "type": "string"
  },
  "NotificationType": {
   "enum": [
    "ACTUAL",
    "FORECASTED"
   ],
   "type": "string"
  },
  "ResourceTags": {
   "items": {
    "$ref": "#/definitions/ResourceTag"
   },
   "maxItems": 200,
   "type": "array"
  },
  "Subscribers": {
   "items": {
    "$ref": "#/definitions/Subscriber"
   },
   "maxItems": 11,
   "minItems": 1,
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/ActionId"
 ],
 "required": [
  "BudgetName",
  "NotificationType",
  "ActionType",
  "ActionThreshold",
  "ExecutionRoleArn",
  "Definition",
  "Subscribers"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/ResourceTags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Budgets::BudgetsAction"
}
