AWS SDK

AWS SDK

rev. a52ece6d3f8525d0a5ac58ebf53bd027bbe63fb2..6a44afbc6fffc96dd09ee873d97f174cadec9c11

Files changed:

tmp-codegen-diff/services/bedrock/common/test/aws/sdk/kotlin/services/bedrock/BedrockEnvironmentBearerTokenTest.kt

@@ -12,12 +117,117 @@
   32     32   
class BedrockEnvironmentBearerTokenTest {
   33     33   
    private fun mockHttpClient(handler: (HttpRequest) -> HttpResponse): HttpClientEngine = object : HttpClientEngineBase("test engine") {
   34     34   
        override val config: HttpClientEngineConfig = HttpClientEngineConfig.Default
   35     35   
   36     36   
        override suspend fun roundTrip(context: ExecutionContext, request: HttpRequest): HttpCall {
   37     37   
            val response = handler(request)
   38     38   
            return HttpCall(request, response, Instant.now(), Instant.now())
   39     39   
        }
   40     40   
    }
   41     41   
   42         -
    private val mockPlatformProvider = TestPlatformProvider(
          42  +
    private val mockPlatformProvider = TestPlatformProvider.of(
   43     43   
        env = mapOf("AWS_BEARER_TOKEN_BEDROCK" to "bedrock-token"),
   44     44   
    )
   45     45   
   46     46   
    @Test
   47     47   
    fun testAuthSchemePreferenceConfigured() = runTest {
   48     48   
        val expectedAuthSchemePreference = listOf(AuthSchemeId.HttpBearer)
   49     49   
        val builder = BedrockClient.Builder()
   50     50   
   51     51   
        finalizeBearerTokenConfig(builder, mockPlatformProvider)
   52     52   
   53     53   
        assertEquals(expectedAuthSchemePreference, builder.config.authSchemePreference)
   54     54   
    }
   55     55   
   56     56   
    @Test
   57     57   
    fun testBearerAuthSchemePromotedToFirst() = runTest {
   58     58   
        val expectedAuthSchemePreference = listOf(AuthSchemeId.HttpBearer, AuthSchemeId.AwsSigV4)
   59     59   
        val builder = BedrockClient.Builder()
   60     60   
   61     61   
        builder.config.authSchemePreference = listOf(AuthSchemeId.AwsSigV4)
   62     62   
        finalizeBearerTokenConfig(builder, mockPlatformProvider)
   63     63   
        assertEquals(expectedAuthSchemePreference, builder.config.authSchemePreference)
   64     64   
   65     65   
        builder.config.authSchemePreference = listOf(AuthSchemeId.AwsSigV4, AuthSchemeId.HttpBearer)
   66     66   
        finalizeBearerTokenConfig(builder, mockPlatformProvider)
   67     67   
        assertEquals(expectedAuthSchemePreference, builder.config.authSchemePreference)
   68     68   
    }
   69     69   
   70     70   
    @Test
   71     71   
    fun testBearerTokenProviderConfigured() = runTest {
   72     72   
        val builder = BedrockClient.Builder()
   73     73   
        finalizeBearerTokenConfig(builder, mockPlatformProvider)
   74     74   
   75     75   
        assertNotNull(builder.config.bearerTokenProvider)
   76     76   
        val token = builder.config.bearerTokenProvider!!.resolve()
   77     77   
        assertNotNull(token)
   78     78   
        assertEquals("bedrock-token", token.token)
   79     79   
    }
   80     80   
   81     81   
    @Test
   82     82   
    fun testBearerTokenSourcingPrecedence() = runTest {
   83     83   
        val builder = BedrockClient.Builder()
   84     84   
   85     85   
        finalizeBearerTokenConfig(
   86     86   
            builder,
   87         -
            TestPlatformProvider(
          87  +
            TestPlatformProvider.of(
   88     88   
                env = mapOf("AWS_BEARER_TOKEN_BEDROCK" to "env-bedrock-token"),
   89     89   
                props = mapOf("aws.bearerTokenBedrock" to "sys-props-bedrock-token"),
   90     90   
            ),
   91     91   
        )
   92     92   
   93     93   
        val token = builder.config.bearerTokenProvider!!.resolve()
   94     94   
        assertEquals("sys-props-bedrock-token", token.token)
   95     95   
    }
   96     96   
   97     97   
    @Test

tmp-codegen-diff/services/codebuild/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

tmp-codegen-diff/services/codebuild/generated-src/main/kotlin/aws/sdk/kotlin/services/codebuild/CodeBuildClient.kt

@@ -144,144 +204,204 @@
  164    164   
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
  165    165   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
  166    166   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
  167    167   
import kotlin.collections.List
  168    168   
import kotlin.jvm.JvmStatic
  169    169   
import kotlin.time.Duration
  170    170   
import kotlinx.coroutines.runBlocking
  171    171   
  172    172   
  173    173   
public const val ServiceId: String = "CodeBuild"
  174         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
         174  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
  175    175   
public const val ServiceApiVersion: String = "2016-10-06"
  176    176   
  177    177   
/**
  178    178   
 * # CodeBuild
  179    179   
 * CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for the most popular programming languages and build tools, such as Apache Maven, Gradle, and more. You can also fully customize build environments in CodeBuild to use your own build tools. CodeBuild scales automatically to meet peak build requests. You pay only for the build time you consume. For more information about CodeBuild, see the *[CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html).*
  180    180   
 */
  181    181   
public interface CodeBuildClient : SdkClient {
  182    182   
    /**
  183    183   
     * CodeBuildClient's configuration
  184    184   
     */

tmp-codegen-diff/services/dynamodb/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

tmp-codegen-diff/services/dynamodb/generated-src/main/kotlin/aws/sdk/kotlin/services/dynamodb/DynamoDbClient.kt

@@ -148,148 +208,208 @@
  168    168   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
  169    169   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
  170    170   
import kotlin.collections.List
  171    171   
import kotlin.jvm.JvmStatic
  172    172   
import kotlin.time.Duration
  173    173   
import kotlin.time.Duration.Companion.milliseconds
  174    174   
import kotlinx.coroutines.runBlocking
  175    175   
  176    176   
  177    177   
public const val ServiceId: String = "DynamoDB"
  178         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
         178  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
  179    179   
public const val ServiceApiVersion: String = "2012-08-10"
  180    180   
  181    181   
/**
  182    182   
 * # Amazon DynamoDB
  183    183   
 * Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.
  184    184   
 *
  185    185   
 * With DynamoDB, you can create database tables that can store and retrieve any amount of data, and serve any level of request traffic. You can scale up or scale down your tables' throughput capacity without downtime or performance degradation, and use the Amazon Web Services Management Console to monitor resource utilization and performance metrics.
  186    186   
 *
  187    187   
 * DynamoDB automatically spreads the data and traffic for your tables over a sufficient number of servers to handle your throughput and storage requirements, while maintaining consistent and fast performance. All of your data is stored on solid state disks (SSDs) and automatically replicated across multiple Availability Zones in an Amazon Web Services Region, providing built-in high availability and data durability.
  188    188   
 */

tmp-codegen-diff/services/ec2/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

tmp-codegen-diff/services/ec2/generated-src/main/kotlin/aws/sdk/kotlin/services/ec2/Ec2Client.kt

@@ -1572,1572 +1632,1632 @@
 1592   1592   
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
 1593   1593   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
 1594   1594   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
 1595   1595   
import kotlin.collections.List
 1596   1596   
import kotlin.jvm.JvmStatic
 1597   1597   
import kotlin.time.Duration
 1598   1598   
import kotlinx.coroutines.runBlocking
 1599   1599   
 1600   1600   
 1601   1601   
public const val ServiceId: String = "EC2"
 1602         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
        1602  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
 1603   1603   
public const val ServiceApiVersion: String = "2016-11-15"
 1604   1604   
 1605   1605   
/**
 1606   1606   
 * # Amazon Elastic Compute Cloud
 1607   1607   
 * This is the *Amazon EC2 API Reference*. It provides descriptions, API request parameters, and the XML response for each of the Amazon EC2 Query API actions. Note that the Amazon EC2 API includes actions for Amazon EC2 plus additional services, such as Amazon EBS and Amazon VPC.
 1608   1608   
 *
 1609   1609   
 * **Learn more**
 1610   1610   
 * + To learn about using the Query API, see [Using the API for Amazon EC2](https://docs.aws.amazon.com/ec2/latest/devguide/ec2-low-level-api.html).
 1611   1611   
 * + To learn about the permissions required to call an Amazon EC2 API action, see [Actions, resources, and condition keys for Amazon EC2](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html).
 1612   1612   
 * + To get the list of API actions by service and resource, see [Actions by service](https://docs.aws.amazon.com/ec2/latest/devguide/OperationList-query.html).

tmp-codegen-diff/services/polly/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

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

@@ -46,46 +106,106 @@
   66     66   
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
   67     67   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
   68     68   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
   69     69   
import kotlin.collections.List
   70     70   
import kotlin.jvm.JvmStatic
   71     71   
import kotlin.time.Duration
   72     72   
import kotlinx.coroutines.runBlocking
   73     73   
   74     74   
   75     75   
public const val ServiceId: String = "Polly"
   76         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
          76  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
   77     77   
public const val ServiceApiVersion: String = "2016-06-10"
   78     78   
   79     79   
/**
   80     80   
 * Amazon Polly is a web service that makes it easy to synthesize speech from text.
   81     81   
 *
   82     82   
 * The Amazon Polly service provides API operations for synthesizing high-quality speech from plain text and Speech Synthesis Markup Language (SSML), along with managing pronunciations lexicons that enable you to get the best results for your application domain.
   83     83   
 */
   84     84   
public interface PollyClient : SdkClient {
   85     85   
    /**
   86     86   
     * PollyClient's configuration

tmp-codegen-diff/services/s3/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

tmp-codegen-diff/services/s3/common/test/aws/sdk/kotlin/services/s3/internal/FinalizeConfigTest.kt

@@ -1,1 +102,103 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
package aws.sdk.kotlin.services.s3.internal
    6      6   
    7      7   
import aws.sdk.kotlin.runtime.config.profile.loadAwsSharedConfig
    8      8   
import aws.sdk.kotlin.services.s3.S3Client
           9  +
import aws.smithy.kotlin.runtime.util.TestFile
    9     10   
import aws.smithy.kotlin.runtime.util.TestPlatformProvider
   10     11   
import aws.smithy.kotlin.runtime.util.asyncLazy
   11     12   
import kotlinx.coroutines.test.runTest
   12     13   
import kotlin.test.Test
   13     14   
import kotlin.test.assertEquals
   14     15   
   15     16   
class FinalizeConfigTest {
   16     17   
    @Test
   17     18   
    fun testExplicitConfigTakesPrecedence() = runTest {
   18     19   
        val builder = S3Client.builder()
   19     20   
        builder.config.useArnRegion = false
   20     21   
        builder.config.disableMrap = true
   21         -
        val platform = TestPlatformProvider(
          22  +
        val platform = TestPlatformProvider.of(
   22     23   
            fs = mapOf(
   23         -
                "/users/test/.aws/config" to "[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false",
          24  +
                "/users/test/.aws/config" to TestFile("[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false"),
   24     25   
            ),
   25     26   
        )
   26     27   
        val sharedConfig = asyncLazy { loadAwsSharedConfig(platform) }
   27     28   
   28     29   
        finalizeS3Config(builder, sharedConfig, platform)
   29     30   
        assertEquals(false, builder.config.useArnRegion)
   30     31   
        assertEquals(true, builder.config.disableMrap)
   31     32   
    }
   32     33   
   33     34   
    @Test
   34     35   
    fun testSystemProperties() = runTest {
   35     36   
        val builder = S3Client.builder()
   36         -
        val platform = TestPlatformProvider(
          37  +
        val platform = TestPlatformProvider.of(
   37     38   
            env = mapOf(
   38     39   
                S3Setting.UseArnRegion.envVar to "false",
   39     40   
                S3Setting.DisableMultiRegionAccessPoints.envVar to "true",
   40     41   
            ),
   41     42   
            props = mapOf(
   42     43   
                S3Setting.UseArnRegion.sysProp to "true",
   43     44   
                S3Setting.DisableMultiRegionAccessPoints.sysProp to "false",
   44     45   
            ),
   45     46   
            fs = mapOf(
   46         -
                "/users/test/.aws/config" to "[default]\ns3_use_arn_region = false\ns3_disable_multiregion_access_points = true",
          47  +
                "/users/test/.aws/config" to TestFile("[default]\ns3_use_arn_region = false\ns3_disable_multiregion_access_points = true"),
   47     48   
            ),
   48     49   
        )
   49     50   
        val sharedConfig = asyncLazy { loadAwsSharedConfig(platform) }
   50     51   
   51     52   
        finalizeS3Config(builder, sharedConfig, platform)
   52     53   
        assertEquals(true, builder.config.useArnRegion)
   53     54   
        assertEquals(false, builder.config.disableMrap)
   54     55   
    }
   55     56   
   56     57   
    @Test
   57     58   
    fun testEnvironmentVariables() = runTest {
   58     59   
        val builder = S3Client.builder()
   59         -
        val platform = TestPlatformProvider(
          60  +
        val platform = TestPlatformProvider.of(
   60     61   
            env = mapOf(
   61     62   
                S3Setting.UseArnRegion.envVar to "false",
   62     63   
                S3Setting.DisableMultiRegionAccessPoints.envVar to "true",
   63     64   
            ),
   64     65   
            fs = mapOf(
   65         -
                "/users/test/.aws/config" to "[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false",
          66  +
                "/users/test/.aws/config" to TestFile("[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false"),
   66     67   
            ),
   67     68   
        )
   68     69   
        val sharedConfig = asyncLazy { loadAwsSharedConfig(platform) }
   69     70   
   70     71   
        finalizeS3Config(builder, sharedConfig, platform)
   71     72   
        assertEquals(false, builder.config.useArnRegion)
   72     73   
        assertEquals(true, builder.config.disableMrap)
   73     74   
    }
   74     75   
   75     76   
    @Test
   76     77   
    fun testProfile() = runTest {
   77     78   
        val builder = S3Client.builder()
   78         -
        val platform = TestPlatformProvider(
          79  +
        val platform = TestPlatformProvider.of(
   79     80   
            fs = mapOf(
   80         -
                "/users/test/.aws/config" to "[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false",
          81  +
                "/users/test/.aws/config" to TestFile("[default]\ns3_use_arn_region = true\ns3_disable_multiregion_access_points = false"),
   81     82   
            ),
   82     83   
        )
   83     84   
        val sharedConfig = asyncLazy { loadAwsSharedConfig(platform) }
   84     85   
   85     86   
        finalizeS3Config(builder, sharedConfig, platform)
   86     87   
        assertEquals(true, builder.config.useArnRegion)
   87     88   
        assertEquals(false, builder.config.disableMrap)
   88     89   
    }
   89     90   
   90     91   
    @Test

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

@@ -259,259 +319,319 @@
  279    279   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
  280    280   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
  281    281   
import kotlin.collections.List
  282    282   
import kotlin.collections.Set
  283    283   
import kotlin.jvm.JvmStatic
  284    284   
import kotlin.time.Duration
  285    285   
import kotlinx.coroutines.runBlocking
  286    286   
  287    287   
  288    288   
public const val ServiceId: String = "S3"
  289         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
         289  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
  290    290   
public const val ServiceApiVersion: String = "2006-03-01"
  291    291   
  292    292   
/**
  293    293   
 *
  294    294   
 */
  295    295   
public interface S3Client : SdkClient {
  296    296   
    /**
  297    297   
     * S3Client's configuration
  298    298   
     */
  299    299   
    public override val config: Config

tmp-codegen-diff/services/sts/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

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

@@ -50,50 +110,110 @@
   70     70   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
   71     71   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
   72     72   
import kotlin.collections.List
   73     73   
import kotlin.collections.Set
   74     74   
import kotlin.jvm.JvmStatic
   75     75   
import kotlin.time.Duration
   76     76   
import kotlinx.coroutines.runBlocking
   77     77   
   78     78   
   79     79   
public const val ServiceId: String = "STS"
   80         -
public const val SdkVersion: String = "1.6.108-SNAPSHOT"
          80  +
public const val SdkVersion: String = "1.7.0-SNAPSHOT"
   81     81   
public const val ServiceApiVersion: String = "2011-06-15"
   82     82   
   83     83   
/**
   84     84   
 * # Security Token Service
   85     85   
 * Security Token Service (STS) enables you to request temporary, limited-privilege credentials for users. This guide provides descriptions of the STS API. For more information about using this service, see [Temporary Security Credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
   86     86   
 */
   87     87   
public interface StsClient : SdkClient {
   88     88   
    /**
   89     89   
     * StsClient's configuration
   90     90   
     */