update_portal

IoTSiteWise.Client.update_portal(**kwargs)

Updates an IoT SiteWise Monitor portal.

See also: AWS API Documentation

Request Syntax

response = client.update_portal(
    portalId='string',
    portalName='string',
    portalDescription='string',
    portalContactEmail='string',
    portalLogoImage={
        'id': 'string',
        'file': {
            'data': b'bytes',
            'type': 'PNG'
        }
    },
    roleArn='string',
    clientToken='string',
    notificationSenderEmail='string',
    alarms={
        'alarmRoleArn': 'string',
        'notificationLambdaArn': 'string'
    }
)
Parameters
  • portalId (string) --

    [REQUIRED]

    The ID of the portal to update.

  • portalName (string) --

    [REQUIRED]

    A new friendly name for the portal.

  • portalDescription (string) -- A new description for the portal.
  • portalContactEmail (string) --

    [REQUIRED]

    The Amazon Web Services administrator's contact email address.

  • portalLogoImage (dict) --

    Contains an image that is one of the following:

    • An image file. Choose this option to upload a new image.
    • The ID of an existing image. Choose this option to keep an existing image.
    • id (string) --

      The ID of an existing image. Specify this parameter to keep an existing image.

    • file (dict) --

      Contains an image file.

      • data (bytes) -- [REQUIRED]

        The image file contents, represented as a base64-encoded string. The file size must be less than 1 MB.

      • type (string) -- [REQUIRED]

        The file type of the image.

  • roleArn (string) --

    [REQUIRED]

    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 .

  • clientToken (string) --

    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.

    This field is autopopulated if not provided.

  • notificationSenderEmail (string) -- The email address that sends alarm notifications.
  • alarms (dict) --

    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 .

    • alarmRoleArn (string) -- [REQUIRED]

      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 (string) --

      The ARN of the Lambda function that manages alarm notifications. For more information, see Managing alarm notifications in the IoT Events Developer Guide .

Return type

dict

Returns

Response Syntax

{
    'portalStatus': {
        'state': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'FAILED',
        'error': {
            'code': 'INTERNAL_FAILURE'|'VALIDATION_ERROR'|'LIMIT_EXCEEDED',
            'message': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • portalStatus (dict) --

      The status of the portal, which contains a state ( UPDATING after successfully calling this operation) and any error message.

      • state (string) --

        The current state of the portal.

      • error (dict) --

        Contains associated error information, if any.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

Exceptions

  • IoTSiteWise.Client.exceptions.InvalidRequestException
  • IoTSiteWise.Client.exceptions.ResourceNotFoundException
  • IoTSiteWise.Client.exceptions.InternalFailureException
  • IoTSiteWise.Client.exceptions.ThrottlingException
  • IoTSiteWise.Client.exceptions.ConflictingOperationException