Skip to content

create_portal

create_portal(
    portal_name: Name,
    portal_contact_email: Email,
    role_arn: IamArn,
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    portal_description: Optional[Description] = None,
    client_token: Optional[ClientToken] = None,
    portal_logo_image_file: Optional[ImageFile] = None,
    tags: Optional[TagMap] = None,
    portal_auth_mode: Optional[AuthMode] = None,
    notification_sender_email: Optional[Email] = None,
    alarms: Optional[Alarms] = None,
    portal_type: Optional[PortalType] = None,
    portal_type_configuration: Optional[PortalTypeConfiguration] = None,
) -> CreatePortalResponse

The IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see IoT SiteWise Monitor availability change.

Creates a portal, which can contain projects and dashboards. IoT SiteWise Monitor uses IAM Identity Center or IAM to authenticate portal users and manage user permissions.

Before you can sign in to a new portal, you must add at least one identity to that portal. For more information, see Adding or removing portal administrators in the IoT SiteWise User Guide.

Parameters:

  • portal_name (Name) –

    A friendly name for the portal.

  • portal_description (Optional[Description], default: None ) –

    A description for the portal.

  • portal_contact_email (Email) –

    The Amazon Web Services administrator's contact email address.

  • client_token (Optional[ClientToken], default: None ) –

    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.

  • portal_logo_image_file (Optional[ImageFile], default: None ) –

    A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark background.

  • role_arn (IamArn) –

    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 (Optional[TagMap], default: None ) –

    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.

  • portal_auth_mode (Optional[AuthMode], default: None ) –

    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 you create a portal.

    Default: SSO

  • notification_sender_email (Optional[Email], default: None ) –

    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 (Optional[Alarms], default: None ) –

    Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. For more information, see Monitoring with alarms in the IoT SiteWise Application Guide.

  • portal_type (Optional[PortalType], default: None ) –

    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.

  • portal_type_configuration (Optional[PortalTypeConfiguration], default: None ) –

    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.

Raises:

  • InternalFailureException –

    IoT SiteWise can't process your request right now. Try again later.

  • InvalidRequestException –

    The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

  • LimitExceededException –

    You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • ResourceNotFoundException –

    The requested resource can't be found.

  • ThrottlingException –

    Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iotsitewise/_services/io_t_site_wise.py
