Skip to content

Commit

Permalink
remove retry headers from presigned url ops
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer committed Jul 15, 2024
1 parent 83e9a24 commit 3b2daf2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Sources/Services/AWSPolly/Sources/AWSPolly/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2587,8 +2587,6 @@ extension SynthesizeSpeechInput {
let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false)
builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware<SynthesizeSpeechOutput, EndpointParams>(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams))
builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware<SynthesizeSpeechOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware<SynthesizeSpeechInput, SynthesizeSpeechOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware<SynthesizeSpeechInput, SynthesizeSpeechOutput>(maxRetries: config.retryStrategyOptions.maxRetriesBase))
builder.serialize(SynthesizeSpeechInputGETQueryItemMiddleware())
var metricsAttributes = Smithy.Attributes()
metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Polly")
Expand Down
4 changes: 0 additions & 4 deletions Sources/Services/AWSS3/Sources/AWSS3/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21632,8 +21632,6 @@ extension GetObjectInput {
builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware<GetObjectOutput, EndpointParams>(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams))
builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware<GetObjectOutput>())
builder.interceptors.add(AWSClientRuntime.FlexibleChecksumsResponseMiddleware<GetObjectInput, GetObjectOutput>(validationMode: true))
builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware<GetObjectInput, GetObjectOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware<GetObjectInput, GetObjectOutput>(maxRetries: config.retryStrategyOptions.maxRetriesBase))
builder.serialize(GetObjectInputGETQueryItemMiddleware())
var metricsAttributes = Smithy.Attributes()
metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "S3")
Expand Down Expand Up @@ -21777,8 +21775,6 @@ extension PutObjectInput {
builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware<PutObjectOutput>())
builder.interceptors.add(AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware<PutObjectInput, PutObjectOutput>())
builder.interceptors.add(AWSClientRuntime.FlexibleChecksumsRequestMiddleware<PutObjectInput, PutObjectOutput>(checksumAlgorithm: input.checksumAlgorithm?.rawValue))
builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware<PutObjectInput, PutObjectOutput>())
builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware<PutObjectInput, PutObjectOutput>(maxRetries: config.retryStrategyOptions.maxRetriesBase))
builder.serialize(PutObjectPresignedURLMiddleware())
var metricsAttributes = Smithy.Attributes()
metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "S3")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import software.amazon.smithy.aws.swift.codegen.PresignableOperation
import software.amazon.smithy.aws.swift.codegen.SigV4Utils
import software.amazon.smithy.aws.swift.codegen.customization.InputTypeGETQueryItemMiddleware
import software.amazon.smithy.aws.swift.codegen.customization.PutObjectPresignedURLMiddleware
import software.amazon.smithy.aws.swift.codegen.middleware.AmzSdkInvocationIdMiddleware
import software.amazon.smithy.aws.swift.codegen.middleware.AmzSdkRequestMiddleware
import software.amazon.smithy.aws.swift.codegen.middleware.InputTypeGETQueryItemMiddlewareRenderable
import software.amazon.smithy.aws.swift.codegen.middleware.PutObjectPresignedURLMiddlewareRenderable
import software.amazon.smithy.codegen.core.Symbol
Expand Down Expand Up @@ -190,6 +192,9 @@ class PresignableUrlIntegration(private val presignedOperations: Map<String, Set
operationMiddlewareCopy.removeMiddleware(op, "OperationInputQueryItemMiddleware")
operationMiddlewareCopy.removeMiddleware(op, "OperationInputHeadersMiddleware")
operationMiddlewareCopy.removeMiddleware(op, "ContentLengthMiddleware")
operationMiddlewareCopy.removeMiddleware(op, AmzSdkRequestMiddleware.NAME)
operationMiddlewareCopy.removeMiddleware(op, AmzSdkInvocationIdMiddleware.NAME)

when (op.id.toString()) {
"com.amazonaws.s3#GetObject", "com.amazonaws.polly#SynthesizeSpeech" -> {
operationMiddlewareCopy.removeMiddleware(op, "OperationInputBodyMiddleware")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class AmzSdkInvocationIdMiddleware(
val model: Model,
val symbolProvider: SymbolProvider,
) : MiddlewareRenderable {
override val name: String = "AmzSdkInvocationIdMiddleware"
companion object {
const val NAME = "AmzSdkInvocationIdMiddleware"
}

override val name: String = NAME

override fun renderMiddlewareInit(
ctx: ProtocolGenerator.GenerationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class AmzSdkRequestMiddleware(
val model: Model,
val symbolProvider: SymbolProvider,
) : MiddlewareRenderable {
override val name: String = "AmzSdkRequestMiddleware"
companion object {
const val NAME = "AmzSdkRequestMiddleware"
}

override val name: String = NAME

override fun renderMiddlewareInit(
ctx: ProtocolGenerator.GenerationContext,
Expand Down

0 comments on commit 3b2daf2

Please sign in to comment.