diff --git a/.changes/3bc2e0a5-d8d4-4051-a723-a54427a96e7e.json b/.changes/3bc2e0a5-d8d4-4051-a723-a54427a96e7e.json new file mode 100644 index 00000000000..3a752b368dc --- /dev/null +++ b/.changes/3bc2e0a5-d8d4-4051-a723-a54427a96e7e.json @@ -0,0 +1,5 @@ +{ + "id": "3bc2e0a5-d8d4-4051-a723-a54427a96e7e", + "type": "feature", + "description": "Enable configuring an HTTP engine on `ImdsClient`" +} \ No newline at end of file diff --git a/aws-runtime/aws-config/api/aws-config.api b/aws-runtime/aws-config/api/aws-config.api index 9b55244e258..6d6878eb35f 100644 --- a/aws-runtime/aws-config/api/aws-config.api +++ b/aws-runtime/aws-config/api/aws-config.api @@ -418,10 +418,12 @@ public final class aws/sdk/kotlin/runtime/config/imds/ImdsClient : aws/sdk/kotli public final class aws/sdk/kotlin/runtime/config/imds/ImdsClient$Builder { public fun ()V public final fun getEndpointConfiguration ()Laws/sdk/kotlin/runtime/config/imds/EndpointConfiguration; + public final fun getEngine ()Laws/smithy/kotlin/runtime/http/engine/HttpClientEngine; public final fun getLogMode ()Laws/smithy/kotlin/runtime/client/LogMode; public final fun getMaxRetries ()I public final fun getTokenTtl-UwyO8pc ()J public final fun setEndpointConfiguration (Laws/sdk/kotlin/runtime/config/imds/EndpointConfiguration;)V + public final fun setEngine (Laws/smithy/kotlin/runtime/http/engine/HttpClientEngine;)V public final fun setLogMode (Laws/smithy/kotlin/runtime/client/LogMode;)V public final fun setMaxRetries (I)V public final fun setTokenTtl-LRDsOJo (J)V diff --git a/aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/imds/ImdsClient.kt b/aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/imds/ImdsClient.kt index ac4cbf9549b..1f0b5e0f046 100644 --- a/aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/imds/ImdsClient.kt +++ b/aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/imds/ImdsClient.kt @@ -172,9 +172,9 @@ public class ImdsClient private constructor(builder: Builder) : InstanceMetadata public var logMode: LogMode = LogMode.Default /** - * The HTTP engine to use to make requests with. This is here to facilitate testing and can otherwise be ignored + * The HTTP engine to use to make requests with */ - internal var engine: HttpClientEngine? = null + public var engine: HttpClientEngine? = null /** * The source of time for token refreshes. This is here to facilitate testing and can otherwise be ignored