Commit Graph

61 Commits

Author SHA1 Message Date
Bert Blommers
651722689f
Admin: Improve automatic resource updates (#5988) 2023-02-26 18:44:04 -01:00
Bert Blommers
27a2e42d9b
Admin: Update Docs to point to getmoto (#5826) 2023-01-07 10:35:14 -01:00
steffyP
fbc3710f69
CloudWatch: support statistic-values in put-metric-data (#5793) 2022-12-21 18:07:41 -01:00
Daniel Roschka
0588db704a
Remove dependency on pytz (#5749) 2022-12-09 22:56:08 -01:00
Maël Mandis
e4c0d0618c
CloudWatch: Add custom label param to get_metric_data (#5728) 2022-12-02 21:00:25 -01:00
Bogdan Girman
fda02e659e
CloudWatch: Add unit filter to query get_metric_data (#5722) 2022-11-30 14:02:59 -01:00
Bert Blommers
1a8ddc0f2b
Techdebt: Replace string-format with f-strings (for tests dirs) (#5678) 2022-11-17 21:41:08 -01:00
steffyP
6b50b8020f
CloudWatch: add support for put-metric-data with values list (#5658) 2022-11-14 10:41:42 -01:00
Bert Blommers
ebe6f0972c
CloudWatch: Ensure we can tag new Alarms that are currently tag-free (#5614) 2022-10-29 15:41:29 +00:00
Bert Blommers
3d913f8f15
MultiAccount support (#5192) 2022-08-13 09:49:43 +00:00
steffyP
7658051594
parse 'ActionsEnabled' as boolean for describe-alarms (#5313) 2022-07-25 19:32:41 -03:00
tzven0
3cb455edb7
[CloudWatch] Take into account _metric_name if dimensions are set (#5068) 2022-04-27 20:43:26 +00:00
steffyP
f8c2b621db
cloudwatch: filter 'dimensions' for get_metric_data (#5041) 2022-04-21 11:32:57 +00:00
Bert Blommers
10bd677cf2
Admin - enable more Pylint rules (#5037) 2022-04-18 20:44:56 +00:00
Bert Blommers
29d01c35bc
Update Black + formatting (#4926) 2022-03-10 13:39:59 -01:00
Ranjithkumar Krishnan
4c309e7dd7
Fix exception type in cloudwatch get_metric_statistics (#4775) 2022-01-25 09:22:29 -01:00
Bert Blommers
aa70ee254d
Remove deprecated decorators + boto dependency (#4378) 2022-01-18 14:18:57 -01:00
Ranjithkumar Krishnan
3f79f7f6c7
Fix cloudwatch list metrics localstack #5000 (#4732) 2021-12-31 14:55:48 -01:00
Bert Blommers
52aeac1cee
Cloudwatch - Return build-in S3 metrics - take 2 (#3839) 2021-11-15 19:40:11 -01:00
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Bert Blommers
5f6ca27bb8
CloudWatch - Enable list_metrics() with Dimensions without value (#4400) 2021-10-12 22:04:06 +00:00
Bert Blommers
198f2696b9
Cloudwatch - Do not allow NaN values (#4399) 2021-10-12 19:32:34 +00:00
Bert Blommers
f7ce1c73fe
CloudWatch - duplicate deprecated tests (#3853) 2021-09-21 20:58:46 +00:00
Anton Grübel
4df099c724
Add cloudwatch tags (#4179)
* Update cloudwatch.put_metric_alarm to accept TreatMissingData and Tags parameter
* Add parameter ExtendedStatistic and EvaluateLowSampleCountPercentile to cloudwatch.put_metric_alarm
* Add parameter ThresholdMetricId to cloudwatch.put_metric_alarm
2021-08-16 08:52:19 +01:00
Waldemar Hummer
f4f8527955
Merge LocalStack changes into upstream moto (#4082)
* fix OPTIONS requests on non-existing API GW integrations

* add cloudformation models for API Gateway deployments

* bump version

* add backdoor to return CloudWatch metrics

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* bump version

* minor fixes

* fix Number data_type for SQS message attribute

* fix handling of encoding errors

* bump version

* make CF stack queryable before starting to initialize its resources

* bump version

* fix integration_method for API GW method integrations

* fix undefined status in CF FakeStack

* Fix apigateway issues with terraform v0.12.21
* resource_methods -> add handle for "DELETE" method
* integrations -> fix issue that "httpMethod" wasn't included in body request (this value was set as the value from refer method resource)

* bump version

* Fix setting http method for API gateway integrations (#6)

* bump version

* remove duplicate methods

* add storage class to S3 Key when completing multipart upload (#7)

* fix SQS performance issues; bump version

* add pagination to SecretsManager list-secrets (#9)

* fix default parameter groups in RDS

* fix adding S3 metadata headers with names containing dots (#13)

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* make CF stack queryable before starting to initialize its resources

* bump version

* remove duplicate methods

* fix adding S3 metadata headers with names containing dots (#13)

* Update amis.json to support EKS AMI mocks (#15)

* fix PascalCase for boolean value in ListMultipartUploads response (#17); fix _get_multi_param to parse nested list/dict query params

* determine non-zero container exit code in Batch API

* support filtering by dimensions in CW get_metric_statistics

* fix storing attributes for ELBv2 Route entities; API GW refactorings for TF tests

* add missing fields for API GW resources

* fix error messages for Route53 (TF-compat)

* various fixes for IAM resources (tf-compat)

* minor fixes for API GW models (tf-compat)

* minor fixes for API GW responses (tf-compat)

* add s3 exception for bucket notification filter rule validation

* change the way RESTErrors generate the response body and content-type header

* fix lint errors and disable "black" syntax enforcement

* remove return type hint in RESTError.get_body

* add RESTError XML template for IAM exceptions

* add support for API GW minimumCompressionSize

* fix casing getting PrivateDnsEnabled API GW attribute

* minor fixes for error responses

* fix escaping special chars for IAM role descriptions (tf-compat)

* minor fixes and tagging support for API GW and ELB v2 (tf-compat)

* Merge branch 'master' into localstack

* add "AlarmRule" attribute to enable support for composite CloudWatch metrics

* fix recursive parsing of complex/nested query params

* bump version

* add API to delete S3 website configurations (#18)

* use dict copy to allow parallelism and avoid concurrent modification exceptions in S3

* fix precondition check for etags in S3 (#19)

* minor fix for user filtering in Cognito

* fix API Gateway error response; avoid returning empty response templates (tf-compat)

* support tags and tracingEnabled attribute for API GW stages

* fix boolean value in S3 encryption response (#20)

* fix connection arn structure

* fix api destination arn structure

* black format

* release 2.0.3.37

* fix s3 exception tests

see botocore/parsers.py:1002 where RequestId is removed from parsed

* remove python 2 from build action

* add test failure annotations in build action

* fix events test arn comparisons

* fix s3 encryption response test

* return default value "0" if EC2 availableIpAddressCount is empty

* fix extracting SecurityGroupIds for EC2 VPC endpoints

* support deleting/updating API Gateway DomainNames

* fix(events): Return empty string instead of null when no pattern is specified in EventPattern (tf-compat) (#22)

* fix logic and revert CF changes to get tests running again (#21)

* add support for EC2 customer gateway API (#25)

* add support for EC2 Transit Gateway APIs (#24)

* feat(logs): add `kmsKeyId` into `LogGroup` entity (#23)

* minor change in ELBv2 logic to fix tests

* feat(events): add APIs to describe and delete CloudWatch Events connections (#26)

* add support for EC2 transit gateway route tables (#27)

* pass transit gateway route table ID in Describe API, minor refactoring (#29)

* add support for EC2 Transit Gateway Routes (#28)

* fix region on ACM certificate import (#31)

* add support for EC2 transit gateway attachments (#30)

* add support for EC2 Transit Gateway VPN attachments (#32)

* fix account ID for logs API

* add support for DeleteOrganization API

* feat(events): store raw filter representation for CloudWatch events patterns (tf-compat) (#36)

* feat(events): add support to describe/update/delete CloudWatch API destinations (#35)

* add Cognito UpdateIdentityPool, CW Logs PutResourcePolicy

* feat(events): add support for tags in EventBus API (#38)

* fix parameter validation for Batch compute environments (tf-compat)

* revert merge conflicts in IMPLEMENTATION_COVERAGE.md

* format code using black

* restore original README; re-enable and fix CloudFormation tests

* restore tests and old logic for CF stack parameters from SSM

* parameterize RequestId/RequestID in response messages and revert related test changes

* undo LocalStack-specific adaptations

* minor fix

* Update CodeCov config to reflect removal of Py2

* undo change related to CW metric filtering; add additional test for CW metric statistics with dimensions

* Terraform - Extend whitelist of running tests

Co-authored-by: acsbendi <acsbendi28@gmail.com>
Co-authored-by: Phan Duong <duongpv@outlook.com>
Co-authored-by: Thomas Rausch <thomas@thrau.at>
Co-authored-by: Macwan Nevil <macnev2013@gmail.com>
Co-authored-by: Dominik Schubert <dominik.schubert91@gmail.com>
Co-authored-by: Gonzalo Saad <saad.gonzalo.ale@gmail.com>
Co-authored-by: Mohit Alonja <monty16597@users.noreply.github.com>
Co-authored-by: Miguel Gagliardo <migag9@gmail.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-07-26 15:21:17 +01:00
usmangani1
03b2009a1c
Add unit support to cloudwatch get_metric_statistics (#3932)
* Add unit support to cloudwatch get_metric_statistics

* fix linting
2021-05-15 08:05:41 +01:00
Bert Blommers
737636f9df
Tech debt (#3653) 2021-02-02 16:31:26 +00:00
Rahul Ranjan
78a5661093
Cloudwatch get metric data return by period (#3626)
* Cloudwatch get metric data return by period

- addresses https://github.com/localstack/localstack/issues/3493

* fix lint issues

* remove unused import

* added test cases for min max and average
2021-02-02 09:08:53 +00:00
usmangani1
54e296eb53
Fix:CloudWatch List metrics with dimensions (#3461)
* Fix:CloudWatch List metrics with dimensions

* Fix:CloudWatch List metrics with dimensions

* Fixed new cases and added more tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-11-20 12:38:48 +00:00
Matěj Cepl
ea489bce6c Finish porting from nose to pytest. 2020-11-10 08:25:05 +01:00
Matěj Cepl
77dc60ea97 Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01:00
usmangani1
9970be2309
Fix: Adding alarm arn to describe alarms response (#3409)
* Fix: adding alarm arn to describe alarms response

* Fix:Delete subscriptions on delete topic

* modified tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-11-02 08:56:18 +00:00
Eoin Shanaghy
a3880c4c35
Metric data query alarms (#3419)
* Add support for metric data query alarms (Metrics=[..])

* Fix trailing whitespace

* Allow for unordered metrics in Python 2.7

* Add describe_alarm assertions and support DatapointsToAlarm
2020-10-31 15:56:24 +00:00
usmangani1
09b764148c
Fix : Added implementation for CloudWatch Describe Metric for Alarm (#3148)
* Fix : added implementation for CloudWatch Describe Metric for Alarm

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-18 10:47:53 +01:00
usmangani1
7a6d78afde
Fix: Cloudwatch delete Alarm status code handling on invalid alarm name (#3028)
* CloudWwatch delete Alarm status code handling on invalid alarm Name

* Handled cases where a mix of existent and non existent alarms are tried to delete

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-05-28 15:52:56 +01:00
Mike Grima
dd22e7855a Fixed a regression with CloudWatch 2020-04-27 12:56:17 -07:00
Steve Pulec
b4a11cd19f
Merge pull request #2848 from bblommers/feature/2239
CloudWatch - Initial get-metric-data implementation
2020-04-25 18:39:21 -05:00
Bert Blommers
fb0de99e81 #2239 - Initial implementation of CW.get_metric_data 2020-03-28 13:41:17 +00:00
Bert Blommers
c3865532f9 #2711 - Register default S3 metrics in CloudWatch 2020-03-23 15:53:39 +00:00
Tim Gatzemeier
6e490a9190 make linter happy 2020-03-16 21:58:50 +01:00
Tim Gatzemeier
50974aa9b2 add test cases to ensure actions enabled is correctly returned 2020-03-16 21:45:29 +01:00
Tim Gatzemeier
9d3ee116d3 add test case for actions_enabled field 2020-03-16 20:14:41 +01:00
Bert Blommers
0e43369155 Linting 2020-03-11 12:47:40 +00:00
Huang syunwei
ab68d14649 Fix bug of put metric data with timestamp, timestamp should be a date time object instead of a string 2020-03-11 12:47:09 +00:00
Stephan Huber
0527e88d46 Merge remote-tracking branch 'upstream/master' 2019-12-23 08:38:53 +01:00
Bert Blommers
36a5d80443 #2010 - Implement Cloudwwatch list_metrics pagination 2019-11-25 16:59:39 +00:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Stephan
e51d1bfade merge 2018-12-21 12:28:56 +01:00
Steve Pulec
69587c151c
Merge branch 'master' into bugfix/1615-cloudwatch-statistics 2018-05-29 22:19:25 -04:00
bclodius
1a0a951b06 Fixes #1608 2018-05-05 15:22:29 -04:00