File tree Expand file tree Collapse file tree 7 files changed +17
-23
lines changed
aws-config/common/src/aws/sdk/kotlin/runtime
aws-core/common/src/aws/sdk/kotlin/runtime/client
aws-http/common/test/aws/sdk/kotlin/runtime/http/middleware Expand file tree Collapse file tree 7 files changed +17
-23
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "id" : " bee7fe5b-8719-4405-9dbb-88be16774861" ,
3+ "type" : " misc" ,
4+ "description" : " Refactor ClientOption to AttributeKey directly and track upstream HttpContext changes"
5+ }
Original file line number Diff line number Diff line change @@ -83,10 +83,8 @@ public class EcsCredentialsProvider internal constructor(
8383 val op = SdkHttpOperation .build<Unit , Credentials > {
8484 serializer = EcsCredentialsSerializer (authToken)
8585 deserializer = EcsCredentialsDeserializer ()
86- context {
87- operationName = " EcsCredentialsProvider"
88- serviceName = " EcsContainerMetadata"
89- }
86+ operationName = " EcsCredentialsProvider"
87+ serviceName = " EcsContainerMetadata"
9088 execution.endpointResolver = EndpointResolver { Endpoint (url) }
9189 }
9290
Original file line number Diff line number Diff line change @@ -117,10 +117,9 @@ public class ImdsClient private constructor(builder: Builder) : InstanceMetadata
117117 }
118118 }
119119 }
120+ operationName = path
121+ serviceName = " IMDS"
120122 context {
121- operationName = path
122- serviceName = " IMDS"
123-
124123 // artifact of re-using ServiceEndpointResolver middleware
125124 set(SdkClientOption .LogMode , logMode)
126125 }
Original file line number Diff line number Diff line change 44 */
55
66package aws.sdk.kotlin.runtime.client
7-
8- import aws.smithy.kotlin.runtime.client.ClientOption
7+ import aws.smithy.kotlin.runtime.util.AttributeKey
98
109/* *
1110 * A collection of AWS service client options. NOTE: most options are configured by default through the service
@@ -16,5 +15,5 @@ public object AwsClientOption {
1615 * The AWS region the client should use. Note this is not always the same as [AwsSigningAttributes.SigningRegion] in
1716 * the case of global services like IAM
1817 */
19- public val Region : ClientOption <String > = ClientOption (" AwsRegion" )
18+ public val Region : AttributeKey <String > = AttributeKey (" AwsRegion" )
2019}
Original file line number Diff line number Diff line change @@ -25,11 +25,8 @@ class AwsRetryHeaderMiddlewareTest {
2525 val op = SdkHttpOperation .build<Unit , Unit > {
2626 serializer = UnitSerializer
2727 deserializer = UnitDeserializer
28- context {
29- // required operation context
30- operationName = " TestOperation"
31- serviceName = " TestService"
32- }
28+ operationName = " TestOperation"
29+ serviceName = " TestService"
3330 }
3431
3532 val strategy = StandardRetryStrategy ()
Original file line number Diff line number Diff line change @@ -41,10 +41,8 @@ class RecursionDetectionTest {
4141 val op = SdkHttpOperation .build<Unit , HttpResponse > {
4242 serializer = if (existingTraceHeader != null ) TraceHeaderSerializer (existingTraceHeader) else UnitSerializer
4343 deserializer = IdentityDeserializer
44- context {
45- operationName = " testOperation"
46- serviceName = " TestService"
47- }
44+ operationName = " testOperation"
45+ serviceName = " TestService"
4846 }
4947
5048 val provider = TestPlatformProvider (env)
Original file line number Diff line number Diff line change @@ -31,10 +31,8 @@ class UserAgentTest {
3131 SdkHttpOperation .build<Unit , HttpResponse > {
3232 serializer = UnitSerializer
3333 deserializer = IdentityDeserializer
34- context {
35- operationName = " testOperation"
36- serviceName = " TestService"
37- }
34+ operationName = " testOperation"
35+ serviceName = " TestService"
3836 }.apply {
3937 val apiMd = ApiMetadata (" Test Service" , " 1.2.3" )
4038 val metadata = loadAwsUserAgentMetadataFromEnvironment(platformProvider, apiMd)
You can’t perform that action at this time.
0 commit comments