{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/NotificationsWithSubscribers"
 ],
 "definitions": {
  "AutoAdjustData": {
   "additionalProperties": false,
   "properties": {
    "AutoAdjustType": {
     "type": "string"
    },
    "HistoricalOptions": {
     "$ref": "#/definitions/HistoricalOptions"
    }
   },
   "required": [
    "AutoAdjustType"
   ],
   "type": "object"
  },
  "BudgetData": {
   "additionalProperties": false,
   "properties": {
    "AutoAdjustData": {
     "$ref": "#/definitions/AutoAdjustData"
    },
    "BillingViewArn": {
     "type": "string"
    },
    "BudgetLimit": {
     "$ref": "#/definitions/Spend"
    },
    "BudgetName": {
     "type": "string"
    },
    "BudgetType": {
     "type": "string"
    },
    "CostFilters": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "CostTypes": {
     "$ref": "#/definitions/CostTypes"
    },
    "FilterExpression": {
     "$ref": "#/definitions/Expression"
    },
    "Metrics": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "PlannedBudgetLimits": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "TimePeriod": {
     "$ref": "#/definitions/TimePeriod"
    },
    "TimeUnit": {
     "type": "string"
    }
   },
   "required": [
    "TimeUnit",
    "BudgetType"
   ],
   "type": "object"
  },
  "CostCategoryValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "MatchOptions": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Values": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  },
  "CostTypes": {
   "additionalProperties": false,
   "properties": {
    "IncludeCredit": {
     "type": "boolean"
    },
    "IncludeDiscount": {
     "type": "boolean"
    },
    "IncludeOtherSubscription": {
     "type": "boolean"
    },
    "IncludeRecurring": {
     "type": "boolean"
    },
    "IncludeRefund": {
     "type": "boolean"
    },
    "IncludeSubscription": {
     "type": "boolean"
    },
    "IncludeSupport": {
     "type": "boolean"
    },
    "IncludeTax": {
     "type": "boolean"
    },
    "IncludeUpfront": {
     "type": "boolean"
    },
    "UseAmortized": {
     "type": "boolean"
    },
    "UseBlended": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "Expression": {
   "additionalProperties": false,
   "properties": {
    "And": {
     "items": {
      "$ref": "#/definitions/Expression"
     },
     "type": "array",
     "uniqueItems": false
    },
    "CostCategories": {
     "$ref": "#/definitions/CostCategoryValues"
    },
    "Dimensions": {
     "$ref": "#/definitions/ExpressionDimensionValues"
    },
    "Not": {
     "$ref": "#/definitions/Expression"
    },
    "Or": {
     "items": {
      "$ref": "#/definitions/Expression"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Tags": {
     "$ref": "#/definitions/TagValues"
    }
   },
   "type": "object"
  },
  "ExpressionDimensionValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "MatchOptions": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Values": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  },
  "HistoricalOptions": {
   "additionalProperties": false,
   "properties": {
    "BudgetAdjustmentPeriod": {
     "type": "integer"
    }
   },
   "required": [
    "BudgetAdjustmentPeriod"
   ],
   "type": "object"
  },
  "Notification": {
   "additionalProperties": false,
   "properties": {
    "ComparisonOperator": {
     "type": "string"
    },
    "NotificationType": {
     "type": "string"
    },
    "Threshold": {
     "maximum": 1000000000,
     "minimum": 0.1,
     "type": "number"
    },
    "ThresholdType": {
     "type": "string"
    }
   },
   "required": [
    "ComparisonOperator",
    "NotificationType",
    "Threshold"
   ],
   "type": "object"
  },
  "NotificationWithSubscribers": {
   "additionalProperties": false,
   "properties": {
    "Notification": {
     "$ref": "#/definitions/Notification"
    },
    "Subscribers": {
     "items": {
      "$ref": "#/definitions/Subscriber"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "required": [
    "Subscribers",
    "Notification"
   ],
   "type": "object"
  },
  "ResourceTag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Key"
   ],
   "type": "object"
  },
  "Spend": {
   "additionalProperties": false,
   "properties": {
    "Amount": {
     "type": "number"
    },
    "Unit": {
     "type": "string"
    }
   },
   "required": [
    "Amount",
    "Unit"
   ],
   "type": "object"
  },
  "Subscriber": {
   "additionalProperties": false,
   "properties": {
    "Address": {
     "type": "string"
    },
    "SubscriptionType": {
     "type": "string"
    }
   },
   "required": [
    "SubscriptionType",
    "Address"
   ],
   "type": "object"
  },
  "TagValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "MatchOptions": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Values": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  },
  "TimePeriod": {
   "additionalProperties": false,
   "properties": {
    "End": {
     "type": "string"
    },
    "Start": {
     "type": "string"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Id"
 ],
 "properties": {
  "Budget": {
   "$ref": "#/definitions/BudgetData"
  },
  "Id": {
   "type": "string"
  },
  "NotificationsWithSubscribers": {
   "items": {
    "$ref": "#/definitions/NotificationWithSubscribers"
   },
   "type": "array",
   "uniqueItems": false
  },
  "ResourceTags": {
   "items": {
    "$ref": "#/definitions/ResourceTag"
   },
   "type": "array",
   "uniqueItems": false
  }
 },
 "readOnlyProperties": [
  "/properties/Id"
 ],
 "required": [
  "Budget"
 ],
 "typeName": "AWS::Budgets::Budget"
}
