AWS SDK

AWS SDK

rev. 336add9fff7367fb77fc3fe4ddebe660dfd1c31a..602af10aa622c110a637f2aa247c39e400914a28 (ignoring whitespace)

Files changed:

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

@@ -4,4 +67,34 @@
   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     27   
                api("aws.smithy.kotlin:http-client:1.3.14-SNAPSHOT")
   28     28   
                api("aws.smithy.kotlin:runtime-core:1.3.14-SNAPSHOT")
   29     29   
                api("aws.smithy.kotlin:smithy-client:1.3.14-SNAPSHOT")
   30     30   
                api("aws.smithy.kotlin:telemetry-api:1.3.14-SNAPSHOT")
   31     31   
            }
   32     32   
        }
   33     33   
    }
   34         -
   35         -
    jvm {
   36         -
        compilations {
   37         -
            val mainPath = getByName("main").output.classesDirs
   38         -
            val testPath = getByName("test").output.classesDirs
   39         -
            tasks {
   40         -
                register<Jar>("smokeTestJar") {
   41         -
                    description = "Creates smoke tests jar"
   42         -
                    group = "application"
   43         -
                    dependsOn(build)
   44         -
                    mustRunAfter(build)
   45         -
                    manifest {
   46         -
                        attributes["Main-Class"] = "aws.sdk.kotlin.services.codebuild.smoketests.SmokeTestsKt"
   47         -
                    }
   48         -
                    val runtimePath = configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) }
   49         -
                    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   50         -
                    from(runtimePath, mainPath, testPath)
   51         -
                    archiveBaseName.set("${project.name}-smoketests")
   52         -
                }
   53         -
            }
   54         -
        }
   55         -
    }
   56         -
   57         -
    tasks.register<JavaExec>("smokeTest") {
   58         -
        description = "Runs smoke tests jar"
   59         -
        group = "verification"
   60         -
        dependsOn(tasks.getByName("smokeTestJar"))
   61         -
        mustRunAfter(tasks.getByName("smokeTestJar"))
   62         -
   63         -
        val sdkVersion: String by project
   64         -
        val jarFile = file("build/libs/${project.name}-smoketests-$sdkVersion.jar")
   65         -
        classpath = files(jarFile)
   66         -
    }
   67     34   
}

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

@@ -1,1 +47,45 @@
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
    6      6   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
    7      7   
import aws.smithy.kotlin.runtime.io.use
    8      8   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
    9      9   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   10     10   
   11     11   
private var exitCode = 0
   12     12   
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   13     13   
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   14         -
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   15     14   
   16     15   
public suspend fun main() {
   17     16   
    listBuildsSuccess()
   18     17   
    exitProcess(exitCode)
   19     18   
}
   20     19   
   21     20   
