Skip to content

Commit d4bd42f

Browse files
authored
Merge branch 'main' into presignedurl-requestpayer-change
2 parents 0353706 + 97e2d3f commit d4bd42f

File tree

144 files changed

+14957
-2204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+14957
-2204
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Release (2024-08-30)
2+
3+
## Module Highlights
4+
* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.37.0](service/backup/CHANGELOG.md#v1370-2024-08-30)
5+
* **Feature**: The latest update introduces two new attributes, VaultType and VaultState, to the DescribeBackupVault and ListBackupVaults APIs. The VaultState attribute reflects the current status of the vault, while the VaultType attribute indicates the specific category of the vault.
6+
* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.38.0](service/cloudwatchlogs/CHANGELOG.md#v1380-2024-08-30)
7+
* **Feature**: This release introduces a new optional parameter: Entity, in PutLogEvents request
8+
* `github.com/aws/aws-sdk-go-v2/service/datazone`: [v1.19.0](service/datazone/CHANGELOG.md#v1190-2024-08-30)
9+
* **Feature**: Amazon DataZone now adds new governance capabilities of Domain Units for organization within your Data Domains, and Authorization Policies for tighter controls.
10+
* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.28.0](service/redshiftdata/CHANGELOG.md#v1280-2024-08-30)
11+
* **Feature**: The release include the new Redshift DataAPI feature for session use, customer execute query with --session-keep-alive-seconds parameter and can submit follow-up queries to same sessions with returned`session-id`
12+
* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.34.6](service/sqs/CHANGELOG.md#v1346-2024-08-30)
13+
* **Bug Fix**: Fix issue where SDK could not send a VisibilityTimeout of 0 in a ChangeMessageVisibilityBatchRequestEntry.
14+
115
# Release (2024-08-29)
216

317
## Module Highlights

codegen/sdk-codegen/aws-models/backup.json

+278-260
Large diffs are not rendered by default.

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

+169-9
Large diffs are not rendered by default.

codegen/sdk-codegen/aws-models/datazone.json

+2,507-357
Large diffs are not rendered by default.

codegen/sdk-codegen/aws-models/redshift-data.json

+239-49
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package software.amazon.smithy.aws.go.codegen.customization;
2+
3+
import static java.util.stream.Collectors.toSet;
4+
5+
import java.util.Arrays;
6+
import java.util.Map;
7+
import java.util.Set;
8+
import software.amazon.smithy.go.codegen.GoSettings;
9+
import software.amazon.smithy.go.codegen.integration.GoIntegration;
10+
import software.amazon.smithy.model.Model;
11+
import software.amazon.smithy.model.shapes.Shape;
12+
import software.amazon.smithy.model.shapes.ShapeId;
13+
import software.amazon.smithy.model.traits.RequiredTrait;
14+
import software.amazon.smithy.model.transform.ModelTransformer;
15+
16+
/**
17+
* Adds the @required trait to inputs that have @default, but lack of serialization of their zero value causes issues.
18+
*
19+
* If a shape is listed here there should generally be an upstreaming effort with the service team to fix. Link issues
20+
* in comments (or internal ticket IDs) where available.
21+
*/
22+
public class BackfillRequiredTrait implements GoIntegration {
23+
private static final Map<ShapeId, Set<ShapeId>> toBackfill = Map.ofEntries(
24+
serviceToShapeIds("com.amazonaws.sqs#AmazonSQS",
25+
// https://github.com/aws/aws-sdk/issues/527
26+
"com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry$VisibilityTimeout")
27+
);
28+
29+
private boolean mustPreprocess(ShapeId service) {
30+
return toBackfill.containsKey(service);
31+
}
32+
33+
@Override
34+
public Model preprocessModel(Model model, GoSettings settings) {
35+
var serviceId = settings.getService();
36+
return mustPreprocess(serviceId)
37+
? backfillRequired(model, toBackfill.get(serviceId))
38+
: model;
39+
}
40+
41+
private Model backfillRequired(Model model, Set<ShapeId> shapes) {
42+
return ModelTransformer.create()
43+
.mapShapes(model, (shape) -> shapes.contains(shape.getId()) ? withRequired(shape) : shape);
44+
}
45+
46+
private Shape withRequired(Shape shape) {
47+
return Shape.shapeToBuilder(shape)
48+
.addTrait(new RequiredTrait())
49+
.build();
50+
}
51+
52+
private static Map.Entry<ShapeId, Set<ShapeId>> serviceToShapeIds(String serviceId, String... shapeIds) {
53+
return Map.entry(
54+
ShapeId.from(serviceId),
55+
Arrays.stream(shapeIds).map(ShapeId::from).collect(toSet()));
56+
}
57+
}

codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration

+1
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ software.amazon.smithy.aws.go.codegen.customization.AccountIDEndpointRouting
8484
software.amazon.smithy.aws.go.codegen.customization.RetryModeUserAgent
8585
software.amazon.smithy.aws.go.codegen.customization.RequestCompressionUserAgent
8686
software.amazon.smithy.aws.go.codegen.customization.s3.ExpressUserAgent
87+
software.amazon.smithy.aws.go.codegen.customization.BackfillRequiredTrait

codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -17527,7 +17527,18 @@
1752717527
"protocols" : [ "https" ]
1752817528
},
1752917529
"ca-central-1" : {
17530-
"protocols" : [ "https" ]
17530+
"protocols" : [ "https" ],
17531+
"variants" : [ {
17532+
"hostname" : "serverlessrepo-fips.ca-central-1.amazonaws.com",
17533+
"tags" : [ "fips" ]
17534+
} ]
17535+
},
17536+
"ca-central-1-fips" : {
17537+
"credentialScope" : {
17538+
"region" : "ca-central-1"
17539+
},
17540+
"deprecated" : true,
17541+
"hostname" : "serverlessrepo-fips.ca-central-1.amazonaws.com"
1753117542
},
1753217543
"eu-central-1" : {
1753317544
"protocols" : [ "https" ]

feature/dynamodbstreams/attributevalue/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v1.14.4 (2024-08-30)
2+
3+
* No change notes available for this release.
4+
15
# v1.14.3 (2024-08-29)
26

37
* No change notes available for this release.

feature/dynamodbstreams/attributevalue/go_module_metadata.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v1.37.0 (2024-08-30)
2+
3+
* **Feature**: The latest update introduces two new attributes, VaultType and VaultState, to the DescribeBackupVault and ListBackupVaults APIs. The VaultState attribute reflects the current status of the vault, while the VaultType attribute indicates the specific category of the vault.
4+
15
# v1.36.4 (2024-08-15)
26

37
* **Dependency Update**: Bump minimum Go version to 1.21.

service/backup/api_op_CancelLegalHold.go

+5-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/api_op_CreateBackupPlan.go

+6-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/api_op_CreateBackupSelection.go

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/api_op_CreateBackupVault.go

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/api_op_CreateFramework.go

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/backup/api_op_CreateLegalHold.go

+16-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)