eventSubscription
Version 2024-04-01
Overview
Fetch event subscription details by subscriptionId.
Response
Return type EventSubscription
Arguments
Argument | Description |
---|---|
subscriptionId (String required) | subscriptionId is a unique identifier associated with a subscription The size should be greater than or equal to 1 and less than or equal to 50. |
Examples
Get Event Subscription
Request
query {
eventSubscription(subscriptionId: "8e5da864-34ee-461d-9d76-0babcef14677") {
eventSubscriptionDetails {
destination {
... on EventBridgeData {
arn
}
}
eventType
}
subscriptionId
targetId
}
}
Response
{
"data": {
"eventSubscription": {
"eventSubscriptionDetails": {
"destination": {
"arn": "arn:aws:events:us-east-1::event-source/aws.partner/buywithprime/BuyWithPrimeEventSource"
},
"eventType": "DELIVERY_COMPLETED"
},
"subscriptionId": "8e5da864-34ee-461d-9d76-0babcef14677",
"targetId": "bp-30b55436-5c42-4864-b3cb-4e4d014d8744"
}
}
}
Query Event Subscription With Invalid Subscription Id
Request
query{
eventSubscription(subscriptionId:"44444444-4444-4444-4444-444444444444"){
eventSubscriptionDetails{
destination{
...on EventBridgeData{
arn
}
}
eventType
}
subscriptionId
targetId
}
}
Response
{
"errors": [
{
"message": "You do not have sufficient access to perform this action.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"eventSubscription"
],
"extensions": {
"classification": {
"type": "AccessDeniedError",
"errorType": "AccessDeniedException",
"errorCode": 403
}
}
}
],
"data": {
"eventSubscription": null
}
}
Updated 23 days ago