{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-ssmcontacts-contact.json",
  "title": "AWSSSMContactsContactProperties",
  "description": "Resource Type definition for AWS::SSMContacts::Contact. 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-contact.json",
    "sourceSha256": "4092c7729e0b3759e0d790007bed413bd7df014ceeca0b2b8f15dcb6c2a0bbc5"
  },
  "type": "object",
  "properties": {
    "Alias": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[a-z0-9_\\-\\.]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Alias of the contact. String value with 20 to 256 characters. Only alphabetical, numeric characters, dash, or underscore allowed."
    },
    "DisplayName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[a-zA-Z0-9_\\-\\s]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the contact. String value with 3 to 256 characters. Only alphabetical, space, numeric characters, dash, or underscore allowed."
    },
    "Type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PERSONAL",
            "CUSTOM",
            "SERVICE",
            "ESCALATION",
            "ONCALL_SCHEDULE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Contact type, which specify type of contact. Currently supported values: “PERSONAL”, “SHARED”, “OTHER“."
    },
    "Plan": {
      "description": "The stages that an escalation plan or engagement plan engages contacts and contact methods in.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Stage"
      }
    }
  },
  "typeName": "AWS::SSMContacts::Contact",
  "createOnlyProperties": [
    "/properties/Alias",
    "/properties/Type"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/Arn"
  ],
  "$defs": {
    "ContactTargetInfo": {
      "type": "object",
      "description": "The contact that SSM Incident Manager is engaging during an incident.",
      "properties": {
        "ContactId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the contact."
        },
        "IsEssential": {
          "type": "boolean",
          "description": "A Boolean value determining if the contact's acknowledgement stops the progress of stages in the plan."
        }
      },
      "required": [
        "ContactId",
        "IsEssential"
      ],
      "title": "AWSSSMContactsContactContactTargetInfoDefinition",
      "additionalProperties": false
    },
    "ChannelTargetInfo": {
      "type": "object",
      "description": "Information about the contact channel that SSM Incident Manager uses to engage the contact.",
      "properties": {
        "ChannelId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the contact channel."
        },
        "RetryIntervalInMinutes": {
          "type": "integer",
          "description": "The number of minutes to wait to retry sending engagement in the case the engagement initially fails."
        }
      },
      "required": [
        "ChannelId",
        "RetryIntervalInMinutes"
      ],
      "title": "AWSSSMContactsContactChannelTargetInfoDefinition",
      "additionalProperties": false
    },
    "Stage": {
      "description": "A set amount of time that an escalation plan or engagement plan engages the specified contacts or contact methods.",
      "type": "object",
      "properties": {
        "DurationInMinutes": {
          "description": "The time to wait until beginning the next stage.",
          "type": "integer"
        },
        "Targets": {
          "type": "array",
          "description": "The contacts or contact methods that the escalation plan or engagement plan is engaging.",
          "items": {
            "$ref": "#/$defs/Targets"
          }
        },
        "RotationIds": {
          "type": "array",
          "description": "List of Rotation Ids to associate with Contact",
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        }
      },
      "oneOf": [
        {
          "required": [
            "DurationInMinutes"
          ]
        },
        {
          "required": [
            "RotationIds"
          ]
        }
      ],
      "title": "AWSSSMContactsContactStageDefinition",
      "additionalProperties": false
    },
    "Targets": {
      "description": "The contacts or contact methods that the escalation plan or engagement plan is engaging.",
      "type": "object",
      "properties": {
        "ContactTargetInfo": {
          "$ref": "#/$defs/ContactTargetInfo"
        },
        "ChannelTargetInfo": {
          "$ref": "#/$defs/ChannelTargetInfo"
        }
      },
      "title": "AWSSSMContactsContactTargetsDefinition",
      "oneOf": [
        {
          "required": [
            "ChannelTargetInfo"
          ]
        },
        {
          "required": [
            "ContactTargetInfo"
          ]
        }
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "Alias",
    "DisplayName",
    "Type"
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "writeOnlyProperties": [
    "/properties/Plan"
  ]
}
