File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
"github.com/null93/aws-knox/sdk/credentials"
10
10
"github.com/null93/aws-knox/sdk/tui"
11
+ "github.com/null93/aws-knox/pkg/color"
12
+ . "github.com/null93/aws-knox/sdk/style"
11
13
"github.com/spf13/cobra"
12
14
)
13
15
@@ -83,6 +85,17 @@ var connectCmd = &cobra.Command{
83
85
continue
84
86
}
85
87
}
88
+
89
+ yellow := color .ToForeground (YellowColor ).Decorator ()
90
+ gray := color .ToForeground (LightGrayColor ).Decorator ()
91
+ title := TitleStyle .Decorator ()
92
+ DefaultStyle .Printfln ("" )
93
+ DefaultStyle .Printfln ("%s %s" , title ("SSO Session: " ), gray (role .SessionName ))
94
+ DefaultStyle .Printfln ("%s %s" , title ("Region: " ), gray (role .Region ))
95
+ DefaultStyle .Printfln ("%s %s" , title ("Account ID: " ), gray (role .AccountId ))
96
+ DefaultStyle .Printfln ("%s %s" , title ("Role Name: " ), gray (role .Name ))
97
+ DefaultStyle .Printfln ("%s %s" , title ("Instance ID: " ), yellow (instanceId ))
98
+
86
99
details , err := role .StartSession (instanceId , connectUid )
87
100
if err != nil {
88
101
ExitWithError (20 , "failed to start ssm session" , err )
You can’t perform that action at this time.
0 commit comments