forked from cloud-custodian/cloud-custodian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws.health-event filter for additional resources (cloud-custodian#2943)
- Loading branch information
1 parent
9d4ec75
commit 0beaa59
Showing
11 changed files
with
289 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...lacebo/test_appelb_health_events_filter/elasticloadbalancing.DescribeLoadBalancers_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"LoadBalancers": [ | ||
{ | ||
"VpcId": "vpc-4a9ff72e", | ||
"LoadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/test-alb/ff1789434bfa3896", | ||
"State": { | ||
"Code": "active" | ||
}, | ||
"DNSName": "test-alb.us-east-1.elb.amazonaws.com", | ||
"SecurityGroups": [ | ||
"sg-f9cc4d9f" | ||
], | ||
"LoadBalancerName": "test-alb", | ||
"CreatedTime": { | ||
"hour": 17, | ||
"__class__": "datetime", | ||
"month": 1, | ||
"second": 20, | ||
"microsecond": 10000, | ||
"year": 2018, | ||
"day": 26, | ||
"minute": 52 | ||
}, | ||
"Scheme": "internal", | ||
"Type": "application", | ||
"CanonicalHostedZoneId": "Z1H1FL5HABSF5", | ||
"AvailabilityZones": [ | ||
{ | ||
"SubnetId": "subnet-15452171", | ||
"ZoneName": "us-east-1a" | ||
}, | ||
{ | ||
"SubnetId": "subnet-5fb47507", | ||
"ZoneName": "us-east-1c" | ||
} | ||
] | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"RetryAttempts": 0, | ||
"HTTPStatusCode": 200, | ||
"RequestId": "de4574a5-8653-11e6-b76c-c5e64157571b", | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "de4574a5-8653-11e6-b76c-c5e64157571b", | ||
"vary": "Accept-Encoding", | ||
"content-length": "2484", | ||
"content-type": "text/xml", | ||
"date": "Mon, 01 Oct 2018 20:32:13 GMT" | ||
} | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
tests/data/placebo/test_appelb_health_events_filter/elasticloadbalancing.DescribeTags_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"ResponseMetadata": { | ||
"RetryAttempts": 0, | ||
"HTTPStatusCode": 200, | ||
"RequestId": "fae221d1-8653-11e6-9612-e99914e6ef67", | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "fae221d1-8653-11e6-9612-e99914e6ef67", | ||
"date": "Mon, 01 Oct 2018 20:32:19 GMT", | ||
"content-length": "877", | ||
"content-type": "text/xml" | ||
} | ||
}, | ||
"TagDescriptions": [ | ||
{ | ||
"ResourceArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/test-alb/ff1789434bfa3896", | ||
"Tags": [ | ||
{ | ||
"Value": "VALUE2", | ||
"Key": "KEY2" | ||
}, | ||
{ | ||
"Value": "VALUE1", | ||
"Key": "KEY1" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
tests/data/placebo/test_appelb_health_events_filter/health.DescribeAffectedEntities_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"entities": [ | ||
{ | ||
"entityValue": "test-alb", | ||
"lastUpdatedTime": { | ||
"hour": 19, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 9, | ||
"microsecond": 183000, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 47 | ||
}, | ||
"entityArn": "arn:aws:health:us-east-1:123456789012:entity/QWERtyuiOPLKjhgfDCvb", | ||
"awsAccountId": "123456789012", | ||
"eventArn": "arn:aws:health:us-east-1::event/ELASTICLOADBALANCING/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET_1234567890_12345678901", | ||
"statusCode": "UNIMPAIRED" | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"RetryAttempts": 0, | ||
"HTTPStatusCode": 200, | ||
"RequestId": "1d866abf-c5b9-11e8-af28-6d15edc46571", | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "1d866abf-c5b9-11e8-af28-6d15edc46571", | ||
"date": "Mon, 01 Oct 2018 20:32:28 GMT", | ||
"content-length": "450", | ||
"content-type": "application/x-amz-json-1.1" | ||
} | ||
} | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
tests/data/placebo/test_appelb_health_events_filter/health.DescribeEventDetails_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"failedSet": [], | ||
"ResponseMetadata": { | ||
"RetryAttempts": 0, | ||
"HTTPStatusCode": 200, | ||
"RequestId": "1d2d4e33-c5b9-11e8-af28-6d15edc46571", | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "1d2d4e33-c5b9-11e8-af28-6d15edc46571", | ||
"date": "Mon, 01 Oct 2018 20:32:28 GMT", | ||
"content-length": "1515", | ||
"content-type": "application/x-amz-json-1.1" | ||
} | ||
}, | ||
"successfulSet": [ | ||
{ | ||
"event": { | ||
"lastUpdatedTime": { | ||
"hour": 19, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 9, | ||
"microsecond": 784000, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 47 | ||
}, | ||
"service": "ELASTICLOADBALANCING", | ||
"eventTypeCode": "AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET", | ||
"startTime": { | ||
"hour": 18, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 26, | ||
"microsecond": 0, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 32 | ||
}, | ||
"eventTypeCategory": "issue", | ||
"endTime": { | ||
"hour": 19, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 9, | ||
"microsecond": 0, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 47 | ||
}, | ||
"region": "us-east-1", | ||
"arn": "arn:aws:health:us-east-1::event/ELASTICLOADBALANCING/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET_1234567890_12345678901", | ||
"statusCode": "closed" | ||
}, | ||
"eventDescription": { | ||
"latestDescription": "We have detected an issue with the ELBs associated with this event in the us-east-1 region.\n\nThe load balancers are unable to scale up because there are not enough free IP addresses in its subnets. The best practice is to keep at least eight IP addresses available in each subnet.\n\nThere are two ways to address the issue:\n- Configure the load balancers to use a different subnet in the same Availability Zone that has more free IP addresses.\n- Free up IP addresses in the current subnets by deleting unused ENIs or moving other resources to different subnets.\n\nWe strongly recommend that you address this issue to ensure that your load balancers are prepared to handle increases in traffic. For more information, see http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html.\n\nIf you require assistance to resolve this issue, contact us by opening a new support case at https://console.aws.amazon.com/support/home." | ||
} | ||
} | ||
] | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
tests/data/placebo/test_appelb_health_events_filter/health.DescribeEvents_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"events": [ | ||
{ | ||
"lastUpdatedTime": { | ||
"hour": 19, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 9, | ||
"microsecond": 784000, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 47 | ||
}, | ||
"service": "ELASTICLOADBALANCING", | ||
"eventTypeCode": "AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET", | ||
"startTime": { | ||
"hour": 18, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 26, | ||
"microsecond": 0, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 32 | ||
}, | ||
"eventTypeCategory": "issue", | ||
"endTime": { | ||
"hour": 19, | ||
"__class__": "datetime", | ||
"month": 7, | ||
"second": 9, | ||
"microsecond": 0, | ||
"year": 2018, | ||
"day": 23, | ||
"minute": 47 | ||
}, | ||
"region": "us-east-1", | ||
"arn": "arn:aws:health:us-east-1::event/ELASTICLOADBALANCING/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET/AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET_1234567890_12345678901", | ||
"statusCode": "closed" | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"RetryAttempts": 0, | ||
"HTTPStatusCode": 200, | ||
"RequestId": "1c9a5cef-c5b9-11e8-af28-6d15edc46571", | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "1c9a5cef-c5b9-11e8-af28-6d15edc46571", | ||
"date": "Mon, 01 Oct 2018 20:32:27 GMT", | ||
"content-length": "478", | ||
"content-type": "application/x-amz-json-1.1" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.