{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-incident-manager/json-schema/amazon-incident-manager-create-contact-request-schema.json",
  "title": "CreateContactRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-incident-manager-contact-api-openapi.yml#/components/schemas/CreateContactRequest",
  "type": "object",
  "properties": {
    "Alias": {
      "type": "string",
      "description": "The short name to quickly identify a contact or escalation plan. The contact alias must be unique and identifiable."
    },
    "DisplayName": {
      "type": "string",
      "description": "The full name of the contact or escalation plan."
    },
    "Type": {
      "type": "string",
      "enum": [
        "PERSONAL",
        "ESCALATION",
        "ONCALL_SCHEDULE"
      ],
      "description": "The type of contact to create. PERSONAL: A single, individual contact. ESCALATION: An escalation plan. ONCALL_SCHEDULE: An on-call schedule."
    },
    "Plan": {
      "$ref": "#/$defs/Plan"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Adds a tag to the target. You can only tag resources created in the first Region of your replication set."
    },
    "IdempotencyToken": {
      "type": "string",
      "description": "A token ensuring that the operation is called only once with the specified details."
    }
  },
  "required": [
    "Alias",
    "Type",
    "Plan"
  ],
  "$defs": {
    "ChannelTargetInfo": {
      "type": "object",
      "properties": {
        "ContactChannelId": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the contact channel."
        },
        "RetryIntervalInMinutes": {
          "type": "integer",
          "description": "The number of minutes to wait before retrying to send engagement if the engagement initially failed."
        }
      },
      "required": [
        "ContactChannelId"
      ]
    },
    "ContactTargetInfo": {
      "type": "object",
      "properties": {
        "ContactId": {
          "type": "string",
          "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": [
        "IsEssential"
      ]
    },
    "Plan": {
      "type": "object",
      "properties": {
        "Stages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Stage"
          },
          "description": "A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods."
        },
        "RotationIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan."
        }
      }
    },
    "Stage": {
      "type": "object",
      "properties": {
        "DurationInMinutes": {
          "type": "integer",
          "description": "The time to wait until beginning the next stage. The duration can only be set to 0 if a target is specified."
        },
        "Targets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Target"
          },
          "description": "The contacts or contact methods that the escalation plan or engagement plan is engaging."
        }
      },
      "required": [
        "DurationInMinutes",
        "Targets"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "Name of the object key."
        },
        "Value": {
          "type": "string",
          "description": "Value of the tag."
        }
      }
    },
    "Target": {
      "type": "object",
      "properties": {
        "ChannelTargetInfo": {
          "$ref": "#/$defs/ChannelTargetInfo"
        },
        "ContactTargetInfo": {
          "$ref": "#/$defs/ContactTargetInfo"
        }
      }
    }
  }
}