Configure subsections in the shared configuration file#10174
Closed
kdaily wants to merge 3 commits intoaws:developfrom
Closed
Configure subsections in the shared configuration file#10174kdaily wants to merge 3 commits intoaws:developfrom
kdaily wants to merge 3 commits intoaws:developfrom
Conversation
This is a port of the following CLI v2 PR: aws#10112 This change adds new parameters to the `aws configure get` command to specify a sub-section for getting the value of a property. These parameters are analogous to the existing `--profile` parameter. A parameter will be added for each sub-section type and take a value of the subsection name.
This is a port of the following v2 PR: aws#10109 This change adds new parameters to the `aws configure set` command to specify a sub-section for setting a property. These parameters are analogous to the existing `--profile`` parameter. A parameter will be added for each sub-section type and take a value of the subsection name. The only sub-section types allowed are services and sso-session. The differences here from v2 are: - Define `get_section_header` and update `profile_to_section` to use it in `__init__.py` - CLI v1 doesn't have return codes of 252, so use 255 in tests.
kdaily
commented
Mar 30, 2026
Comment on lines
+56
to
+58
| if profile_name == 'default': | ||
| return profile_name | ||
| return get_section_header('profile', profile_name) |
Member
Author
There was a problem hiding this comment.
Need to check if this behavior is appropriate for CLI v1.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10174 +/- ##
===========================================
+ Coverage 93.39% 93.42% +0.03%
===========================================
Files 210 210
Lines 17052 17270 +218
===========================================
+ Hits 15925 16135 +210
- Misses 1127 1135 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kdaily
commented
Mar 31, 2026
| # A map between the command line parameter name and the name used | ||
| # in the full config object. | ||
| SUBSECTION_TYPE_ALLOWLIST = { | ||
| 'sso-session': {"full_config_name": "sso_sessions"}, |
Member
Author
There was a problem hiding this comment.
Should we remove this, since SSO sessions are only supported in CLI v2?
kdaily
commented
Mar 31, 2026
| 'action': 'store', | ||
| 'cli_type_name': 'string', 'positional_arg': True}, | ||
| { | ||
| 'name': 'sso-session', |
Member
Author
There was a problem hiding this comment.
Remove since SSO sessions aren't supported?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
This is a port of the CLI v2 PR #10172.
See the commit messages detailing the changes and differences between the CLI v2 PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.