IntegrationsAwsActions
Filter CloudWatch Logs events
Filter log events in one log group. start_time and end_time must be at most seven days apart. newest_first requires start_time on or after 2024-01-01T00:00:00Z. Does not unmask sensitive data. Requires logs:FilterLogEvents.
cloudwatch_logs.events.filter · AWS · v1
Details
Scopes
logs:FilterLogEvents
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
region | string | No | enum us-east-1 | us-east-2 | us-west-1 | us-west-2 | af-south-1 | ap-east-1 | ap-east-2 | ap-south-1 | ap-south-2 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-southeast-4 | ap-southeast-5 | ap-southeast-6 | ap-southeast-7 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | ca-central-1 | ca-west-1 | eu-central-1 | eu-central-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-north-1 | eu-south-1 | eu-south-2 | il-central-1 | me-central-1 | me-south-1 | mx-central-1 | sa-east-1 |
log_group | string | Yes | minLength 1; maxLength 512; pattern ^[\.-_/#A-Za-z0-9]+$ |
start_time | string | Yes | minLength 1; maxLength 64 |
end_time | string | Yes | minLength 1; maxLength 64 |
filter_pattern | string | No | minLength 0; maxLength 1024 |
log_stream_names | array<string> | No | minItems 1; maxItems 100 |
log_stream_names[] | string | Yes | minLength 1; maxLength 512 |
direction | string | No | enum oldest_first | newest_first |
page_size | integer | No | minimum 1; maximum 1000 |
cursor | string | No | minLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$ |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
events | array<object> | Yes | maxItems 1000 |
events[] | object | Yes | additionalProperties false |
events[].event_id | string | Yes | minLength 1; maxLength 128 |
events[].log_stream_name | string | Yes | minLength 1; maxLength 512 |
events[].message | string | Yes | minLength 0; maxLength 262144 |
events[].event_timestamp | string | Yes | minLength 1; maxLength 64 |
events[].ingestion_timestamp | string | Yes | minLength 1; maxLength 64 |
next_cursor | string | No | minLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$ |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"region": {
"type": "string",
"enum": [
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"af-south-1",
"ap-east-1",
"ap-east-2",
"ap-south-1",
"ap-south-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-southeast-4",
"ap-southeast-5",
"ap-southeast-6",
"ap-southeast-7",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ca-central-1",
"ca-west-1",
"eu-central-1",
"eu-central-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
"eu-south-1",
"eu-south-2",
"il-central-1",
"me-central-1",
"me-south-1",
"mx-central-1",
"sa-east-1"
]
},
"log_group": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^[\\.-_/#A-Za-z0-9]+$"
},
"start_time": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"end_time": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"filter_pattern": {
"type": "string",
"minLength": 0,
"maxLength": 1024
},
"log_stream_names": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"minItems": 1,
"maxItems": 100
},
"direction": {
"type": "string",
"enum": [
"oldest_first",
"newest_first"
]
},
"page_size": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 16384,
"pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
}
},
"required": [
"log_group",
"start_time",
"end_time"
]
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"event_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"log_stream_name": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"message": {
"type": "string",
"minLength": 0,
"maxLength": 262144
},
"event_timestamp": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"ingestion_timestamp": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"event_id",
"log_stream_name",
"message",
"event_timestamp",
"ingestion_timestamp"
]
},
"maxItems": 1000
},
"next_cursor": {
"type": "string",
"minLength": 1,
"maxLength": 16384,
"pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
}
},
"required": [
"events"
]
}