AWS IoT SiteWise

2024/11/18 - AWS IoT SiteWise - 6 new6 updated api methods

Changes  The release introduces a generative AI Assistant in AWS IoT SiteWise. It includes: 1) InvokeAssistant API - Invoke the Assistant to get alarm summaries and ask questions. 2) Dataset APIs - Manage knowledge base configuration for the Assistant. 3) Portal APIs enhancement - Manage AI-aware dashboards.

DescribeDataset (new) Link ¶

Retrieves information about a dataset.

See also: AWS API Documentation

Request Syntax

client.describe_dataset(
    datasetId='string'
)
type datasetId:

string

param datasetId:

[REQUIRED]

The ID of the dataset.

rtype:

dict

returns:

Response Syntax

{
    'datasetId': 'string',
    'datasetArn': 'string',
    'datasetName': 'string',
    'datasetDescription': 'string',
    'datasetSource': {
        'sourceType': 'KENDRA',
        'sourceFormat': 'KNOWLEDGE_BASE',
        'sourceDetail': {
            'kendra': {
                'knowledgeBaseArn': 'string',
                'roleArn': 'string'
            }
        }
    },
    'datasetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    },
    'datasetCreationDate': datetime(2015, 1, 1),
    'datasetLastUpdateDate': datetime(2015, 1, 1),
    'datasetVersion': 'string'
}

Response Structure

  • (dict) --

    • datasetId (string) --

      The ID of the dataset.

    • datasetArn (string) --

      The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

    • datasetName (string) --

      The name of the dataset.

    • datasetDescription (string) --

      A description about the dataset, and its functionality.

    • datasetSource (dict) --

      The data source for the dataset.

      • sourceType (string) --

        The type of data source for the dataset.

      • sourceFormat (string) --

        The format of the dataset source associated with the dataset.

      • sourceDetail (dict) --

        The details of the dataset source associated with the dataset.

        • kendra (dict) --

          Contains details about the Kendra dataset source.

          • knowledgeBaseArn (string) --

            The knowledgeBaseArn details for the Kendra dataset source.

          • roleArn (string) --

            The roleARN details for the Kendra dataset source.

    • datasetStatus (dict) --

      The status of the dataset. This contains the state and any error messages. State is CREATING after a successfull call to this API, and any associated error message. The state is ACTIVE when ready to use.

      • state (string) --

        The current status of the dataset.

      • error (dict) --

        Contains the details of an IoT SiteWise error.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

    • datasetCreationDate (datetime) --

      The dataset creation date, in Unix epoch time.

    • datasetLastUpdateDate (datetime) --

      The date the dataset was last updated, in Unix epoch time.

    • datasetVersion (string) --

      The version of the dataset.

ListDatasets (new) Link ¶

Retrieves a paginated list of datasets for a specific target resource.

See also: AWS API Documentation

Request Syntax

client.list_datasets(
    sourceType='KENDRA',
    nextToken='string',
    maxResults=123
)
type sourceType:

string

param sourceType:

[REQUIRED]

The type of data source for the dataset.

type nextToken:

string

param nextToken:

The token for the next set of results, or null if there are no additional results.

type maxResults:

integer

param maxResults:

The maximum number of results to return for each paginated request.

rtype:

dict

returns:

Response Syntax