def create_portal(
    self,
    portal_name: "capo_iotsitewise.types.name.Name",
    portal_contact_email: "capo_iotsitewise.types.email.Email",
    role_arn: "capo_iotsitewise.types.iam_arn.IamArn",
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    portal_description: Optional[
        "capo_iotsitewise.types.description.Description"
    ] = None,
    client_token: Optional[
        "capo_iotsitewise.types.client_token.ClientToken"
    ] = None,
    portal_logo_image_file: Optional[
        "capo_iotsitewise.types.image_file.ImageFile"
    ] = None,
    tags: Optional["capo_iotsitewise.types.tag_map.TagMap"] = None,
    portal_auth_mode: Optional["capo_iotsitewise.types.auth_mode.AuthMode"] = None,
    notification_sender_email: Optional[
        "capo_iotsitewise.types.email.Email"
    ] = None,
    alarms: Optional["capo_iotsitewise.types.alarms.Alarms"] = None,
    portal_type: Optional["capo_iotsitewise.types.portal_type.PortalType"] = None,
    portal_type_configuration: Optional[
        "capo_iotsitewise.types.portal_type_configuration.PortalTypeConfiguration"
    ] = None,
) -> "capo_iotsitewise.types.create_portal_response.CreatePortalResponse":
    """<important> <p>The IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/appguide/iotsitewise-monitor-availability-change.html">IoT SiteWise Monitor availability change</a>.</p> </important> <p>Creates a portal, which can contain projects and dashboards. IoT SiteWise Monitor uses IAM Identity Center or IAM to authenticate portal users and manage user permissions.</p> <note> <p>Before you can sign in to a new portal, you must add at least one identity to that portal. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/administer-portals.html#portal-change-admins">Adding or removing portal administrators</a> in the <i>IoT SiteWise User Guide</i>.</p> </note>

    Args:
        portal_name: <p>A friendly name for the portal.</p>
        portal_description: <p>A description for the portal.</p>
        portal_contact_email: <p>The Amazon Web Services administrator's contact email address.</p>
        client_token: <p>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.</p>
        portal_logo_image_file: <p>A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark background.</p>
        role_arn: <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of a service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/monitor-service-role.html">Using service roles for IoT SiteWise Monitor</a> in the <i>IoT SiteWise User Guide</i>.</p>
        tags: <p>A list of key-value pairs that contain metadata for the portal. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
        portal_auth_mode: <p>The service to use to authenticate users to the portal. Choose from the following options:</p> <ul> <li> <p> <code>SSO</code> – 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 <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/monitor-get-started.html#mon-gs-sso">Enabling IAM Identity Center</a> in the <i>IoT SiteWise User Guide</i>. This option is only available in Amazon Web Services Regions other than the China Regions.</p> </li> <li> <p> <code>IAM</code> – The portal uses Identity and Access Management to authenticate users and manage user permissions.</p> </li> </ul> <p>You can't change this value after you create a portal.</p> <p>Default: <code>SSO</code> </p>
        notification_sender_email: <p>The email address that sends alarm notifications.</p> <important> <p>If you use the <a href="https://docs.aws.amazon.com/iotevents/latest/developerguide/lambda-support.html">IoT Events managed Lambda function</a> to manage your emails, you must <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html">verify the sender email address in Amazon SES</a>.</p> </important>
        alarms: <p>Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/appguide/monitor-alarms.html">Monitoring with alarms</a> in the <i>IoT SiteWise Application Guide</i>.</p>
        portal_type: <p>Define the type of portal. The value for IoT SiteWise Monitor (Classic) is <code>SITEWISE_PORTAL_V1</code>. The value for IoT SiteWise Monitor (AI-aware) is <code>SITEWISE_PORTAL_V2</code>.</p>
        portal_type_configuration: <p>The configuration entry associated with the specific portal type. The value for IoT SiteWise Monitor (Classic) is <code>SITEWISE_PORTAL_V1</code>. The value for IoT SiteWise Monitor (AI-aware) is <code>SITEWISE_PORTAL_V2</code>.</p>

    Raises:
        capo_iotsitewise.errors.internal_failure_exception.InternalFailureException: <p>IoT SiteWise can't process your request right now. Try again later.</p>
        capo_iotsitewise.errors.invalid_request_exception.InvalidRequestException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.</p>
        capo_iotsitewise.errors.limit_exceeded_exception.LimitExceededException: <p>You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_iotsitewise.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iotsitewise.types.create_portal_request.CreatePortalRequest]",
    ) -> OperationResponse[
        "capo_iotsitewise.types.create_portal_response.CreatePortalResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.create_portal

        output, http_response = (
            capo_iotsitewise._operations.aws_io_t_site_wise.create_portal.create_portal(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_iotsitewise.types.create_portal_request.CreatePortalRequest",
    ) -> dict[str, Any]:
        import capo_iotsitewise.types.create_portal_request

        return capo_iotsitewise.types.create_portal_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreatePortal", redact_input=_redact_input),
    )
    input_: capo_iotsitewise.types.create_portal_request.CreatePortalRequest = {
        "portal_name": portal_name,
        "portal_contact_email": portal_contact_email,
        "role_arn": role_arn,
    }
    if portal_description is not None:
        input_["portal_description"] = portal_description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if portal_logo_image_file is not None:
        input_["portal_logo_image_file"] = portal_logo_image_file
    if tags is not None:
        input_["tags"] = tags
    if portal_auth_mode is not None:
        input_["portal_auth_mode"] = portal_auth_mode
    if notification_sender_email is not None:
        input_["notification_sender_email"] = notification_sender_email
    if alarms is not None:
        input_["alarms"] = alarms
    if portal_type is not None:
        input_["portal_type"] = portal_type
    if portal_type_configuration is not None:
        input_["portal_type_configuration"] = portal_type_configuration

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output