aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.6k stars 4.14k forks source link

Add support to shorthand syntax for loading parameters from files #9063

Closed aemous closed 2 weeks ago

aemous commented 2 weeks ago

Description of changes:

Description of tests:

Usage Example: For example, suppose there is a file named tagval.txt located at path/to/tagval.txt on the host machine with contents TagValue.

aws codecommit tag-resource --resource-arn <RESOURCE_ARN> --tags TagKey@=file://path/to/tagval.txt

The above command will parse the tags parameter as "tags": {"TagKey": "TagValue"}}. Notice the need for the assignment operator @=. This operator is required to prevent breaking existing customers that may be using a nested parameter value that happens to start with file:// already.

Relevant Links:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 0.08%. Comparing base (cdea504) to head (f21aa57). Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
awscli/shorthand.py 0.00% 26 Missing :warning:
awscli/paramfile.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #9063 +/- ## ========================================== - Coverage 0.08% 0.08% -0.01% ========================================== Files 210 210 Lines 16955 16977 +22 ========================================== Hits 14 14 - Misses 16941 16963 +22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.