{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-clean-rooms/json-schema/amazon-clean-rooms-update-privacy-budget-template-input-schema.json",
  "title": "UpdatePrivacyBudgetTemplateInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-clean-rooms-privacybudgettemplates-api-openapi.yml#/components/schemas/UpdatePrivacyBudgetTemplateInput",
  "type": "object",
  "properties": {
    "membershipIdentifier": {
      "type": "string",
      "description": "A unique identifier for one of your memberships for a collaboration. The privacy budget template is updated in the collaboration that this membership belongs to. Accepts a membership ID."
    },
    "privacyBudgetTemplateIdentifier": {
      "type": "string",
      "description": "A unique identifier for your privacy budget template that you want to update."
    },
    "privacyBudgetType": {
      "type": "string",
      "enum": [
        "DIFFERENTIAL_PRIVACY",
        "ACCESS_BUDGET"
      ],
      "description": "Specifies the type of the privacy budget template."
    },
    "parameters": {
      "$ref": "#/$defs/PrivacyBudgetTemplateUpdateParameters"
    }
  },
  "required": [
    "membershipIdentifier",
    "privacyBudgetTemplateIdentifier",
    "privacyBudgetType"
  ],
  "$defs": {
    "AccessBudgetsPrivacyTemplateUpdateParameters": {
      "type": "object",
      "properties": {
        "budgetParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BudgetParameter"
          },
          "description": "Updated array of budget parameters for the access budget configuration."
        }
      },
      "required": [
        "budgetParameters"
      ]
    },
    "BudgetParameter": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "CALENDAR_DAY",
            "CALENDAR_MONTH",
            "CALENDAR_WEEK",
            "LIFETIME"
          ],
          "description": "The type of budget parameter being configured."
        },
        "budget": {
          "type": "integer",
          "description": "The budget allocation amount for this specific parameter."
        },
        "autoRefresh": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Whether this individual budget parameter automatically refreshes when the budget period resets."
        }
      },
      "required": [
        "type",
        "budget"
      ]
    },
    "DifferentialPrivacyTemplateUpdateParameters": {
      "type": "object",
      "properties": {
        "epsilon": {
          "type": "integer",
          "description": "The updated epsilon value that you want to use."
        },
        "usersNoisePerQuery": {
          "type": "integer",
          "description": "The updated value of noise added per query. It is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted."
        }
      }
    },
    "PrivacyBudgetTemplateUpdateParameters": {
      "type": "object",
      "properties": {
        "differentialPrivacy": {
          "$ref": "#/$defs/DifferentialPrivacyTemplateUpdateParameters"
        },
        "accessBudget": {
          "$ref": "#/$defs/AccessBudgetsPrivacyTemplateUpdateParameters"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}