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
AccountandDomainName.Value (string) –
The value of the entity. For
DomainName, this is the domain name. ForAccount, 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) andDESC(descending).MaxResults (integer) – An optional parameter that specifies the maximum number of results to return. You can use
NextTokento get the next page of results. Valid values are 1 to 500.NextToken (string) – If your initial
ListInsightsoperation returns aNextToken, include the returnedNextTokenin subsequentListInsightsoperations 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
ListInsightsrequest. 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
ListInsightsoperation. 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
EVENTandRECOMMENDATION.Priority (string) –
The priority level of the insight. Possible values are
CRITICAL,HIGH,MEDIUM, andLOW.Status (string) –
The current status of the insight. Possible values are
ACTIVE,RESOLVED, andDISMISSED.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
NextTokenis returned, there are more results available. The value ofNextTokenis a unique pagination token for each page. Send the request again using the returned token to retrieve the next page.
Exceptions
OpenSearchService.Client.exceptions.BaseExceptionOpenSearchService.Client.exceptions.InternalExceptionOpenSearchService.Client.exceptions.ValidationExceptionOpenSearchService.Client.exceptions.ResourceNotFoundExceptionOpenSearchService.Client.exceptions.DisabledOperationExceptionOpenSearchService.Client.exceptions.LimitExceededException