BatchGetEvent
Gets up to 10 events by ID, each as GetEvent returns it, including its payload.
If you supply actorId or sessionId, every requested event must match it. Each event
has its own outcome. The operation reports an event that it can't return in errors instead of failing,
with an error code named for the exception that GetEvent would return for it. The operation reports both
an event that doesn't exist and an event outside the supplied scope as RESOURCE_NOT_FOUND.
The exception is the space's customer managed AWS KMS key: if it is disabled, pending deletion, can't be used
for decryption, or was deleted, the whole call fails with ValidationException, as
GetEvent does.
Request Syntax
{
"actorId": "string",
"eventIds": [ "string" ],
"sessionId": "string",
"spaceId": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- actorId
-
The identifier of the actor that the requested events belong to. One value applies to every event in the request. This value is intended for authorization: IAM policies can reference it in condition keys to allow or deny the request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
[a-zA-Z0-9][a-zA-Z0-9-_]*Required: No
- eventIds
-
The IDs of the events to get: 1 to 10, without duplicates.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
- sessionId
-
The identifier of the session that the requested events belong to. One value applies to every event in the request. This value is intended for authorization: IAM policies can reference it in condition keys to allow or deny the request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
[a-zA-Z0-9][a-zA-Z0-9-_]*Required: No
- spaceId
-
The ID of the space.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
sp-[a-f0-9]{12}Required: Yes
Response Syntax
{
"errors": [
{
"errorCode": "string",
"eventId": "string",
"message": "string"
}
],
"events": [
{
"actorId": "string",
"eventId": "string",
"eventTimestamp": "string",
"metadata": {
"string" : "string"
},
"payload": { ... },
"sessionId": "string",
"spaceId": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- errors
-
An entry for each requested event that the call didn't return. Empty when the call returned every event.
Type: Array of BatchGetEventError objects
Array Members: Minimum number of 0 items. Maximum number of 10 items.
- events
-
The events found, in the order that you requested their IDs.
Type: Array of Event objects
Array Members: Minimum number of 0 items. Maximum number of 10 items.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
- message
-
A message that describes which access the request is missing.
HTTP Status Code: 403
- InternalServerException
-
The service couldn't process the request because of an internal error. Retry the request.
- message
-
A message that describes the internal error.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource doesn't exist. Check the IDs in the request.
- message
-
A message that describes which resource wasn't found.
- resourceId
-
The ID of the resource that wasn't found.
- resourceType
-
The type of the resource that wasn't found.
HTTP Status Code: 404
- ThrottlingException
-
The service throttled the request. Retry the request with exponential backoff.
- message
-
A message that describes the throttling.
- retryAfterSeconds
-
The number of seconds to wait before you retry the request.
HTTP Status Code: 429
- ValidationException
-
The request isn't valid. The
reason,message, andfieldListmembers describe the problem. Fix the request, and then try again.- fieldList
-
The fields that failed validation, if any.
- message
-
A message that describes why the request failed validation, such as the field, key, or limit involved.
- reason
-
The reason that the request failed validation.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: