{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-create-portal-request-schema.json",
  "title": "CreatePortalRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-portals-api-openapi.yml#/components/schemas/CreatePortalRequest",
  "type": "object",
  "properties": {
    "portalName": {
      "type": "string",
      "description": "A friendly name for the portal."
    },
    "portalDescription": {
      "type": "string",
      "description": "A description for the portal."
    },
    "portalContactEmail": {
      "type": "string",
      "description": "The Amazon Web Services administrator's contact email address."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required."
    },
    "portalLogoImageFile": {
      "$ref": "#/$defs/ImageFile"
    },
    "roleArn": {
      "type": "string",
      "description": "The ARN of a service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, see Using service roles for IoT SiteWise Monitor in the IoT SiteWise User Guide."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide."
    },
    "portalAuthMode": {
      "type": "string",
      "enum": [
        "IAM",
        "SSO"
      ],
      "description": "The service to use to authenticate users to the portal. Choose from the following options: SSO – The portal uses IAM Identity Center to authenticate users and manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable IAM Identity Center. For more information, see Enabling IAM Identity Center in the IoT SiteWise User Guide. This option is only available in Amazon Web Services Regions other than the China Regions. IAM – The portal uses Identity and Access Management to authenticate users and manage user permissions. You can't change this value after y"
    },
    "notificationSenderEmail": {
      "type": "string",
      "description": "The email address that sends alarm notifications. If you use the IoT Events managed Lambda function to manage your emails, you must verify the sender email address in Amazon SES."
    },
    "alarms": {
      "$ref": "#/$defs/Alarms"
    },
    "portalType": {
      "type": "string",
      "enum": [
        "SITEWISE_PORTAL_V1",
        "SITEWISE_PORTAL_V2"
      ],
      "description": "Define the type of portal. The value for IoT SiteWise Monitor (Classic) is SITEWISE_PORTAL_V1. The value for IoT SiteWise Monitor (AI-aware) is SITEWISE_PORTAL_V2."
    },
    "portalTypeConfiguration": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/PortalTypeEntry"
      },
      "description": "The configuration entry associated with the specific portal type. The value for IoT SiteWise Monitor (Classic) is SITEWISE_PORTAL_V1. The value for IoT SiteWise Monitor (AI-aware) is SITEWISE_PORTAL_V2."
    }
  },
  "required": [
    "portalName",
    "portalContactEmail",
    "roleArn"
  ],
  "$defs": {
    "Alarms": {
      "type": "object",
      "properties": {
        "alarmRoleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that allows the alarm to perform actions and access Amazon Web Services resources and services, such as IoT Events."
        },
        "notificationLambdaArn": {
          "type": "string",
          "description": "The ARN of the Lambda function that manages alarm notifications. For more information, see Managing alarm notifications in the IoT Events Developer Guide."
        }
      },
      "required": [
        "alarmRoleArn"
      ]
    },
    "ImageFile": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The image file contents, represented as a base64-encoded string. The file size must be less than 1 MB."
        },
        "type": {
          "type": "string",
          "enum": [
            "PNG"
          ],
          "description": "The file type of the image."
        }
      },
      "required": [
        "data",
        "type"
      ]
    },
    "PortalTypeEntry": {
      "type": "object",
      "properties": {
        "portalTools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array of tools associated with the specified portal type. The possible values are ASSISTANT and DASHBOARD."
        }
      }
    }
  }
}