Commit Graph

2453 Commits

Author SHA1 Message Date
Jesse Vogt
2df0309db5 unquote key name multiple times until stable value 2019-09-24 16:10:08 -05:00
Steve Pulec
86fc340ffd
Merge pull request #2428 from mangin/get_log_events_problem
fix tail message problem in get_log_events
2019-09-23 21:44:36 -05:00
Steve Pulec
6795a219cd
Merge pull request #2417 from Gapex/fix-MaxKeys
MaxKeys limits the sum of folders and keys
2019-09-23 21:38:26 -05:00
Steve Pulec
cbe1ff1974
Merge pull request #2422 from kiyonori-matsumoto/dynamodb-and-order
fix: raises ValueError on conditional and operator
2019-09-23 21:35:08 -05:00
Aleksandr Mangin
b163f23a22 fix tail message problem in get_log_events 2019-09-23 18:35:44 +02:00
Gapex
d8e69a9a36 list with prifix 2019-09-17 12:44:48 +08:00
Gapex
a466ef2d1b check key & common prefix in unit test' 2019-09-17 12:42:33 +08:00
Gapex
1c36e1e2c5 update unit test and fix StartAfter 2019-09-17 10:42:10 +08:00
Kiyonori Matsumoto
7ee35a8510 fix: raises ValueError on conditional and operator
if lhs evaluates to false, rhs must be ignored, but rhs was evaluated then ValueError is occurred.
2019-09-16 23:33:52 +09:00
Gapex
c04c72d435 update MaxKeys unite test 2019-09-16 18:09:42 +08:00
Gapex
84715e9a2a add truncate unite test 2019-09-16 16:46:19 +08:00
mattsb42-aws
4c7cdec965 fix encoding for Python 2 in KMS tests 2019-09-13 14:08:26 -07:00
mattsb42-aws
24832982d4 convert tests from boto to boto3 and add unicode plaintext vector to test auto-conversion 2019-09-13 13:32:19 -07:00
mattsb42-aws
c44178f2f7 add tests for invalid values passed to generate_random 2019-09-13 13:19:11 -07:00
mattsb42-aws
9a095d731a add tests for invalid aliases in describe_key 2019-09-13 13:01:55 -07:00
mattsb42-aws
aa6b505415 fix tests to expect the correct error 2019-09-12 17:42:43 -07:00
mattsb42-aws
f4c5dfbdfb reorganize and centralize key ID validation 2019-09-12 17:42:40 -07:00
Jessie Nadler
2b8bdc9bca Validate elbv2 FixedResponseConfig attributes 2019-09-12 12:29:03 -04:00
Jessie Nadler
2983a63c0d Allow fixed-response action type for elbv2 2019-09-12 12:25:43 -04:00
Steve Pulec
b8a79611d6
Merge pull request #2397 from mattsb42-aws/kms
Making kms:Encrypt/Decrypt/GenerateDataKey more real
2019-09-11 22:13:33 -05:00
Steve Pulec
aa896a0c2e
Merge pull request #2294 from spulec/fix-responses-mocking
Cleanup responses mocking. Closes #1567
2019-09-11 22:06:36 -05:00
Steve Pulec
e5311eb6f6
Merge pull request #2415 from brunog3/fix-iam-policy-statements-with-empty-sid
Fix multiple IAM Policy Statement creation with empty sid
2019-09-11 22:04:35 -05:00
Steve Pulec
f8cde9da9d
Merge pull request #2414 from harveywi/wjh-fix-reregister-taskdefinition-unit-test
Fix/tighten AWS Batch test_reregister_task_definition unit test
2019-09-11 22:03:36 -05:00
Steve Pulec
7a01b7ce9e
Merge pull request #2412 from joolean/issues/2189
Prevent overlapping expr name prefixes from corrupting projection expr
2019-09-11 22:02:34 -05:00
Steve Pulec
ff3e3de387
Merge pull request #2403 from wesselvdv/feature/cognito-describe-identity-pool
Adds Cognito Identity describe-identity-pool
2019-09-11 21:53:08 -05:00
Steve Pulec
d88e1fbdda
Merge pull request #2402 from gruebel/fix-sqs-maxReceiveCount
Store SQS RedrivePolicy maxReceiveCount value as int
2019-09-11 21:52:16 -05:00
Steve Pulec
0f3957ffad
Merge pull request #2399 from dkuntz2/route53-fix-empty-tags
Don't error out on route53.list_tags_for_resource when resource has no tags
2019-09-11 21:50:25 -05:00
Steve Pulec
12ad7d0ded
Merge pull request #2398 from RDProjekt/leading-double-slashes
Allows leading // for mocked s3 paths (fix for #1637)
2019-09-11 21:49:53 -05:00
Steve Pulec
13c4f2e794
Merge pull request #2343 from danguer/support-iterator-type-at-after-sequence
Adding support for AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER
2019-09-11 21:48:55 -05:00
Steve Pulec
c81de6e381
Merge pull request #2393 from cm-iwata/fix_device_shadow_ver_conflict
fix #2392 Add validation for device shadow version
2019-09-11 21:46:46 -05:00
Steve Pulec
8867e91f9e
Merge pull request #2391 from gruebel/master
Add exact Number, exact String.Array and attribute key matching to SN…
2019-09-11 21:46:06 -05:00
Steve Pulec
ac8d3c6792
Merge pull request #2390 from gdippolito/master
Add tag support to API Gateway keys
2019-09-11 21:45:08 -05:00
Steve Pulec
5dfa30df42
Merge pull request #2385 from bblommers/bugfix/2366
Secretsmanager put_secret_value still does not support SecretBinary
2019-09-11 21:41:11 -05:00
Steve Pulec
eb5bf2ed55
Merge pull request #2401 from rocky4570/redshift-enhanced-vpc-routing
add enhanced vpc routing option to redshift moto
2019-09-11 21:40:12 -05:00
Steve Pulec
7c2d328724
Merge pull request #2400 from acsbendi/elbv2-terminated-instance-target
Terminated EC2 instances are deregistered from ELBv2 target groups.
2019-09-11 21:39:37 -05:00
Bruno Oliveira
21933052d3 Fix multiple IAM Policy Statement creation with empty sid 2019-09-10 23:43:50 -03:00
William Harvey
0d4d2b7041 Fix/tighten AWS Batch test_reregister_task_definition unit test 2019-09-10 14:24:00 -04:00
Julian Graham
f4df7a48ee Prevent overlapping expr name prefixes from corrupting projection expr
h/t @beheh. This patch handles the case when ProjectionExpression looks
like "#1, ..., #10" - the previous code used `replace`, which would make
the resulting projection into "foo, ..., foo0".
2019-09-09 19:08:16 -04:00
Bert Blommers
6a1a8df7cc Step Functions - Simplify tests 2019-09-07 16:37:55 +01:00
Bert Blommers
78254cc4f2 Step Functions - Execution methods 2019-09-04 15:42:42 +01:00
Bert Blommers
af4082f38e Step Functions - State Machines methods 2019-09-02 16:26:40 +01:00
Wessel van der Veen
0c11daf623 adds test cases, and fixes formatting. 2019-09-01 17:38:33 +02:00
gruebel
9ac20ad5f1 store SQS RedrivePolicy maxReceiveCount value as int 2019-08-31 19:28:09 +02:00
rocky4570
ff27e021bc add enhanced vpc routing option to redshift moto
EnhancedVpcRouting is only available when mock_redshift not mock_redshift_deprecated
2019-09-01 00:34:18 +10:00
acsbendi
675db17ace Implemented deregistering terminated instances from ELB target groups. 2019-08-30 18:21:11 +02:00
Don Kuntz
cae0b5bc45
Remove extraneous print statement from test 2019-08-28 13:59:49 -05:00
Don Kuntz
35507f33df
Don't error out on route53.list_tags_for_resource when resource has no tags
Without the added `return {}`, calling route53.list_tags_for_resource
when called with a ResourceId of a resource without any tags would
result in the error:
    jinja2.exceptions.UndefinedError: 'None' has no attribute 'items'

Because the LIST_TAGS_FOR_RESOURCE_RESPONSE was given None instead of
empty dict.

