AWS SDK

AWS SDK

rev. af028824dbfecd029fcbd1be9a9038a9c67237e4..68bf45f5d5e37b5de7512b0a7a6702b9a46a8a5e

Files changed:

tmp-codegen-diff/services/ec2/generated-src/test/kotlin/aws/sdk/kotlin/services/ec2/smoketests/SmokeTests.kt

@@ -1,1 +106,87 @@
    2      2   
    3      3   
package aws.sdk.kotlin.services.ec2.smoketests
    4      4   
    5      5   
import aws.sdk.kotlin.services.ec2.Ec2Client
    6      6   
import aws.sdk.kotlin.services.ec2.model.DescribeInstancesRequest
    7      7   
import aws.sdk.kotlin.services.ec2.model.DescribeRegionsRequest
    8      8   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsFailureException
    9      9   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
   10     10   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
   11     11   
import aws.smithy.kotlin.runtime.io.use
   12         -
import aws.smithy.kotlin.runtime.smoketests.DefaultPrinter
   13     12   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
          13  +
import aws.smithy.kotlin.runtime.smoketests.printExceptionStackTrace
   14     14   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   15         -
import kotlin.text.Appendable
   16     15   
          16  +
private var exitCode = 0
          17  +
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
          18  +
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
          19  +
          20  +
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   17     21   
   18     22   
public suspend fun main() {
   19         -
    val success = SmokeTestRunner().runAllTests()
   20         -
    if (!success) {
   21         -
        exitProcess(1)
   22         -
    }
          23  +
    describeInstancesFailure()
          24  +
    describeRegionsSuccess()
          25  +
    exitProcess(exitCode)
   23     26   
}
   24     27   
   25         -
