Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(provider/aws): LifecycleNotification JsonMappingException #2402

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

robzienert
Copy link
Member

LifecycleNotifications now have nested objects (InvokingAlarms).
Stumbled around for some AWS docs to no immediate avail, but a snippet:

{'Message': {'Description': 'Launching a new EC2 instance: REDACTED',
  'Details': {'Availability Zone': 'us-east-1d',
            'InvokingAlarms': [{'AWSAccountId': 'REDACTED',
                                'AlarmDescription': None,
                                'AlarmName': 'awsec2-REDACTED-High-CPU-Utilization',
                                'NewStateReason': 'Threshold Crossed: 1 datapoint (5.984999999999999) was less than or equal to the threshold (40.0).',
                                'NewStateValue': 'ALARM',
                                'OldStateValue': 'ALARM',
                                'Region': 'US - N. Virginia',
                                'StateChangeTime': 1402188328924L,
                                'Trigger': {'ComparisonOperator': 'LessThanOrEqualToThreshold',
                                            'Dimensions': [{'name': 'AutoScalingGroupName',
                                                            'value': 'REDACTED'}],
                                            'EvaluationPeriods': 1,
                                            'MetricName': 'CPUUtilization',
                                            'Namespace': 'AWS/EC2',
                                            'Period': 900,
                                            'Statistic': 'AVERAGE',
                                            'Threshold': 40,
                                            'Unit': None}}]},
  'EC2InstanceId': 'REDACTED',
  // ...
  'Time': '2014-06-09T12:47:23.288Z'}

LifecycleNotifications now have nested objects (`InvokingAlarms`).
Stumbled around for some AWS docs to no immediate avail, but a snippet:

```
{'Message': {'Description': 'Launching a new EC2 instance: REDACTED',
  'Details': {'Availability Zone': 'us-east-1d',
            'InvokingAlarms': [{'AWSAccountId': 'REDACTED',
                                'AlarmDescription': None,
                                'AlarmName': 'awsec2-REDACTED-High-CPU-Utilization',
                                'NewStateReason': 'Threshold Crossed: 1 datapoint (5.984999999999999) was less than or equal to the threshold (40.0).',
                                'NewStateValue': 'ALARM',
                                'OldStateValue': 'ALARM',
                                'Region': 'US - N. Virginia',
                                'StateChangeTime': 1402188328924L,
                                'Trigger': {'ComparisonOperator': 'LessThanOrEqualToThreshold',
                                            'Dimensions': [{'name': 'AutoScalingGroupName',
                                                            'value': 'REDACTED'}],
                                            'EvaluationPeriods': 1,
                                            'MetricName': 'CPUUtilization',
                                            'Namespace': 'AWS/EC2',
                                            'Period': 900,
                                            'Statistic': 'AVERAGE',
                                            'Threshold': 40,
                                            'Unit': None}}]},
  'EC2InstanceId': 'REDACTED',
  // ...
  'Time': '2014-06-09T12:47:23.288Z'}
```
@robzienert robzienert requested review from ajordens and removed request for ajordens March 2, 2018 07:00
@robzienert robzienert merged commit 74bef46 into spinnaker:master Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant