Update module aws/aws-sdk-go-v2 to v0.28.0 #38
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.24.0->v0.28.0Release Notes
aws/aws-sdk-go-v2
v0.28.0Compare Source
New Features
service/s3: Add support for Accelerate, and Dualstack (#836)service/s3control: Add support for Dualstack (#836)Service Client Highlights
v0.28.0service/s3: Add support for Accelerate, and Dualstack (#836)service/s3control: Add support for Dualstack (#836)service/route53: Fix sanitizeURL customization to handle leading slash(/) #846service/route53: Fix codegen to correctly look for operations that need sanitize url (#851)Core SDK Highlights
aws/protocol/restjson: Fix unexpected JSON error response deserialization (#837)example/service/s3/listobjects: Add example for Amazon S3 ListObjectsV2 (#838)v0.27.0Compare Source
Configuration
The
configmodule's exported types were trimmed down to add clarity and reduce confusion. Additional changes to theconfigmodule' helpers.WithCredentialsProvider,WithHTTPClient, andWithEndpointResolverto functions instead of structs.MFATokenFuncProvider, useAssumeRoleCredentialOptionsProviderfor setting options forstscreds.AssumeRoleOptions.WithWebIdentityCredentialProviderOptionstoWithWebIdentityRoleCredentialOptionsAssumeRoleCredentialProviderOptionstoAssumeRoleCredentialOptionsProviderEndpointResolverFuncProvidertoEndpointResolverProviderAPI Client
Optionstype getter methods have been removed. Use the struct members instead.smithy.OperationErrortosmithy.OperationInvokeError.v0.26.0Compare Source
Configuration
The
configmodule's exported types were trimmed down to add clarity and reduce confusion. Additional changes to theconfigmodule' helpers.WithCredentialsProvider,WithHTTPClient, andWithEndpointResolverto functions instead of structs.MFATokenFuncProvider, useAssumeRoleCredentialOptionsProviderfor setting options forstscreds.AssumeRoleOptions.WithWebIdentityCredentialProviderOptionstoWithWebIdentityRoleCredentialOptionsAssumeRoleCredentialProviderOptionstoAssumeRoleCredentialOptionsProviderEndpointResolverFuncProvidertoEndpointResolverProviderAPI Client
Optionstype getter methods have been removed. Use the struct members instead.smithy.OperationErrortosmithy.OperationInvokeError.v0.25.0Compare Source
Design changes
The v2 preview SDK
v0.25.0release represents a significant stepping stone bringing the v2 SDK closer to its target design and usability. This release includes significant breaking changes to the v2 preview SDK. The updates in thev0.25.0release focus on refactoring and modularization of the SDK’s API clients to use the new client design, updated request pipeline (aka middleware), refactored credential providers, and configuration loading packages.We've also bumped the minimum supported Go version with this release. Starting with v0.25.0 the SDK requires a minimum version of Go
v1.15.As a part of the refactoring done to v2 preview SDK some components have not been included in this update. The following is a non exhaustive list of features that are not available.
We expect additional breaking changes to the v2 preview SDK in the coming releases. We expect these changes to focus on organizational, naming, and hardening the SDK's design for future feature capabilities after it is released for general availability.
Relocated Packages
In this release packages within the SDK were relocated, and in some cases those packages were converted to Go modules. The following is a list of packages have were relocated.
github.com/aws/aws-sdk-go-v2/aws/external=>github.com/aws/aws-sdk-go-v2/configmodulegithub.com/aws/aws-sdk-go-v2/aws/ec2metadata=>github.com/aws/aws-sdk-go-v2/ec2imdsmoduleThe
github.com/aws/aws-sdk-go-v2/credentialsmodule contains refactored credentials providers.github.com/aws/aws-sdk-go-v2/ec2rolecreds=>github.com/aws/aws-sdk-go-v2/credentials/ec2rolecredsgithub.com/aws/aws-sdk-go-v2/endpointcreds=>github.com/aws/aws-sdk-go-v2/credentials/endpointcredsgithub.com/aws/aws-sdk-go-v2/processcreds=>github.com/aws/aws-sdk-go-v2/credentials/processcredsgithub.com/aws/aws-sdk-go-v2/stscreds=>github.com/aws/aws-sdk-go-v2/credentials/stscredsModularization
New modules were added to the v2 preview SDK to allow the components to be versioned independently from each other. This allows your application to depend on specific versions of an API client module, and take discrete updates from the SDK core and other API client modules as desired.
API Clients
The following is a list of the major changes to the API client modules
v0.25.0, you'll need to add the API client's module to your application's go.mod file.typespackage within the API client's module, e.g.github.com/aws/aws-sdk-go-v2/service/s3/typesThese types were moved to improve documentation and discovery of the API client, operation, and input/output types. For example Amazon S3's ListObject's operation ListObjectOutput.Contents input parameter is a slice of types.Object.Requestsuffix. The method now invokes the operation instead of constructing a request, which needed to be invoked separately. The operation methods were also expanded to include functional options for providing operation specific configuration, such as modifying the request pipeline.Configuration
In addition to the
github.com/aws/aws-sdk-go-v2/aws/externalpackage being made a module atgithub.com/aws/aws-sdk-go-v2/config, theLoadDefaultAWSConfigfunction was renamed toLoadDefaultConfig.The
github.com/aws/aws-sdk-go-v2/aws/defaultspackage has been removed. Its components have been migrated to thegithub.com/aws/aws-sdk-go-v2/awspackage, andgithub.com/aws/aws-sdk-go-v2/configmodule.Error Handling
The
github.com/aws/aws-sdk-go-v2/aws/awserrpackage was removed as a part of the SDK error handling refactor. The SDK now uses typed errors built around Go v1.13's errors.As and errors.Unwrap features. All SDK error types that wrap other errors implement theUnwrapmethod. Generic v2 preview SDK errors created withfmt.Errorfuse%wto wrap the underlying error.The SDK API clients now include generated public error types for errors modeled for an API. The SDK will automatically deserialize the error response from the API into the appropriate error type. Your application should use
errors.Asto check if the returned error matches one it is interested in. Your application can also use the generic interface smithy.APIError to test if the API client's operation method returned an API error, but not check against a specific error.API client errors returned to the caller will use error wrapping to layer the error values. This allows underlying error types to be specific to their use case, and the SDK's more generic error types to wrap the underlying error.
For example, if an Amazon DynamoDB Scan operation call cannot find the
TableNamerequested, the error returned will contain dynamodb.ResourceNotFoundException. The SDK will return this error value wrapped in a couple layers, with each layer adding additional contextual information such as ResponseError for AWS HTTP response error metadata , and smithy.OperationError for API operation call metadata.Logging an error value will include information from each wrapped error. For example, the following is a mock error logged for a Scan operation call that failed because the table was not found.
The
github.com/aws/aws-sdk-go-v2/aws/endpointshas been removed from the SDK, along with all exported endpoint definitions and iteration behavior. Each generated API client now includes its own endpoint definition internally to the module.API clients can optionally be configured with a generic aws.EndpointResolver via the aws.Config.EndpointResolver. If the API client is not configured with a custom endpoint resolver it will defer to the endpoint resolver the client module was generated with.
Renovate configuration
📅 Schedule: "every weekend" in timezone Asia/Tokyo.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.