{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-ssmcontacts-rotation.json",
  "title": "AWSSSMContactsRotationProperties",
  "description": "Resource Type definition for AWS::SSMContacts::Rotation.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-ssmcontacts-rotation.json",
    "sourceSha256": "db21f6eda1f6a06dfcdfb42f1f48d8583cebd26e6a72bc94ccba980cb330882b"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the Rotation"
    },
    "ContactIds": {
      "description": "Members of the rotation",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string"
      }
    },
    "StartTime": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Start time of the first shift of Oncall Schedule"
    },
    "TimeZoneId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "TimeZone Identifier for the Oncall Schedule"
    },
    "Recurrence": {
      "$ref": "#/$defs/RecurrenceSettings"
    },
    "Tags": {
      "type": "array",
      "insertionOrder": false,
      "uniqueItems": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::SSMContacts::Rotation",
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false
  },
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag"
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSSSMContactsRotationTagDefinition",
      "additionalProperties": false
    },
    "HandOffTime": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Details about when an on-call rotation shift begins or ends. Time of the day in format HH:MM",
      "title": "AWSSSMContactsRotationHandOffTimeDefinition"
    },
    "CoverageTime": {
      "type": "object",
      "description": "StartTime and EndTime for the Shift",
      "properties": {
        "StartTime": {
          "$ref": "#/$defs/HandOffTime"
        },
        "EndTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "StartTime",
        "EndTime"
      ],
      "title": "AWSSSMContactsRotationCoverageTimeDefinition",
      "additionalProperties": false
    },
    "ShiftCoverage": {
      "type": "object",
      "description": "Information about the days of the week included in on-call rotation coverage.",
      "properties": {
        "DayOfWeek": {
          "$ref": "#/$defs/DayOfWeek"
        },
        "CoverageTimes": {
          "description": "Information about when an on-call shift begins and ends.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/CoverageTime"
          }
        }
      },
      "required": [
        "DayOfWeek",
        "CoverageTimes"
      ],
      "title": "AWSSSMContactsRotationShiftCoverageDefinition",
      "additionalProperties": false
    },
    "DayOfWeek": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "MON",
            "TUE",
            "WED",
            "THU",
            "FRI",
            "SAT",
            "SUN"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The day of the week when weekly recurring on-call shift rotations begin. ",
      "title": "AWSSSMContactsRotationDayOfWeekDefinition"
    },
    "MonthlySetting": {
      "type": "object",
      "description": "DayOfWeek for Month and HandOff Time for Monthly Recurring Rotation.",
      "properties": {
        "DayOfMonth": {
          "description": "The day of the month when monthly recurring on-call rotations begin.",
          "type": "integer",
          "minimum": 1,
          "maximum": 31
        },
        "HandOffTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "DayOfMonth",
        "HandOffTime"
      ],
      "title": "AWSSSMContactsRotationMonthlySettingDefinition",
      "additionalProperties": false
    },
    "WeeklySetting": {
      "type": "object",
      "description": "DayOfWeek for Rotation and HandOff Time for Weekly Recurring Rotation.",
      "properties": {
        "DayOfWeek": {
          "$ref": "#/$defs/DayOfWeek"
        },
        "HandOffTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "DayOfWeek",
        "HandOffTime"
      ],
      "title": "AWSSSMContactsRotationWeeklySettingDefinition",
      "additionalProperties": false
    },
    "DailySetting": {
      "type": "object",
      "description": "Handoff time for Daily Recurring Rotation.",
      "properties": {
        "HandOffTime": {
          "$ref": "#/$defs/HandOffTime"
        }
      },
      "required": [
        "HandOffTime"
      ],
      "title": "AWSSSMContactsRotationDailySettingDefinition",
      "additionalProperties": false
    },
    "RecurrenceSettings": {
      "description": "Information about when an on-call rotation is in effect and how long the rotation period lasts.",
      "type": "object",
      "properties": {
        "MonthlySettings": {
          "description": "Information about on-call rotations that recur monthly.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MonthlySetting"
          }
        },
        "WeeklySettings": {
          "description": "Information about on-call rotations that recur weekly.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/WeeklySetting"
          }
        },
        "DailySettings": {
          "description": "Information about on-call rotations that recur daily.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/HandOffTime"
          }
        },
        "NumberOfOnCalls": {
          "type": "integer",
          "description": "Number of Oncalls per shift.",
          "minimum": 1
        },
        "RecurrenceMultiplier": {
          "type": "integer",
          "description": "The number of days, weeks, or months a single rotation lasts.",
          "minimum": 1,
          "maximum": 100
        },
        "ShiftCoverages": {
          "type": "array",
          "insertionOrder": false,
          "description": "Information about the days of the week included in on-call rotation coverage.",
          "items": {
            "$ref": "#/$defs/ShiftCoverage"
          }
        }
      },
      "title": "AWSSSMContactsRotationRecurrenceSettingsDefinition",
      "oneOf": [
        {
          "required": [
            "NumberOfOnCalls",
            "RecurrenceMultiplier",
            "WeeklySettings"
          ]
        },
        {
          "required": [
            "NumberOfOnCalls",
            "RecurrenceMultiplier",
            "MonthlySettings"
          ]
        },
        {
          "required": [
            "NumberOfOnCalls",
            "RecurrenceMultiplier",
            "DailySettings"
          ]
        }
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "Name",
    "ContactIds",
    "StartTime",
    "TimeZoneId",
    "Recurrence"
  ],
  "readOnlyProperties": [
    "/properties/Arn"
  ]
}
