Skip to content

[v2] Add ability to get values from properties in subsections#10112

Open
kdaily wants to merge 9 commits intofeature-configure-subsectionsfrom
add-configure-get-subsections
Open

[v2] Add ability to get values from properties in subsections#10112
kdaily wants to merge 9 commits intofeature-configure-subsectionsfrom
add-configure-get-subsections

Conversation

@kdaily
Copy link
Member

@kdaily kdaily commented Feb 27, 2026

Issue #, if available:

Continuation of #10109.

Description of changes:

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. Following is the generic pattern for the aws configure get command:

aws configure get
  --<sub-section-type> <sub-section-name> \
  <property>

For example, the following command should get the property sso_region from the sso-session sub-section named my-sso-session:

aws configure get --sso-session my-sso-session sso_region 

Following is an example getting a nested property in a sub-section:

aws configure get \
  --<sub-section-type> <sub-section-name> \
  <nested-section>.<property>

The only sub-section types allowed are services and sso-session.

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

@AndrewAsseily AndrewAsseily requested a review from ashovlin March 2, 2026 19:44
Copy link
Member

@ashovlin ashovlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add an example or two for get?

@kdaily
Copy link
Member Author

kdaily commented Mar 17, 2026

Could we also add an example or two for get?

Addressed in 401de0f

@kdaily kdaily requested a review from ashovlin March 17, 2026 19:23
@kdaily kdaily marked this pull request as draft March 17, 2026 19:25
kdaily added 6 commits March 18, 2026 09:31
Rename and add more test cases to cover non-exsistent subsections and nested properties.
A missing case, adding it for consistency with test for a non-existent sub-section.
These are better tested with functional tests.
@kdaily kdaily force-pushed the add-configure-get-subsections branch from 43c73ba to f6070c9 Compare March 18, 2026 20:00
@kdaily kdaily force-pushed the add-configure-get-subsections branch from 6cf3711 to 1265410 Compare March 18, 2026 20:16
@kdaily kdaily force-pushed the add-configure-get-subsections branch from 1265410 to 945b158 Compare March 18, 2026 20:17
@kdaily kdaily marked this pull request as ready for review March 18, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants