Skip to content

Commit cfff2e4

Browse files
authored
misc: make configurationSource configurable (#1118)
1 parent 94a4a19 commit cfff2e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/profile/AwsConfigLoader.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ import kotlin.coroutines.coroutineContext
2323
*
2424
* @param platform Platform from which to resolve configuration environment
2525
* @param profileNameOverride Optional profile name to use as the active profile
26+
* @param configurationSource Optional configuration source to use
2627
* @return A [AwsSharedConfig] instance
2728
*/
2829
@InternalSdkApi
2930
public suspend fun loadAwsSharedConfig(
3031
platform: PlatformProvider,
3132
profileNameOverride: String? = null,
33+
configurationSource: AwsConfigurationSource? = null,
3234
): AwsSharedConfig =
3335
withSpan("AwsSharedConfig", "loadAwsSharedConfig") {
3436
// Determine active profile and location of configuration files
35-
val source = resolveConfigSource(platform, profileNameOverride)
37+
val source = configurationSource ?: resolveConfigSource(platform, profileNameOverride)
3638
val logger = coroutineContext.logger("AwsConfigParser")
3739

3840
// merged AWS configuration based on optional configuration and credential file contents

0 commit comments

Comments
 (0)