public class SmokeTestRunner(private val platform: PlatformProvider = PlatformProvider.System, private val printer: Appendable = DefaultPrinter) {
   26         -
    private val skipTags = platform.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   27         -
    private val serviceFilter = platform.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   28         -
   29         -
    private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   30         -
   31         -
    public suspend fun runAllTests(): Boolean =
   32         -
        listOf<suspend () -> Boolean>(
   33         -
            ::describeInstancesFailure,
   34         -
            ::describeRegionsSuccess,
   35         -
        )
   36         -
            .map { it() }
   37         -
            .all { it }
          28  +
private suspend fun describeInstancesFailure() {
          29  +
    val tags = setOf<String>()
          30  +
    if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
          31  +
        println("ok EC2 DescribeInstancesFailure - error expected from service # skip")
          32  +
        return
          33  +
    }
   38     34   
   39         -
    private suspend fun describeInstancesFailure(): Boolean {
   40         -
        val tags = setOf<String>()
   41         -
        if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
   42         -
            printer.appendLine("ok EC2 DescribeInstancesFailure - error expected from service # skip")
   43         -
            return true
          35  +
    try {
          36  +
        Ec2Client {
          37  +
            interceptors.add(SmokeTestsInterceptor())
          38  +
            region = regionOverride ?: "us-west-2"
          39  +
        }.use { client ->
          40  +
            client.describeInstances(
          41  +
                DescribeInstancesRequest {
          42  +
                    instanceIds = listOf<String>(
          43  +
                        "i-12345678"
          44  +
                    )
          45  +
                }
          46  +
            )
   44     47   
        }
   45     48   
   46         -
        return try {
   47         -
            Ec2Client {
   48         -
                interceptors.add(SmokeTestsInterceptor())
   49         -
                region = regionOverride ?: "us-west-2"
   50         -
            }.use { client ->
   51         -
                client.describeInstances(
   52         -
                    DescribeInstancesRequest {
   53         -
                        instanceIds = listOf<String>(
   54         -
                            "i-12345678"
   55         -
                        )
   56         -
                    }
   57         -
                )
   58         -
            }
   59         -
   60         -
            error("Unexpectedly completed smoke test operation without throwing exception")
   61         -
   62         -
        } catch (exception: Exception) {
   63         -
            val success: Boolean = exception is SmokeTestsFailureException
   64         -
            val status: String = if (success) "ok" else "not ok"
   65         -
            printer.appendLine("$status EC2 DescribeInstancesFailure - error expected from service ")
   66         -
            if (!success) {
   67         -
                printer.appendLine(exception.stackTraceToString().prependIndent("# "))
   68         -
            }
   69         -
   70         -
            success
          49  +
    } catch (exception: Exception) {
          50  +
        val success: Boolean = exception is SmokeTestsFailureException
          51  +
        val status: String = if (success) "ok" else "not ok"
          52  +
        println("$status EC2 DescribeInstancesFailure - error expected from service ")
          53  +
        if (!success) {
          54  +
            printExceptionStackTrace(exception)
          55  +
            exitCode = 1
   71     56   
        }
   72     57   
    }
          58  +
}
   73     59   
   74         -
    private suspend fun describeRegionsSuccess(): Boolean {
   75         -
        val tags = setOf<String>()
   76         -
        if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
   77         -
            printer.appendLine("ok EC2 DescribeRegionsSuccess - no error expected from service # skip")
   78         -
            return true
   79         -
        }
   80         -
   81         -
        return try {
   82         -
            Ec2Client {
   83         -
                interceptors.add(SmokeTestsInterceptor())
   84         -
                region = regionOverride ?: "us-west-2"
   85         -
            }.use { client ->
   86         -
                client.describeRegions(
   87         -
                    DescribeRegionsRequest {
   88         -
                    }
   89         -
                )
   90         -
            }
   91         -
   92         -
            error("Unexpectedly completed smoke test operation without throwing exception")
          60  +
private suspend fun describeRegionsSuccess() {
          61  +
    val tags = setOf<String>()
          62  +
    if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
          63  +
        println("ok EC2 DescribeRegionsSuccess - no error expected from service # skip")
          64  +
        return
          65  +
    }
   93     66   
   94         -
        } catch (exception: Exception) {
   95         -
            val success: Boolean = exception is SmokeTestsSuccessException
   96         -
            val status: String = if (success) "ok" else "not ok"
   97         -
            printer.appendLine("$status EC2 DescribeRegionsSuccess - no error expected from service ")
   98         -
            if (!success) {
   99         -
                printer.appendLine(exception.stackTraceToString().prependIndent("# "))
  100         -
            }
          67  +
    try {
          68  +
        Ec2Client {
          69  +
            interceptors.add(SmokeTestsInterceptor())
          70  +
            region = regionOverride ?: "us-west-2"
          71  +
        }.use { client ->
          72  +
            client.describeRegions(
          73  +
                DescribeRegionsRequest {
          74  +
                }
          75  +
            )
          76  +
        }
  101     77   
  102         -
            success
          78  +
    } catch (exception: Exception) {
          79  +
        val success: Boolean = exception is SmokeTestsSuccessException
          80  +
        val status: String = if (success) "ok" else "not ok"
          81  +
        println("$status EC2 DescribeRegionsSuccess - no error expected from service ")
          82  +
        if (!success) {
          83  +
            printExceptionStackTrace(exception)
          84  +
            exitCode = 1
  103     85   
        }
  104     86   
    }
  105         -
  106     87   
}

tmp-codegen-diff/services/polly/build.gradle.kts

@@ -1,1 +60,60 @@
    1      1   
    2      2   
description = "The AWS SDK for Kotlin client for Polly"
    3      3   
project.ext.set("aws.sdk.id", "Polly")
    4      4   
    5      5   
kotlin {
    6      6   
    sourceSets {
    7      7   
        commonMain {
    8      8   
            dependencies {
    9         -
                implementation("aws.smithy.kotlin:aws-credentials:1.4.17-SNAPSHOT")
           9  +
                implementation("aws.smithy.kotlin:aws-credentials:1.4.2-SNAPSHOT")
   10     10   
                implementation(project(":aws-runtime:aws-http"))
   11         -
                implementation("aws.smithy.kotlin:aws-json-protocols:1.4.17-SNAPSHOT")
   12         -
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.17-SNAPSHOT")
   13         -
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.17-SNAPSHOT")
   14         -
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.17-SNAPSHOT")
   15         -
                implementation("aws.smithy.kotlin:http:1.4.17-SNAPSHOT")
   16         -
                implementation("aws.smithy.kotlin:http-auth:1.4.17-SNAPSHOT")
   17         -
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.17-SNAPSHOT")
   18         -
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.17-SNAPSHOT")
   19         -
                implementation("aws.smithy.kotlin:identity-api:1.4.17-SNAPSHOT")
          11  +
                implementation("aws.smithy.kotlin:aws-json-protocols:1.4.2-SNAPSHOT")
          12  +
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.2-SNAPSHOT")
          13  +
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.2-SNAPSHOT")
          14  +
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.2-SNAPSHOT")
          15  +
                implementation("aws.smithy.kotlin:http:1.4.2-SNAPSHOT")
          16  +
                implementation("aws.smithy.kotlin:http-auth:1.4.2-SNAPSHOT")
          17  +
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.2-SNAPSHOT")
          18  +
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.2-SNAPSHOT")
          19  +
                implementation("aws.smithy.kotlin:identity-api:1.4.2-SNAPSHOT")
   20     20   
                implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
   21         -
                implementation("aws.smithy.kotlin:serde:1.4.17-SNAPSHOT")
   22         -
                implementation("aws.smithy.kotlin:serde-json:1.4.17-SNAPSHOT")
   23         -
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.17-SNAPSHOT")
          21  +
                implementation("aws.smithy.kotlin:serde:1.4.2-SNAPSHOT")
          22  +
                implementation("aws.smithy.kotlin:serde-json:1.4.2-SNAPSHOT")
          23  +
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.2-SNAPSHOT")
   24     24   
                api(project(":aws-runtime:aws-config"))
   25     25   
                api(project(":aws-runtime:aws-core"))
   26     26   
                api(project(":aws-runtime:aws-endpoint"))
   27         -
                api("aws.smithy.kotlin:http-client:1.4.17-SNAPSHOT")
   28         -
                api("aws.smithy.kotlin:runtime-core:1.4.17-SNAPSHOT")
   29         -
                api("aws.smithy.kotlin:smithy-client:1.4.17-SNAPSHOT")
   30         -
                api("aws.smithy.kotlin:telemetry-api:1.4.17-SNAPSHOT")
          27  +
                api("aws.smithy.kotlin:http-client:1.4.2-SNAPSHOT")
          28  +
                api("aws.smithy.kotlin:runtime-core:1.4.2-SNAPSHOT")
          29  +
                api("aws.smithy.kotlin:smithy-client:1.4.2-SNAPSHOT")
          30  +
                api("aws.smithy.kotlin:telemetry-api:1.4.2-SNAPSHOT")
   31     31   
            }
   32     32   
        }
   33     33   
        commonTest {
   34     34   
            dependencies {
   35     35   
                implementation("org.jetbrains.kotlin:kotlin-test:2.1.0")
   36     36   
            }
   37     37   
        }
   38     38   
    }
   39     39   
   40     40   
    jvm {

tmp-codegen-diff/services/polly/generated-src/main/kotlin/aws/sdk/kotlin/services/polly/PollyClient.kt

@@ -6,6 +66,65 @@
   26     26   
import aws.sdk.kotlin.services.polly.model.ListLexiconsRequest
   27     27   
import aws.sdk.kotlin.services.polly.model.ListLexiconsResponse
   28     28   
import aws.sdk.kotlin.services.polly.model.ListSpeechSynthesisTasksRequest
   29     29   
import aws.sdk.kotlin.services.polly.model.ListSpeechSynthesisTasksResponse
   30     30   
import aws.sdk.kotlin.services.polly.model.PutLexiconRequest
   31     31   
import aws.sdk.kotlin.services.polly.model.PutLexiconResponse
   32     32   
import aws.sdk.kotlin.services.polly.model.StartSpeechSynthesisTaskRequest
   33     33   
import aws.sdk.kotlin.services.polly.model.StartSpeechSynthesisTaskResponse
   34     34   
import aws.sdk.kotlin.services.polly.model.SynthesizeSpeechRequest
   35     35   
import aws.sdk.kotlin.services.polly.model.SynthesizeSpeechResponse
   36         -
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
   37     36   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
   38     37   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
   39     38   
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
   40     39   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
   41     40   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
   42     41   
import aws.smithy.kotlin.runtime.client.LogMode
   43     42   
import aws.smithy.kotlin.runtime.client.RetryClientConfig
   44     43   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
   45     44   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
   46     45   
import aws.smithy.kotlin.runtime.client.SdkClient
@@ -80,79 +194,186 @@
  100     99   
    }
  101    100   
  102    101   
    public class Builder internal constructor(): AbstractSdkClientBuilder<Config, Config.Builder, PollyClient>() {
  103    102   
        override val config: Config.Builder = Config.Builder()
  104    103   
        override fun newClient(config: Config): PollyClient = DefaultPollyClient(config)
  105    104   
    }
  106    105   
  107    106   
    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
  108    107   
        override val clientName: String = builder.clientName
  109    108   
        override val region: String? = builder.region
  110         -
        override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = builder.authSchemePreference
  111    109   
        override val authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = builder.authSchemes
  112    110   
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
  113    111   
        public val endpointProvider: PollyEndpointProvider = builder.endpointProvider ?: DefaultPollyEndpointProvider()
  114    112   
        public val endpointUrl: Url? = builder.endpointUrl
  115    113   
        override val interceptors: kotlin.collections.List<aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor> = builder.interceptors
  116    114   
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
  117    115   
        override val retryPolicy: RetryPolicy<Any?> = builder.retryPolicy ?: AwsRetryPolicy.Default
  118    116   
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
  119    117   
        override val useDualStack: Boolean = builder.useDualStack ?: false
  120    118   
        override val useFips: Boolean = builder.useFips ?: false
  121    119   
        override val applicationId: String? = builder.applicationId
  122         -
        public val authSchemeProvider: PollyAuthSchemeProvider = builder.authSchemeProvider ?: DefaultPollyAuthSchemeProvider(authSchemePreference = authSchemePreference)
         120  +
        public val authSchemeProvider: PollyAuthSchemeProvider = builder.authSchemeProvider ?: DefaultPollyAuthSchemeProvider()
  123    121   
        public companion object {
  124    122   
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
  125    123   
        }
  126    124   
  127    125   
        public fun toBuilder(): Builder = Builder().apply {
  128    126   
            clientName = this@Config.clientName
  129    127   
            region = this@Config.region
  130         -
            authSchemePreference = this@Config.authSchemePreference
  131    128   
            authSchemes = this@Config.authSchemes
  132    129   
            credentialsProvider = this@Config.credentialsProvider
  133    130   
            endpointProvider = this@Config.endpointProvider
  134    131   
            endpointUrl = this@Config.endpointUrl
  135    132   
            httpClient = this@Config.httpClient
  136    133   
            interceptors = this@Config.interceptors.toMutableList()
  137    134   
            logMode = this@Config.logMode
  138    135   
            retryPolicy = this@Config.retryPolicy
  139    136   
            retryStrategy = this@Config.retryStrategy
  140    137   
            telemetryProvider = this@Config.telemetryProvider
  141    138   
            useDualStack = this@Config.useDualStack
  142    139   
            useFips = this@Config.useFips
  143    140   
            applicationId = this@Config.applicationId
  144    141   
            authSchemeProvider = this@Config.authSchemeProvider
  145    142   
        }
  146    143   
  147    144   
        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder<Config>, TelemetryConfig.Builder {
  148    145   
            /**
  149    146   
             * A reader-friendly name for the client.
  150    147   
             */
  151    148   
            override var clientName: String = "Polly"
  152    149   
  153    150   
            /**
  154    151   
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
  155    152   
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
  156    153   
             * information
  157    154   
             */
  158    155   
            override var region: String? = null
  159    156   
  160         -
            /**
  161         -
             * The ordered preference of [AuthScheme] that this client will use.
  162         -
             */
  163         -
            override var authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null
  164         -
  165    157   
            /**
  166    158   
             * Register new or override default [AuthScheme]s configured for this client. By default, the set
  167    159   
             * of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
  168    160   
             * precedence over the defaults and can be used to customize identity resolution and signing for specific
  169    161   
             * authentication schemes.
  170    162   
             */
  171    163   
            override var authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = emptyList()
  172    164   
  173    165   
            /**
  174    166   
             * The AWS credentials provider to use for authenticating requests. If not provided a

tmp-codegen-diff/services/polly/generated-src/main/kotlin/aws/sdk/kotlin/services/polly/auth/DefaultPollyAuthSchemeProvider.kt

@@ -1,1 +25,21 @@
    1      1   
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.polly.auth
    4      4   
    5      5   
import aws.sdk.kotlin.services.polly.endpoints.PollyEndpointProvider
    6      6   
import aws.smithy.kotlin.runtime.auth.AuthOption
    7         -
import aws.smithy.kotlin.runtime.http.auth.reprioritizeAuthOptions
    8      7   
import aws.smithy.kotlin.runtime.http.auth.sigV4
    9      8   
   10         -
public class DefaultPollyAuthSchemeProvider(private val endpointProvider: PollyEndpointProvider? = null, private val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null) : PollyAuthSchemeProvider {
           9  +
public class DefaultPollyAuthSchemeProvider(private val endpointProvider: PollyEndpointProvider? = null) : PollyAuthSchemeProvider {
   11     10   
    private val operationOverrides = mapOf<String, List<AuthOption>>(
   12     11   
    )
   13         -
   14     12   
    private val serviceDefaults = listOf<AuthOption>(
   15     13   
        sigV4(),
   16     14   
    )
   17         -
   18     15   
    override suspend fun resolveAuthScheme(params: PollyAuthSchemeParameters): List<AuthOption> {
   19         -
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) { serviceDefaults }
   20         -
   21         -
        val authOptions = modeledAuthOptions
   22         -
   23         -
        return authSchemePreference?.let { reprioritizeAuthOptions(it, authOptions) } ?: authOptions
          16  +
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) {
          17  +
            serviceDefaults
          18  +
        }
          19  +
        return modeledAuthOptions
   24     20   
    }
   25     21   
}

tmp-codegen-diff/services/polly/generated-src/test/kotlin/aws/sdk/kotlin/services/polly/smoketests/SmokeTests.kt

@@ -1,1 +68,52 @@
    1      1   
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.polly.smoketests
    4      4   
    5      5   
import aws.sdk.kotlin.services.polly.PollyClient
    6      6   
import aws.sdk.kotlin.services.polly.model.DescribeVoicesRequest
    7      7   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
    8      8   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
    9      9   
import aws.smithy.kotlin.runtime.io.use
   10         -
import aws.smithy.kotlin.runtime.smoketests.DefaultPrinter
   11     10   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
          11  +
import aws.smithy.kotlin.runtime.smoketests.printExceptionStackTrace
   12     12   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   13         -
import kotlin.text.Appendable
   14     13   
          14  +
private var exitCode = 0
          15  +
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
          16  +
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
          17  +
          18  +
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   15     19   
   16     20   
public suspend fun main() {
   17         -
    val success = SmokeTestRunner().runAllTests()
   18         -
    if (!success) {
   19         -
        exitProcess(1)
   20         -
    }
          21  +
    describeVoicesSuccess()
          22  +
    exitProcess(exitCode)
   21     23   
}
   22     24   
   23         -
public class SmokeTestRunner(private val platform: PlatformProvider = PlatformProvider.System, private val printer: Appendable = DefaultPrinter) {
   24         -
    private val skipTags = platform.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   25         -
    private val serviceFilter = platform.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   26         -
   27         -
    private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   28         -
   29         -
    public suspend fun runAllTests(): Boolean =
   30         -
        listOf<suspend () -> Boolean>(
   31         -
            ::describeVoicesSuccess,
   32         -
        )
   33         -
            .map { it() }
   34         -
            .all { it }
          25  +
private suspend fun describeVoicesSuccess() {
          26  +
    val tags = setOf<String>()
          27  +
    if ((serviceFilter.isNotEmpty() && "Polly" !in serviceFilter) || tags.any { it in skipTags }) {
          28  +
        println("ok Polly DescribeVoicesSuccess - no error expected from service # skip")
          29  +
        return
          30  +
    }
   35     31   
   36         -
    private suspend fun describeVoicesSuccess(): Boolean {
   37         -
        val tags = setOf<String>()
   38         -
        if ((serviceFilter.isNotEmpty() && "Polly" !in serviceFilter) || tags.any { it in skipTags }) {
   39         -
            printer.appendLine("ok Polly DescribeVoicesSuccess - no error expected from service # skip")
   40         -
            return true
          32  +
    try {
          33  +
        PollyClient {
          34  +
            interceptors.add(SmokeTestsInterceptor())
          35  +
            region = regionOverride ?: "us-west-2"
          36  +
        }.use { client ->
          37  +
            client.describeVoices(
          38  +
                DescribeVoicesRequest {
          39  +
                }
          40  +
            )
   41     41   
        }
   42     42   
   43         -
        return try {
   44         -
            PollyClient {
   45         -
                interceptors.add(SmokeTestsInterceptor())
   46         -
                region = regionOverride ?: "us-west-2"
   47         -
            }.use { client ->
   48         -
                client.describeVoices(
   49         -
                    DescribeVoicesRequest {
   50         -
                    }
   51         -
                )
   52         -
            }
   53         -
   54         -
            error("Unexpectedly completed smoke test operation without throwing exception")
   55         -
   56         -
        } catch (exception: Exception) {
   57         -
            val success: Boolean = exception is SmokeTestsSuccessException
   58         -
            val status: String = if (success) "ok" else "not ok"
   59         -
            printer.appendLine("$status Polly DescribeVoicesSuccess - no error expected from service ")
   60         -
            if (!success) {
   61         -
                printer.appendLine(exception.stackTraceToString().prependIndent("# "))
   62         -
            }
   63         -
   64         -
            success
          43  +
    } catch (exception: Exception) {
          44  +
        val success: Boolean = exception is SmokeTestsSuccessException
          45  +
        val status: String = if (success) "ok" else "not ok"
          46  +
        println("$status Polly DescribeVoicesSuccess - no error expected from service ")
          47  +
        if (!success) {
          48  +
            printExceptionStackTrace(exception)
          49  +
            exitCode = 1
   65     50   
        }
   66     51   
    }
   67         -
   68     52   
}

tmp-codegen-diff/services/s3/build.gradle.kts

@@ -1,1 +41,41 @@
    1      1   
    2      2   
description = "The AWS SDK for Kotlin client for S3"
    3      3   
project.ext.set("aws.sdk.id", "S3")
    4      4   
    5      5   
kotlin {
    6      6   
    sourceSets {
    7      7   
        commonMain {
    8      8   
            dependencies {
    9         -
                implementation("aws.smithy.kotlin:aws-credentials:1.4.17-SNAPSHOT")
   10         -
                implementation("aws.smithy.kotlin:aws-event-stream:1.4.17-SNAPSHOT")
           9  +
                implementation("aws.smithy.kotlin:aws-credentials:1.4.2-SNAPSHOT")
          10  +
                implementation("aws.smithy.kotlin:aws-event-stream:1.4.2-SNAPSHOT")
   11     11   
                implementation(project(":aws-runtime:aws-http"))
   12         -
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.17-SNAPSHOT")
   13         -
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.17-SNAPSHOT")
   14         -
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.17-SNAPSHOT")
   15         -
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.4.17-SNAPSHOT")
   16         -
                implementation("aws.smithy.kotlin:http:1.4.17-SNAPSHOT")
   17         -
                implementation("aws.smithy.kotlin:http-auth:1.4.17-SNAPSHOT")
   18         -
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.17-SNAPSHOT")
   19         -
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.17-SNAPSHOT")
   20         -
                implementation("aws.smithy.kotlin:identity-api:1.4.17-SNAPSHOT")
          12  +
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.2-SNAPSHOT")
          13  +
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.2-SNAPSHOT")
          14  +
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.2-SNAPSHOT")
          15  +
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.4.2-SNAPSHOT")
          16  +
                implementation("aws.smithy.kotlin:http:1.4.2-SNAPSHOT")
          17  +
                implementation("aws.smithy.kotlin:http-auth:1.4.2-SNAPSHOT")
          18  +
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.2-SNAPSHOT")
          19  +
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.2-SNAPSHOT")
          20  +
                implementation("aws.smithy.kotlin:identity-api:1.4.2-SNAPSHOT")
   21     21   
                implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
   22         -
                implementation("aws.smithy.kotlin:serde:1.4.17-SNAPSHOT")
   23         -
                implementation("aws.smithy.kotlin:serde-xml:1.4.17-SNAPSHOT")
   24         -
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.17-SNAPSHOT")
          22  +
                implementation("aws.smithy.kotlin:serde:1.4.2-SNAPSHOT")
          23  +
                implementation("aws.smithy.kotlin:serde-xml:1.4.2-SNAPSHOT")
          24  +
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.2-SNAPSHOT")
   25     25   
                api(project(":aws-runtime:aws-config"))
   26     26   
                api(project(":aws-runtime:aws-core"))
   27     27   
                api(project(":aws-runtime:aws-endpoint"))
   28         -
                api("aws.smithy.kotlin:http-client:1.4.17-SNAPSHOT")
   29         -
                api("aws.smithy.kotlin:runtime-core:1.4.17-SNAPSHOT")
   30         -
                api("aws.smithy.kotlin:smithy-client:1.4.17-SNAPSHOT")
   31         -
                api("aws.smithy.kotlin:telemetry-api:1.4.17-SNAPSHOT")
          28  +
                api("aws.smithy.kotlin:http-client:1.4.2-SNAPSHOT")
          29  +
                api("aws.smithy.kotlin:runtime-core:1.4.2-SNAPSHOT")
          30  +
                api("aws.smithy.kotlin:smithy-client:1.4.2-SNAPSHOT")
          31  +
                api("aws.smithy.kotlin:telemetry-api:1.4.2-SNAPSHOT")
   32     32   
            }
   33     33   
        }
   34     34   
        commonTest {
   35     35   
            dependencies {
   36     36   
                implementation("org.jetbrains.kotlin:kotlin-test:2.1.0")
   37         -
                implementation("aws.smithy.kotlin:smithy-test:1.4.17-SNAPSHOT")
          37  +
                implementation("aws.smithy.kotlin:smithy-test:1.4.2-SNAPSHOT")
   38     38   
            }
   39     39   
        }
   40     40   
    }
   41     41   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/S3Client.kt

@@ -186,186 +246,245 @@
  206    206   
import aws.sdk.kotlin.services.s3.model.RestoreObjectRequest
  207    207   
import aws.sdk.kotlin.services.s3.model.RestoreObjectResponse
  208    208   
import aws.sdk.kotlin.services.s3.model.SelectObjectContentRequest
  209    209   
import aws.sdk.kotlin.services.s3.model.SelectObjectContentResponse
  210    210   
import aws.sdk.kotlin.services.s3.model.UploadPartCopyRequest
  211    211   
import aws.sdk.kotlin.services.s3.model.UploadPartCopyResponse
  212    212   
import aws.sdk.kotlin.services.s3.model.UploadPartRequest
  213    213   
import aws.sdk.kotlin.services.s3.model.UploadPartResponse
  214    214   
import aws.sdk.kotlin.services.s3.model.WriteGetObjectResponseRequest
  215    215   
import aws.sdk.kotlin.services.s3.model.WriteGetObjectResponseResponse
  216         -
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
  217    216   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
  218    217   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
  219    218   
import aws.smithy.kotlin.runtime.auth.awscredentials.SigV4aClientConfig
  220    219   
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
  221    220   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
  222    221   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
  223    222   
import aws.smithy.kotlin.runtime.client.LogMode
  224    223   
import aws.smithy.kotlin.runtime.client.RetryClientConfig
  225    224   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
  226    225   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
@@ -264,263 +400,392 @@
  284    283   
    }
  285    284   
  286    285   
    public class Builder internal constructor(): AbstractSdkClientBuilder<Config, Config.Builder, S3Client>() {
  287    286   
        override val config: Config.Builder = Config.Builder()
  288    287   
        override fun newClient(config: Config): S3Client = DefaultS3Client(config)
  289    288   
    }
  290    289   
  291    290   
    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpChecksumConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, SigV4aClientConfig, TelemetryConfig {
  292    291   
        override val clientName: String = builder.clientName
  293    292   
        override val region: String? = builder.region
  294         -
        override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = builder.authSchemePreference
  295    293   
        override val authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = builder.authSchemes
  296    294   
        public val continueHeaderThresholdBytes: Long? = builder.continueHeaderThresholdBytes
  297    295   
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
  298    296   
        public val disableMrap: Boolean = builder.disableMrap ?: false
  299    297   
        public val disableS3ExpressSessionAuth: Boolean = builder.disableS3ExpressSessionAuth ?: false
  300    298   
        public val enableAccelerate: Boolean = builder.enableAccelerate ?: false
  301    299   
        public val enableAwsChunked: Boolean = builder.enableAwsChunked ?: true
  302    300   
        public val endpointProvider: S3EndpointProvider = builder.endpointProvider ?: DefaultS3EndpointProvider()
  303    301   
        public val endpointUrl: Url? = builder.endpointUrl
  304    302   
        public val expressCredentialsProvider: CredentialsProvider = builder.expressCredentialsProvider ?: DefaultS3ExpressCredentialsProvider()
  305    303   
        public val forcePathStyle: Boolean = builder.forcePathStyle ?: false
  306    304   
        override val interceptors: kotlin.collections.List<aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor> = builder.interceptors
  307    305   
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
  308    306   
        override val requestChecksumCalculation: RequestHttpChecksumConfig = builder.requestChecksumCalculation ?: RequestHttpChecksumConfig.WHEN_SUPPORTED
  309    307   
        override val responseChecksumValidation: ResponseHttpChecksumConfig = builder.responseChecksumValidation ?: ResponseHttpChecksumConfig.WHEN_SUPPORTED
  310    308   
        override val retryPolicy: RetryPolicy<Any?> = builder.retryPolicy ?: AwsRetryPolicy.Default
  311    309   
        override val sigV4aSigningRegionSet: kotlin.collections.Set<kotlin.String>? = builder.sigV4aSigningRegionSet
  312    310   
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
  313    311   
        public val useArnRegion: Boolean = builder.useArnRegion ?: false
  314    312   
        override val useDualStack: Boolean = builder.useDualStack ?: false
  315    313   
        override val useFips: Boolean = builder.useFips ?: false
  316    314   
        override val applicationId: String? = builder.applicationId
  317         -
        public val authSchemeProvider: S3AuthSchemeProvider = builder.authSchemeProvider ?: DefaultS3AuthSchemeProvider(endpointProvider, authSchemePreference)
         315  +
        public val authSchemeProvider: S3AuthSchemeProvider = builder.authSchemeProvider ?: DefaultS3AuthSchemeProvider(endpointProvider)
  318    316   
        public companion object {
  319    317   
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
  320    318   
        }
  321    319   
  322    320   
        public fun toBuilder(): Builder = Builder().apply {
  323    321   
            clientName = this@Config.clientName
  324    322   
            region = this@Config.region
  325         -
            authSchemePreference = this@Config.authSchemePreference
  326    323   
            authSchemes = this@Config.authSchemes
  327    324   
            continueHeaderThresholdBytes = this@Config.continueHeaderThresholdBytes
  328    325   
            credentialsProvider = this@Config.credentialsProvider
  329    326   
            disableMrap = this@Config.disableMrap
  330    327   
            disableS3ExpressSessionAuth = this@Config.disableS3ExpressSessionAuth
  331    328   
            enableAccelerate = this@Config.enableAccelerate
  332    329   
            enableAwsChunked = this@Config.enableAwsChunked
  333    330   
            endpointProvider = this@Config.endpointProvider
  334    331   
            endpointUrl = this@Config.endpointUrl
  335    332   
            expressCredentialsProvider = this@Config.expressCredentialsProvider
  336    333   
            forcePathStyle = this@Config.forcePathStyle
  337    334   
            httpClient = this@Config.httpClient
  338    335   
            interceptors = this@Config.interceptors.toMutableList()
  339    336   
            logMode = this@Config.logMode
  340    337   
            requestChecksumCalculation = this@Config.requestChecksumCalculation
  341    338   
            responseChecksumValidation = this@Config.responseChecksumValidation
  342    339   
            retryPolicy = this@Config.retryPolicy
  343    340   
            retryStrategy = this@Config.retryStrategy
  344    341   
            sigV4aSigningRegionSet = this@Config.sigV4aSigningRegionSet
  345    342   
            telemetryProvider = this@Config.telemetryProvider
  346    343   
            useArnRegion = this@Config.useArnRegion
  347    344   
            useDualStack = this@Config.useDualStack
  348    345   
            useFips = this@Config.useFips
  349    346   
            applicationId = this@Config.applicationId
  350    347   
            authSchemeProvider = this@Config.authSchemeProvider
  351    348   
        }
  352    349   
  353    350   
        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpChecksumConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder<Config>, SigV4aClientConfig.Builder, TelemetryConfig.Builder {
  354    351   
            /**
  355    352   
             * A reader-friendly name for the client.
  356    353   
             */
  357    354   
            override var clientName: String = "S3"
  358    355   
  359    356   
            /**
  360    357   
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
  361    358   
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
  362    359   
             * information
  363    360   
             */
  364    361   
            override var region: String? = null
  365    362   
  366         -
            /**
  367         -
             * The ordered preference of [AuthScheme] that this client will use.
  368         -
             */
  369         -
            override var authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null
  370         -
  371    363   
            /**
  372    364   
             * Register new or override default [AuthScheme]s configured for this client. By default, the set
  373    365   
             * of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
  374    366   
             * precedence over the defaults and can be used to customize identity resolution and signing for specific
  375    367   
             * authentication schemes.
  376    368   
             */
  377    369   
            override var authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = emptyList()
  378    370   
  379    371   
            /**
  380    372   
             * The minimum content length threshold (in bytes) for which to send `Expect: 100-continue` HTTP headers. PUT

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/auth/DefaultS3AuthSchemeProvider.kt

@@ -1,1 +42,39 @@
    1      1   
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.s3.auth
    4      4   
    5      5   
import aws.sdk.kotlin.services.s3.endpoints.S3EndpointProvider
    6      6   
import aws.sdk.kotlin.services.s3.express.sigV4S3Express
    7      7   
import aws.smithy.kotlin.runtime.auth.AuthOption
    8      8   
import aws.smithy.kotlin.runtime.client.endpoints.authOptions
    9      9   
import aws.smithy.kotlin.runtime.http.auth.mergeAuthOptions
   10         -
import aws.smithy.kotlin.runtime.http.auth.reprioritizeAuthOptions
   11     10   
import aws.smithy.kotlin.runtime.http.auth.sigV4
   12     11   
import aws.smithy.kotlin.runtime.http.auth.sigV4A
   13     12   
   14         -
public class DefaultS3AuthSchemeProvider(private val endpointProvider: S3EndpointProvider? = null, private val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null) : S3AuthSchemeProvider {
          13  +
public class DefaultS3AuthSchemeProvider(private val endpointProvider: S3EndpointProvider? = null) : S3AuthSchemeProvider {
   15     14   
    private val operationOverrides = mapOf<String, List<AuthOption>>(
   16     15   
        "WriteGetObjectResponse" to listOf(
   17     16   
            sigV4(unsignedPayload = true),
   18     17   
        ),
   19     18   
    )
   20         -
   21     19   
    private val serviceDefaults = listOf<AuthOption>(
   22     20   
        sigV4(),
   23     21   
        sigV4A(),
   24     22   
        sigV4S3Express(),
   25     23   
    )
   26         -
   27     24   
    override suspend fun resolveAuthScheme(params: S3AuthSchemeParameters): List<AuthOption> {
   28         -
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) { serviceDefaults }
          25  +
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) {
          26  +
            serviceDefaults
          27  +
        }
   29     28   
   30     29   
        val endpointParams = params.endpointParameters
   31     30   
        val endpointAuthOptions = if (endpointProvider != null && endpointParams != null) {
   32     31   
            val endpoint = endpointProvider.resolveEndpoint(endpointParams)
   33     32   
            endpoint.authOptions
   34     33   
        } else {
   35     34   
            emptyList()
   36     35   
        }
   37     36   
   38         -
        val authOptions = mergeAuthOptions(modeledAuthOptions, endpointAuthOptions)
   39         -
   40         -
        return authSchemePreference?.let { reprioritizeAuthOptions(it, authOptions) } ?: authOptions
          37  +
        return mergeAuthOptions(modeledAuthOptions, endpointAuthOptions)
   41     38   
    }
   42     39   
}

tmp-codegen-diff/services/sts/build.gradle.kts

@@ -1,1 +35,35 @@
    1      1   
    2      2   
description = "The AWS SDK for Kotlin client for STS"
    3      3   
project.ext.set("aws.sdk.id", "STS")
    4      4   
    5      5   
kotlin {
    6      6   
    sourceSets {
    7      7   
        commonMain {
    8      8   
            dependencies {
    9         -
                implementation("aws.smithy.kotlin:aws-credentials:1.4.17-SNAPSHOT")
           9  +
                implementation("aws.smithy.kotlin:aws-credentials:1.4.2-SNAPSHOT")
   10     10   
                implementation(project(":aws-runtime:aws-http"))
   11         -
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.17-SNAPSHOT")
   12         -
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.17-SNAPSHOT")
   13         -
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.17-SNAPSHOT")
   14         -
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.4.17-SNAPSHOT")
   15         -
                implementation("aws.smithy.kotlin:http:1.4.17-SNAPSHOT")
   16         -
                implementation("aws.smithy.kotlin:http-auth:1.4.17-SNAPSHOT")
   17         -
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.17-SNAPSHOT")
   18         -
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.17-SNAPSHOT")
   19         -
                implementation("aws.smithy.kotlin:identity-api:1.4.17-SNAPSHOT")
          11  +
                implementation("aws.smithy.kotlin:aws-protocol-core:1.4.2-SNAPSHOT")
          12  +
                implementation("aws.smithy.kotlin:aws-signing-common:1.4.2-SNAPSHOT")
          13  +
                implementation("aws.smithy.kotlin:aws-signing-default:1.4.2-SNAPSHOT")
          14  +
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.4.2-SNAPSHOT")
          15  +
                implementation("aws.smithy.kotlin:http:1.4.2-SNAPSHOT")
          16  +
                implementation("aws.smithy.kotlin:http-auth:1.4.2-SNAPSHOT")
          17  +
                implementation("aws.smithy.kotlin:http-auth-aws:1.4.2-SNAPSHOT")
          18  +
                implementation("aws.smithy.kotlin:http-client-engine-default:1.4.2-SNAPSHOT")
          19  +
                implementation("aws.smithy.kotlin:identity-api:1.4.2-SNAPSHOT")
   20     20   
                implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
   21         -
                implementation("aws.smithy.kotlin:serde:1.4.17-SNAPSHOT")
   22         -
                implementation("aws.smithy.kotlin:serde-form-url:1.4.17-SNAPSHOT")
   23         -
                implementation("aws.smithy.kotlin:serde-xml:1.4.17-SNAPSHOT")
   24         -
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.17-SNAPSHOT")
          21  +
                implementation("aws.smithy.kotlin:serde:1.4.2-SNAPSHOT")
          22  +
                implementation("aws.smithy.kotlin:serde-form-url:1.4.2-SNAPSHOT")
          23  +
                implementation("aws.smithy.kotlin:serde-xml:1.4.2-SNAPSHOT")
          24  +
                implementation("aws.smithy.kotlin:telemetry-defaults:1.4.2-SNAPSHOT")
   25     25   
                api(project(":aws-runtime:aws-config"))
   26     26   
                api(project(":aws-runtime:aws-core"))
   27     27   
                api(project(":aws-runtime:aws-endpoint"))
   28         -
                api("aws.smithy.kotlin:http-client:1.4.17-SNAPSHOT")
   29         -
                api("aws.smithy.kotlin:runtime-core:1.4.17-SNAPSHOT")
   30         -
                api("aws.smithy.kotlin:smithy-client:1.4.17-SNAPSHOT")
   31         -
                api("aws.smithy.kotlin:telemetry-api:1.4.17-SNAPSHOT")
          28  +
                api("aws.smithy.kotlin:http-client:1.4.2-SNAPSHOT")
          29  +
                api("aws.smithy.kotlin:runtime-core:1.4.2-SNAPSHOT")
          30  +
                api("aws.smithy.kotlin:smithy-client:1.4.2-SNAPSHOT")
          31  +
                api("aws.smithy.kotlin:telemetry-api:1.4.2-SNAPSHOT")
   32     32   
            }
   33     33   
        }
   34     34   
    }
   35     35   
}

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/StsClient.kt

@@ -6,6 +66,65 @@
   26     26   
import aws.sdk.kotlin.services.sts.model.DecodeAuthorizationMessageRequest
   27     27   
import aws.sdk.kotlin.services.sts.model.DecodeAuthorizationMessageResponse
   28     28   
import aws.sdk.kotlin.services.sts.model.GetAccessKeyInfoRequest
   29     29   
import aws.sdk.kotlin.services.sts.model.GetAccessKeyInfoResponse
   30     30   
import aws.sdk.kotlin.services.sts.model.GetCallerIdentityRequest
   31     31   
import aws.sdk.kotlin.services.sts.model.GetCallerIdentityResponse
   32     32   
import aws.sdk.kotlin.services.sts.model.GetFederationTokenRequest
   33     33   
import aws.sdk.kotlin.services.sts.model.GetFederationTokenResponse
   34     34   
import aws.sdk.kotlin.services.sts.model.GetSessionTokenRequest
   35     35   
import aws.sdk.kotlin.services.sts.model.GetSessionTokenResponse
   36         -
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
   37     36   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
   38     37   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
   39     38   
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
   40     39   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
   41     40   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
   42     41   
import aws.smithy.kotlin.runtime.client.LogMode
   43     42   
import aws.smithy.kotlin.runtime.client.RetryClientConfig
   44     43   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
   45     44   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
   46     45   
import aws.smithy.kotlin.runtime.client.SdkClient
@@ -79,78 +193,185 @@
   99     98   
    }
  100     99   
  101    100   
    public class Builder internal constructor(): AbstractSdkClientBuilder<Config, Config.Builder, StsClient>() {
  102    101   
        override val config: Config.Builder = Config.Builder()
  103    102   
        override fun newClient(config: Config): StsClient = DefaultStsClient(config)
  104    103   
    }
  105    104   
  106    105   
    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
  107    106   
        override val clientName: String = builder.clientName
  108    107   
        override val region: String? = builder.region
  109         -
        override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = builder.authSchemePreference
  110    108   
        override val authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = builder.authSchemes
  111    109   
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
  112    110   
        public val endpointProvider: StsEndpointProvider = builder.endpointProvider ?: DefaultStsEndpointProvider()
  113    111   
        public val endpointUrl: Url? = builder.endpointUrl
  114    112   
        override val interceptors: kotlin.collections.List<aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor> = builder.interceptors
  115    113   
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
  116    114   
        override val retryPolicy: RetryPolicy<Any?> = builder.retryPolicy ?: AwsRetryPolicy.Default
  117    115   
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
  118    116   
        override val useDualStack: Boolean = builder.useDualStack ?: false
  119    117   
        override val useFips: Boolean = builder.useFips ?: false
  120    118   
        override val applicationId: String? = builder.applicationId
  121         -
        public val authSchemeProvider: StsAuthSchemeProvider = builder.authSchemeProvider ?: DefaultStsAuthSchemeProvider(authSchemePreference = authSchemePreference)
         119  +
        public val authSchemeProvider: StsAuthSchemeProvider = builder.authSchemeProvider ?: DefaultStsAuthSchemeProvider()
  122    120   
        public companion object {
  123    121   
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
  124    122   
        }
  125    123   
  126    124   
        public fun toBuilder(): Builder = Builder().apply {
  127    125   
            clientName = this@Config.clientName
  128    126   
            region = this@Config.region
  129         -
            authSchemePreference = this@Config.authSchemePreference
  130    127   
            authSchemes = this@Config.authSchemes
  131    128   
            credentialsProvider = this@Config.credentialsProvider
  132    129   
            endpointProvider = this@Config.endpointProvider
  133    130   
            endpointUrl = this@Config.endpointUrl
  134    131   
            httpClient = this@Config.httpClient
  135    132   
            interceptors = this@Config.interceptors.toMutableList()
  136    133   
            logMode = this@Config.logMode
  137    134   
            retryPolicy = this@Config.retryPolicy
  138    135   
            retryStrategy = this@Config.retryStrategy
  139    136   
            telemetryProvider = this@Config.telemetryProvider
  140    137   
            useDualStack = this@Config.useDualStack
  141    138   
            useFips = this@Config.useFips
  142    139   
            applicationId = this@Config.applicationId
  143    140   
            authSchemeProvider = this@Config.authSchemeProvider
  144    141   
        }
  145    142   
  146    143   
        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder<Config>, TelemetryConfig.Builder {
  147    144   
            /**
  148    145   
             * A reader-friendly name for the client.
  149    146   
             */
  150    147   
            override var clientName: String = "STS"
  151    148   
  152    149   
            /**
  153    150   
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
  154    151   
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
  155    152   
             * information
  156    153   
             */
  157    154   
            override var region: String? = null
  158    155   
  159         -
            /**
  160         -
             * The ordered preference of [AuthScheme] that this client will use.
  161         -
             */
  162         -
            override var authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null
  163         -
  164    156   
            /**
  165    157   
             * Register new or override default [AuthScheme]s configured for this client. By default, the set
  166    158   
             * of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
  167    159   
             * precedence over the defaults and can be used to customize identity resolution and signing for specific
  168    160   
             * authentication schemes.
  169    161   
             */
  170    162   
            override var authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = emptyList()
  171    163   
  172    164   
            /**
  173    165   
             * The AWS credentials provider to use for authenticating requests. If not provided a

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/auth/DefaultStsAuthSchemeProvider.kt

@@ -1,1 +32,28 @@
    1      1   
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.sts.auth
    4      4   
    5      5   
import aws.sdk.kotlin.services.sts.endpoints.StsEndpointProvider
    6      6   
import aws.smithy.kotlin.runtime.auth.AuthOption
    7      7   
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
    8         -
import aws.smithy.kotlin.runtime.http.auth.reprioritizeAuthOptions
    9      8   
import aws.smithy.kotlin.runtime.http.auth.sigV4
   10      9   
   11         -
public class DefaultStsAuthSchemeProvider(private val endpointProvider: StsEndpointProvider? = null, private val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null) : StsAuthSchemeProvider {
          10  +
public class DefaultStsAuthSchemeProvider(private val endpointProvider: StsEndpointProvider? = null) : StsAuthSchemeProvider {
   12     11   
    private val operationOverrides = mapOf<String, List<AuthOption>>(
   13     12   
        "AssumeRoleWithSAML" to listOf(
   14     13   
            AuthOption(AuthSchemeId.Anonymous),
   15     14   
        ),
   16     15   
        "AssumeRoleWithWebIdentity" to listOf(
   17     16   
            AuthOption(AuthSchemeId.Anonymous),
   18     17   
        ),
   19     18   
    )
   20         -
   21     19   
    private val serviceDefaults = listOf<AuthOption>(
   22     20   
        sigV4(),
   23     21   
    )
   24         -
   25     22   
    override suspend fun resolveAuthScheme(params: StsAuthSchemeParameters): List<AuthOption> {
   26         -
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) { serviceDefaults }
   27         -
   28         -
        val authOptions = modeledAuthOptions
   29         -
   30         -
        return authSchemePreference?.let { reprioritizeAuthOptions(it, authOptions) } ?: authOptions
          23  +
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) {
          24  +
            serviceDefaults
          25  +
        }
          26  +
        return modeledAuthOptions
   31     27   
    }
   32     28   
}