eventSubscription
Version 2024-11-01
Important
The Buy with Prime API is offered as a preview and might change as we receive feedback and iterate on the interfaces. We are sharing this early documentation to help you learn about the Buy with Prime API as we write and iterate on the content.
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
Query Event Subscription By Subscription Id
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 2 days ago