Skip to content

Commit

Permalink
Merge branch 'main' into presignedurl-requestpayer-change
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Aug 30, 2024
2 parents 0353706 + 97e2d3f commit d4bd42f
Show file tree
Hide file tree
Showing 144 changed files with 14,957 additions and 2,204 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Release (2024-08-30)

## Module Highlights
* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.37.0](service/backup/CHANGELOG.md#v1370-2024-08-30)
* **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.
* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.38.0](service/cloudwatchlogs/CHANGELOG.md#v1380-2024-08-30)
* **Feature**: This release introduces a new optional parameter: Entity, in PutLogEvents request
* `github.com/aws/aws-sdk-go-v2/service/datazone`: [v1.19.0](service/datazone/CHANGELOG.md#v1190-2024-08-30)
* **Feature**: Amazon DataZone now adds new governance capabilities of Domain Units for organization within your Data Domains, and Authorization Policies for tighter controls.
* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.28.0](service/redshiftdata/CHANGELOG.md#v1280-2024-08-30)
* **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`
* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.34.6](service/sqs/CHANGELOG.md#v1346-2024-08-30)
* **Bug Fix**: Fix issue where SDK could not send a VisibilityTimeout of 0 in a ChangeMessageVisibilityBatchRequestEntry.

# Release (2024-08-29)

## Module Highlights
Expand Down
538 changes: 278 additions & 260 deletions codegen/sdk-codegen/aws-models/backup.json

Large diffs are not rendered by default.

178 changes: 169 additions & 9 deletions codegen/sdk-codegen/aws-models/cloudwatch-logs.json

Large diffs are not rendered by default.

2,864 changes: 2,507 additions & 357 deletions codegen/sdk-codegen/aws-models/datazone.json

Large diffs are not rendered by default.

288 changes: 239 additions & 49 deletions codegen/sdk-codegen/aws-models/redshift-data.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package software.amazon.smithy.aws.go.codegen.customization;

import static java.util.stream.Collectors.toSet;

import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import software.amazon.smithy.go.codegen.GoSettings;
import software.amazon.smithy.go.codegen.integration.GoIntegration;
import software.amazon.smithy.model.Model;
import software.amazon.smithy.model.shapes.Shape;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.model.traits.RequiredTrait;
import software.amazon.smithy.model.transform.ModelTransformer;

/**
* Adds the @required trait to inputs that have @default, but lack of serialization of their zero value causes issues.
*
* If a shape is listed here there should generally be an upstreaming effort with the service team to fix. Link issues
* in comments (or internal ticket IDs) where available.
*/
public class BackfillRequiredTrait implements GoIntegration {
private static final Map<ShapeId, Set<ShapeId>> toBackfill = Map.ofEntries(
serviceToShapeIds("com.amazonaws.sqs#AmazonSQS",
// https://github.com/aws/aws-sdk/issues/527
"com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry$VisibilityTimeout")
);

private boolean mustPreprocess(ShapeId service) {
return toBackfill.containsKey(service);
}

@Override
public Model preprocessModel(Model model, GoSettings settings) {
var serviceId = settings.getService();
return mustPreprocess(serviceId)
? backfillRequired(model, toBackfill.get(serviceId))
: model;
}

private Model backfillRequired(Model model, Set<ShapeId> shapes) {
return ModelTransformer.create()
.mapShapes(model, (shape) -> shapes.contains(shape.getId()) ? withRequired(shape) : shape);
}

private Shape withRequired(Shape shape) {
return Shape.shapeToBuilder(shape)
.addTrait(new RequiredTrait())
.build();
}

private static Map.Entry<ShapeId, Set<ShapeId>> serviceToShapeIds(String serviceId, String... shapeIds) {
return Map.entry(
ShapeId.from(serviceId),
Arrays.stream(shapeIds).map(ShapeId::from).collect(toSet()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ software.amazon.smithy.aws.go.codegen.customization.AccountIDEndpointRouting
software.amazon.smithy.aws.go.codegen.customization.RetryModeUserAgent
software.amazon.smithy.aws.go.codegen.customization.RequestCompressionUserAgent
software.amazon.smithy.aws.go.codegen.customization.s3.ExpressUserAgent
software.amazon.smithy.aws.go.codegen.customization.BackfillRequiredTrait
Original file line number Diff line number Diff line change
Expand Up @@ -17527,7 +17527,18 @@
"protocols" : [ "https" ]
},
"ca-central-1" : {
"protocols" : [ "https" ]
"protocols" : [ "https" ],
"variants" : [ {
"hostname" : "serverlessrepo-fips.ca-central-1.amazonaws.com",
"tags" : [ "fips" ]
} ]
},
"ca-central-1-fips" : {
"credentialScope" : {
"region" : "ca-central-1"
},
"deprecated" : true,
"hostname" : "serverlessrepo-fips.ca-central-1.amazonaws.com"
},
"eu-central-1" : {
"protocols" : [ "https" ]
Expand Down
4 changes: 4 additions & 0 deletions feature/dynamodbstreams/attributevalue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.14.4 (2024-08-30)

* No change notes available for this release.

# v1.14.3 (2024-08-29)

* No change notes available for this release.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions service/backup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.37.0 (2024-08-30)

* **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.

# v1.36.4 (2024-08-15)

* **Dependency Update**: Bump minimum Go version to 1.21.
Expand Down
11 changes: 5 additions & 6 deletions service/backup/api_op_CancelLegalHold.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions service/backup/api_op_CreateBackupPlan.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions service/backup/api_op_CreateBackupSelection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions service/backup/api_op_CreateBackupVault.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions service/backup/api_op_CreateFramework.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 16 additions & 18 deletions service/backup/api_op_CreateLegalHold.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4bd42f

Please sign in to comment.