{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-incident-manager/json-schema/amazon-incident-manager-update-rotation-request-schema.json",
  "title": "UpdateRotationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-incident-manager-rotation-api-openapi.yml#/components/schemas/UpdateRotationRequest",
  "type": "object",
  "properties": {
    "RotationId": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the rotation to update."
    },
    "ContactIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Amazon Resource Names (ARNs) of the contacts to include in the updated rotation. Only the PERSONAL contact type is supported. The contact types ESCALATION and ONCALL_SCHEDULE are not supported for this operation. The order in which you list the contacts is their shift order in the rotation schedule."
    },
    "StartTime": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the rotation goes into effect."
    },
    "TimeZoneId": {
      "type": "string",
      "description": "The time zone to base the updated rotation’s activity on, in Internet Assigned Numbers Authority (IANA) format. For example: \"America/Los_Angeles\", \"UTC\", or \"Asia/Seoul\". For more information, see the Time Zone Database on the IANA website. Designators for time zones that don’t support Daylight Savings Time Rules, such as Pacific Standard Time (PST), aren't supported."
    },
    "Recurrence": {
      "$ref": "#/$defs/RecurrenceSettings"
    }
  },
  "required": [
    "RotationId",
    "Recurrence"
  ],
  "$defs": {
    "CoverageTime": {
      "type": "object",
      "properties": {
        "Start": {
          "$ref": "#/$defs/HandOffTime"
        },
        "End": {
          "$ref": "#/$defs/HandOffTime"
        }
      }
    },
    "HandOffTime": {
      "type": "object",
      "properties": {
        "HourOfDay": {
          "type": "integer",
          "description": "The hour when an on-call rotation shift begins or ends."
        },
        "MinuteOfHour": {
          "type": "integer",
          "description": "The minute when an on-call rotation shift begins or ends."
        }
      },
      "required": [
        "HourOfDay",
        "MinuteOfHour"
      ]
    },
    "MonthlySetting": {
      "type": "object",
      "properties": {
        "DayOfMonth": {
          "type": "integer",
          "description": "The day of the month when monthly recurring on-call rotations begin."
        },
        "HandOffTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "DayOfMonth",
        "HandOffTime"
      ]
    },
    "RecurrenceSettings": {
      "type": "object",
      "properties": {
        "MonthlySettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MonthlySetting"
          },
          "description": "Information about on-call rotations that recur monthly."
        },
        "WeeklySettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WeeklySetting"
          },
          "description": "Information about on-call rotations that recur weekly."
        },
        "DailySettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HandOffTime"
          },
          "description": "Information about on-call rotations that recur daily."
        },
        "NumberOfOnCalls": {
          "type": "integer",
          "description": "The number of contacts, or shift team members designated to be on call concurrently during a shift. For example, in an on-call schedule that contains ten contacts, a value of 2 designates that two of them are on call at any given time."
        },
        "ShiftCoverages": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/CoverageTime"
            }
          },
          "description": "Information about the days of the week that the on-call rotation coverage includes."
        },
        "RecurrenceMultiplier": {
          "type": "integer",
          "description": "The number of days, weeks, or months a single rotation lasts."
        }
      },
      "required": [
        "NumberOfOnCalls",
        "RecurrenceMultiplier"
      ]
    },
    "WeeklySetting": {
      "type": "object",
      "properties": {
        "DayOfWeek": {
          "type": "string",
          "enum": [
            "MON",
            "TUE",
            "WED",
            "THU",
            "FRI",
            "SAT",
            "SUN"
          ],
          "description": "The day of the week when weekly recurring on-call shift rotations begins."
        },
        "HandOffTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "DayOfWeek",
        "HandOffTime"
      ]
    }
  }
}