Commit Graph

79 Commits

Author SHA1 Message Date
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
rajinder
fbbc8fc472
basic implementation of update rest api (#3951)
* basic implementation of update rest api

* basic implementation of update rest api

* basic implementation of update rest api

* review comments from bblommers

Co-authored-by: rajinder saini <rajinder.saini@c02vt5k2htd6.corp.climate.com>
2021-05-23 17:09:02 +01:00
rajinder
58f7ab0d25
Refector Apigateway update_usage_plan and add all replace operation. (#3942)
* Refector Apigateway update_usage_plan and add all replace operation.

* code reformatting

Co-authored-by: rajinder saini <rajinder.saini@c02vt5k2htd6.corp.climate.com>
2021-05-20 07:10:08 +01:00
usmangani1
0cff5458af
Fix : Remove Invalid request error when response-template is not specified (#3885)
* Fix : Remove Invalid request error

* Fix test and review commanets

* Remove duplicate put_integration_template

* API Gateway - Body can be None or empty

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-05-01 15:45:06 +01:00
rajinder
4b1c7225b6
added feature update_usage_plan and fixed some lint errors (#3727)
Co-authored-by: rajinder saini <rajinder.saini@c02vt5k2htd6.corp.climate.com>
2021-02-25 07:46:11 +00:00
Bert Blommers
f64532ed40
Cloudformation - Create ApiGateway resources (#3659)
* Cloudformation - Create ApiGateway resources

* Cleanup

* Linting
2021-02-15 10:31:33 +00:00
Bert Blommers
2f50f9cb24
Add validation to API Key min length value (#3652)
* api gateway - add api key minimum length validation

* api gateway - support includeValue query parameter on api key apis

* [apigateway] code refactoring

* Cleanup - remove duplicate utility methods

* APIGateway - Dont send headers with error messsage

Co-authored-by: Jovan Zivanov <j.zivanov@levi9.com>
2021-02-15 09:39:35 +00:00
Anders Kaseorg
8befcb6a48
Leave the global responses configuration alone (#3529)
Instead of modifying responses._default_mock, create our own
responses.RequestsMock object that we can modify as needed without
interfering with other users of the responses library.

Fixes #3264.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-01-15 09:12:41 +00:00
Bert Blommers
273ca63d59 Linting 2020-11-11 15:55:37 +00:00
Matěj Cepl
5697ff87a8 Back to Black 2020-11-10 14:12:38 +01: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
bcf61d0b09
Fix: Api-Gateway ApiKeyAlreadyExists headers change. (#3162)
* Fix: Api-Gateway ApiKeyAlreadyExists headers change.

* Added test for non decorator

* Fixed cli errors

* Fix:fixed build errors

* Fix: assert only in case of non server mode

Co-authored-by: usmankb <usman@krazybee.com>
2020-09-01 08:25:59 +01:00
cm-iwata
419f3fba5a
fix API Gateway:create_usage_plan_key return wrong status code (#3134) 2020-07-15 14:01:03 +01:00
cm-iwata
4e4ce5f9f1
fix API Gateway:create_api_key return wrong status code (#3136) 2020-07-15 12:21:11 +01:00
cm-iwata
1b355f7f06
fix #3131 fix API Gateway:delete_api_key return wrong status code (#3132)
* fix #3131 fix API Gateway:delete_api_key return wrong status code

* lint
2020-07-15 09:41:41 +01:00
cm-iwata
b5c7356b20
fix #3129 API Gateway create_api_key generate wrong default value (#3130) 2020-07-15 07:00:44 +01:00
usmangani1
b1d515c929
Enhancement : API-Gateway Put Integration Response - Adding support f… (#3058)
* Enhancement : API-Gateway Put Integration Response - Adding support for contentHandling.

* Added tests where the contentHandling is None also gets tested.

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-06-10 07:58:40 +01:00
Bert Blommers
d6875c25cc Linting 2020-05-04 09:27:57 +01:00
usmankb
1cda64e9a3 Added tests 2020-05-03 08:31:46 +05:30
Alessandro Palumbo
05860fcdd1 Fixed apigateway usage plan api when dealing with non existing usage plans and non existing api keys 2020-04-27 22:58:51 +02:00
JohnWC
4a800d8f2c Updated for black 2020-04-25 11:24:54 -05:00
JohnWC
0828c5af9d Add unit test for add apigateway with policy 2020-04-25 03:27:59 -05:00
Bert Blommers
69f963a3c2 Linting 2020-04-14 08:06:00 +01:00
usmankb
79e63e3bcf Added implementation for create-model,get-models,get-model in api gateway 2020-04-12 17:49:22 +05:30
Bert Blommers
1654280e43 Linting 2020-04-09 08:12:44 +01:00
usmankb
8542309fc9 conflicts 2020-04-08 22:00:48 +05:30
usmankb
af57cfc7ec Added more tests and coverage 2020-04-08 21:54:26 +05:30
Bert Blommers
8237fdaff0 Linting 2020-04-08 11:06:30 +01:00
usmankb
856c07de63 aws apigateway create,get domain names 2020-04-08 03:18:42 +05:30
Jon Beilke
40208363be Merge branch 'master' into feature-apigw-authorizers 2020-02-18 10:49:53 -06:00
Jon Beilke
1d14085294 add API Gateway authorizers 2020-02-18 10:49:35 -06:00
Steve Pulec
dcd1f0195f lint. 2020-02-17 20:32:19 -06:00
Steve Pulec
356c55f99d Fix default resourceMethod for API Gateway. Closes #2750. 2020-02-17 20:21:25 -06:00
Jon Beilke
8a51fbe1c9 add default for apiKeyRequired field on API Gateway methods 2020-02-14 12:26:27 -06:00
Bert Blommers
7719ac76a3
Merge pull request #2720 from jrbeilke/feature-apigw-defaults
Feature apigw defaults
2020-02-06 13:52:56 +00:00
Jon Beilke
c9995412b5 add support for apigateway fields with default values including apiKeySource, endpointConfiguration, and tags 2020-02-03 10:21:22 -06:00
Fabrício Matté
cf65cfc6ec
Update API Gateway resource name test 2020-01-29 16:28:37 -03:00
Fabio Dias
743dd46399 black linting 2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5 ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630 Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id 2019-12-16 19:56:11 -05:00
Mike Grima
8399bc4df5
Merge pull request #2606 from levinine/api_key_fix
api gateway handle duplicate api key values
2019-12-12 18:21:51 -08:00
Jovan Zivanov
a28183d150 fix lint errors 2019-11-27 16:12:30 +01:00
Jovan Zivanov
5260de8859 remove unnecessary comments 2019-11-27 15:55:29 +01:00
Jovan Zivanov
e3587afe01 api gateway handle duplicate api key values 2019-11-27 15:49:37 +01:00
Steve Pulec
72da9e96c2 Lint. 2019-11-21 17:53:58 -05:00
Bert Blommers
e4b586022d API Gateway - Linting 2019-11-04 02:02:07 -08:00
Bert Blommers
f0e2d44c5d Make API Gateway tests Python2/3 compatible 2019-11-04 09:41:47 +00:00
Bert Blommers
2d32ee18a6 #2521 - Implement API Gateway Stage deletion 2019-11-04 09:12:24 +00:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00