* fix sqs tag list from cloudformation resource creation
the method `create_from_cloudformation_json` of the Sqs resource
does not handle the difference of format of the Tags field in the
resource template and the format expected in Sqs resource class.
In cfn resource template Tags is specified as a list of dicts. But
the Sqs resource expects that the tags field be a single dict.
This behaviour causes a crash when a queue is created with tags
from `create_from_cloudformation_json` and later the list_queue_tags
is called because it tries to call `items` from `queue.tags` but
tags is actually a list of dicts.
* fix comment
* fix linter
* minor
Co-authored-by: Hudo Assenco <hudo.assenco@gmail.com>
* Fixed defect with CloudFormation provisioning of S3 buckets occuring when stack has a long name, resulting in the default S3 bucket name's length exceeding its 63 char limit.
* PR 3169 July 23, 2020 2:57a ET comment: added additional asserts to assure provisioned bucket's name complies. Fixed bug in my earlier change that could produce default bucket names with illegal upper-case characters in it.
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
* Enforce parameter naming
Parameters are not allowed to start with `ssm` or `aws`. This commit adds error messages which
correspond exactly to the error messages returned by boto3.
* Fix for Python 2 compatibility
f-strings not supported in Python 2.7
* 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
* 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
* 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>
* 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>
* 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
* 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>
* 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