{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-deadline-cloud/json-schema/amazon-deadline-cloud-update-budget-request-schema.json",
  "title": "UpdateBudgetRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-deadline-cloud-budgets-api-openapi.yml#/components/schemas/UpdateBudgetRequest",
  "type": "object",
  "properties": {
    "farmId": {
      "type": "string",
      "description": "The farm ID of the budget to update."
    },
    "budgetId": {
      "type": "string",
      "description": "The budget ID to update."
    },
    "clientToken": {
      "type": "string",
      "description": "The unique token which the server uses to recognize retries of the same request."
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the budget to update. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field."
    },
    "description": {
      "type": "string",
      "description": "The description of the budget to update. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field."
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "description": "Updates the status of the budget. ACTIVE–The budget is being evaluated. INACTIVE–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses."
    },
    "approximateDollarLimit": {
      "type": "number",
      "description": "The dollar limit to update on the budget. Based on consumed usage."
    },
    "actionsToAdd": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BudgetActionToAdd"
      },
      "description": "The budget actions to add. Budget actions specify what happens when the budget runs out."
    },
    "actionsToRemove": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BudgetActionToRemove"
      },
      "description": "The budget actions to remove from the budget."
    },
    "schedule": {
      "$ref": "#/$defs/BudgetSchedule"
    }
  },
  "required": [
    "farmId",
    "budgetId"
  ],
  "$defs": {
    "BudgetActionToAdd": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "STOP_SCHEDULING_AND_COMPLETE_TASKS",
            "STOP_SCHEDULING_AND_CANCEL_TASKS"
          ],
          "description": "The type of budget action to add."
        },
        "thresholdPercentage": {
          "type": "number",
          "description": "The percentage threshold for the budget action to add."
        },
        "description": {
          "type": "string",
          "description": "A description for the budget action to add. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field."
        }
      },
      "required": [
        "type",
        "thresholdPercentage"
      ]
    },
    "BudgetActionToRemove": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "STOP_SCHEDULING_AND_COMPLETE_TASKS",
            "STOP_SCHEDULING_AND_CANCEL_TASKS"
          ],
          "description": "The type of budget action to remove."
        },
        "thresholdPercentage": {
          "type": "number",
          "description": "The percentage threshold for the budget action to remove."
        }
      },
      "required": [
        "type",
        "thresholdPercentage"
      ]
    },
    "BudgetSchedule": {
      "type": "object",
      "properties": {
        "fixed": {
          "$ref": "#/$defs/FixedBudgetSchedule"
        }
      },
      "description": "Exactly one member is set."
    },
    "FixedBudgetSchedule": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "When the budget starts."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "When the budget ends."
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    }
  }
}