I have a string of various messages and I need to create a regular expression that only filters for messages:
where the "eventName" is "ListTables" AND "eventType" = "AwsApiCall" AND "userIdentity ARN" contains "DatadogAWSIntegrationRoleKlein"
thanks - you will find and example message below
{"eventVersion":"1.07","userIdentity":{"type":"AssumedRole","principalId":"AROA4IEVG6HK4DK2EQCAI:DatadogAWSIntegration","arn":"arn:aws:sts::842126520789:assumed-role/DatadogAWSIntegrationRoleKlein/DatadogAWSIntegration","accountId":"842126520789","accessKeyId":"ASIA4IEVG6HKVZLODRP6","sessionContext":{"sessionIssuer":{"type":"Role","principalId":"AROA4IEVG6HK4DK2EQCAI","arn":"arn:aws:iam::842126520789:role/DatadogAWSIntegrationRoleKlein","accountId":"842126520789","userName":"DatadogAWSIntegrationRoleKlein"},"attributes":{"creationDate":"2020-11-23T22:49:22Z","mfaAuthenticated":"false"}}},"eventTime":"2020-11-23T23:07:22Z","eventSource":"[login to view URL]","eventName":"ListTables","awsRegion":"eu-west-2","sourceIPAddress":"3.86.32.213","userAgent":"Datadog","requestParameters":null,"responseElements":null,"requestID":"0E09TKS5GFMSFSIE09GA5K9RL3VV4KQNSO5AEMVJF66Q9ASUAAJG","eventID":"fb986d0b-4b57-4ec1-9db6-364d84db35fd","readOnly":true,"resources":[],"eventType":"AwsApiCall","apiVersion":"2012-08-10","managementEvent":true,"recipientAccountId":"842126520789","eventCategory":"Management"}
Hi there,
Yes sure. Let me write your required regex pattern. I'm experienced and advanced user of regex. It is useful for me in my data processing and manipulation tasks; which I do very often. I could be the best candidate!
Will respond within max one hour if you find me offline (daytime).
Best regards,
Ishaq