@@ -42,8 +42,7 @@ const alert = {
4242 priority: " P1" ,
4343 occurred_at: " 2024-01-15T10:30:00.000Z" ,
4444 team: " platform-team" ,
45- resource: { type: " instance" , id: " i-123456" },
46- identity: { rule_id: " cpu-high" },
45+ identity: { account_id: " 123456789012" , rule_id: " cpu-high" },
4746 links: { runbook_url: " https://wiki.company.com/cpu-runbook" },
4847};
4948
@@ -73,8 +72,7 @@ alert = {
7372 " priority" : " P1" ,
7473 " occurred_at" : " 2024-01-15T10:30:00.000Z" ,
7574 " team" : " platform-team" ,
76- " resource" : {" type" : " instance" , " id" : " i-123456" },
77- " identity" : {" rule_id" : " cpu-high" },
75+ " identity" : {" account_id" : " 123456789012" , " rule_id" : " cpu-high" },
7876 " links" : {" runbook_url" : " https://wiki.company.com/cpu-runbook" }
7977}
8078
@@ -107,8 +105,7 @@ func main() {
107105 " priority" : " P1" ,
108106 " occurred_at" : " 2024-01-15T10:30:00.000Z" ,
109107 " team" : " platform-team" ,
110- " resource" : map [string ]interface {}{" type" : " instance" , " id" : " i-123456" },
111- " identity" : map [string ]interface {}{" rule_id" : " cpu-high" },
108+ " identity" : map [string ]interface {}{" account_id" : " 123456789012" , " rule_id" : " cpu-high" },
112109 " links" : map [string ]interface {}{" runbook_url" : " https://wiki.company.com/cpu-runbook" },
113110 }
114111
@@ -152,21 +149,12 @@ func main() {
152149| ` description ` | string | Detailed description (max 4000 chars) |
153150| ` summary ` | string | High-level summary (max 1000 chars) |
154151| ` reason ` | string | Provider-specific reason (max 2000 chars) |
155- | ` resource ` | object | Resource information (requires ` type ` if provided) |
156152| ` raw_provider ` | any | Original payload for debugging |
157153
158- ### Resource Types
159-
160- - ` runner ` - CI/CD runner or build agent
161- - ` instance ` - Virtual machine or container instance
162- - ` job ` - Scheduled job or task
163- - ` service ` - Application service or microservice
164- - ` generic ` - Generic resource type
165-
166154### Validation Rules
167155
168156- ** URLs** : Must be valid HTTP/HTTPS URLs (max 2048 chars)
169- - ** AWS Account** : Must be 12-digit string
157+ - ** Account ID ** : Alphanumeric, hyphens, underscores only (max 100 chars)
170158- ** CloudWatch ARN** : Must start with "arn:aws:cloudwatch:"
171159- ** Source/Team** : Alphanumeric, hyphens, underscores only
172160
0 commit comments