Lists events for a given source identifier and source type. You can also specify a start and end time. For more
information on AWS DMS events, see Working with Events and Notifications
in the AWS Database Migration User Guide.
This is a variant of
#describeEvents(software.amazon.awssdk.services.databasemigration.model.DescribeEventsRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsIterable responses = client.describeEventsPaginator(request);
2) Using For loop
{
@code
software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsIterable responses = client
.describeEventsPaginator(request);
for (software.amazon.awssdk.services.databasemigration.model.DescribeEventsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsIterable responses = client.describeEventsPaginator(request);
Note: If you prefer to have control on service calls, use the
#describeEvents(software.amazon.awssdk.services.databasemigration.model.DescribeEventsRequest)operation.