

# Amazon Managed Service for Prometheus workspaces events
<a name="events-ref-aps-workspaces"></a>

Amazon Managed Service for Prometheus workspaces sends service events to EventBridge via Amazon CloudTrail.

## Amazon Managed Service for Prometheus workspaces events delivered via Amazon CloudTrail
<a name="event-ref-aps-workspaces-events-via-CT"></a>

Amazon CloudTrail sends events originating from Amazon Managed Service for Prometheus workspaces to EventBridge. Amazon services deliver events to CloudTrail on a [best effort](event-delivery-level.md) basis. For more information, see [Amazon service events delivered via Amazon CloudTrail](https://docs.amazonaws.cn/eventbridge/latest/userguide/eb-service-event-cloudtrail.html) in the *Amazon EventBridge User Guide*.

To match events from this service delivered by Amazon CloudTrail, create an event pattern that matches against the following event attributes:
+ `source`: aws.aps-workspaces
+ `eventSource`: aps-workspaces.amazonaws.com

```
{
  "source": ["aws.aps-workspaces"],
  "detail-type": ["Amazon API Call via CloudTrail"],
  "detail": {
    "eventSource": ["aps-workspaces.amazonaws.com"]
  }
}
```

To match against a specific API calls from this service, include an `eventName` attribute specifying an array of API calls to match:

```
{
  "source": ["aws.aps-workspaces"],
  "detail-type": ["Amazon API Call via CloudTrail"],
  "detail": {
    "eventSource": ["aps-workspaces.amazonaws.com"],
    "eventName": ["api-action-name"]
  }
}
```