OpenSearchService / Client / list_insights

list_insights

OpenSearchService.Client.list_insights(**kwargs)

Lists insights for an Amazon OpenSearch Service domain or Amazon Web Services account. Returns a paginated list of insights based on the specified entity, filters, time range, and sort order.

See also: AWS API Documentation

Request Syntax

response = client.list_insights(
    Entity={
        'Type': 'Account'|'DomainName',
        'Value': 'string'
    },
    TimeRange={
        'From': 123,
        'To': 123
    },
    SortOrder='ASC'|'DESC',
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • Entity (dict) –

    [REQUIRED]

    The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.

    • Type (string) – [REQUIRED]

      The type of the entity. Possible values are Account and DomainName.

    • Value (string) –

      The value of the entity. For DomainName, this is the domain name. For Account, this is the Amazon Web Services account ID.

  • TimeRange (dict) –

    The time range for filtering insights, specified as epoch millisecond timestamps.

    • From (integer) – [REQUIRED]

      The start of the time range, in epoch milliseconds.

    • To (integer) – [REQUIRED]

      The end of the time range, in epoch milliseconds.

  • SortOrder (string) – The sort order for the results. Possible values are ASC (ascending) and DESC (descending).

  • MaxResults (integer) – An optional parameter that specifies the maximum number of results to return. You can use NextToken to get the next page of results. Valid values are 1 to 500.

  • NextToken (string) – If your initial ListInsights operation returns a NextToken, include the returned NextToken in subsequent ListInsights operations to retrieve the next page of results.

Return type:

dict

Returns:

Response Syntax

{
    'Insights': [
        {
            'InsightId': 'string',
            'DisplayName': 'string',
            'Type': 'EVENT'|'RECOMMENDATION',
            'Priority': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW',
            'Status': 'ACTIVE'|'RESOLVED'|'DISMISSED',
            'CreationTime': datetime(2015, 1, 1),
            'UpdateTime': datetime(2015, 1, 1),
            'IsExperimental': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    The result of a ListInsights request. Contains the list of insights and a pagination token for retrieving the next page of results.

    • Insights (list) –

      The list of insights returned for the specified entity.

      • (dict) –

        Represents an insight returned by the ListInsights operation. An insight is a notification about a domain event or recommendation that helps you optimize your Amazon OpenSearch Service domain.

        • InsightId (string) –

          The unique identifier of the insight.

        • DisplayName (string) –

          The display name of the insight.

        • Type (string) –

          The type of the insight. Possible values are EVENT and RECOMMENDATION.

        • Priority (string) –

          The priority level of the insight. Possible values are CRITICAL, HIGH, MEDIUM, and LOW.

        • Status (string) –

          The current status of the insight. Possible values are ACTIVE, RESOLVED, and DISMISSED.

        • CreationTime (datetime) –

          The timestamp when the insight was created, in epoch milliseconds.

        • UpdateTime (datetime) –

          The timestamp when the insight was last updated, in epoch milliseconds.

        • IsExperimental (boolean) –

          Indicates whether the insight is experimental.

    • NextToken (string) –

      When NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Send the request again using the returned token to retrieve the next page.

Exceptions

  • OpenSearchService.Client.exceptions.BaseException

  • OpenSearchService.Client.exceptions.InternalException

  • OpenSearchService.Client.exceptions.ValidationException

  • OpenSearchService.Client.exceptions.ResourceNotFoundException

  • OpenSearchService.Client.exceptions.DisabledOperationException

  • OpenSearchService.Client.exceptions.LimitExceededException