Skip to content

Commit d427f65

Browse files
committed
Merge branch 'main' of https://github.com/awslabs/aws-sdk-kotlin into smoke-tests-trait
2 parents c9d266f + 5449093 commit d427f65

File tree

11 files changed

+771
-23
lines changed

11 files changed

+771
-23
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.3.67] - 11/01/2024
4+
5+
### Features
6+
* (**bedrockagent**) Amazon Bedrock Knowledge Bases now supports using application inference profiles to increase throughput and improve resilience.
7+
* (**cloudwatchlogs**) This release introduces an improvement in PutLogEvents
8+
* (**docdbelastic**) Amazon DocumentDB Elastic Clusters adds support for pending maintenance actions feature with APIs GetPendingMaintenanceAction, ListPendingMaintenanceActions and ApplyPendingMaintenanceAction
9+
* (**taxsettings**) Add support for supplemental tax registrations via these new APIs: PutSupplementalTaxRegistration, ListSupplementalTaxRegistrations, and DeleteSupplementalTaxRegistration.
10+
311
## [1.3.66] - 10/31/2024
412

513
### Features

aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public class BusinessMetricsInterceptor : HttpInterceptor {
3535
/**
3636
* Makes sure the metrics do not exceed the maximum size and truncates them if so.
3737
*/
38-
private fun formatMetrics(metrics: MutableSet<String>): String {
38+
private fun formatMetrics(metrics: MutableSet<BusinessMetric>): String {
3939
if (metrics.isEmpty()) return ""
40-
val metricsString = metrics.joinToString(",", "m/")
40+
val metricsString = metrics.joinToString(",", "m/") { it.identifier }
4141
val metricsByteArray = metricsString.encodeToByteArray()
4242

4343
if (metricsByteArray.size <= BUSINESS_METRICS_MAX_LENGTH) return metricsString

aws-runtime/aws-http/common/test/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptorTest.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package aws.sdk.kotlin.runtime.http.interceptors
66

77
import aws.sdk.kotlin.runtime.http.BUSINESS_METRICS_MAX_LENGTH
88
import aws.sdk.kotlin.runtime.http.middleware.USER_AGENT
9+
import aws.smithy.kotlin.runtime.businessmetrics.BusinessMetric
910
import aws.smithy.kotlin.runtime.businessmetrics.SmithyBusinessMetric
1011
import aws.smithy.kotlin.runtime.businessmetrics.emitBusinessMetric
1112
import aws.smithy.kotlin.runtime.client.ProtocolRequestInterceptorContext
@@ -70,7 +71,11 @@ class BusinessMetricsInterceptorTest {
7071
executionContext.attributes[aws.smithy.kotlin.runtime.businessmetrics.BusinessMetrics] = mutableSetOf()
7172

7273
for (i in 0..1024) {
73-
executionContext.attributes[aws.smithy.kotlin.runtime.businessmetrics.BusinessMetrics].add(i.toString())
74+
executionContext.emitBusinessMetric(
75+
object : BusinessMetric {
76+
override val identifier: String = i.toString()
77+
},
78+
)
7479
}
7580

7681
val rawMetrics = executionContext[aws.smithy.kotlin.runtime.businessmetrics.BusinessMetrics]
@@ -91,9 +96,12 @@ class BusinessMetricsInterceptorTest {
9196
@Test
9297
fun malformedBusinessMetrics() = runTest {
9398
val executionContext = ExecutionContext()
99+
val reallyLongMetric = "All work and no play makes Jack a dull boy".repeat(1000)
94100

95-
executionContext.attributes[aws.smithy.kotlin.runtime.businessmetrics.BusinessMetrics] = mutableSetOf(
96-
"A".repeat(BUSINESS_METRICS_MAX_LENGTH),
101+
executionContext.attributes.emitBusinessMetric(
102+
object : BusinessMetric {
103+
override val identifier: String = reallyLongMetric
104+
},
97105
)
98106

99107
val interceptor = BusinessMetricsInterceptor()

codegen/aws-sdk-codegen/src/main/resources/aws/sdk/kotlin/codegen/endpoints.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16192,6 +16192,7 @@
1619216192
"hostname" : "rekognition-fips.ca-central-1.amazonaws.com"
1619316193
},
1619416194
"eu-central-1" : { },
16195+
"eu-south-2" : { },
1619516196
"eu-west-1" : { },
1619616197
"eu-west-2" : { },
1619716198
"il-central-1" : { },

codegen/sdk/aws-models/bedrock-agent.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,7 @@
20052005
"min": 20,
20062006
"max": 2048
20072007
},
2008-
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)$"
2008+
"smithy.api#pattern": "^(arn:aws(-[^:]{1,12})?:(bedrock|sagemaker):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-zA-Z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$"
20092009
}
20102010
},
20112011
"com.amazonaws.bedrockagent#BedrockEmbeddingModelConfiguration": {
@@ -2050,7 +2050,7 @@
20502050
"min": 1,
20512051
"max": 2048
20522052
},
2053-
"smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):inference-profile/[a-zA-Z0-9-:.]+)$"
2053+
"smithy.api#pattern": "^(arn:aws(-[^:]{1,12})?:(bedrock):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-zA-Z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$"
20542054
}
20552055
},
20562056
"com.amazonaws.bedrockagent#BucketOwnerAccountId": {
@@ -13621,7 +13621,7 @@
1362113621
"embeddingModelArn": {
1362213622
"target": "com.amazonaws.bedrockagent#BedrockEmbeddingModelArn",
1362313623
"traits": {
13624-
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.</p>",
13624+
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.</p>",
1362513625
"smithy.api#required": {}
1362613626
}
1362713627
},

codegen/sdk/aws-models/cloudwatch-logs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3386,7 +3386,7 @@
33863386
"traits": {
33873387
"smithy.api#length": {
33883388
"min": 2,
3389-
"max": 3
3389+
"max": 4
33903390
}
33913391
}
33923392
},

0 commit comments

Comments
 (0)