This now allows list_tags_for_resource to be called without issue on
tag-less resources.
2019-08-28 13:57:42 -05:00
Łukasz Sznuk
e0304bc500 Allows leading // for mocked s3 paths (#1637). 2019-08-28 16:17:45 +02:00
mattsb42-aws
f7043e1eaf add kms:GenerateRandom and tests 2019-08-27 20:55:58 -07:00
mattsb42-aws
dd63cebf81 add kms:ReEncrypt invalid destination key test 2019-08-27 20:49:47 -07:00
mattsb42-aws
9ffb9d3d0a add kms:ReEncrypt and tests 2019-08-27 20:24:57 -07:00
Daniel Guerrero
a068a56972 Merge branch 'master' into support-iterator-type-at-after-sequence 2019-08-27 16:06:11 -05:00
mattsb42-aws
d5ac5453b3 streamline KMS tests 2019-08-27 13:57:50 -07:00
mattsb42-aws
98581b9196 add proper KMS encrypt, decrypt, and generate_data_key functionality and tests 2019-08-27 13:42:36 -07:00
mattsb42-aws
3fe8afaa60 add tests for generate_data_key and generate_master_key 2019-08-26 23:29:30 -07:00
mattsb42-aws
7eeead8a37 add encrypt/decrypt utility functions with appropriate exceptions and tests 2019-08-26 23:24:31 -07:00
Tomoya Iwata
778fc47c21 fix #2392 Add validation for shadow version,when update_thing_shadow() has called 2019-08-26 17:47:08 +09:00
gruebel
d8a922811c Add exact Number, exact String.Array and attribute key matching to SNS subscription filter policy and validate filter policy 2019-08-25 21:08:02 +02:00
Giulio
59852eb13a Add tag support to API Gateway keys 2019-08-24 11:19:50 +01:00
Bert Blommers
e8d60435fe #2366 - SecretsManager - put_secret_value should support binary values 2019-08-23 10:57:15 +01:00
Mike Grima
3a5d857a60
Merge pull request #2376 from rwestergren/event_source_mappings
And event source mapping endpoints and SQS trigger support
2019-08-22 16:54:46 -07:00
Mike Grima
7fa46e9659
Merge pull request #2381 from bblommers/bugfix/2380
2380 - Validate parameter-list for duplicates in dynamodb.batch_get_item
2019-08-22 16:40:16 -07:00
Mike Grima
5fd2c30f97
Merge pull request #2377 from acsbendi/get-caller-identity
GetCallerIdentity returns real data based on the access key used
2019-08-22 09:50:59 -07:00
acsbendi
cf2dae0ce8 Calling sts:GetCallerIdentity is always allowed. 2019-08-22 18:09:52 +02:00
Bert Blommers
956592d615 2380 - Validate parameter-list for duplicates in dynamodb.batch_get_item 2019-08-22 16:12:48 +01:00
acsbendi
addb631081 Skip checking the expiration of AssumedRole in server mode. 2019-08-22 11:06:42 +02:00
Mike Grima
38866bfcef Fixed some IAM APIs for tagging and role descriptions 2019-08-21 13:08:33 -07:00
Mike Grima
1de371ca76
Merge pull request #2374 from asherf/acm
[ACM] Use the specified region name when generating ARN for a requested cert.
2019-08-21 12:56:59 -07:00
Mike Grima
aea9d84b01
Merge pull request #2373 from asherf/filter-acm
[ACM] Filter certs by statuses.
2019-08-21 12:55:26 -07:00
Mike Grima
d5e7334e5b
Merge pull request #2369 from dkuntz2/implement-launch-templates
Add basic endpoints for EC2 Launch Templates
2019-08-21 12:54:42 -07:00
acsbendi
3012740699 Fixed AssumedRole ARN. 2019-08-21 19:47:12 +02:00
acsbendi
6bdbd0dbc8 Fixed a broken test case and parameterized account ID in STS tests. 2019-08-21 13:17:58 +02:00
Bendegúz Ács
24dcdb7453
Merge branch 'master' into get-caller-identity 2019-08-21 12:36:40 +02:00
acsbendi
d931204266 Implemented get-caller-identity returning real data depending on the access key used. 2019-08-21 12:20:35 +02:00
acsbendi
d9cb1f2d35 Implemented returning random assumed role ID. 2019-08-21 10:45:36 +02:00
Randy Westergren
ccceb70397
And event source mapping endpoints and SQS trigger support 2019-08-20 21:54:57 -04:00
Asher Foa
d669145b71 Filter certs by statuses. 2019-08-19 18:01:21 -07:00
Asher Foa
66a7ace2c5 Use the specified region name when generating ARN for a requested cert. 2019-08-19 17:30:30 -07:00
Don Kuntz
d2ce3a9e04
Flake8 fixes 2019-08-19 18:01:44 -05:00
Don Kuntz
4929298f1f
Test create_launch_template_version using launch_template id 2019-08-19 17:59:15 -05:00
Don Kuntz
a1aa087718
Add test for creating launch templates with TagSpecifications option 2019-08-19 17:58:19 -05:00
Don Kuntz
743e5be4d3
Confirm describe_launch_template_versions works with Versions, MinVersion, and MaxVersion options 2019-08-19 17:57:39 -05:00
Mike Grima
188969a048 AWS Config Aggregator support
- Added support for the following APIs:
	- put_configuration_aggregator
	- describe_configuration_aggregators
	- delete_configuration_aggregator
	- put_aggregation_authorization
	- describe_aggregation_authorizations
	- delete_aggregation_authorization
