From 57a1b13c4e42bd9eae7b0eafefc7c4a4e2a3c000 Mon Sep 17 00:00:00 2001 From: kdnakt Date: Thu, 28 Dec 2023 21:47:29 +0900 Subject: [PATCH] Fix parsing failure in CloudWatchAlarmStateValue. --- lambda-events/src/event/cloudwatch_alarms/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lambda-events/src/event/cloudwatch_alarms/mod.rs b/lambda-events/src/event/cloudwatch_alarms/mod.rs index 0f2eb03d..aa8f6dd1 100644 --- a/lambda-events/src/event/cloudwatch_alarms/mod.rs +++ b/lambda-events/src/event/cloudwatch_alarms/mod.rs @@ -69,7 +69,8 @@ where R: DeserializeOwned, R: Serialize, { - pub value: String, + #[serde(default)] + pub value: CloudWatchAlarmStateValue, pub reason: String, #[serde(default, bound = "")] pub reason_data: Option, @@ -129,7 +130,7 @@ pub enum CloudWatchAlarmStateValue { #[default] Ok, Alarm, - InsuficientData, + InsufficientData, } #[derive(Clone, Debug, PartialEq)]