Skip to content

Commit

Permalink
add flag.parse for assume role (awsdocs#2356)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangli1030 authored Nov 9, 2021
1 parent 6236ad2 commit 1fcf7ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gov2/sts/AssumeRole/AssumeRolev2.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TakeRole(c context.Context, api STSAssumeRoleAPI, input *sts.AssumeRoleInpu
func main() {
roleARN := flag.String("r", "", "The Amazon Resource Name (ARN) of the role to assume")
sessionName := flag.String("s", "", "The name of the session")
flag.Parse()

if *roleARN == "" || *sessionName == "" {
fmt.Println("You must supply a role ARN and session name")
Expand Down

0 comments on commit 1fcf7ab

Please sign in to comment.