Commit Graph

5377 Commits

Author SHA1 Message Date
Ninh Khong
97139d4253
Fix : SQS - Added support for attribute labels for send_message function (#3181)
* Fix : SQS - Added support for attribute labels for send_message function

* Add integration test on receive message function

* Add send message invalid datetype integration test and fix SQS MessageAttributesInvalid exceptions
2020-07-28 14:34:26 +01:00
Jordan Reiter
126f5a5155
Implement Filter: Contains functionality for describe_params (#3189)
* Implement Filter: Contains functionality for describe_params

This commit adds the Contains functionality. Tests were created
to mimic behavior in AWS/boto3, including that filters with values
in the form of `/name` will match parameters named `/name/match` but
not parameters named `match/with/other-name`. In the test example, a
Contains filter with the value `/tan` would match: `/tangent-3` and
`tangram-4` but not `standby-5`.

* Enforce parameter filter restrictions on get_parameters_by_path

According to the boto3 documentation [1], `Name`, `Path`, and `Tier` are not
allowed values for `Key` in a parameter filter for `get_parameters_by_path`.

This commit enforces this by calling `_validate_parameter_filters` from the
`get_parameters_by_path` method, and adding a check to `_validate_parameter_filters`.

I added 3 test cases to `test_get_parameters_by_path` which check for the correct
exception when calling with a parameter filter using any of these keys.

* Code formatted to match style

* Refactored logic
2020-07-28 10:17:35 +01:00
Macwan Nevil
6adee0cbaf
Bugfix: RedrivePolicy Issue SNS (#3186)
* Bugfix: S3 time precision issue fixed

* Bugfix: S3 time precision issue fixed

* s3 timeformat fix

* Quickfix S3 timefix

* Bugfix: Redrive Policy Allow

* Linting Fixed
2020-07-27 18:53:15 +01:00
usmangani1
1db42fb865
FIX : IAM - Added support for pathPrefix in list_users_function (#3180)
* FIX:IAM-Added support for pathPrefix in list_users_function

* removed changes for roles

* Added test for non decorator

* changed filter function

Co-authored-by: usmankb <usman@krazybee.com>
2020-07-27 15:32:41 +01:00
usmangani1
bc1674cb19
CF : Added support for get template summary (#3179)
* CF : Added support for get template summary

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-27 14:08:01 +01:00
Bert Blommers
03dd55d39d
Organisations - Put back assertions that got lost in a merge (#3184) 2020-07-27 12:36:31 +01:00
Hector Acosta
cdc4385e2a
Various changes to organizations endpoint (#3175)
* Raise DuplicatePolicyException when a policy with the same name exists

* Implement update_policy

* Implement delete_policy
2020-07-27 12:32:11 +01:00
Steve Pulec
1eda31cb76
Merge pull request #2939 from redyvon/master
Update Dockerfile
2020-07-26 15:35:42 -05:00
Steve Pulec
ebae2b1799
Merge pull request #3156 from bblommers/bug/3150
AWS Lambda - Verify Docker is running when executing a Function
2020-07-26 15:32:11 -05:00
Steve Pulec
41427a78b6
Merge pull request #3147 from bblommers/enhancement/3139
ECS - UpdateService - Allow service ARN to be passed in
2020-07-26 15:31:12 -05:00
Steve Pulec
7481d07a3d
Merge pull request #3119 from bblommers/bugfix/dynamodb_table_cfn_output
CFN - Allow DynamoDB table as an Output
2020-07-26 15:30:29 -05:00
Steve Pulec
980525c3dd
Merge pull request #3121 from bblommers/bugfix/2104
S3 - Persist metadata for Presigned URL
2020-07-26 15:29:38 -05:00
Macwan Nevil
c166d97a97
Bugfix: S3 time precision issue fixed (#3182)
* Bugfix: S3 time precision issue fixed

* Bugfix: S3 time precision issue fixed

* s3 timeformat fix

* Quickfix S3 timefix
2020-07-26 16:00:15 +01:00
Larry Aiello
2504a398f9
Implement ec2.register_image() (#3177)
* implement register_image

* format code
2020-07-26 13:51:26 +01:00
Dean Kleissas
936c7c80f1
When generating multi-part upload IDs remove / characters (#3164)
* / are not allowed in upload ids

* ran black
2020-07-22 17:01:31 +01:00
Koichi Ogura
448ff45174
fix cognito-idp UserPool ClientId (#3165)
* fix cognito-idp UserPool ClientId

* add test

* replace uuid4 to create_id
2020-07-22 14:08:17 +01:00
ryanlchandler
bf8eb11dc3
Adding MessageGroupId and MessageDeduplicationId (#3163)
Adding MessageGroupId and MessageDeduplicationId when sent from batch (#3101)
2020-07-22 13:09:12 +01:00
Alan Baldwin
b09c8034e6
Adding VPN Gateway filters (#3155)
* Adding attchment.vpc-id, attachment.state, type, and vpn-gateway-id filters for VPN Gateways. fixes #3154

* Run formatting on tests

Co-authored-by: Alan Baldwin <alan.baldwin.jr@gmail.com>
2020-07-21 16:08:49 +01:00
Anton Grübel
a507314d45
RAM - implement CRUD endpoints (#3158)
* Add ram.create_resource_share

* Add ram.get_resource_shares

* Add ram.update_resource_share

* Add ram.delete_resource_share

* Add ram.enable_sharing_with_aws_organization

* Fix server tests

* Add CR suggestions
2020-07-21 14:15:13 +01:00
Aaron Hill
1e5b8acac6
Implementation: ECS Task Sets (#3152)
* initial implementation of taskSets.  Fixed a bug with ECS Service where task_definition was a required parameter.

* Added update_task_set and tests.  DRYed up ClusterNotFoundException. General cleanup.

* Added support for filtering tags on include parameter to describe_task_sets.  Added additional tests.

* Fix copy/pasta in ClusterNotFoundException

* styling updates

* Added TODO for delete_task_set force parameter

* Updated multiple function and constructor calls to use named variables.  Updated tests to reference variables instead of hardcoded strings.

* Run black for formatting

* Updated create_service function call to use named variables
2020-07-21 07:17:37 +01:00
cm-iwata
fdeee07762
Add basic implement for cognito-idp create_resource_server (#3153)
* Add basic implement for cognito-idp create_resource_server

* lint
2020-07-20 12:31:30 +01:00
Bert Blommers
f2f25060fe #3150 - AWSLambda - Verify Docker is running 2020-07-20 11:37:45 +01:00
jweite
ba99c61477
Basic Support for Endpoints, EndpointConfigs and TrainingJobs (#3142)
* Basic upport for Endpoints, EndpointConfigs and TrainingJobs

* Dropped extraneous pass statement.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-19 15:06:48 +01:00
usmangani1
a123a22eeb
Fix : cloudFormation dynamodb : delete resource on delete stack (#3120)
* Fix :  cloudFormation dynamodb : delete resource on delete stack

* Delete function for dynamodb

* Added tests for delete stack using dynamodb.

* Added tests for non decorator

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-19 11:59:19 +01:00
usmangani1
552b1294df
Fix : EC2 - Added ownerId filter for describe instances (#3149)
* Fix : EC2 - Added ownerId filter for describe instances

* linting
2020-07-19 10:44:58 +01:00
Logan Jones
6fb7867767
Fix: Put Events API (#3145)
* Fix: Put Events API

* Update from code review.

Co-authored-by: Logan Asher Jones <logan@codescratch.com>
2020-07-19 10:00:24 +01: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
Bert Blommers
f69688b064 ECS - UpdateService - Allow Service ARNs 2020-07-17 12:50:06 +01:00
Bert Blommers
bed769a387
Tech debt - increase test timeouts to remove intermittant test failures (#3146) 2020-07-17 12:11:47 +01:00
jweite
1b80b0a810
Sagemaker models (#3105)
* First failing test, and enough framework to run it.

* Rudimentary passing test.

* Sagemaker Notebook Support, take-1: create, describe, start, stop, delete.

* Added list_tags.

* Merged in model support from https://github.com/porthunt/moto/tree/sagemaker-support.

* Re-org'd

* Fixed up describe_model exception when no matching model.

* Segregated tests by Sagemaker entity.  Model arn check by regex..

* Python2 compabitility changes.

* Added sagemaker to list of known backends.  Corrected urls.

* Added sagemaker special case to moto.server.infer_service_region_host due to irregular url format (use of 'api' subdomain) to support server mode.

* Changes for PR 3105 comments of July 10, 2020

* PR3105 July 10, 2020, 8:55 AM EDT comment: dropped unnecessary re-addition of arn when formulating model list response.

* PR 3105 July 15, 2020 9:10 AM EDT Comment: clean-up SageMakerModelBackend.describe_models logic for finding the model in the dict.

* Optimized imports

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-16 13:12:25 +01:00
Koichi Ogura
3e2a5e7ee8
fix #3133 Cognito Identity Provider : create_user_pool_client GenerateSecret=True doesn't work (#3135)
* fix #3133 Cognito Identity Provider : create_user_pool_client
`GenerateSecret=True` doesn't work

* add test for update_user_pool_client
2020-07-16 09:13:12 +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
Mike Fogel
9072153474
Fix dynamodb2 KEYS_ONLY Indexes (#3125)
KEYS_ONLY indexes include table keys.
2020-07-14 13:42:13 +01:00
Adam Richie-Halford
890c3b4954
Make batch.utils.lowercase_first_key() recursive (#3124)
* Make batch.utils.lowercase_first_key() recursive

* Reformat using black

* Add test of recursive lowercase_first_key()

* Fix typo in ttest_batch/test_cloud_formation.py
2020-07-14 11:29:49 +01:00
Anton Grübel
f31f8e08c1
Organizations - implement AWS Service Access functionality (#3122)
* Add organizations.enable_aws_service_access

* Add organizations.list_aws_service_access_for_organization

* Add organizations.disable_aws_service_access
2020-07-14 10:27:39 +01:00
Anton Grübel
55bb4eb08d
Config - implement Organization Conformance Pack functionality (#3116)
* Add config.put_organization_conformance_pack

* Add config.describe_organization_conformance_packs

* Add config.get_organization_conformance_pack_detailed_status

* Add config.describe_organization_conformance_pack_statuses

* Add config.delete_organization_conformance_pack

* Add an update method to OrganizationConformancePack
2020-07-13 09:30:55 +01:00
Bert Blommers
8b63421321 S3 - Only add metadata once; use binary file content 2020-07-12 18:29:10 +01:00
usmangani1
c5de56ce70
Fix: CloudFormation support status filter in list stacks (#3115)
* Fix: CloudFormation support status filter in list stacks

* Added test for non decorator

Co-authored-by: usmankb <usman@krazybee.com>
2020-07-12 13:39:42 +01:00
Bert Blommers
b33c5dff06 #2104 - S3 - Persist metadata for Presigned URL 2020-07-12 13:33:46 +01:00
Bert Blommers
80761ebb3b #3114 - Allow DynamoDB table as CFN output 2020-07-11 09:46:03 +01:00
ngander64
069c159492
Always return 'HardExpiry' for account password policy. (#3117)
Co-authored-by: Nick B Gander <NGANDER@amfam.com>
2020-07-11 09:38:33 +01:00
Bert Blommers
920d074bb9
Merge pull request #50 from spulec/master
Merge upstream
2020-07-11 09:03:53 +01:00
Adam Richie-Halford
766f527d37
Add NUMBER and LIST<NUMBER> parsing to cloudformation/parsing.py (#3118)
* Add NUMBER and LIST<NUMBER> parsing to cloudformation/parsing.py

* Fix black formatting error in test_stack_parsing.py
2020-07-11 08:43:45 +01:00
usmangani1
81be4b37a1
Fix: Ec2 - add destinationIpv6CIDR support. (#3106)
* Fix: Ec2 - add destinationIpv6CIDR support.

* removing unneccessary debug statements

* modifying existing test case

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-07 14:32:55 +01:00
Mike Grima
1299fef8b8
Merge pull request #3107 from ninhkd/add-region-response-vpc-peering-connections
Fix: Ec2 - add VPCPeeringConnections region response support.
2020-07-05 10:28:27 -07:00
Ninh Khong
b7671819df Update code lint 2020-07-05 23:04:34 +07:00
Ninh Khong
87eb8a21d6 Update unittest checking region response in accept_vpc_peering_connection and describe_vpc_peering_connects functions 2020-07-05 22:09:57 +07:00