User guide
}
} while (marker != null);
}
static void printEvent(Event event)
{
if (event == null)
{
System.out.println("\nEvent object is null.");
return;
}
System.out.println("\nEvent metadata:\n");
System.out.format("SourceID: %s\n", event.getSourceIdentifier());
System.out.format("Type: %s\n", event.getSourceType());
System.out.format("Message: %s\n", event.getMessage());
System.out.format("Date: %s\n", event.getDate());
}
}
View Events Using the Amazon Redshift CLI and
API
You can use the following Amazon Redshift CLI operation to manage events.
• describe-events
Amazon Redshift provides the following API to view events.
• DescribeEvents
Amazon Redshift Event Notifications
Topics
• Overview (p. 202)
• Amazon Redshift Event Categories and Event Messages (p. 204)
• Managing Event Notifications Using the Amazon Redshift Console (p. 209)
• Managing Event Notifications Using the Amazon Redshift CLI and API (p. 214)
Overview
Amazon Redshift uses the Amazon Simple Notification Service (Amazon SNS) to communicate notifications
of Amazon Redshift events.You enable notifications by creating an Amazon Redshift event subscription.
In the Amazon Redshift subscription, you specify a set of filters for Amazon Redshift events and an
Amazon SNS topic.Whenever an event occurs that matches the filter criteria, Amazon Redshift publishes
a notification message to the Amazon SNS topic. Amazon SNS then transmits the message to any Amazon
SNS consumers that have an Amazon SNS subscription to the topic.The messages sent to the Amazon
SNS consumers can be in any form supported by Amazon SNS for an AWS region, such as an email, a
API Version 2012-12-01
202
Amazon Redshift Management Guide
View Events Using the Amazon Redshift CLI and API