private suspend fun listBuildsSuccess() {
   22     21   
    val tags = setOf<String>()
   23     22   
    if ((serviceFilter.isNotEmpty() && "CodeBuild" !in serviceFilter) || tags.any { it in skipTags }) {
   24     23   
        println("ok CodeBuild ListBuildsSuccess - no error expected from service # skip")
   25     24   
        return
   26     25   
    }
   27     26   
   28     27   
    try {
   29     28   
        aws.sdk.kotlin.services.codebuild.CodeBuildClient {
   30         -
            region = regionOverride ?:
   31         -
            "us-west-2"
          29  +
            region = "us-west-2"
   32     30   
            interceptors.add(SmokeTestsInterceptor())
   33     31   
   34     32   
        }.use { client ->
   35     33   
            client.listBuilds(
   36     34   
                aws.sdk.kotlin.services.codebuild.model.ListBuildsRequest {
   37     35   
                }
   38     36   
            )
   39     37   
        }
   40     38   
   41     39   
    } catch (e: Exception) {

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

@@ -4,4 +67,34 @@
   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     27   
                api("aws.smithy.kotlin:http-client:1.3.14-SNAPSHOT")
   28     28   
                api("aws.smithy.kotlin:runtime-core:1.3.14-SNAPSHOT")
   29     29   
                api("aws.smithy.kotlin:smithy-client:1.3.14-SNAPSHOT")
   30     30   
                api("aws.smithy.kotlin:telemetry-api:1.3.14-SNAPSHOT")
   31     31   
            }
   32     32   
        }
   33     33   
    }
   34         -
   35         -
    jvm {
   36         -
        compilations {
   37         -
            val mainPath = getByName("main").output.classesDirs
   38         -
            val testPath = getByName("test").output.classesDirs
   39         -
            tasks {
   40         -
                register<Jar>("smokeTestJar") {
   41         -
                    description = "Creates smoke tests jar"
   42         -
                    group = "application"
   43         -
                    dependsOn(build)
   44         -
                    mustRunAfter(build)
   45         -
                    manifest {
   46         -
                        attributes["Main-Class"] = "aws.sdk.kotlin.services.dynamodb.smoketests.SmokeTestsKt"
   47         -
                    }
   48         -
                    val runtimePath = configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) }
   49         -
                    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   50         -
                    from(runtimePath, mainPath, testPath)
   51         -
                    archiveBaseName.set("${project.name}-smoketests")
   52         -
                }
   53         -
            }
   54         -
        }
   55         -
    }
   56         -
   57         -
    tasks.register<JavaExec>("smokeTest") {
   58         -
        description = "Runs smoke tests jar"
   59         -
        group = "verification"
   60         -
        dependsOn(tasks.getByName("smokeTestJar"))
   61         -
        mustRunAfter(tasks.getByName("smokeTestJar"))
   62         -
   63         -
        val sdkVersion: String by project
   64         -
        val jarFile = file("build/libs/${project.name}-smoketests-$sdkVersion.jar")
   65         -
        classpath = files(jarFile)
   66         -
    }
   67     34   
}

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

@@ -1,1 +48,46 @@
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
    6      6   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
    7      7   
import aws.smithy.kotlin.runtime.io.use
    8      8   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
    9      9   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   10     10   
   11     11   
private var exitCode = 0
   12     12   
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   13     13   
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   14         -
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   15     14   
   16     15   
public suspend fun main() {
   17     16   
    listTablesSuccess()
   18     17   
    exitProcess(exitCode)
   19     18   
}
   20     19   
   21     20   
private suspend fun listTablesSuccess() {
   22     21   
    val tags = setOf<String>()
   23     22   
    if ((serviceFilter.isNotEmpty() && "DynamoDB" !in serviceFilter) || tags.any { it in skipTags }) {
   24     23   
        println("ok DynamoDB ListTablesSuccess - no error expected from service # skip")
   25     24   
        return
   26     25   
    }
   27     26   
   28     27   
    try {
   29     28   
        aws.sdk.kotlin.services.dynamodb.DynamoDbClient {
   30         -
            region = regionOverride ?:
   31         -
            "us-west-2"
          29  +
            region = "us-west-2"
   32     30   
            interceptors.add(SmokeTestsInterceptor())
   33     31   
   34     32   
        }.use { client ->
   35     33   
            client.listTables(
   36     34   
                aws.sdk.kotlin.services.dynamodb.model.ListTablesRequest {
   37     35   
                    limit = 1
   38     36   
                }
   39     37   
            )
   40     38   
        }
   41     39   

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

@@ -5,5 +68,35 @@
   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     28   
                api("aws.smithy.kotlin:http-client:1.3.14-SNAPSHOT")
   29     29   
                api("aws.smithy.kotlin:runtime-core:1.3.14-SNAPSHOT")
   30     30   
                api("aws.smithy.kotlin:smithy-client:1.3.14-SNAPSHOT")
   31     31   
                api("aws.smithy.kotlin:telemetry-api:1.3.14-SNAPSHOT")
   32     32   
            }
   33     33   
        }
   34     34   
    }
   35         -
   36         -
    jvm {
   37         -
        compilations {
   38         -
            val mainPath = getByName("main").output.classesDirs
   39         -
            val testPath = getByName("test").output.classesDirs
   40         -
            tasks {
   41         -
                register<Jar>("smokeTestJar") {
   42         -
                    description = "Creates smoke tests jar"
   43         -
                    group = "application"
   44         -
                    dependsOn(build)
   45         -
                    mustRunAfter(build)
   46         -
                    manifest {
   47         -
                        attributes["Main-Class"] = "aws.sdk.kotlin.services.ec2.smoketests.SmokeTestsKt"
   48         -
                    }
   49         -
                    val runtimePath = configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) }
   50         -
                    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   51         -
                    from(runtimePath, mainPath, testPath)
   52         -
                    archiveBaseName.set("${project.name}-smoketests")
   53         -
                }
   54         -
            }
   55         -
        }
   56         -
    }
   57         -
   58         -
    tasks.register<JavaExec>("smokeTest") {
   59         -
        description = "Runs smoke tests jar"
   60         -
        group = "verification"
   61         -
        dependsOn(tasks.getByName("smokeTestJar"))
   62         -
        mustRunAfter(tasks.getByName("smokeTestJar"))
   63         -
   64         -
        val sdkVersion: String by project
   65         -
        val jarFile = file("build/libs/${project.name}-smoketests-$sdkVersion.jar")
   66         -
        classpath = files(jarFile)
   67         -
    }
   68     35   
}

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

