:doc:`IoTSiteWise <../../iotsitewise>` / Client / update_portal

*************
update_portal
*************



.. py:method:: IoTSiteWise.Client.update_portal(**kwargs)

  

  Updates an IoT SiteWise Monitor portal.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/UpdatePortal>`_  


  **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'
        },
        portalType='SITEWISE_PORTAL_V1'|'SITEWISE_PORTAL_V2',
        portalTypeConfiguration={
            'string': {
                'portalTools': [
                    'string',
                ]
            }
        }
    )
    
  :type portalId: string
  :param portalId: **[REQUIRED]** 

    The ID of the portal to update.

    

  
  :type portalName: string
  :param portalName: **[REQUIRED]** 

    A new friendly name for the portal.

    

  
  :type portalDescription: string
  :param portalDescription: 

    A new description for the portal.

    

  
  :type portalContactEmail: string
  :param portalContactEmail: **[REQUIRED]** 

    The Amazon Web Services administrator's contact email address.

    

  
  :type portalLogoImage: dict
  :param portalLogoImage: 

    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.

        

      
    
  
  :type roleArn: string
  :param roleArn: **[REQUIRED]** 

    The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ 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 <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/monitor-service-role.html>`__ in the *IoT SiteWise User Guide*.

    

  
  :type clientToken: string
  :param clientToken: 

    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.

  
  :type notificationSenderEmail: string
  :param notificationSenderEmail: 

    The email address that sends alarm notifications.

    

  
  :type alarms: dict
  :param alarms: 

    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 <https://docs.aws.amazon.com/iot-sitewise/latest/appguide/monitor-alarms.html>`__ in the *IoT SiteWise Application Guide*.

    

  
    - **alarmRoleArn** *(string) --* **[REQUIRED]** 

      The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ 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 <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the Lambda function that manages alarm notifications. For more information, see `Managing alarm notifications <https://docs.aws.amazon.com/iotevents/latest/developerguide/lambda-support.html>`__ in the *IoT Events Developer Guide*.

      

    
  
  :type portalType: string
  :param portalType: 

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

    

  
  :type portalTypeConfiguration: dict
  :param portalTypeConfiguration: 

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

    

  
    - *(string) --* 

    
      - *(dict) --* 

        The configuration entry associated with the specific portal type. The ``portalTypeConfiguration`` is a map of the ``portalTypeKey`` to the ``PortalTypeEntry``.

        

      
        - **portalTools** *(list) --* 

          The array of tools associated with the specified portal type. The possible values are ``ASSISTANT`` and ``DASHBOARD``.

          

        
          - *(string) --* 

          
      
      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'portalStatus': {
              'state': 'CREATING'|'PENDING'|'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**
  
  *   :py:class:`IoTSiteWise.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ConflictingOperationException`

  