- AWS Code Sample


To run this Java (SDK V2) code example, ensure that you have set up your development environment, including your credentials. For more information, see AWS SDK for Java 2.x Developer Guide.

logGroup = <define a log group> alarmName = <define an alarm name> instanceId = <define an instance id> streamName = <define a stream name> ruleResource = <define the ARN of the user whom owns the rule> metricId = <define a metric id> filterName = <define the name of the filter to use> destinationArn=<the ARN of the destination. This value is used to create subscription filters> roleArn =<the ARN of the user> filterPattern = <the filter pattern. For example, Error>