@@ -1,1 +78,75 @@
    5      5   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsFailureException
    6      6   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
    7      7   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
    8      8   
import aws.smithy.kotlin.runtime.io.use
    9      9   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
   10     10   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   11     11   
   12     12   
private var exitCode = 0
   13     13   
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   14     14   
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   15         -
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   16     15   
   17     16   
public suspend fun main() {
   18     17   
    describeInstancesFailure()
   19     18   
    describeRegionsSuccess()
   20     19   
    exitProcess(exitCode)
   21     20   
}
   22     21   
   23     22   
private suspend fun describeInstancesFailure() {
   24     23   
    val tags = setOf<String>()
   25     24   
    if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
   26     25   
        println("ok EC2 DescribeInstancesFailure - error expected from service # skip")
   27     26   
        return
   28     27   
    }
   29     28   
   30     29   
    try {
   31     30   
        aws.sdk.kotlin.services.ec2.Ec2Client {
   32         -
            region = regionOverride ?:
   33         -
            "us-west-2"
          31  +
            region = "us-west-2"
   34     32   
            interceptors.add(SmokeTestsInterceptor())
   35     33   
   36     34   
        }.use { client ->
   37     35   
            client.describeInstances(
   38     36   
                aws.sdk.kotlin.services.ec2.model.DescribeInstancesRequest {
   39     37   
                    instanceIds = listOf("i-12345678")
   40     38   
                }
   41     39   
            )
   42     40   
        }
   43     41   
   44     42   
    } catch (e: Exception) {
   45     43   
        val success = e is SmokeTestsFailureException
   46     44   
        val status = if (success) "ok" else "not ok"
   47     45   
        println("$status EC2 DescribeInstancesFailure - error expected from service ")
   48     46   
        if (!success) exitCode = 1
   49     47   
    }
   50     48   
}
   51     49   
   52     50   
