2022/07/19 - Amazon DevOps Guru - 2 new2 updated api methods
Changes Added new APIs for log anomaly detection feature.
Returns the list of log groups that contain log anomalies.
See also: AWS API Documentation
Request Syntax
client.list_anomalous_log_groups( InsightId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the insight containing the log groups.
integer
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
string
The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.
dict
Response Syntax
{ 'InsightId': 'string', 'AnomalousLogGroups': [ { 'LogGroupName': 'string', 'ImpactStartTime': datetime(2015, 1, 1), 'ImpactEndTime': datetime(2015, 1, 1), 'NumberOfLogLinesScanned': 123, 'LogAnomalyShowcases': [ { 'LogAnomalyClasses': [ { 'LogStreamName': 'string', 'LogAnomalyType': 'KEYWORD'|'KEYWORD_TOKEN'|'FORMAT'|'HTTP_CODE'|'BLOCK_FORMAT'|'NUMERICAL_POINT'|'NUMERICAL_NAN'|'NEW_FIELD_NAME', 'LogAnomalyToken': 'string', 'LogEventId': 'string', 'Explanation': 'string', 'NumberOfLogLinesOccurrences': 123, 'LogEventTimestamp': datetime(2015, 1, 1) }, ] }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InsightId (string) --
The ID of the insight containing the log groups.
AnomalousLogGroups (list) --
The list of Amazon CloudWatch log groups that are related to an insight.
(dict) --
An Amazon CloudWatch log group that contains log anomalies and is used to generate an insight.
LogGroupName (string) --
The name of the CloudWatch log group.
ImpactStartTime (datetime) --
The time the anomalous log events began. The impact start time indicates the time of the first log anomaly event that occurs.
ImpactEndTime (datetime) --
The time the anomalous log events stopped.
NumberOfLogLinesScanned (integer) --
The number of log lines that were scanned for anomalous log events.
LogAnomalyShowcases (list) --
The log anomalies in the log group. Each log anomaly displayed represents a cluster of similar anomalous log events.
(dict) --
A cluster of similar anomalous log events found within a log group.
LogAnomalyClasses (list) --
A list of anomalous log events that may be related.
(dict) --
Information about an anomalous log event found within a log group.
LogStreamName (string) --
The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a sequence of log events that share the same source.
LogAnomalyType (string) --
The type of log anomaly that has been detected.
LogAnomalyToken (string) --
The token where the anomaly was detected. This may refer to an exception or another location, or it may be blank for log anomalies such as format anomalies.
LogEventId (string) --
The ID of the log event.
Explanation (string) --
The explanation for why the log event is considered an anomaly.
NumberOfLogLinesOccurrences (integer) --
The number of log lines where this anomalous log event occurs.
LogEventTimestamp (datetime) --
The time of the first occurrence of the anomalous log event.
NextToken (string) --
The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.
Returns the list of all log groups that are being monitored and tagged by DevOps Guru.
See also: AWS API Documentation
Request Syntax
client.list_monitored_resources( Filters={ 'ResourcePermission': 'FULL_PERMISSION'|'MISSING_PERMISSION', 'ResourceTypeFilters': [ 'LOG_GROUPS', ] }, MaxResults=123, NextToken='string' )
dict
[REQUIRED]
Filters to determine which monitored resources you want to retrieve. You can filter by resource type or resource permission status.
ResourcePermission (string) -- [REQUIRED]
The permission status of a resource.
ResourceTypeFilters (list) -- [REQUIRED]
The type of resource that you wish to retrieve, such as log groups.
(string) --
integer
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
string
The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.
dict
Response Syntax
{ 'MonitoredResourceIdentifiers': [ { 'MonitoredResourceName': 'string', 'Type': 'string', 'ResourcePermission': 'FULL_PERMISSION'|'MISSING_PERMISSION' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
MonitoredResourceIdentifiers (list) --
Information about the resource that is being monitored, including the name of the resource, the type of resource, and whether or not permission is given to DevOps Guru to access that resource.
(dict) --
Information about the resource that is being monitored, including the name of the resource, the type of resource, and whether or not permission is given to DevOps Guru to access that resource.
MonitoredResourceName (string) --
The name of the resource being monitored.
Type (string) --
The type of resource being monitored.
ResourcePermission (string) --
The permission status of a resource.
NextToken (string) --
The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.
{'ServiceIntegration': {'LogsAnomalyDetection': {'OptInStatus': 'ENABLED | ' 'DISABLED'}}}
Returns the integration status of services that are integrated with DevOps Guru. The one service that can be integrated with DevOps Guru is Amazon Web Services Systems Manager, which can be used to create an OpsItem for each generated insight.
See also: AWS API Documentation
Request Syntax
client.describe_service_integration()
dict
Response Syntax
{ 'ServiceIntegration': { 'OpsCenter': { 'OptInStatus': 'ENABLED'|'DISABLED' }, 'LogsAnomalyDetection': { 'OptInStatus': 'ENABLED'|'DISABLED' } } }
Response Structure
(dict) --
ServiceIntegration (dict) --
Information about the integration of DevOps Guru with another Amazon Web Services service, such as Amazon Web Services Systems Manager.
OpsCenter (dict) --
Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager OpsCenter for each created insight.
OptInStatus (string) --
Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created insight.
LogsAnomalyDetection (dict) --
Information about whether DevOps Guru is configured to perform log anomaly detection on Amazon CloudWatch log groups.
OptInStatus (string) --
Specifies if DevOps Guru is configured to perform log anomaly detection on CloudWatch log groups.
{'ServiceIntegration': {'LogsAnomalyDetection': {'OptInStatus': 'ENABLED | ' 'DISABLED'}}}
Enables or disables integration with a service that can be integrated with DevOps Guru. The one service that can be integrated with DevOps Guru is Amazon Web Services Systems Manager, which can be used to create an OpsItem for each generated insight.
See also: AWS API Documentation
Request Syntax
client.update_service_integration( ServiceIntegration={ 'OpsCenter': { 'OptInStatus': 'ENABLED'|'DISABLED' }, 'LogsAnomalyDetection': { 'OptInStatus': 'ENABLED'|'DISABLED' } } )
dict
[REQUIRED]
An IntegratedServiceConfig object used to specify the integrated service you want to update, and whether you want to update it to enabled or disabled.
OpsCenter (dict) --
Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager OpsCenter for each created insight. You can use this to update the configuration.
OptInStatus (string) --
Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created insight.
LogsAnomalyDetection (dict) --
Information about whether DevOps Guru is configured to perform log anomaly detection on Amazon CloudWatch log groups.
OptInStatus (string) --
Specifies if DevOps Guru is configured to perform log anomaly detection on CloudWatch log groups.
dict
Response Syntax
{}
Response Structure
(dict) --