{
  "typeName" : "AWS::Budgets::Budget",
  "description" : "Resource Type definition for AWS::Budgets::Budget",
  "additionalProperties" : false,
  "properties" : {
    "Budget" : {
      "$ref" : "#/definitions/BudgetData"
    },
    "Id" : {
      "type" : "string"
    },
    "NotificationsWithSubscribers" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/NotificationWithSubscribers"
      }
    },
    "ResourceTags" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/ResourceTag"
      }
    }
  },
  "definitions" : {
    "HistoricalOptions" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "BudgetAdjustmentPeriod" : {
          "type" : "integer"
        }
      },
      "required" : [ "BudgetAdjustmentPeriod" ]
    },
    "CostCategoryValues" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Values" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Key" : {
          "type" : "string"
        },
        "MatchOptions" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "BudgetData" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "TimePeriod" : {
          "$ref" : "#/definitions/TimePeriod"
        },
        "PlannedBudgetLimits" : {
          "type" : "object"
        },
        "CostFilters" : {
          "type" : "object"
        },
        "CostTypes" : {
          "$ref" : "#/definitions/CostTypes"
        },
        "BudgetType" : {
          "type" : "string"
        },
        "Metrics" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "BudgetLimit" : {
          "$ref" : "#/definitions/Spend"
        },
        "BillingViewArn" : {
          "type" : "string"
        },
        "AutoAdjustData" : {
          "$ref" : "#/definitions/AutoAdjustData"
        },
        "TimeUnit" : {
          "type" : "string"
        },
        "FilterExpression" : {
          "$ref" : "#/definitions/Expression"
        },
        "BudgetName" : {
          "type" : "string"
        }
      },
      "required" : [ "TimeUnit", "BudgetType" ]
    },
    "TimePeriod" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Start" : {
          "type" : "string"
        },
        "End" : {
          "type" : "string"
        }
      }
    },
    "NotificationWithSubscribers" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Subscribers" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "$ref" : "#/definitions/Subscriber"
          }
        },
        "Notification" : {
          "$ref" : "#/definitions/Notification"
        }
      },
      "required" : [ "Subscribers", "Notification" ]
    },
    "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"
        }
      }
    },
    "TagValues" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Values" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Key" : {
          "type" : "string"
        },
        "MatchOptions" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "ResourceTag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Key" : {
          "type" : "string"
        }
      },
      "required" : [ "Key" ]
    },
    "Subscriber" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Address" : {
          "type" : "string"
        },
        "SubscriptionType" : {
          "type" : "string"
        }
      },
      "required" : [ "SubscriptionType", "Address" ]
    },
    "Expression" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Not" : {
          "$ref" : "#/definitions/Expression"
        },
        "Or" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "$ref" : "#/definitions/Expression"
          }
        },
        "And" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "$ref" : "#/definitions/Expression"
          }
        },
        "Dimensions" : {
          "$ref" : "#/definitions/ExpressionDimensionValues"
        },
        "CostCategories" : {
          "$ref" : "#/definitions/CostCategoryValues"
        },
        "Tags" : {
          "$ref" : "#/definitions/TagValues"
        }
      }
    },
    "Spend" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Unit" : {
          "type" : "string"
        },
        "Amount" : {
          "type" : "number"
        }
      },
      "required" : [ "Amount", "Unit" ]
    },
    "AutoAdjustData" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AutoAdjustType" : {
          "type" : "string"
        },
        "HistoricalOptions" : {
          "$ref" : "#/definitions/HistoricalOptions"
        }
      },
      "required" : [ "AutoAdjustType" ]
    },
    "ExpressionDimensionValues" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Values" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Key" : {
          "type" : "string"
        },
        "MatchOptions" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "required" : [ "Budget" ],
  "createOnlyProperties" : [ "/properties/NotificationsWithSubscribers" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Id" ]
}