private suspend fun describeRegionsSuccess() {
   53     51   
    val tags = setOf<String>()
   54     52   
    if ((serviceFilter.isNotEmpty() && "EC2" !in serviceFilter) || tags.any { it in skipTags }) {
   55     53   
        println("ok EC2 DescribeRegionsSuccess - no error expected from service # skip")
   56     54   
        return
   57     55   
    }
   58     56   
   59     57   
    try {
   60     58   
        aws.sdk.kotlin.services.ec2.Ec2Client {
   61         -
            region = regionOverride ?:
   62         -
            "us-west-2"
          59  +
            region = "us-west-2"
   63     60   
            interceptors.add(SmokeTestsInterceptor())
   64     61   
   65     62   
        }.use { client ->
   66     63   
            client.describeRegions(
   67     64   
                aws.sdk.kotlin.services.ec2.model.DescribeRegionsRequest {
   68     65   
                }
   69     66   
            )
   70     67   
        }
   71     68   
   72     69   
    } catch (e: Exception) {

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

@@ -9,9 +72,39 @@
   29     29   
                api("aws.smithy.kotlin:smithy-client:1.3.14-SNAPSHOT")
   30     30   
                api("aws.smithy.kotlin:telemetry-api:1.3.14-SNAPSHOT")
   31     31   
            }
   32     32   
        }
   33     33   
        commonTest {
   34     34   
            dependencies {
   35     35   
                implementation("org.jetbrains.kotlin:kotlin-test:2.0.10")
   36     36   
            }
   37     37   
        }
   38     38   
    }
   39         -
   40         -
    jvm {
   41         -
        compilations {
   42         -
            val mainPath = getByName("main").output.classesDirs
   43         -
            val testPath = getByName("test").output.classesDirs
   44         -
            tasks {
   45         -
                register<Jar>("smokeTestJar") {
   46         -
                    description = "Creates smoke tests jar"
   47         -
                    group = "application"
   48         -
                    dependsOn(build)
   49         -
                    mustRunAfter(build)
   50         -
                    manifest {
   51         -
                        attributes["Main-Class"] = "aws.sdk.kotlin.services.polly.smoketests.SmokeTestsKt"
   52         -
                    }
   53         -
                    val runtimePath = configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) }
   54         -
                    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   55         -
                    from(runtimePath, mainPath, testPath)
   56         -
                    archiveBaseName.set("${project.name}-smoketests")
   57         -
                }
   58         -
            }
   59         -
        }
   60         -
    }
   61         -
   62         -
    tasks.register<JavaExec>("smokeTest") {
   63         -
        description = "Runs smoke tests jar"
   64         -
        group = "verification"
   65         -
        dependsOn(tasks.getByName("smokeTestJar"))
   66         -
        mustRunAfter(tasks.getByName("smokeTestJar"))
   67         -
   68         -
        val sdkVersion: String by project
   69         -
        val jarFile = file("build/libs/${project.name}-smoketests-$sdkVersion.jar")
   70         -
        classpath = files(jarFile)
   71         -
    }
   72     39   
}

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

@@ -1,1 +47,45 @@
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsInterceptor
    6      6   
import aws.smithy.kotlin.runtime.http.interceptors.SmokeTestsSuccessException
    7      7   
import aws.smithy.kotlin.runtime.io.use
    8      8   
import aws.smithy.kotlin.runtime.smoketests.exitProcess
    9      9   
import aws.smithy.kotlin.runtime.util.PlatformProvider
   10     10   
   11     11   
private var exitCode = 0
   12     12   
private val skipTags = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SKIP_TAGS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   13     13   
private val serviceFilter = PlatformProvider.System.getenv("AWS_SMOKE_TEST_SERVICE_IDS")?.let { it.split(",").map { it.trim() }.toSet() } ?: emptySet()
   14         -
private val regionOverride = PlatformProvider.System.getenv("AWS_SMOKE_TEST_REGION")
   15     14   
   16     15   
public suspend fun main() {
   17     16   
    describeVoicesSuccess()
   18     17   
    exitProcess(exitCode)
   19     18   
}
   20     19   
   21     20   
private suspend fun describeVoicesSuccess() {
   22     21   
    val tags = setOf<String>()
   23     22   
    if ((serviceFilter.isNotEmpty() && "Polly" !in serviceFilter) || tags.any { it in skipTags }) {
   24     23   
        println("ok Polly DescribeVoicesSuccess - no error expected from service # skip")
   25     24   
        return
   26     25   
    }
   27     26   
   28     27   
    try {
   29     28   
        aws.sdk.kotlin.services.polly.PollyClient {
   30         -
            region = regionOverride ?:
   31         -
            "us-west-2"
          29  +
            region = "us-west-2"
   32     30   
            interceptors.add(SmokeTestsInterceptor())
   33     31   
   34     32   
        }.use { client ->
   35     33   
            client.describeVoices(
   36     34   
                aws.sdk.kotlin.services.polly.model.DescribeVoicesRequest {
   37     35   
                }
   38     36   
            )
   39     37   
        }
   40     38   
   41     39   
    } catch (e: Exception) {