File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen
credential-provider-ini/src
credential-provider-sso/src Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ export const getDefaultRoleAssumer = (
100
100
sessionToken : Credentials . SessionToken ,
101
101
expiration : Credentials . Expiration ,
102
102
// TODO(credentialScope): access normally when shape is updated.
103
- credentialScope : ( Credentials as any ) . CredentialScope ,
104
- accountId,
103
+ ... ( ( Credentials as any ) . CredentialScope && { credentialScope : ( Credentials as any ) . CredentialScope } ) ,
104
+ ... ( accountId && { accountId } ) ,
105
105
} ;
106
106
} ;
107
107
} ;
@@ -157,8 +157,8 @@ export const getDefaultRoleAssumerWithWebIdentity = (
157
157
sessionToken : Credentials . SessionToken ,
158
158
expiration : Credentials . Expiration ,
159
159
// TODO(credentialScope): access normally when shape is updated.
160
- credentialScope : ( Credentials as any ) . CredentialScope ,
161
- accountId,
160
+ ... ( ( Credentials as any ) . CredentialScope && { credentialScope : ( Credentials as any ) . CredentialScope } ) ,
161
+ ... ( accountId && { accountId } ) ,
162
162
} ;
163
163
} ;
164
164
} ;
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ export const getDefaultRoleAssumer = (
97
97
sessionToken : Credentials . SessionToken ,
98
98
expiration : Credentials . Expiration ,
99
99
// TODO(credentialScope): access normally when shape is updated.
100
- credentialScope : ( Credentials as any ) . CredentialScope ,
101
- accountId,
100
+ ... ( ( Credentials as any ) . CredentialScope && { credentialScope : ( Credentials as any ) . CredentialScope } ) ,
101
+ ... ( accountId && { accountId } ) ,
102
102
} ;
103
103
} ;
104
104
} ;
@@ -154,8 +154,8 @@ export const getDefaultRoleAssumerWithWebIdentity = (
154
154
sessionToken : Credentials . SessionToken ,
155
155
expiration : Credentials . Expiration ,
156
156
// TODO(credentialScope): access normally when shape is updated.
157
- credentialScope : ( Credentials as any ) . CredentialScope ,
158
- accountId,
157
+ ... ( ( Credentials as any ) . CredentialScope && { credentialScope : ( Credentials as any ) . CredentialScope } ) ,
158
+ ... ( accountId && { accountId } ) ,
159
159
} ;
160
160
} ;
161
161
} ;
Original file line number Diff line number Diff line change @@ -37,6 +37,6 @@ export const resolveStaticCredentials = (
37
37
secretAccessKey : profile . aws_secret_access_key ,
38
38
sessionToken : profile . aws_session_token ,
39
39
credentialScope : profile . aws_credential_scope ,
40
- accountId : profile . aws_account_id ,
40
+ ... ( profile . aws_account_id && { accountId : profile . aws_account_id } ) ,
41
41
} ) ;
42
42
} ;
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export const resolveSSOCredentials = async ({
108
108
secretAccessKey,
109
109
sessionToken,
110
110
expiration : new Date ( expiration ) ,
111
- credentialScope,
112
- accountId,
111
+ ... ( credentialScope && { credentialScope } ) ,
112
+ ... ( accountId && { accountId } ) ,
113
113
} ;
114
114
} ;
You can’t perform that action at this time.
0 commit comments