{
    'datasetSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1),
            'status': {
                'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
                'error': {
                    'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                    'message': 'string',
                    'details': [
                        {
                            'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                            'message': 'string'
                        },
                    ]
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • datasetSummaries (list) --

      A list that summarizes the dataset response.

      • (dict) --

        The summary details for the dataset.

        • id (string) --

          The ID of the dataset.

        • arn (string) --

          The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

        • name (string) --

          The name of the dataset.

        • description (string) --

          A description about the dataset, and its functionality.

        • creationDate (datetime) --

          The dataset creation date, in Unix epoch time.

        • lastUpdateDate (datetime) --

          The date the dataset was last updated, in Unix epoch time.

        • status (dict) --

          The status of the dataset. This contains the state and any error messages. The state is ACTIVE when ready to use.

          • state (string) --

            The current status of the dataset.

          • error (dict) --

            Contains the details of an IoT SiteWise error.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

            • details (list) --

              A list of detailed errors.

              • (dict) --

                Contains detailed error information.

                • code (string) --

                  The error code.

                • message (string) --

                  The error message.

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

DeleteDataset (new) Link ¶

Deletes a dataset. This cannot be undone.

See also: AWS API Documentation

Request Syntax

client.delete_dataset(
    datasetId='string',
    clientToken='string'
)
type datasetId:

string

param datasetId:

[REQUIRED]

The ID of the dataset.

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.

rtype:

dict

returns:

Response Syntax

{
    'datasetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • datasetStatus (dict) --

      The status of the dataset. This contains the state and any error messages. State is DELETING after a successfull call to this API, and any associated error message.

      • state (string) --

        The current status of the dataset.

      • error (dict) --

        Contains the details of an IoT SiteWise error.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

UpdateDataset (new) Link ¶

Updates a dataset.

See also: AWS API Documentation

Request Syntax

client.update_dataset(
    datasetId='string',
    datasetName='string',
    datasetDescription='string',
    datasetSource={
        'sourceType': 'KENDRA',
        'sourceFormat': 'KNOWLEDGE_BASE',
        'sourceDetail': {
            'kendra': {
                'knowledgeBaseArn': 'string',
                'roleArn': 'string'
            }
        }
    },
    clientToken='string'
)
type datasetId:

string

param datasetId:

[REQUIRED]

The ID of the dataset.

type datasetName:

string

param datasetName:

[REQUIRED]

The name of the dataset.

type datasetDescription:

string

param datasetDescription:

A description about the dataset, and its functionality.

type datasetSource:

dict

param datasetSource:

[REQUIRED]

The data source for the dataset.

  • sourceType (string) -- [REQUIRED]

    The type of data source for the dataset.

  • sourceFormat (string) -- [REQUIRED]

    The format of the dataset source associated with the dataset.

  • sourceDetail (dict) --

    The details of the dataset source associated with the dataset.

    • kendra (dict) --

      Contains details about the Kendra dataset source.

      • knowledgeBaseArn (string) -- [REQUIRED]

        The knowledgeBaseArn details for the Kendra dataset source.

      • roleArn (string) -- [REQUIRED]

        The roleARN details for the Kendra dataset source.

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.

rtype:

dict

returns:

Response Syntax

{
    'datasetId': 'string',
    'datasetArn': 'string',
    'datasetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • datasetId (string) --

      The ID of the dataset.

    • datasetArn (string) --

      The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

    • datasetStatus (dict) --

      The status of the dataset. This contains the state and any error messages. State is UPDATING after a successfull call to this API, and any associated error message. The state is ACTIVE when ready to use.

      • state (string) --

        The current status of the dataset.

      • error (dict) --

        Contains the details of an IoT SiteWise error.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

CreateDataset (new) Link ¶

Creates a dataset to connect an external datasource.

See also: AWS API Documentation

Request Syntax

client.create_dataset(
    datasetId='string',
    datasetName='string',
    datasetDescription='string',
    datasetSource={
        'sourceType': 'KENDRA',
        'sourceFormat': 'KNOWLEDGE_BASE',
        'sourceDetail': {
            'kendra': {
                'knowledgeBaseArn': 'string',
                'roleArn': 'string'
            }
        }
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type datasetId:

string

param datasetId:

The ID of the dataset.

type datasetName:

string

param datasetName:

[REQUIRED]

The name of the dataset.

type datasetDescription:

string

param datasetDescription:

A description about the dataset, and its functionality.

type datasetSource:

dict

param datasetSource:

[REQUIRED]

The data source for the dataset.

  • sourceType (string) -- [REQUIRED]

    The type of data source for the dataset.

  • sourceFormat (string) -- [REQUIRED]

    The format of the dataset source associated with the dataset.

  • sourceDetail (dict) --

    The details of the dataset source associated with the dataset.

    • kendra (dict) --

      Contains details about the Kendra dataset source.

      • knowledgeBaseArn (string) -- [REQUIRED]

        The knowledgeBaseArn details for the Kendra dataset source.

      • roleArn (string) -- [REQUIRED]

        The roleARN details for the Kendra dataset source.

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

dict

param tags:

A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'datasetId': 'string',
    'datasetArn': 'string',
    'datasetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • datasetId (string) --

      The ID of the dataset.

    • datasetArn (string) --

      The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

    • datasetStatus (dict) --

      The status of the dataset. This contains the state and any error messages. State is CREATING after a successfull call to this API, and any associated error message. The state is ACTIVE when ready to use.

      • state (string) --

        The current status of the dataset.

      • error (dict) --

        Contains the details of an IoT SiteWise error.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

        • details (list) --

          A list of detailed errors.

          • (dict) --

            Contains detailed error information.

            • code (string) --

              The error code.

            • message (string) --

              The error message.

InvokeAssistant (new) Link ¶

Invokes SiteWise Assistant to start or continue a conversation.

See also: AWS API Documentation

Request Syntax

client.invoke_assistant(
    conversationId='string',
    message='string',
    enableTrace=True|False
)
type conversationId:

string

param conversationId:

The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.

type message:

string

param message:

[REQUIRED]

A text message sent to the SiteWise Assistant by the user.

type enableTrace:

boolean

param enableTrace:

Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.

rtype:

dict

returns:

The response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.

Response Syntax

{
    'body': EventStream({
        'trace': {
            'text': 'string'
        },
        'output': {
            'message': 'string',
            'citations': [
                {
                    'reference': {
                        'dataset': {
                            'datasetArn': 'string',
                            'source': {
                                'arn': 'string',
                                'location': {
                                    'uri': 'string'
                                }
                            }
                        }
                    },
                    'content': {
                        'text': 'string'
                    }
                },
            ]
        },
        'accessDeniedException': {
            'message': 'string'
        },
        'conflictingOperationException': {
            'message': 'string',
            'resourceId': 'string',
            'resourceArn': 'string'
        },
        'internalFailureException': {
            'message': 'string'
        },
        'invalidRequestException': {
            'message': 'string'
        },
        'limitExceededException': {
            'message': 'string'
        },
        'resourceNotFoundException': {
            'message': 'string'
        },
        'throttlingException': {
            'message': 'string'
        }
    }),
    'conversationId': 'string'
}

Response Structure

  • (dict) --

    • body (:class:`.EventStream`) --

      Contains the response, citation, and trace from the SiteWise Assistant.

      • trace (dict) --

        Contains tracing information of the SiteWise Assistant's reasoning and data access.

        • text (string) --

          The cited text from the data source.

      • output (dict) --

        Contains the SiteWise Assistant's response.

        • message (string) --

          The text message of the SiteWise Assistant's response.

        • citations (list) --

          A list of citations, and related information for the SiteWise Assistant's response.

          • (dict) --

            Contains text content to which the SiteWise Assistant refers to, and generate the final response. It also contains information about the source.

            • reference (dict) --

              Contains information about the data source.

              • dataset (dict) --

                Contains the dataset reference information.

                • datasetArn (string) --

                  The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

                • source (dict) --

                  The data source for the dataset.

                  • arn (string) --

                    Contains the ARN of the dataset. If the source is Kendra, it's the ARN of the Kendra index.

                  • location (dict) --

                    Contains the location information where the cited text is originally stored. For example, if the data source is Kendra, and the text synchronized is from an S3 bucket, then the location refers to an S3 object.

                    • uri (string) --

                      The URI of the location.

            • content (dict) --

              Contains the cited text from the data source.

              • text (string) --

                The cited text from the data source.

      • accessDeniedException (dict) --

        Access is denied.

        • message (string) --

      • conflictingOperationException (dict) --

        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.

        • message (string) --

        • resourceId (string) --

          The ID of the resource that conflicts with this operation.

        • resourceArn (string) --

          The ARN of the resource that conflicts with this operation.

      • internalFailureException (dict) --

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

        • message (string) --

      • invalidRequestException (dict) --

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

        • message (string) --

      • limitExceededException (dict) --

        You've reached the limit 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.

        • message (string) --

      • resourceNotFoundException (dict) --

        The requested resource can't be found.

        • message (string) --

      • throttlingException (dict) --

        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.

        • message (string) --

    • conversationId (string) --

      The ID of the conversation, in UUID format. This ID uniquely identifies the conversation within IoT SiteWise.

CreatePortal (updated) Link ¶
Changes (request, response)
Request
{'portalType': 'SITEWISE_PORTAL_V1 | SITEWISE_PORTAL_V2',
 'portalTypeConfiguration': {'string': {'portalTools': ['string']}}}
Response
{'portalStatus': {'state': {'PENDING'}}}

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.

See also: AWS API Documentation

Request Syntax

client.create_portal(
    portalName='string',
    portalDescription='string',
    portalContactEmail='string',
    clientToken='string',
    portalLogoImageFile={
        'data': b'bytes',
        'type': 'PNG'
    },
    roleArn='string',
    tags={
        'string': 'string'
    },
    portalAuthMode='IAM'|'SSO',
    notificationSenderEmail='string',
    alarms={
        'alarmRoleArn': 'string',
        'notificationLambdaArn': 'string'
    },
    portalType='SITEWISE_PORTAL_V1'|'SITEWISE_PORTAL_V2',
    portalTypeConfiguration={
        'string': {
            'portalTools': [
                'string',
            ]
        }
    }
)
type portalName:

string

param portalName:

[REQUIRED]

A friendly name for the portal.

type portalDescription:

string

param portalDescription:

A description for the portal.

type portalContactEmail:

string

param portalContactEmail:

[REQUIRED]

The Amazon Web Services administrator's contact email address.

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

dict

param portalLogoImageFile:

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

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

type tags:

dict

param tags:

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.

  • (string) --

    • (string) --

type portalAuthMode:

string

param portalAuthMode:

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

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

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

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

Response Structure

  • (dict) --

    • portalId (string) --

      The ID of the created portal.

    • portalArn (string) --

      The ARN of the portal, which has the following format.

      arn:${Partition}:iotsitewise:${Region}:${Account}:portal/${PortalId}

    • portalStartUrl (string) --

      The URL for the IoT SiteWise Monitor portal. You can use this URL to access portals that use IAM Identity Center for authentication. For portals that use IAM for authentication, you must use the IoT SiteWise console to get a URL that you can use to access the portal.

    • portalStatus (dict) --

      The status of the portal, which contains a state ( CREATING 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.

    • ssoApplicationId (string) --

      The associated IAM Identity Center application ID, if the portal uses IAM Identity Center.

DeletePortal (updated) Link ¶
Changes (response)
{'portalStatus': {'state': {'PENDING'}}}

Deletes a portal from IoT SiteWise Monitor.

See also: AWS API Documentation

Request Syntax

client.delete_portal(
    portalId='string',
    clientToken='string'
)
type portalId:

string

param portalId:

[REQUIRED]

The ID of the portal to delete.

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.

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 ( DELETING 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.

DescribePortal (updated) Link ¶
Changes (response)
{'portalStatus': {'state': {'PENDING'}},
 'portalType': 'SITEWISE_PORTAL_V1 | SITEWISE_PORTAL_V2',
 'portalTypeConfiguration': {'string': {'portalTools': ['string']}}}

Retrieves information about a portal.

See also: AWS API Documentation

Request Syntax

client.describe_portal(
    portalId='string'
)
type portalId:

string

param portalId:

[REQUIRED]

The ID of the portal.

rtype:

dict

returns:

Response Syntax

{
    'portalId': 'string',
    'portalArn': 'string',
    'portalName': 'string',
    'portalDescription': 'string',
    'portalClientId': 'string',
    'portalStartUrl': 'string',
    'portalContactEmail': 'string',
    'portalStatus': {
        'state': 'CREATING'|'PENDING'|'UPDATING'|'DELETING'|'ACTIVE'|'FAILED',
        'error': {
            'code': 'INTERNAL_FAILURE'|'VALIDATION_ERROR'|'LIMIT_EXCEEDED',
            'message': 'string'
        }
    },
    'portalCreationDate': datetime(2015, 1, 1),
    'portalLastUpdateDate': datetime(2015, 1, 1),
    'portalLogoImageLocation': {
        'id': 'string',
        'url': 'string'
    },
    'roleArn': 'string',
    'portalAuthMode': 'IAM'|'SSO',
    'notificationSenderEmail': 'string',
    'alarms': {
        'alarmRoleArn': 'string',
        'notificationLambdaArn': 'string'
    },
    'portalType': 'SITEWISE_PORTAL_V1'|'SITEWISE_PORTAL_V2',
    'portalTypeConfiguration': {
        'string': {
            'portalTools': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • portalId (string) --

      The ID of the portal.

    • portalArn (string) --

      The ARN of the portal, which has the following format.

      arn:${Partition}:iotsitewise:${Region}:${Account}:portal/${PortalId}

    • portalName (string) --

      The name of the portal.

    • portalDescription (string) --

      The portal's description.

    • portalClientId (string) --

      The IAM Identity Center application generated client ID (used with IAM Identity Center API operations). IoT SiteWise includes portalClientId for only portals that use IAM Identity Center to authenticate users.

    • portalStartUrl (string) --

      The URL for the IoT SiteWise Monitor portal. You can use this URL to access portals that use IAM Identity Center for authentication. For portals that use IAM for authentication, you must use the IoT SiteWise console to get a URL that you can use to access the portal.

    • portalContactEmail (string) --

      The Amazon Web Services administrator's contact email address.

    • portalStatus (dict) --

      The current status of the portal, which contains a state 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.

    • portalCreationDate (datetime) --

      The date the portal was created, in Unix epoch time.

    • portalLastUpdateDate (datetime) --

      The date the portal was last updated, in Unix epoch time.

    • portalLogoImageLocation (dict) --

      The portal's logo image, which is available at a URL.

      • id (string) --

        The ID of the image.

      • url (string) --

        The URL where the image is available. The URL is valid for 15 minutes so that you can view and download the image

    • roleArn (string) --

      The ARN of the 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.

    • portalAuthMode (string) --

      The service to use to authenticate users to the portal.

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

      • alarmRoleArn (string) --

        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.

    • portalType (string) --

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

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

ExecuteQuery (updated) Link ¶
Changes (request)
{'clientToken': 'string'}

Run SQL queries to retrieve metadata and time-series data from asset models, assets, measurements, metrics, transforms, and aggregates.

See also: AWS API Documentation

Request Syntax

client.execute_query(
    queryStatement='string',
    nextToken='string',
    maxResults=123,
    clientToken='string'
)
type queryStatement:

string

param queryStatement:

[REQUIRED]

The IoT SiteWise query statement.

type nextToken:

string

param nextToken:

The string that specifies the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return at one time. The default is 25.

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.

rtype:

dict

returns:

Response Syntax

{
    'columns': [
        {
            'name': 'string',
            'type': {
                'scalarType': 'BOOLEAN'|'INT'|'DOUBLE'|'TIMESTAMP'|'STRING'
            }
        },
    ],
    'rows': [
        {
            'data': [
                {
                    'scalarValue': 'string',
                    'arrayValue': {'... recursive ...'},
                    'rowValue': {'... recursive ...'},
                    'nullValue': True|False
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • columns (list) --

      Represents a single column in the query results.

      • (dict) --

        A description of the column in the query results.

        • name (string) --

          The name of the column description.

        • type (dict) --

          The type of the column description.

          • scalarType (string) --

            The allowed data types that the column has as it's value.

    • rows (list) --

      Represents a single row in the query results.

      • (dict) --

        Represents a single row in the query results.

        • data (list) --

          List of data points in a single row of the result set.

          • (dict) --

            Represents a single data point in a query result.

            • scalarValue (string) --

              Indicates if the data point is a scalar value such as integer, string, double, or Boolean.

            • arrayValue (list) --

              Indicates if the data point is an array.

            • rowValue (dict) --

              Indicates if the data point is a row.

            • nullValue (boolean) --

              Indicates if the data point is null.

    • nextToken (string) --

      The string that specifies the next page of results.

ListPortals (updated) Link ¶
Changes (response)
{'portalSummaries': {'portalType': 'SITEWISE_PORTAL_V1 | SITEWISE_PORTAL_V2',
                     'status': {'state': {'PENDING'}}}}

Retrieves a paginated list of IoT SiteWise Monitor portals.

See also: AWS API Documentation

Request Syntax

client.list_portals(
    nextToken='string',
    maxResults=123
)
type nextToken:

string

param nextToken:

The token to be used for the next set of paginated results.

type maxResults:

integer

param maxResults:

The maximum number of results to return for each paginated request.

Default: 50

rtype:

dict

returns:

Response Syntax

{
    'portalSummaries': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'startUrl': 'string',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1),
            'roleArn': 'string',
            'status': {
                'state': 'CREATING'|'PENDING'|'UPDATING'|'DELETING'|'ACTIVE'|'FAILED',
                'error': {
                    'code': 'INTERNAL_FAILURE'|'VALIDATION_ERROR'|'LIMIT_EXCEEDED',
                    'message': 'string'
                }
            },
            'portalType': 'SITEWISE_PORTAL_V1'|'SITEWISE_PORTAL_V2'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • portalSummaries (list) --

      A list that summarizes each portal.

      • (dict) --

        Contains a portal summary.

        • id (string) --

          The ID of the portal.

        • name (string) --

          The name of the portal.

        • description (string) --

          The portal's description.

        • startUrl (string) --

          The URL for the IoT SiteWise Monitor portal. You can use this URL to access portals that use IAM Identity Center for authentication. For portals that use IAM for authentication, you must use the IoT SiteWise console to get a URL that you can use to access the portal.

        • creationDate (datetime) --

          The date the portal was created, in Unix epoch time.

        • lastUpdateDate (datetime) --

          The date the portal was last updated, in Unix epoch time.

        • roleArn (string) --

          The ARN of the 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.

        • status (dict) --

          Contains information about the current status of a portal.

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

        • portalType (string) --

          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.

    • nextToken (string) --

      The token for the next set of results, or null if there are no additional results.

UpdatePortal (updated) Link ¶
Changes (request, response)
Request
{'portalType': 'SITEWISE_PORTAL_V1 | SITEWISE_PORTAL_V2',
 'portalTypeConfiguration': {'string': {'portalTools': ['string']}}}
Response
{'portalStatus': {'state': {'PENDING'}}}

Updates an IoT SiteWise Monitor portal.

See also: AWS API Documentation

Request Syntax

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

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

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.