Skip to content

update_portal

update_portal(
    portal_id: ID,
    portal_name: Name,
    portal_contact_email: Email,
    role_arn: IamArn,
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    portal_description: Optional[Description] = None,
    portal_logo_image: Optional[Image] = None,
    client_token: Optional[ClientToken] = None,
    notification_sender_email: Optional[Email] = None,
    alarms: Optional[Alarms] = None,
    portal_type: Optional[PortalType] = None,
    portal_type_configuration: Optional[PortalTypeConfiguration] = None,
) -> UpdatePortalResponse

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.

Updates an IoT SiteWise Monitor portal.

Parameters:

  • portal_id (ID) –

    The ID of the portal to update.

  • portal_name (Name) –

    A new friendly name for the portal.

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

    A new description for the portal.

  • portal_contact_email (Email) –

    The Amazon Web Services administrator's contact email address.

  • 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.

  • 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.

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

    The email address that sends alarm notifications.

  • 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:

  • ConflictingOperationException –

    Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

  • 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.

  • 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 update_portal(
    self,
    portal_id: "capo_iotsitewise.types.id.ID",
    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,
    portal_logo_image: Optional["capo_iotsitewise.types.image.Image"] = None,
    client_token: Optional[
        "capo_iotsitewise.types.client_token.ClientToken"
    ] = 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.update_portal_response.UpdatePortalResponse":
    """<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>Updates an IoT SiteWise Monitor portal.</p>

    Args:
        portal_id: <p>The ID of the portal to update.</p>
        portal_name: <p>A new friendly name for the portal.</p>
        portal_description: <p>A new description for the portal.</p>
        portal_contact_email: <p>The Amazon Web Services administrator's contact email address.</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>
        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>
        notification_sender_email: <p>The email address that sends alarm notifications.</p>
        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.conflicting_operation_exception.ConflictingOperationException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
        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.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.update_portal_request.UpdatePortalRequest]",
    ) -> OperationResponse[
        "capo_iotsitewise.types.update_portal_response.UpdatePortalResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.update_portal

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

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

        return capo_iotsitewise.types.update_portal_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdatePortal", redact_input=_redact_input),
    )
    input_: capo_iotsitewise.types.update_portal_request.UpdatePortalRequest = {
        "portal_id": portal_id,
        "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 portal_logo_image is not None:
        input_["portal_logo_image"] = portal_logo_image
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    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