@@ -24,36 +24,41 @@ func (r raw) Unmarshal(bytes []byte) error {
24
24
}
25
25
26
26
type BXConfigData struct {
27
- APIEndpoint string
28
- IsPrivate bool
29
- IsAccessFromVPC bool
30
- ConsoleEndpoint string
31
- ConsolePrivateEndpoint string
32
- ConsolePrivateVPCEndpoint string
33
- CloudType string
34
- CloudName string
35
- CRIType string
36
- Region string
37
- RegionID string
38
- IAMEndpoint string
39
- IAMPrivateEndpoint string
40
- IAMPrivateVPCEndpoint string
41
- IAMToken string
42
- IAMRefreshToken string
43
- IsLoggedInAsCRI bool
44
- Account models.Account
45
- Profile models.Profile
46
- ResourceGroup models.ResourceGroup
47
- LoginAt time.Time
48
- PluginRepos []models.PluginRepo
49
- SSLDisabled bool
50
- Locale string
51
- MessageOfTheDayTime int64
52
- LastSessionUpdateTime int64
53
- Trace string
54
- ColorEnabled string
55
- HTTPTimeout int
56
- TypeOfSSO string
27
+ APIEndpoint string
28
+ IsPrivate bool
29
+ IsAccessFromVPC bool
30
+ ConsoleEndpoint string
31
+ ConsolePrivateEndpoint string
32
+ ConsolePrivateVPCEndpoint string
33
+ CloudType string
34
+ CloudName string
35
+ CRIType string
36
+ Region string
37
+ RegionID string
38
+ IAMEndpoint string
39
+ IAMPrivateEndpoint string
40
+ IAMPrivateVPCEndpoint string
41
+ IAMToken string
42
+ IAMRefreshToken string
43
+ IsLoggedInAsCRI bool
44
+ Account models.Account
45
+ Profile models.Profile
46
+ ResourceGroup models.ResourceGroup
47
+ LoginAt time.Time
48
+ PluginRepos []models.PluginRepo
49
+ SSLDisabled bool
50
+ Locale string
51
+ MessageOfTheDayTime int64
52
+ LastSessionUpdateTime int64
53
+ Trace string
54
+ ColorEnabled string
55
+ HTTPTimeout int
56
+ TypeOfSSO string
57
+ FallbackIAMTokens struct {
58
+ IAMToken string
59
+ IAMRefreshToken string
60
+ }
61
+ AssumedTrustedProfileId string
57
62
CLIInfoEndpoint string // overwrite the cli info endpoint
58
63
CheckCLIVersionDisabled bool
59
64
UsageStatsDisabled bool // deprecated: use UsageStatsEnabled
@@ -417,6 +422,27 @@ func (c *bxConfig) TypeOfSSO() (style string) {
417
422
return
418
423
}
419
424
425
+ func (c * bxConfig ) FallbackIAMToken () (t string ) {
426
+ c .read (func () {
427
+ t = c .data .FallbackIAMTokens .IAMToken
428
+ })
429
+ return
430
+ }
431
+
432
+ func (c * bxConfig ) FallbackIAMRefreshToken () (t string ) {
433
+ c .read (func () {
434
+ t = c .data .FallbackIAMTokens .IAMRefreshToken
435
+ })
436
+ return
437
+ }
438
+
439
+ func (c * bxConfig ) AssumedTrustedProfileId () (id string ) {
440
+ c .read (func () {
441
+ id = c .data .AssumedTrustedProfileId
442
+ })
443
+ return
444
+ }
445
+
420
446
func (c * bxConfig ) HTTPTimeout () (timeout int ) {
421
447
c .read (func () {
422
448
timeout = c .data .HTTPTimeout
@@ -635,6 +661,19 @@ func (c *bxConfig) SetTypeOfSSO(style string) {
635
661
})
636
662
}
637
663
664
+ func (c * bxConfig ) SetFallbackIAMTokens (token , refreshToken string ) {
665
+ c .write (func () {
666
+ c .data .FallbackIAMTokens .IAMToken = token
667
+ c .data .FallbackIAMTokens .IAMRefreshToken = refreshToken
668
+ })
669
+ }
670
+
671
+ func (c * bxConfig ) SetAssumedTrustedProfileId (id string ) {
672
+ c .write (func () {
673
+ c .data .AssumedTrustedProfileId = id
674
+ })
675
+ }
676
+
638
677
func (c * bxConfig ) SetCheckCLIVersionDisabled (disabled bool ) {
639
678
c .write (func () {
640
679
c .data .CheckCLIVersionDisabled = disabled
0 commit comments