2019-08-19 15:50:19 -07:00
Don Kuntz
1de63b1691 Specify region in launch template tests 2019-08-14 16:32:01 -05:00
Don Kuntz
aa3b6085d1 Add basic endpoints for EC2 Launch Templates
Specifically, add the CreateLaunchTemplate, CreateLaunchTemplateVersion,
DescribeLaunchTemplates, and DescribeLaunchTemplateVersions endpoints.
2019-08-14 16:11:07 -05:00
Earl Robinson
bbaff4b273 restore KeyId to test_decrypt in test_kms 2019-08-14 08:39:54 -04:00
Steve Pulec
9a3a99243f
Merge pull request #2365 from spulec/elb-cognito
Add cognito support to Elb
2019-08-12 16:10:26 -05:00
Steve Pulec
7b3846f6a1 Refactor Actions to be a real class. Add elb cognito. 2019-08-09 23:34:52 -05:00
Mike Grima
2358433f74
Merge pull request #2359 from bkovacki/batch_submit_job_with_job_definition_name
Add option to call batch submit_job with job definition name only
2019-08-07 15:13:52 -07:00
Mike Grima
fa07d4973b
Merge pull request #2360 from ashleygould/issue_2355
[Resolves #2355] - create_organization(): add master account, default…
2019-08-07 15:11:48 -07:00
Berislav Kovacki
5063ffc837 Implement pagination support for GetLogEvents
* Add nextForwardToken and nextBackwardToken to GetLogEvents response
* Handle end of stream by returning the same token as passed in
2019-08-07 17:37:53 +02:00
Ashley Gould
7d453fec9a [Resolves #2355] - create_organization(): add master account, default policy
Model: OrganizationsBackend
Method: create_organization

create_organization now creates master account, root ou, and a
default service control policy objects and adds them to the
OrganizationsBackend object.  the policy is attached to both
the master account and the root ou.  any subsiquently created
accounts or OU also have the default policy attached.
2019-08-06 16:52:31 -07:00
Berislav Kovacki
a35a55ec26 Add option to call batch submit_job with job definition name only
* Add option to call batch submit_job with job definition name only
* Fix bug which causes register_job_definition not to increment job
revision number after a second revision
2019-08-06 22:13:52 +02:00
brodie.gallinger
ec99a6b827 Existing user now raises a UsernameExistsException
If a user is attempted to be added to a pool that already contains a user with that username, the UsernameExistsException is thrown, to match AWS behaviour.
2019-08-06 13:51:00 -03:00
Steve Pulec
40271d2c4e
Merge pull request #2352 from wndhydrnt/bugfix/ecs-time-as-timestamp
Convert fields createdAt and updatedAt of ECS deployment to timestamp
2019-08-05 21:33:47 -05:00
Berislav Kovacki
b7884ef903 Add S3 support for INTELLIGENT_TIERING, GLACIER and DEEP_ARCHIVE storage
* Add INTELLIGENT_TIERING, GLACIER and DEEP_ARCHIVE as valid storage
classes for objects
* Add ObjectNotInActiveTierError error on PUT object copy for GLACIER
and DEEP_ARCHIVE storage class objects
2019-08-05 17:34:39 +02:00
wndhydrnt
3c19f0a02d Convert fields createdAt and updatedAt of deployment to timestamp 2019-08-04 10:23:50 +02:00
Steve Pulec
9b535a7c75
Merge pull request #2345 from iisulop/fix_timezone_problem_in_test_create_cluster_boto3
Fix timezone problem in test create cluster boto3
2019-08-03 22:38:14 -05:00
Steve Pulec
0d28d51f90
Merge pull request #2350 from chichi1091/apigateway_apikey_update
implements APIGateway update_api_key
2019-08-03 22:35:13 -05:00
Chiharu Terashima
7fa5ce3dc3 implements APIGateway update_api_key 2019-08-03 01:28:47 +09:00
Daniel Guerrero
9cce674857 Merge branch 'master' into support-iterator-type-at-after-sequence 2019-07-30 09:36:19 -05:00
Iiro Sulopuisto
8cca33dc42 Test redshift cluster creation time more thoroughly 2019-07-30 14:14:14 +03:00
Steve Pulec
37978d79b3
Merge pull request #2338 from labd/add-ecs-list_tags_for_resource
Add ecs list tags for resource
2019-07-29 22:17:23 -05:00
Daniel Guerrero
bfc401c520 Fixing comments conventions 2019-07-29 21:21:02 -05:00
Daniel Guerrero
7091be8eae Adding support for AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER
Adding support on DynamoDB Streams for AT_SEQUENCE_NUMBER
 and AFTER_SEQUENCE_NUMBER ShardIteratorType

Change SequenceNumber type to string instead of int to match documentation
2019-07-29 21:13:58 -05:00
Michael van Tellingen
64e2a74e8c Add support for setting tags on ecs task definitions
This also implements the ecs.list_tags_for_resources, although the
resources it checks for are currently only the task definitions
2019-07-29 09:58:08 +02:00
Steve Pulec
69d86cbd54
Merge pull request #2300 from acsbendi/master
Basic IAM authentication, authorization
2019-07-28 17:22:52 -05:00
acsbendi
62b25f9914 Added a few more tests to achieve better coverage. 2019-07-28 22:19:50 +02:00
acsbendi
cc843bb8c5 Created tests for IAM auth. 2019-07-26 20:40:15 +02:00
Jack Danger
348dc54e6a
Supporting tags in KMS (#2332)
The CreateKey API method accepts tags but does not return them.
2019-07-24 19:15:43 -07:00
Steve Pulec
5dbdff7ca7
Merge pull request #2330 from spulec/host-parsing
Host parsing
2019-07-23 22:51:45 -05:00
Steve Pulec
40cd8fa11c
Merge pull request #2334 from dkuntz2/unify-ec2-owner-ids
Use the same default Owner ID between EC2 models
2019-07-23 22:44:11 -05:00
Steve Pulec
5abe56fd2b
Merge pull request #2250 from szczeles/s3_delete_objects_boto3
Raising MalformedXML exception when using boto3 client and s3.delete_objects()
2019-07-23 22:41:45 -05:00
Mariusz Strzelecki
51d96ae8f3 Test split into boto and boto3 part 2019-07-23 20:53:45 +02:00
Don Kuntz
abf3db8d8a
Add a test to ensure that ec2.copy_image sets the proper owner id
This test is useful because before the last commit using copy_image
would not set the owner_id to the same one used when calling
describe_images.

For example, this code

    conn = boto3.client("ec2")
    copy_resp = conn.copy_image(
        SourceImageId="ami-whatever",
        ...
    )

    describe_resp = conn.describe_images(
        Owners=["self"]
    )

Would result in describe_resp being empty, when it should contain the
image from the copy_resp before it.

By ensuring the owner ids are the same (see ce4059f6) the code example
now works as expected.
2019-07-22 21:57:15 -05:00
Don Kuntz
ce4059f6d9
Use a consistent owner id between EC2 resources
Previously there were a couple models which used different owner ids by
default, which could make tests relying on them fail if someone wasn't
expecting that. This change ensures a uniform owner id between
resources.
2019-07-22 21:50:09 -05:00
Steve Pulec
4dd2b66b04 Refactor backend parsing. 2019-07-21 22:07:58 -05:00
PND
a2aefc49b4 Fixed update_item of DynamoDB to deal with the list type. 2019-07-22 01:42:20 +09:00
Steve Pulec
63d5af90b4
Merge pull request #2327 from efiop/master
tests: multipart: use REDUCED_PART_SIZE and variable part size
2019-07-20 11:04:11 -04:00
Ruslan Kuprieiev
615d427c6d tests: multipart: use REDUCED_PART_SIZE and variable part size
There is no reason to use 5M chunks, especially with the reduced_part_size
decorator. Also made part_size to be variable to add extra layer of
testing to make sure that moto is handling that scenario correctly.

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
2019-07-20 16:26:24 +03:00
Grégory Bataille
67c8ea0352 fixes #2075 - STS should raise on too long policy for federation token 2019-07-20 08:41:52 +02:00
Steve Pulec
5c34c06d07
Merge pull request #2311 from caguado/fix/2310
Implement get_open_id_token
2019-07-20 00:12:18 -04:00
Steve Pulec
7ec3d43e0c
Merge pull request #2319 from acsbendi/autoscaling-group-from-instance
Implemented creating Auto Scaling group from instance
2019-07-20 00:06:22 -04:00
Steve Pulec
f840a0f6a0
Merge pull request #2321 from sblumin/fix-change-rrsets
added support to UPSERT records that are not simple routing policy such as weighted records
2019-07-19 23:42:29 -04:00
Steve Pulec
0e7895ee46
Merge pull request #2320 from dkuntz2/glue-batch-get-partition
Add glue.batch_get_partition endpoint
2019-07-19 23:41:41 -04:00
Steve Pulec
e052219161
Merge pull request #2315 from bkovacki/asg_min_max_size_update_desired_capacity_change
Handle change of ASG desired capacity on min and max size update
2019-07-19 23:38:16 -04:00
Steve Pulec
2dabb629f7
Merge pull request #2324 from acsbendi/elbv2-stopped-instance-target
ELBv2 DescribeTargetHealth returns correct response for stopped instance
2019-07-19 23:35:58 -04:00
Steve Pulec
2a981d3d45
Merge pull request #2325 from acsbendi/autoscaling-terminate-instance-in-group
Auto Scaling groups recreate terminated instances
2019-07-19 23:34:42 -04:00
acsbendi
201d9fb491 Created test for terminating instance in an Auto Scaling group. 2019-07-18 20:30:07 +02:00
acsbendi
44e93c94e8 Created test for describing health of a stopped instance target. 2019-07-18 16:25:41 +02:00
sblumin
a2ac341e3d added support to UPSERT records that are not simple routing policy 2019-07-17 16:37:47 -07:00
Don Kuntz
c8d8aa4dd0
Add glue.batch_get_partition endpoint 2019-07-17 14:11:34 -05:00
acsbendi
4ca0bd807f Created tests for calling CreateAutoScalingGroup with an instance id. 2019-07-17 20:15:59 +02:00
Berislav Kovacki
1b3157ced0 Handle change of ASG desired capacity on min and max size update
A change in UpdateAutoScalingGroup:
* if a value for MinSize is specified without specifying a value for
DesiredCapacity, and the new MinSize is larger than the current size of
the group, set the group's DesiredCapacity to the new MinSize value
* if a value for MaxSize is specified without specifying a value for
DesiredCapacity, and the new MaxSize is smaller than the current size of
the group, set the group's DesiredCapacity to the new MaxSize value
2019-07-16 09:12:03 +02:00
Steve Pulec
6bc07360a1
Merge pull request #2313 from caguado/fix/2312
Implement assume_role_with_web_identity
2019-07-15 23:08:23 -05:00
Steve Pulec
d1e057ecab
Merge pull request #2309 from caguado/fix/2308
Implement update_user_pool_domain
2019-07-15 22:46:26 -05:00
Carlos Aguado
e54f74776b Implement assume_role_with_web_identity
The AssumeRoleWithWebIdentity is a similar endpoint to STS's AssumeRole
where the authentication element is a JWT id_token from a configured OP.
This commit implements the functionality and relies on the same result
generated for the regular AssumeRole.
2019-07-16 13:27:47 +10:00
Carlos Aguado
7c17fcd21d Implement get_open_id_token
Introduce the CognitoIdentity's GetOpenIDToken endpoint to retrieve a
JWT tuple from Cognito's Identity Pool for a given IdentityId.
2019-07-16 13:20:31 +10:00
Steve Pulec
9acdc59aa4
Merge pull request #2291 from spulec/context-manager-return-mock
Have context manager return mock.
2019-07-15 22:09:19 -05:00
Carlos Aguado
81980850d4 Implement update_user_pool_domain
Introduce the CognitoIDP's UpdateUserPoolDomain to update configuration
options of the associated domain to a Cognito IDP (e.g. ACM certificate).
2019-07-16 13:09:13 +10:00
Steve Pulec
25ab3afc31
Merge pull request #2295 from garrettheel/condition-expr-or-evaluation
dynamodb2: Defer evaluation of the OR RHS in condition expr
2019-07-15 20:46:11 -05:00
Steve Pulec
ef4f7e1ecc
Merge pull request #2307 from efiop/master
moto: s3: support partNumber for head_object
2019-07-15 20:33:21 -05:00
Steve Pulec
67b3d07e5d
Merge pull request #2306 from bkovacki/extend-describe-network-interface-filter
Extend EC2 DescribeNetworkInterface filter support
2019-07-15 20:30:22 -05:00
Ruslan Kuprieiev
2c2dff22bc moto: s3: support partNumber for head_object
To support it, we need to keep multipart info in the key itself when
completing multipart upload.

Fixes #2154

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
2019-07-15 20:47:29 +03:00
Berislav Kovacki
e67e2deee4 Extend EC2 DescribeNetworkInterface filter support
* add description property to EC2 NetworkInterface
* extend DescribeNetworkInterfaces filter support with description,
subnet-id, private-ip-address attributes
2019-07-15 00:01:37 +02:00
Berislav Kovacki
4ed189c454 Add support for VpcSecurityGroups set/update in RDS 2019-07-13 08:19:23 +02:00
Berislav Kovacki
4fd0b5c710 Add support for OptionGroupName in create_db_instance 2019-07-11 22:43:42 +02:00
Steve Pulec
2a0df1e1a8 Flip when we test passthru. 2019-07-11 10:09:01 -05:00
Garrett Heel
0093a7992f dynamodb2: Defer evaluation of the OR RHS in condition expr 2019-07-11 08:29:07 -04:00
Mariusz Strzelecki
f32db6e64a Raising MalformedXML exception when using boto3 client and s3.delete_objects() 2019-07-11 09:53:23 +02:00
Steve Pulec
11506e21d5 Only test passthrough exception in non-server mode. 2019-07-10 22:45:26 -05:00
Steve Pulec
c7147b06b1 Cleanup responses mocking. Closes #1567
This unblocks requests to other websites with requests while Moto
is activated. It also adds a wildcard for AWS services to still
ensure no accidental requests are made for unmocked services
2019-07-10 21:59:25 -05:00
Steve Pulec
c2e382f537 Dont test context manager in server mode. 2019-07-10 21:40:49 -05:00
Steve Pulec
b19c201975 Cleanup model ref resetting. 2019-07-10 21:16:11 -05:00
Steve Pulec
308712841c Have context manager return mock. 2019-07-09 20:31:43 -05:00
Steve Pulec
6a13d54616
Merge pull request #2266 from garrettheel/feat/dynamodb-expressions
Improve DynamoDB condition expression support
2019-07-09 18:22:55 -05:00
Steve Pulec
d758952d84
Merge pull request #2287 from bkovacki/add-instance-create-time-to-db-instance
Add InstanceCreateTime to DBInstance
2019-07-08 19:43:07 -05:00
Berislav Kovacki
c51ce76ee9 Add InstanceCreateTime to DBInstance 2019-07-09 02:10:33 +02:00
Steve Pulec
7bb2b9dc8c
Merge pull request #2016 from adriangalera/ses->sns
Enable SES feedback via SNS
2019-07-08 19:00:58 -05:00
Steve Pulec
a9ec1c7ee7
Merge pull request #2082 from markchalloner/mark-alias-target
Fix route53 alias response.
2019-07-08 18:27:22 -05:00
Steve Pulec
841eaf3886
Merge pull request #2286 from acsbendi/assume-role-fix
AssumeRole returns randomly generated credentials.
2019-07-08 18:23:15 -05:00
Steve Pulec
8c61bce1a2
Merge pull request #2276 from aakhan-sep/master
Implement If-Modified-Since in GET Object for S3 Bucket
2019-07-08 18:22:44 -05:00
acsbendi
ab0d23a0ba AssumeRole returns randomly generated credentials. 2019-07-08 16:32:25 +02:00
Steve Pulec
414ff930ed
Merge branch 'master' into mark-alias-target 2019-07-07 23:11:53 -05:00
Steve Pulec
ac33845367
Merge pull request #2070 from bkovacki/add-attributes-parameter-for-sns-create_topic-api
Add attributes parameter support for sns create_topic API
2019-07-07 23:04:40 -05:00
Steve Pulec
6efd5582d7
Merge pull request #2284 from wndhydrnt/fix-iam-get-role-policy-not-found
Raise exception if a role policy is not found
2019-07-07 21:23:44 -05:00
Steve Pulec
4e6eb25512
Merge pull request #2274 from corydolphin/failing-test
Adds failing test for socket.socketpair()
2019-07-07 21:18:46 -05:00
wndhydrnt
67326ace4f Raise exception if a role policy is not found 2019-07-07 21:46:26 +02:00
Steve Pulec
574055da2c
Merge pull request #2245 from vrtdev/bugfix/r53-delete-type
Route53 Delete: respect the given Type
2019-07-06 17:29:19 -05:00
Steve Pulec
3bafc89b40
Merge pull request #2268 from acsbendi/policy-version-fixes
IAM policy version fixes
2019-07-06 15:52:10 -05:00
Steve Pulec
04f8446a93
Merge pull request #2280 from acsbendi/create-access-key-fix
Create access key fix
2019-07-06 15:40:12 -05:00
acsbendi
7de0ef0f8b Fixed value is present in response even if it's None. 2019-07-05 15:24:16 +02:00
acsbendi
0b88dd1efb Fixed security group IDs not returned correctly. 2019-07-05 15:12:38 +02:00
acsbendi
7215b00466 Created test case for describe_instance_attribute. 2019-07-05 13:43:47 +02:00
acsbendi
48f0c6f194 Fixed format of access key ID and secret access key. 2019-07-04 20:20:08 +02:00
acsbendi
0bd2c5adb4 Fixed minor errors in test. 2019-07-04 20:12:53 +02:00
acsbendi
ef97e0f28f Extended create_access_key test. 2019-07-04 20:04:27 +02:00
Cory Dolphin
f11a5dcf6b Fix socket.fakesock compatibility 2019-07-03 11:26:33 -07:00
Aden Khan
b2adbf1f48 Adding the functionality and test so that the If-Modified-Since header is honored in GET Object
Signed-off-by: Aden Khan <aakhan@sep.com>
2019-07-03 14:25:08 -04:00
acsbendi
6ac315b903 Fixed broken tests due to policy validation. 2019-07-02 12:24:19 +02:00
Steve Pulec
75d9707e8e
Merge pull request #2099 from ssoulier/master
fix bug in Stream init (wrong number of shards)
2019-07-01 22:27:33 -05:00
Steve Pulec
d46324e7fd
Merge pull request #2241 from vrtdev/bugfix/route53-list-start
route53.list_resource_record_sets() with StartRecordName= behaves different from real service
2019-07-01 21:58:16 -05:00
Steve Pulec
c8b94b6e9f
Merge pull request #2265 from IVIURRAY/bugfix/scan-projection
ProjectionExpression works with table.scan()
2019-07-01 21:21:53 -05:00
Steve Pulec
3920ff0c9a
Merge pull request #2236 from dkuntz2/glue-endpoints
Add glue.delete_partition and glue.batch_delete_partition
2019-07-01 21:16:36 -05:00
Steve Pulec
176799637c
Merge pull request #2247 from queue-tip/ecr-batch-delete-image-fix
Delete ECR image when it has no tags
2019-07-01 21:09:52 -05:00
Steve Pulec
172e089854
Merge branch 'master' into policy-version-fixes 2019-07-01 20:58:38 -05:00
acsbendi
1bda3f2213 Added tests for valid policy documents. 2019-07-01 18:21:54 +02:00
acsbendi
85efec29b1 Added more tests. 2019-07-01 17:30:59 +02:00
acsbendi
d2b0812edc Added more tests. 2019-06-30 20:33:17 +02:00
acsbendi
e133344846 Implemented validating action prefixes. 2019-06-30 18:48:27 +02:00
acsbendi
55f9040296 Fixed old unit tests in test_iam that didn't use valid IAM policies. 2019-06-30 17:57:50 +02:00
acsbendi
99336cbe6a Reorganized tests using a generator method and fixed error messages. 2019-06-30 17:04:02 +02:00
acsbendi
896f7b6eb2 Added more tests. 2019-06-30 16:36:49 +02:00
acsbendi
a4b850aab9 Added test cases for mutually exclusive elements. 2019-06-30 14:03:18 +02:00
acsbendi
f0e9ea4e72 Created tests for policy documents. 2019-06-30 13:47:17 +02:00
acsbendi
3cd373f1f9 Created failing tests. 2019-06-29 18:15:01 +02:00
IVIURRAY
4ce0e6bbcb add extra test for ProjectionExpression using scan with ExpressionAttributes 2019-06-27 19:37:46 +01:00
IVIURRAY
949637a14c remove debug 2019-06-27 19:12:53 +01:00
IVIURRAY
b60097fab2 improve test case 2019-06-27 19:08:32 +01:00
Garrett Heel
467f669c1e add test for attr doesn't exist 2019-06-27 11:49:08 -04:00
Matthew Stevens
83082df4d9 Adding update_item and attribute_not_exists test 2019-06-26 23:22:07 +01:00
Matthew Stevens
8a90971ba1 Adding test cases for #1587 2019-06-26 23:20:55 +01:00
Matthew Stevens
6fd47f843f Test case for #1819 2019-06-26 23:20:55 +01:00
Matthew Stevens
57b668c832 Using Ops for dynamodb condition expressions 2019-06-26 23:20:55 +01:00
Matthew Stevens
1a2fc66f84 Adding dynamodb2 expression parser and fixing test cases 2019-06-26 23:20:16 +01:00
IVIURRAY
e50ce7287d ProjectionExpression works with table.scan() 2019-06-26 21:54:48 +01:00
Juan Martinez
9a26c92e72 Delete ECR image when it has no tags
This is a bug fix to my initial work when implementing
batch_delete_image. Deleting the last tag for a given image should
delete the image from the backend.

I also cleaned up the tests previously-added in the initial
implementation.
2019-06-17 13:41:35 -04:00
Niels Laukens
6e97881896
Route53 Delete: respect the given Type 2019-06-17 15:53:32 +02:00
Niels Laukens
9ef69a617a
Route53 get_record_sets: sort names lexicographically 2019-06-14 17:07:59 +02:00
Ber Zoidberg
6717cba286 test name fix 2019-06-12 08:12:15 -07:00
Ber Zoidberg
997556f7bb improve test coverage 2019-06-12 08:06:37 -07:00
Ber Zoidberg
26ae13b715 Fix copypasta error in comment 2019-06-11 22:41:56 -07:00
Ber Zoidberg
96c2506fd4 Fix DynamoDB UpdateExpression support for REMOVE on nested maps 2019-06-11 22:38:15 -07:00
Don Kuntz
df2d2ac6b4 Add endpoints to glue for deleting partitions
Specifically add glue.delete_partition and glue.batch_delete_partition.
2019-06-11 14:32:50 -05:00
Don Kuntz
df493ea18d Add glue.batch_delete_table, and fix glue.batch_create_partition to respond correctly (#2233)
* Fix glue.batch_create_partition to only respond with Errors if Errors occurred

* Add glue.batch_delete_table endpoint

* Remove unused variable
2019-06-10 20:14:30 +01:00
Bendegúz Ács
ab8a189bbf Fixed policy version's Document type for AWS managed policies (#2234)
* Added checking Document's type in AWS managed policy version response.

* Fixed policy version's Document type for AWS managed policies.
2019-06-10 20:00:37 +01:00
Don Kuntz
3833449b36 Add batch_create_partition endpoint to Glue client (#2232)
* Add batch_create_partition endpoint to Glue client

* Remove exception as e from glue batch_create_partition, because it's unused
2019-06-07 09:28:10 +01:00
Bendegúz Ács
97ab7fd307 Fixes for get_policy and get_policy_version with AWS managed policies (#2231)
* Created test for get_policy with AWS managed policy.

* Created failing test for get_policy_version with AWS managed policy.

* Updated AWS managed policies.

* Fixed failing tests.

* Fixed trying to compare datetime with string in test case.

* Fixed CreateDate of AWS managed policies overwritten by their version's CreateDate.

* Fixed and improved tests for managed AWS policies.

* Added test for AWS managed policy with v4 default version.

* Fixed not correctly returning dates for AWS managed policies.
2019-06-06 13:36:39 +01:00
Juan Martinez
ed93821621 Set ECR imagePushedAt to current date and time (#2229) 2019-06-06 13:34:10 +01:00
Elliott Butler
9bd15b5a09
Fix route53 alias response.
This commit
* includes the work by @elliotmb in #1694,
* removes the AliasTarget.DNSName copy into a RecordSet.Value,
* fixes and adds tests.
2019-05-31 10:54:18 +01:00
Juan Martinez
664b27d8e7 Implement ECR batch_delete_image (#2225)
This implements the endpoint in spulec #2224
2019-05-30 18:16:19 +01:00
Bendegúz Ács
8f53b16b9a Updates to create_subnet and describe_subnets responses (#2053)
* Removed Tags field from create_subnet response.

* Added DefaultForAz to create_subnet response.

* Added MapPublicIpOnLaunch to create_subnet response.

* Added OwnerId to create_subnet response.

* Added AssignIpv6AddressOnCreation field for create_subnet and describe_subnet and implemented setting it in modify_subnet_attribute.

* Added SubnetArn to create_subnet response.

* Added AvailabilityZoneId to create_subnet and describe_subnet responses, and error for invalid availability zone.

* Added Ipv6CidrBlockAssociationSet to create_subnet response.

* Added missing fields to describe_subnets response.

* Added myself to list of contributors and marked describe_subnet as implemented.

* Fixed linting errors.

* Fixed blank line containing a tab.

* Fixed accidentally deleted ).

* Fixed broken tests.
2019-05-28 16:33:25 +01:00
A
2386d47fe3 SecretsManager secret value binary support (#2222) 2019-05-28 16:32:43 +01:00
Bendegúz Ács
21917c4b93 Bug fix for default network ACL entries (#2056)
* Fixed a bug where default network ACL entries could not be deleted.

* Implemented throwing error when a network entry with the same rule number and egress value already exists.

* Fixed syntax errors.

* Added socket.timeout to possibly raised exceptions in wait_for for Python 3.
2019-05-26 02:02:14 +01:00
Alexander Mohr
7271fb9391 Fix S3 backend operations with VersionId (#2055)
* fix s3 issues

* fix merge conflict

* fix and add test cases
2019-05-25 20:19:33 +01:00
Bendegúz Ács
f408709ef9 VPC IPv4 validation (#2026)
* Implemented throwing invalid subnet range error and fixed breaking tests.

* Implemented throwing invalid CIDR block parameter error for vpcs and subnets.

* Implemented throwing invalid destination CIDR block error.

* IPv6 addresses not accepted, strict checking disabled.

* Implemented throwing invalid subnet conflict error and fixed breaking tests.

* Implemented throwing invalid VPC range error and fixed breaking tests.

* Fixed accidentally removed ).

* Fixed test case trying to create two subnets with the same CIDR range.
2019-05-25 18:35:07 +01:00
Garrett
c739c5331e Handle UnicodeEncodeError when parsing querystring (#2170) 2019-05-25 18:34:47 +01:00
Adam Hodges
71f83d7e4f Add support for IoT register_certificate (#1827) 2019-05-25 18:30:23 +01:00
Jordan Sanders
4cce4defac Support CustomAmiId in EMR (#2037) 2019-05-25 11:19:26 +01:00
Gregory Bataille
d952410965 1987 support transfer acceleration (#2018)
* chore(): remove executable flag on moto/s3/response.py

* chore(): ignore .eggs temp file

* feat(#1987): get bucket acceleration support

* feat(#1987): put bucket acceleration support

* feat(#1987): suspend undefined bucket is a no-op

* feat(#1987): validate accelerate_configuration status

* feat(#1987): bucket containing dots do not support acceleration

* doc(#1987): update implementation coverage
2019-05-25 11:19:00 +01:00
William Richard
1b91534165 Add support for redirect actions on ELBv2 listeners (#2029) 2019-05-25 11:18:39 +01:00
David
868d0107bf Autoscaling instance azs (#2030)
* Add instance AZ support in autoscaling

* Resolve py36-py27 format string error in test_autoscaling
2019-05-25 11:18:16 +01:00
Daniel Miranda
fb2a76fd66 ec2: add support for creation and importing of real SSH keys (#2108)
* ec2: add support for creation and importing of real SSH keys

* setup: lock PyYAML version to avoid incompatibilities
2019-05-25 11:17:52 +01:00
Mark Challoner
d8ff67197b Add resource-groups. (#1953) 2019-05-25 11:10:34 +01:00
Don Kuntz
238d1c7c39 Add glue.delete_table endpoint, for allowing tables to be deleted (#2112)
* Add glue.delete_table endpoint, for allowing tables to be deleted

* remove extra whitespace
2019-05-25 10:58:41 +01:00
Jeffery Smith
4a99dcddb2 Issue #2141 Adding owner-id to the filter for Snapshot (#2142)
* Adding owner-id to the filter for Snapshot
2019-05-25 10:34:59 +01:00
Hans
9b12ce6809 Fix #1842 Create cross region VPC peering connection in both region (#2195)
Add a class level store in models/VPCPeeringConnectionBackend of ec2
for saving vpc peering connection.
Any instance can correctly save VPC peering connection info
on both region when it create vpc peering connection.

Update vpc_peering_connections in ec2/responses to meet new version:
DESCRIBE_VPC_PEERING_CONNECTIONS_RESPONSE,
ACCEPT_VPC_PEERING_CONNECTION_RESPONSE,

Previous code only create one region VPC peering connection but
doesn't create the other region VPC peering connection
when create cross region VPC peering connection.

Tested in real AWS environment at first
and create unit test case according to real AWS environment response.

Add 5 test cases
VPC cross region delete case
VPC cross region accept case
VPC cross region accept wrong region case
VPC cross region reject case
VPC cross region reject wrong region case

Related: #1842, #1830
2019-05-25 10:21:57 +01:00
Ashley Gould
a3f6d2c110 [Resolves #2196] - endpoints for querying organizations SC policies (#2197)
adding support for organizations service control policies

* [Resolves #2196] - endpoints for querying organizations SC policies

I have added the following mock endpoints to the Organizations service:

- create_policy
- list_policies
- describe_policy
- attach_policy
- list_policies_for_target
- list_targets_for_policy
2019-05-25 10:20:19 +01:00
Koudai Aono
a61124f774 support to create dynamodb resource by cloudformation (#2219)
* support to create dynamodb resource by cloudformation
2019-05-25 10:16:33 +01:00
Jon Beilke
cb72d1d00e Feature cloudwatch log retention (#2199)
* add proper retentionInDays to describe_log_groups response and add support for delete_retention_policy() and put_retention_policy() to log groups

* fix for inline comment formatting

* include check for retentionInDays to verify no retention by default in  test_log_group_create
2019-05-25 10:14:23 +01:00
Dan Chan
2a5f7e15a7 Updating redshift.describe_cluster_snapshots to return multiple snapshots for cluster_identifier (#2216) 2019-05-23 09:01:47 +01:00
Ber Zoidberg
1088c421d2 #2212 add support for delete on update_with_attribute_updates (#2213)
* add support for delete on update_with_attribute_updates
2019-05-22 10:47:02 +01:00
Justin Kieber-King
bbd7fefb37 Feature: Secrets Manager put_secret_value and list_secret_version_ids (#2116)
* initial work

- adding put_secret_value and list_secret_versions

* Added support for versions in all functions except rotate_secret

* more work

- refactor rotate_secret method
  - now, adds a new version of the secret and points default version id to it
- updated implementation coverage readme
- element in list check to fix unit test
- fixed linting errors
- added tests, fixed exception, failing tests still
- secrets_manager/test_server fails when running whole suite,
  but not when running that individual test file

* fixed failing test_get_secret_value

* Removed test.py. Fixed condition statement.

* fixed default stages + adding AWSPREVIOUS

* remove old AWSPREVIOUS stages
2019-05-22 10:45:22 +01:00
cm-iwata
8f4c273095 fix #2190 (#2194)
lambda list_versions_by_function return $LATEST version and published version
2019-05-21 17:49:56 +01:00
James Bungard
796dd71c0c Platform independent KMS timestamp generation (#2193)
* Platform independent KMS timestamp generation

Fixes #2192

* Switch to moto.core.unix_time

Fixes #2192
2019-05-21 17:46:22 +01:00
cm-iwata
9bf8fd3417 fix #2011 (#2012)
add support for Scan method using LSI or GSI
2019-05-21 17:45:30 +01:00
Travis Truman
b8ba7980a0 Adding support for specifying a PermissionsBoundary ARN in calls to i… (#2182)
* Adding support for specifying a PermissionsBoundary ARN in calls to iam.create_role

Closes #2181

* Correcting whitespace error

* Adding support for Role PermissionsBoundary to be returned from
calls to list_roles

* Raise ClientError when a bad permissions boundary ARN is supplied
2019-05-21 17:44:05 +01:00
Craig Anderson
33efe07b43 Hide CloudFormation pararamters with NoEcho. Fixes #2021 (#2024) 2019-05-21 00:05:02 +01:00
Alexey Firsov
f13e4e41cd add implemented kinesis method describe_stream_summary (#2023) 2019-05-21 00:02:36 +01:00
Jordan
1de9acb7ad Add cognito-idp admin_update_user_attributes #2184 (#2185) 2019-05-20 23:58:10 +01:00
redspart
1fd71fd45a Updated delete_cluster() for redshift (#2186)
* Updated the deprecated decorator to allow the "SkipFinalClusterSnapshot" option that aws supports.

* FIxed logical mistake on the delete_cluster

* Removed an unused exception I put in
2019-05-20 23:56:23 +01:00
Kyle Decot
8cb4db1896 Adds Support for filtering on schedulingStrategy in ECS#list_services (#2180) 2019-05-02 19:00:28 +01:00
Mike Grima
1cb208580d
Merge pull request #2027 from ralewis85/fix-request-id
Fix sending the Request ID in the response body
2019-04-30 09:34:23 -07:00
shiba24
b822db8d8c Support create_table with PAY_PER_REQUEST billing mode of DynamoDB 2019-04-30 22:36:25 +09:00
Terry Cain
4a286c4bc2
KMS generate_data_key (#2071)
* Added KMS.generate_data_key and KMS.generate_date_key_without_plaintext

Increase test coverage to cover Key not found

* Added test for kms.put_key_policy key not found
2019-04-26 20:52:24 +01:00
Mike Grima
603f7c58a2
Merge pull request #2166 from chriskilding/feature/secretsmanager-restoresecret
Feature: Secrets Manager restore-secret
2019-04-26 09:50:02 -07:00
Christopher Kilding
55fe629112 Feature: Secrets Manager restore-secret 2019-04-24 10:03:04 +01:00
Steve Pulec
88e1f0fa23
Merge pull request #2015 from corrjo/master
#1514 Stackset Support
2019-04-22 19:04:47 -05:00
Mike Grima
2fec1be1a2
Merge pull request #2160 from copland/fix-role-arn-slash
Add test to verify create_role path defaults to /
2019-04-22 09:58:41 -07:00
Chris Opland
dd898add4d Add test verifying create_role path defaults to / 2019-04-21 18:29:36 -05:00
Mike Grima
734a39b3e4
Merge pull request #2162 from cm-iwata/fix_dynamo_query
fix #2161 DyanmoDB query method using GSI with range key
2019-04-19 10:04:04 -07:00
Tomoya Iwata
431269bcd0 fix #2161
mock_dynamodb2 query fails when using GSI with range key if target table has record that have no range key attribute
2019-04-19 12:23:06 +09:00
Chris Kilding
8f21272e57 Use pytz instead of timezone 2019-04-18 17:27:13 +01:00
Chris Kilding
bd8aa341f2 Also throw exception if client tries to RotateSecret on a soft-deleted secret 2019-04-18 16:47:15 +01:00
Chris Kilding
749f4f63e6 Allow soft deletion of secrets 2019-04-18 15:44:48 +01:00
Chris K
fc8cf2d872 Feature: AWS Secrets Manager delete-secret 2019-04-18 10:30:18 +01:00
Mike Grima
97408552a3
Merge pull request #2033 from r1b/feat/cognitoidp-add-update-identity-provider
[cognitoidp] feat: add update_identity_provider
2019-04-17 12:21:45 -07:00
Mike Grima
65525cb611
Merge pull request #2114 from cm-iwata/fix_lambda_publish_version
Fix lambda publish_version returns wrong status code
2019-04-17 11:14:03 -07:00
Mike Grima
5d955985b9
Merge pull request #2106 from andytumelty/iam-update-user
Add support for iam update_user
2019-04-17 11:13:14 -07:00
Mike Grima
51ef03b03b
Merge pull request #2133 from earlrob/add_keyid_to_kms_encrypt_and_decrypt
add KeyId value to kms.responses.encrypt and kms.responses.decrypt
2019-04-17 11:07:00 -07:00
Mike Grima
d8dbc6a49c
Merge pull request #2134 from ogckw/master
Fix #2129 EC2 tag should raise ClientError when resource is empty
2019-04-17 11:05:28 -07:00
Mike Grima
53f101774f
Merge pull request #2137 from devoto13/fix-missing-version-id
Fixed copy-object from unversioned bucket to versioned bucket
2019-04-17 11:04:15 -07:00
Mike Grima
c7dc09345a
Merge pull request #2143 from chriskilding/feature/secretsmanager-listsecrets
Feature: aws secretsmanager list-secrets
2019-04-17 11:03:19 -07:00
Santosh Ananthakrishnan
4f1a1a9d1e [iam] create_policy_version: Fix version id calculation
When creating a new IAM policy version with create_policy_version,
we cannot use the length of the versions list to calculate VersionId.
Keep track of the next version id to use as a non-decreasing counter.

Fixes #2157
2019-04-16 20:15:57 +00:00
Chris K
89e4ab93ee Implement ListSecrets 2019-04-05 13:33:28 +01:00
Yaroslav Admin
b85d21b8fe Fixed copy-object from unversioned bucket to versioned bucket
The response of the copy-object operation was missing VersionId property
when source bucket is not versioned.
2019-04-02 15:30:01 +02:00
Steve Pulec
66dafc6679
Merge pull request #2130 from spulec/bugfix/network-interface-and-private-ip
Add private IP to every NetworkInterface
2019-04-01 15:17:36 -05:00
hsuhans
6b7282f93c Fix #2129 EC2 tag should raise ClientError when resource is empty
Raise MissingParameterError exception in models/validate_resource_ids of ec2.

Add ec2 create tag with empty resource test case.
Add ec2 delete tag with empty resource test case.

Related: #2129

Reference
boto3 create_tags
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.create_tags

boto3 delete_tags
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.delete_tags

Amazon EC2 API Reference Actions CreateTags
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html

Amazon EC2 API Reference Actions DeleteTags
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteTags.html
2019-03-30 23:26:50 +08:00
Earl Robinson
dbdc8925e3 add KeyId value to kms.responses.encrypt and kms.responses.decrypt 2019-03-29 21:07:32 -04:00
Tomoya Iwata
52ad71879d modified test code for python2.7 2019-03-29 15:52:47 +09:00
Tomoya Iwata
7e28fa7bfe Merge branch 'master' into fix_lambda_publish_version 2019-03-29 09:52:47 +09:00
Nick Venenga
d181897ec9
Add proper failure response to describe_clusters 2019-03-28 14:50:48 -04:00
Mike Grima
921b5a3227 Fixing broken tests #2126
- KMS
- S3
- CloudFormation (Thanks kgutwin!)
2019-03-28 10:09:03 -07:00
Hugo Lopes Tavares
7c62f4a75c Add test to CloudFormation and PrimaryPrivateIpAddress GetAtt
This test would raise an error before d4e39146b7
2019-03-27 16:28:18 -04:00
Hugo Lopes Tavares
d4e39146b7 Make sure every NetworkInterface has a private IP
AWS always assigns a primary IP address to Network Interfaces.
Using a test account (modified the IP):

    >>> import boto
    >>> vpc = boto.connect_vpc()
    >>> eni = vpc.create_network_interface(subnet_id)
    >>> eni.private_ip_addresses
    [PrivateIPAddress(10.1.2.3, primary=True)]
2019-03-27 16:27:10 -04:00
Tomoya Iwata
11ff548d14 fix #2113
moto must return Http status code 201 when lambda publish_version has succeeded
2019-03-17 17:54:34 +09:00
Robert Jensen
9ed80f14e8 fix coverage, update IMPLEMENTATION_COVERAGE 2019-03-12 17:52:34 -04:00
Robert Jensen
c7d3e1f8b6 Merge remote-tracking branch 'upstream/master' into feat/cognitoidp-add-update-identity-provider 2019-03-12 17:37:07 -04:00
Andy Tumelty
d53626ad9a Add support for iam update_user
This covers both the NewPath and NewUserName parameters for update_user, but
without regex validation for these values.
2019-03-12 17:23:32 +00:00
Mike Grima
6ecb840c61
Merge pull request #2100 from gilbsgilbs/non-versioned-bucket-consitency
[S3] Support null version ids for buckets with versioning disabled
2019-03-11 14:13:26 -07:00
Mike Grima
53b94606de
Merge pull request #2103 from mikegrima/config
Fixed validation bugs in put_configuration_recorder
2019-03-11 13:58:54 -07:00
Mike Grima
87a54b9d81
Merge pull request #2077 from markchalloner/mark-route53-upsert-type
Check record type when upserting.
2019-03-11 13:50:37 -07:00
Mike Grima
6d67418c41 Fixed validation bugs in put_configuration_recorder 2019-03-11 13:25:36 -07:00
Gilbert Gilb's
dedb53371e [S3] Support null version ids for buckets with versioning disabled 2019-03-09 10:21:49 +01:00
stephane soulier
fa3fd729d1 fix bug in Stream init (wrong number of shards) 2019-03-08 16:27:24 +01:00
Tay Frost
15b3ede3cc Add test for case where ebs volume has no tags.
This commit adds a test for a case where an EBS volume has no tags. When
an EBS volume has no tags, calls to the aws ec2 endpoints `create_volume`
and `describe_volumes` do not include the `Tags` key in the
`response.Volumes[]` object.

However, moto does include the `Tags` key in this case. This discrepancy
in behaviour can result in code passing a moto test but failing in
production.

Sample snippets that trigger this condition:

```
def create_volume_and_then_get_tags_from_response():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    keys = volume_response['Keys']
```

```
def create_volume_and_then_get_tags_from_describe_volumes():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    volume_describe_response = client.describe_volumes()
    keys = volume_describe_response['Volumes'][0]['Keys']
```

Both sample snippets will succeed in a moto test, but fail with a
`KeyError` when using the aws api.
2019-03-07 17:25:18 -05:00
Mike Grima
7eaf6bf595
Merge pull request #2062 from domtes/fix_copy_key_with_unicode
Fixing S3 copy_key error when using unicode.
2019-03-04 11:48:46 -08:00
Mike Grima
bc116ab750 Basic AWS Config service support. 2019-03-02 18:37:20 -08:00
Mark Challoner
d61ce0584b
Check record type when upserting.
Previously this was not checked so an existing record (e.g. with type A) would be overwritten on upsert by a record with the same name but different type (e.g. TXT).

This commit also:

* publicizes the type variable appending the underscore affix (required to maintain compatibility with CloudFormation which sets type as the CF type),
* fixes a wrong assumption in tests that UPSERT applies a change to Type (it creates a distinct record instead),
* Updates ACM model to use serial_number instead of deprecated and remove serial causing Travis failures.
2019-03-01 16:44:50 +00:00
Mike Grima
09855801ba
Merge pull request #2019 from acsbendi/launch_index
Correctly returning ami launch index
2019-02-25 12:16:40 -08:00
Mike Grima
3920f0e16b
Merge pull request #2060 from gregsterin/better-support-for-ddb-expressions
support a bit more of the dynamoDB ConditionExpression syntax
2019-02-25 10:03:02 -08:00
Berislav Kovacki
7e863b0260 Add attributes parameter support for sns create_topic API 2019-02-21 22:08:46 +01:00
William Rubel
e9d8021c86 Fixing list entities for policy 2019-02-18 21:20:29 -06:00
William Rubel
37845e41a6 Trying to improve coverage 2019-02-18 09:44:48 -06:00
William Rubel
c46bc9ae83 Trying to improve coverage 2019-02-18 09:15:07 -06:00
William Rubel
e229d248ad Trying to improve coverage 2019-02-18 08:52:37 -06:00
William Rubel
8048e39dc0 Fix policy date 2019-02-17 22:32:39 -06:00
William Rubel
ce7b5ebf54 Fix policy date 2019-02-17 21:37:33 -06:00
William Rubel
37a765db8d Fix policy date 2019-02-17 17:12:27 -06:00
William Rubel
0e73cddf2f Add test for roles 2019-02-17 16:25:49 -06:00
William Rubel
6e7bd088b3 Add test for roles 2019-02-17 16:04:28 -06:00
William Rubel
31258e9e9e Add test for roles 2019-02-17 15:23:59 -06:00
William Rubel
37cb5ab4e6 Add test for roles 2019-02-17 14:36:53 -06:00
William Rubel
921a993330 cleaning up files 2019-02-17 14:30:43 -06:00
William Rubel
e35d99ff09 Trying to improve coverage 2019-02-17 09:25:35 -06:00
William Rubel
8ad28f8400 Adding additional tests to increase coverage 2019-02-16 20:53:27 -06:00
William Rubel
5372e6840f Increasing code coverage 2019-02-16 12:37:46 -06:00
Domenico Testa
6897a118ed Fixing S3 copy_key error when using unicode. 2019-02-16 16:42:00 +01:00
William Rubel
4c6f08d463 Update kms and lambda to work with terraform 2019-02-16 09:27:23 -06:00
Greg Sterin
f035b9613d support a bit more of the dynamoDB ConditionExpression syntax 2019-02-14 18:10:01 -08:00
John Corrales
a6f7f06c30
Merge branch 'master' into master 2019-02-11 17:51:18 -08:00
Mike Grima
94672799cf Fixed a bug in get_account_authorization_details for attached managed policies.
Fixed a bug in the XML template for `get_account_authorization_details` where attached managed policies
were empty strings.
2019-02-07 17:32:31 -08:00
Mike Grima
f41c4e756f
Merge pull request #2041 from mikegrima/roletags
IAM Role Tagging support
2019-02-06 11:40:59 -08:00
Mike Grima
dfceab9bf0 Some fixes to get_account_authorization_details 2019-02-04 13:44:01 -08:00
Mike Grima
142fc65260
Merge pull request #2014 from garyd203/dynamodb-set-comparison
Make EQ conditions on sets work reliably in DynamoDB
2019-02-01 11:49:48 -08:00
Mike Grima
d652755f3b
Merge pull request #2032 from drmorr0/spot_fleet_tag_specifications
tag specifications for spot fleet requests
2019-02-01 11:47:36 -08:00
Mike Grima
8d17271ee4
Merge pull request #2028 from acsbendi/network-acl-fixes
Network ACL fixes
2019-02-01 11:46:25 -08:00
Mike Grima
1a36c0c377 IAM Role Tagging support 2019-01-31 17:37:26 -08:00
Robert C Jensen
73bd3e1c77 [cognitoidp] feat: add update_identity_provider 2019-01-24 20:39:55 -05:00
David Morrison
b4b63202d9 tag specifications for spot fleet requests 2019-01-24 11:38:07 -08:00
Mark Challoner
337601b5fb
Add CloudFormation methods delete_change_set, describe_change_set and list_change_sets. 2019-01-21 17:18:50 +00:00
acsbendi
68b8e6b636 Implemented adding default entries to default network ACLs. 2019-01-21 15:36:49 +01:00
acsbendi
3c5ce6c09e Fixed new subnets associated with a network ACL from a different VPC. 2019-01-21 13:30:22 +01:00
Robert Lewis
570b73691b Add requestid checking for autoscaling 2019-01-20 22:54:05 -08:00
Robert Lewis
acdb1c9768 Add requestid checking for sqs 2019-01-20 22:54:05 -08:00
acsbendi
6bd7e5941f Added test case for running multiple instances in the same command. 2019-01-15 17:34:22 +01:00
John Corrales
5fb43ee7b6
Operations (#4)
Added stop, list operation results, and describe operation
2019-01-14 22:01:53 -08:00
Adrian Galera
75812eb838 Enable SES feedback via SNS 2019-01-11 13:22:33 +01:00
John Corrales
4207a8e182
Add stacksets (#3)
Added most stack set responses
2019-01-10 21:33:15 -08:00
Gary Donovan
0b15bb13b6 Make EQ conditions work reliably in DynamoDB.
The AWS API represents a set object as a list of values. Internally
moto also represents a set as a list. This means that when we do value
comparisons, the order of the values can cause a set equality test to
fail.
2019-01-10 21:39:12 +11:00
Steve Pulec
850496f29a
Merge pull request #2005 from fivepapertigers/feature/lambda-env-mapping
Lambda Cloudformation Env Variables
2019-01-06 17:22:52 -05:00
Steve Pulec
c2a1f4eb14 Fix S3 bucket location test. 2018-12-29 07:07:29 -05:00
Steve Pulec
1f9ade61c0 Fix iam SAML tests. 2018-12-29 06:47:16 -05:00
Jacob Grismo
4f7d6e15c9 adds failing test case for lambda cfm env vars
Adds a failing test case that shows that a Lambda function resource in a CloudFormation template ignores
the Environment variable mapping.
2018-12-28 22:16:07 -05:00
Steve Pulec
97d9d46770
Merge pull request #1999 from dargueta/s3-spooling
Don't store S3 entirely in memory
2018-12-28 21:29:19 -05:00
Steve Pulec
e8551988d9
Merge pull request #2000 from AlanAlexander-Janrain/master
Updating the list of urls the SSM moto will match to include china
2018-12-28 21:27:45 -05:00
Steve Pulec
d685a9f50a
Merge pull request #1892 from drewpearce/dynamodb-ne
Dynamodb ne
2018-12-28 21:23:01 -05:00
Steve Pulec
93f68090e3
Merge pull request #1989 from jrbeilke/bugfix-ec2_ami_is-public
Bugfix for filtering EC2 AMIs with is-public (values should be lowercase)
2018-12-28 21:22:28 -05:00
Steve Pulec
dec665be43
Merge pull request #1986 from okomestudio/ts/fix-s3-common-prefix-pagination
Activate proper pagination for S3 common prefixes
2018-12-28 21:22:07 -05:00
Steve Pulec
302744242a
Merge pull request #1983 from kawaiwanyelp/autoscaling-instance-protection
Add instance protection support in autoscaling, with tests
2018-12-28 21:18:41 -05:00
Steve Pulec
25595815e5
Merge pull request #1972 from surfaslt/implement-get-access-key-last-used
Implement get_access_key_last_used
2018-12-28 21:08:13 -05:00
Steve Pulec
5d172d9c97
Merge pull request #1969 from grahamlyons/list-deleted-cloudformation-stacks
Return the deleted stacks in the list stacks call
2018-12-28 21:07:06 -05:00
Steve Pulec
e681f55ba1
Merge branch 'master' into bucket-name-length-limit 2018-12-28 21:04:10 -05:00
Steve Pulec
860dfbbe11
Merge pull request #1960 from tatsuyafw/add-trailing-dot-to-resource-record
Add a trailing dot to the Name of Route53 ResourceRecordSet
2018-12-28 21:01:35 -05:00
Steve Pulec
65364a8e71
Merge pull request #1961 from gbataille/fix_1959_location_constraint_us_east_1
Fix 1959 location constraint us east 1
2018-12-28 21:00:29 -05:00
Steve Pulec
46bf7f0176
Merge branch 'master' into master 2018-12-28 20:57:47 -05:00
Steve Pulec
39c103ec0b
Merge branch 'master' into master 2018-12-28 20:49:24 -05:00
Steve Pulec
f155028d27
Merge pull request #1945 from markchalloner/vpc-peering-delete-fix
Set deleted status on vpc peer deletion.
2018-12-28 20:40:51 -05:00
Steve Pulec
8ba1a09c0d
Merge pull request #1921 from adamdavis40208/cloudformation-validate-spike
Adding cloudformation-validate. Cfn-lint does the heavy lifting.
2018-12-28 20:39:00 -05:00
Steve Pulec
f82d4bb619
Merge pull request #1938 from kgutwin/i-1937-dynamodb2-update-attributes
Correct behavior of ReturnValues parameter to put_item and update_item
2018-12-28 20:36:00 -05:00
Steve Pulec
48ee867245
Merge pull request #1935 from kgutwin/i-1875-dynamodb-streams
Support DynamoDB Streams
2018-12-28 20:30:58 -05:00
Steve Pulec
19bdf7de73
Merge pull request #1901 from cm-iwata/add_iot_attach_policy
Add support for IoT attach_policy
2018-12-28 20:17:31 -05:00
Steve Pulec
c8a35f0b02
Merge pull request #1920 from pall-valmundsson/iam_credential_report_boto3
Support IAM Credential Report in boto3
2018-12-28 20:04:59 -05:00
Steve Pulec
77bf143f80
Merge pull request #1906 from jrstarke/1009
Support full ARN in update_container_instance_state calls
2018-12-28 19:57:57 -05:00
Steve Pulec
643c498d01
Merge pull request #1911 from markchalloner/cf-create-change-sets-tags-fix
Fix Tags parameter on CloudFormation create_change_set method.
2018-12-28 19:55:36 -05:00
Steve Pulec
a62f15b537
Merge pull request #1730 from garyd203/cognitoidp-groups
Implement groups for cognito-idp
2018-12-28 19:53:53 -05:00
Steve Pulec
811197a9bb
Merge pull request #1913 from cm-iwata/add_iot_delete_validation
Fix #1908 add some validation for IoT delete operations
2018-12-28 19:52:24 -05:00
Steve Pulec
1244ce53e2
Merge pull request #1898 from sepulworld/zmw/refactor_multiple_secrets
Refactor to store multiple scrects, use uuid, tags support
2018-12-28 19:47:49 -05:00
Steve Pulec
bdb000b0e2
Merge pull request #1897 from georgealton/feature/add_max_results_and_next_token_to_cognito_lists
Adds limiting/pagination to cognitoidp list_* functions
2018-12-28 19:44:21 -05:00
Steve Pulec
745d46114f
Merge pull request #1887 from mikegrima/instanceprofiles
IAM Improvements
2018-12-28 19:30:20 -05:00
zane
08d17a7a13 adding Tags support 2018-12-21 14:04:52 -08:00
Diego Argueta
1998d59cfc Add more tests to please Coveralls 2018-12-20 11:40:13 -08:00
Diego Argueta
191ad6d778 Make keys pickleable 2018-12-20 11:15:15 -08:00
Alan Alexander
36b0117eec Updating the list of urls the SSM moto will match to include china 2018-12-19 15:02:36 -08:00
Diego Argueta
2cc8784e5c Restore files modified in non-working fix. 2018-12-18 14:53:52 -08:00
Diego Argueta
b0a280bde2 Move S3 storage to SpooledTemporaryFile 2018-12-18 14:20:48 -08:00
Jon Beilke
a744adbcc5 AWS is case-sensitive when using is-public to filter for AMIs and expects lower-case values 2018-12-06 12:18:59 -06:00
Taro Sato
2038fa92be Activate proper pagination for S3 common prefixes 2018-12-05 16:17:28 -08:00
martynaspaulikas
9418a6916d Fix tests and functionality of get_access_key_last_used() 2018-11-27 16:12:41 +00:00
Craig Anderson
96ed66c08d
Add AllowedPattern to SSM describe_parameters response (#1955) 2018-11-27 15:31:56 +00:00
martynaspaulikas
7189d019df Implemented get_access_key_last_used
Written test that still does not work due to:
    ParamValidationError: Parameter validation failed:
    Unknown parameter in input: "UserName", must be one of: AccessKeyId
Refactored update_access_key and delete_access_key functions
2018-11-27 11:28:09 +00:00
grahamlyons
4de92accab
Fix existing tests which use list_stacks
The tests are expecting that deleted stacks are not listed when in
fact they should be.
2018-11-27 11:11:13 +00:00
grahamlyons
2d554cd098
Return the deleted stacks in the list stacks call
This matches the behaviour of the AWS API.
2018-11-26 23:58:41 +00:00
Jon Michaelchuck
009b02bcd5 Raise a client error if PutBucketTags request contains duplicate keys
A PutBucketTags request with duplicate keys will raise a ClientError
with code InvalidTag and message 'Cannot provide multiple Tags with the
same key'.
2018-11-26 15:56:46 -08:00
Ka Wai Wan
df2120f38c Add instance protection support in autoscaling, with tests 2018-11-24 02:32:53 -08:00
Jon Michaelchuck
fb7e52becc Check bucket name length at CreateBucket
Check that s3 bucket names follow the documented length restriction:

'Bucket names must be at least 3 and no more than 63 characters long.'

See https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html
2018-11-22 06:08:03 -06:00
Grégory Bataille
b0eb7b263e test(#1959): us-east-1 located bucket should return a None LocationConstraint 2018-11-20 19:42:51 +01:00
Grégory Bataille
9291ff533a test(#1959): LocationConstraint us-east-1 should be refused 2018-11-20 18:56:56 +01:00
Tatsuya Hoshino
293b25a8f9 Add a missing trailing dot to the Name of ResourceRecordSet
AWS Route53 treats www.example.com (without a trailing dot)
and www.example.com. (with a trailing dot) as identical.
Hence, after creating a `www.example.com` record,
`www.example.com.` name is saved in Route53.
But moto treated `www.example.com` and `www.example.com.` as different.

This commit fixes the moto behavior.
2018-11-20 21:43:59 +09:00
Joe Engel
57fa11136b Add functionalities for SAML Providers 2018-11-19 15:53:02 -08:00
Mark Challoner
6e6f23a1b0
Set deleted status on vpc peer deletion. 2018-11-14 14:48:57 +00:00
Karl Gutwin
2ec32c80f7 Merge in functionality from #1899 2018-11-09 13:21:38 -05:00
Karl Gutwin
770ad1db56 Correct behavior of ReturnValues parameter to put_item and update_item 2018-11-08 16:21:06 -05:00
Karl Gutwin
e7b01292e9 Fix test failures in server mode 2018-11-08 13:57:44 -05:00
Karl Gutwin
9d190aa04e Tweak functionality and add tests 2018-11-08 13:22:24 -05:00
Karl Gutwin
0f6086f708 Finalize implementation of DynamoDB Streams 2018-11-08 10:54:54 -05:00
Karl Gutwin
519899f74f Much of the way towards complete DynamoDB Streams implementation 2018-11-07 17:10:00 -05:00
Karl Gutwin
0b57ffe26a Add StreamSpecification to dynamodb2 package 2018-11-07 15:03:25 -05:00
Tomoya Iwata
e52158f811 Add support for IoT detach_policy 2018-11-06 17:15:30 +09:00
adam davis
b66965e6e8 Adding cloudformation-validate. Cfn-lint does the heavy lifting. 2018-11-05 15:16:32 -08:00