Commit Graph

93 Commits

Author SHA1 Message Date
Bert Blommers
a32b721c79
Techdebt: MyPy SSM (#6250) 2023-04-24 10:26:25 +00:00
Bert Blommers
28f3f84644
SSM: Allow filtering by existence of tag-name (#6238) 2023-04-20 21:12:43 +00:00
Bert Blommers
f6ead48401
SSM: Include default parameters at /aws/service/ecs/optimized-ami (#6008) 2023-03-04 11:36:00 -01:00
Bert Blommers
c4f99f3102
Techdebt: SSM: Specific param may not exist on the first page (#5995) 2023-02-27 22:06:19 -01:00
Bert Blommers
651722689f
Admin: Improve automatic resource updates (#5988) 2023-02-26 18:44:04 -01:00
Matthew Davis
5d2f2bca8c
SSM param type validation (#5835) 2023-01-12 11:06:40 -01:00
Bert Blommers
6654f6ee9a
SSM: Improve tag filtering (#5752) 2022-12-10 21:36:09 -01:00
Bert Blommers
b4f0fb7137
Prepare release 4.0.11 (#5724) 2022-11-30 20:09:37 -01:00
Bert Blommers
1a8ddc0f2b
Techdebt: Replace string-format with f-strings (for tests dirs) (#5678) 2022-11-17 21:41:08 -01:00
Bert Blommers
b176feb540
SSM: now returns DeliveryTimedOutCount-attr (#5502) 2022-09-28 21:03:14 +00:00
Bert Blommers
0dfb61fbcf
SSM - bootstrap /aws/service/ami-amazon-linux-latest parameters (#5427) 2022-08-28 22:30:11 +00:00
Bert Blommers
3d913f8f15
MultiAccount support (#5192) 2022-08-13 09:49:43 +00:00
Bert Blommers
749b543b7c
SSM - Integrate with SecretsManager (#5117) 2022-05-10 22:32:49 +00:00
Bert Blommers
eed32a5f72
Pylint - Enable more rules on source and tests-directory (#4929) 2022-03-11 20:28:45 -01:00
Bert Blommers
29d01c35bc
Update Black + formatting (#4926) 2022-03-10 13:39:59 -01:00
Bert Blommers
155f9f20eb
SSM - load global parameters (#3953) 2022-02-12 12:59:15 -01:00
Bert Blommers
db0738025a
SSM - Maintenance Windows (#4549) 2021-11-09 21:28:24 -01:00
Dominik Schubert
78709ce22c
feat(SSM): add support for Label filter in get_parameters_by_path (#4542) 2021-11-08 21:58:11 -01:00
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Jim King
33e60a2d16
[issue-4360] Fix InvalidResource Id,Type responses for ssm tagging methods (#4361) 2021-09-30 11:47:11 +00:00
Jim King
f50cf51de7
[issue-4283] ssm put_parameter with tags and overwrite should error (#4362) 2021-09-30 10:58:04 +00:00
Gonzalo Saad
e6c6ce5942
refactor(ssm): Refactor document permisisons and conditions (#4243) 2021-09-08 06:56:20 +01:00
Julian
58da62cc71
enhancement(SSM): Add DataType attribute to SSM Parameters (#4232) 2021-08-29 17:28:51 +01:00
Bert Blommers
020257904e
Tech Debt - improve test coverage (#4229) 2021-08-27 11:28:10 +01:00
Gonzalo Saad
29b0122fac
feat(ssm): Add ssm documents permissions (#4217)
* refactor(ssm): Add Documents class to avoid dictionary handling
This also solves the datetime format issue in TestAccAWSCloudWatchEventTarget_ssmDocument
2021-08-25 15:16:14 +01:00
Bert Blommers
76094f012b
Remove pkg_resources module (#4142) 2021-08-05 17:59:25 +01:00
Bert Blommers
5e4bccc22d
Use centralized ACCOUNT_ID (#4029) 2021-06-23 18:03:11 +01:00
Kyle Decot
8d4007f2b6
Escape Hyphen in Regular Expression (#4006)
* Escape Hyphen in Regular Expression

* Add Test

* Fix Linting Errors

* Use Pytest Parameterize Marker

* Fix Black Formatting Errors

* Interpolate / Use Raw String

* fixes string formatting

Co-authored-by: Correna Sprowls <correna.sprowls@joinroot.com>
2021-06-11 21:54:43 +01:00
Austin Hendrix
5602c4e73e
SSM Parameter Store improvements in GetParameterHistory & GetParameters (#3984)
* Including labels and versions in SSM Get Parameters

* implementing NextToken and MaxResults into the SSM Get Parameter History functionality

* Implementing unit tests and some lint refactoring for NextToken implementation in get_parameter_history
2021-06-04 11:12:35 +01:00
Austin Hendrix
b670962c5e
SSM Parameter Store Error Message When Requesting Invalid Version (#3977)
* Implement correct error when requesting specific version of a parameter which exists but does not have this version

* removing trailing whitespace causing lint failure

* Adding unit tests and fixing linting for new error handling

* Fixing small bug in response message

* Revert change in get_parameters as versioning is not currently implemented in this method. Will fix as a separate PR
2021-06-02 16:27:23 +01:00
Brian Pandola
7947b1e001
Enforce SSM Parameter Version Limit (#3967)
Behavior verified against a real AWS backend.
2021-05-28 08:32:39 +01:00
usmangani1
58fd4aeaae
Fix tags for resource in ListTagsForResource (#3931)
* Fix tags for resource in ListTagsForResource

* Fix review comments

* Fix tests
2021-05-14 20:05:40 +01:00
Tom Noble
a001c59f7e
Modify SSM put_parameter() to raise ValidationException if value is empty string (#3806)
* Modify put_parameter() to raise ValidationError when value is empty string

* Simplify empty string check

Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-03-28 14:45:57 +01:00
Joakim Saario
457402fbe2
Support SSM Parameter tags (#3739) 2021-03-02 09:00:26 +00:00
Brian Pandola
f4b81e69b8
Address pytest warnings (#3629)
* Address `boto` deprecation warnings

This commit eliminates the following warning:

../boto/ec2/connection.py:582:
  PendingDeprecationWarning: The current get_all_instances implementation will be replaced with get_all_reservations.

`boto` isn't likely to ever make good on this warning, but doing the replacement will
declutter the `moto` test output.

* Remove `invoke_lambda` tracebacks from unit test logging

If an exception is encountered, the details are returned in the response payload.
Printing the traceback was just adding noise to the pytest output.

* Use known AMIs in unit tests

This commit eliminates the following warning in the pytest output:

`PendingDeprecationWarning: Could not find AMI with image-id:ami-123456, in the near future this will cause an error.`

Known, pre-loaded AMI image ids are used instead of random ids that don't actually
exist in the moto backend.  The integrity of the tests is unaffected by this change.

A test has been added to provide explicit coverage of the PendingDeprecationWarning
raised when an invalid AMI image id is passed to moto.
2021-01-29 11:31:56 +00:00
Brian Pandola
cd25ab7a16
Fix: broken build with release of botocore 1.19.62 (#3628)
The latest release of `botocore` (1.19.62) makes changes to the parameter
validation code, which for some reason was also covered by a couple of
`moto` tests.

These tests, when run, do not execute any `moto` code.  They fail the
parameter validation check in `botocore`, which raises an exception
before ever sending a request.  These tests do not cover or verify
any `moto` behavior and have been removed.

Ref: ff8ae76ecc

Closes #3627
2021-01-29 09:06:25 +00:00
Bert Blommers
8591eda9d6
Introduce Github Actions to replace TravisCI (#3610) 2021-01-26 12:37:03 +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
Brian Pandola
3b9635b3c7 Add ssm:SendCommand support for instance tag Targets
Replace the special-case code to handle Cloud Formation tags with a more
generic implementation that covers all instance tags.

Supersedes #2863
Closes #2862
2020-11-08 00:06:35 -08:00
Bert Blommers
db1d7123f6 List dependencies for services - add integration test to verify 2020-09-13 16:08:23 +01:00
Ninh Khong
ff1f565142
Enhance function get_parameter by parameter name, version or labels (#3191)
Co-authored-by: Ninh Khong <ninh@1on1english.vn>
2020-07-28 16:59:22 +01:00
Jordan Reiter
28d1d762af
Enforce parameter naming (#3190)
* 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
2020-07-28 15:26:59 +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
Alex Bainbridge
c1326ed8cc removed done comments 2020-07-03 13:25:03 -04:00
Alex Bainbridge
487829810f passes python3 and 2.7. added additional few tests for coverage bump 2020-07-02 13:43:14 -04:00
Alex Bainbridge
c9b38e25b8 black linting 2020-06-30 12:43:42 -04:00
Alex Bainbridge
82825787db all tests passing 2020-06-30 12:39:52 -04:00