{
  "typeName" : "AWS::Budgets::Budget",
  "description" : "Resource Type definition for AWS::Budgets::Budget",
  "additionalProperties" : false,
  "properties" : {
    "NotificationsWithSubscribers" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/NotificationWithSubscribers"
      }
    },
    "Budget" : {
      "$ref" : "#/definitions/BudgetData"
    },
    "Id" : {
      "type" : "string"
    }
  },
  "definitions" : {
    "HistoricalOptions" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "BudgetAdjustmentPeriod" : {
          "type" : "integer"
        }
      },
      "required" : [ "BudgetAdjustmentPeriod" ]
    },
    "Subscriber" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Address" : {
          "type" : "string"
        },
        "SubscriptionType" : {
          "type" : "string"
        }
      },
      "required" : [ "SubscriptionType", "Address" ]
    },
    "BudgetData" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "BudgetLimit" : {
          "$ref" : "#/definitions/Spend"
        },
        "TimePeriod" : {
          "$ref" : "#/definitions/TimePeriod"
        },
        "AutoAdjustData" : {
          "$ref" : "#/definitions/AutoAdjustData"
        },
        "TimeUnit" : {
          "type" : "string"
        },
        "PlannedBudgetLimits" : {
          "type" : "object"
        },
        "CostFilters" : {
          "type" : "object"
        },
        "BudgetName" : {
          "type" : "string"
        },
        "CostTypes" : {
          "$ref" : "#/definitions/CostTypes"
        },
        "BudgetType" : {
          "type" : "string"
        }
      },
      "required" : [ "TimeUnit", "BudgetType" ]
    },
    "TimePeriod" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Start" : {
          "type" : "string"
        },
        "End" : {
          "type" : "string"
        }
      }
    },
    "Spend" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Unit" : {
          "type" : "string"
        },
        "Amount" : {
          "type" : "number"
        }
      },
      "required" : [ "Amount", "Unit" ]
    },
    "NotificationWithSubscribers" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Subscribers" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "$ref" : "#/definitions/Subscriber"
          }
        },
        "Notification" : {
          "$ref" : "#/definitions/Notification"
        }
      },
      "required" : [ "Subscribers", "Notification" ]
    },
    "AutoAdjustData" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AutoAdjustType" : {
          "type" : "string"
        },
        "HistoricalOptions" : {
          "$ref" : "#/definitions/HistoricalOptions"
        }
      },
      "required" : [ "AutoAdjustType" ]
    },
    "Notification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ComparisonOperator" : {
          "type" : "string"
        },
        "NotificationType" : {
          "type" : "string"
        },
        "Threshold" : {
          "type" : "number"
        },
        "ThresholdType" : {
          "type" : "string"
        }
      },
      "required" : [ "ComparisonOperator", "NotificationType", "Threshold" ]
    },
    "CostTypes" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IncludeSupport" : {
          "type" : "boolean"
        },
        "IncludeOtherSubscription" : {
          "type" : "boolean"
        },
        "IncludeTax" : {
          "type" : "boolean"
        },
        "IncludeSubscription" : {
          "type" : "boolean"
        },
        "UseBlended" : {
          "type" : "boolean"
        },
        "IncludeUpfront" : {
          "type" : "boolean"
        },
        "IncludeDiscount" : {
          "type" : "boolean"
        },
        "IncludeCredit" : {
          "type" : "boolean"
        },
        "IncludeRecurring" : {
          "type" : "boolean"
        },
        "UseAmortized" : {
          "type" : "boolean"
        },
        "IncludeRefund" : {
          "type" : "boolean"
        }
      }
    }
  },
  "required" : [ "Budget" ],
  "createOnlyProperties" : [ "/properties/NotificationsWithSubscribers" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Id" ]
}