Skip to content

feat: extend commands coverage & add request wait for approval#2

Merged
MatteoManzoni merged 1 commit intomainfrom
feat/extend_commands_coverage_wait
Mar 24, 2026
Merged

feat: extend commands coverage & add request wait for approval#2
MatteoManzoni merged 1 commit intomainfrom
feat/extend_commands_coverage_wait

Conversation

@MatteoManzoni
Copy link
Copy Markdown
Contributor

Summary

Completes the request lifecycle by adding the missing operations from the AWS TEAM API:

  • team reject <id> — approver rejects a pending request
  • team revoke <id> — requester or approver revokes an active session (approved/scheduled/in progress)
  • team cancel <id> — requester cancels their own pending request
  • team pending — lists requests awaiting the current user's approval (uses the requestByApproverAndStatus GSI)
  • team request --wait — blocks until the request reaches a terminal state, with configurable timeout (--wait-timeout, default 600s)

--wait behavior

Designed for scripting and wrapper tools. Polls the request status every 5 seconds, prints progress to stderr, and exits with:

Exit code Meaning
0 approved / in progress
1 rejected, cancelled, expired, or error
2 timeout

When stdout is not a TTY (piped), outputs the final request state as JSON. Tokens are refreshed automatically during long waits.

@MatteoManzoni MatteoManzoni self-assigned this Mar 24, 2026
@MatteoManzoni MatteoManzoni requested a review from a team as a code owner March 24, 2026 11:41
@MatteoManzoni MatteoManzoni merged commit 372f463 into main Mar 24, 2026
1 check passed
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.

2 participants