CloudTrail.Client.put_insight_selectors(**kwargs)¶Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail. You also use PutInsightSelectors to turn off Insights event logging, by passing an empty list of insight types. The valid Insights event types in this release are ApiErrorRateInsight and ApiCallRateInsight .
See also: AWS API Documentation
Request Syntax
response = client.put_insight_selectors(
TrailName='string',
InsightSelectors=[
{
'InsightType': 'ApiCallRateInsight'|'ApiErrorRateInsight'
},
]
)
[REQUIRED]
The name of the CloudTrail trail for which you want to change or add Insights selectors.
[REQUIRED]
A JSON string that contains the insight types you want to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
A JSON string that contains a list of insight types that are logged on a trail.
The type of insights to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
dict
Response Syntax
{
'TrailARN': 'string',
'InsightSelectors': [
{
'InsightType': 'ApiCallRateInsight'|'ApiErrorRateInsight'
},
]
}
Response Structure
(dict) --
TrailARN (string) --
The Amazon Resource Name (ARN) of a trail for which you want to change or add Insights selectors.
InsightSelectors (list) --
A JSON string that contains the Insights event types that you want to log on a trail. The valid Insights types in this release are ApiErrorRateInsight and ApiCallRateInsight .
(dict) --
A JSON string that contains a list of insight types that are logged on a trail.
InsightType (string) --
The type of insights to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
Exceptions
CloudTrail.Client.exceptions.TrailNotFoundExceptionCloudTrail.Client.exceptions.InvalidTrailNameExceptionCloudTrail.Client.exceptions.CloudTrailARNInvalidExceptionCloudTrail.Client.exceptions.InvalidHomeRegionExceptionCloudTrail.Client.exceptions.InvalidInsightSelectorsExceptionCloudTrail.Client.exceptions.InsufficientS3BucketPolicyExceptionCloudTrail.Client.exceptions.InsufficientEncryptionPolicyExceptionCloudTrail.Client.exceptions.S3BucketDoesNotExistExceptionCloudTrail.Client.exceptions.KmsExceptionCloudTrail.Client.exceptions.UnsupportedOperationExceptionCloudTrail.Client.exceptions.OperationNotPermittedExceptionCloudTrail.Client.exceptions.NotOrganizationMasterAccountExceptionCloudTrail.Client.exceptions.NoManagementAccountSLRExistsException