ImdsCredentialsProvider
constructor(instanceProfileName: String? = null, client: InstanceMetadataProvider? = null, platformProvider: PlatformProvider = PlatformProvider.System)
Parameters
instanceProfileName
overrides the instance profile name. When set, this provider skips querying IMDS for the name of the active profile.
client
a preconfigured IMDS client with which to retrieve instance metadata. If an instance is passed, the caller is responsible for closing it. If no instance is passed, a default instance is created and will be closed when this credentials provider is closed.
platformProvider
a platform provider used for env vars and system properties
constructor(profileOverride: String? = null, client: Lazy<InstanceMetadataProvider> = lazy { ImdsClient() }, platformProvider: PlatformEnvironProvider = PlatformProvider.System, clock: Clock = Clock.System)
Deprecated
This constructor supports parameters which are no longer used in the implementation. It will be removed in version 1.5.