diff --git a/.changelog/e50b13c4d0994557a1f0098adce2c23e.json b/.changelog/e50b13c4d0994557a1f0098adce2c23e.json new file mode 100644 index 00000000000..4b9c198a97c --- /dev/null +++ b/.changelog/e50b13c4d0994557a1f0098adce2c23e.json @@ -0,0 +1,11 @@ +{ + "id": "e50b13c4-d099-4557-a1f0-098adce2c23e", + "type": "bugfix", + "description": "Respect caller region overrides in endpoint discovery.", + "modules": [ + "service/dynamodb", + "service/internal/endpoint-discovery", + "service/timestreamquery", + "service/timestreamwrite" + ] +} \ No newline at end of file diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java index 0f424b1ea63..f56907cf437 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java @@ -189,6 +189,7 @@ private static void generateAddDiscoverEndpointMiddleware( writer.write("EndpointDiscoveryEnableState: o.$L.$L,", ENDPOINT_DISCOVERY_OPTION, ENABLE_ENDPOINT_DISCOVERY_OPTION); writer.write("EndpointDiscoveryRequired: $L,", operationRequiresEndpointDiscovery(model, service, operation)); + writer.write("Region: o.Region,"); }); }); writer.write(""); @@ -216,11 +217,10 @@ private static void generateEndpointDiscoveryHandler( Symbol discoveryOperationInputSymbol = symbolProvider.toSymbol(discoveryOperationInput); writer.addUseImports(SmithyGoDependency.CONTEXT); - writer.openBlock("func (c *Client) $L(ctx context.Context, input $P, key string, opt $T) ($T, error) {", "}", + writer.openBlock("func (c *Client) $L(ctx context.Context, input $P, region, key string, opt $T) ($T, error) {", "}", DISCOVERY_ENDPOINT_HANDLER_NAME, discoveryOperationInputSymbol, DISCOVERY_ENDPOINT_OPTIONS, DISCOVERY_ENDPOINT_TYPE, () -> { - - if (serviceSupportsCustomDiscoveryEndpoint(model, service)) { +if (serviceSupportsCustomDiscoveryEndpoint(model, service)) { // check if endpoint resolver for endpoint discovery is of service-specific endpoint resolver type writer.writeDocs("assert endpoint resolver interface is of expected type."); writer.write("endpointResolver, ok := opt.$L.($T)", ENDPOINT_RESOLVER_USED_FOR_DISCOVERY, @@ -238,6 +238,7 @@ private static void generateEndpointDiscoveryHandler( // fetch endpoint via making discovery call writer.openBlock("output, err := c.$T(ctx, input, func(o *Options) {", "})", discoveryOperationSymbol, () -> { + writer.write("o.Region = region").write(""); writer.write("o.EndpointOptions.$L = opt.$L", DISABLE_HTTPS, DISABLE_HTTPS); writer.write("o.Logger = opt.Logger"); @@ -329,7 +330,7 @@ private static void generateFetchDiscoveredEndpointFunction( writer.addUseImports(SmithyGoDependency.CONTEXT); writer.openBlock( - "func (c *Client) $L(ctx context.Context, optFns ...func($P)) ($T, error) {", "}", + "func (c *Client) $L(ctx context.Context, region string, optFns ...func($P)) ($T, error) {", "}", fetchDiscoveredEndpointFuncName, DISCOVERY_ENDPOINT_OPTIONS, DISCOVERY_ENDPOINT_WEIGHTED_ADDRESS, () -> { writer.write("input := getOperationInput(ctx)"); @@ -346,6 +347,10 @@ private static void generateFetchDiscoveredEndpointFunction( String IDENTIFIER_MAP = "identifierMap"; writer.write("$L := make(map[string]string, 0)", IDENTIFIER_MAP); + // include region at a minimum + // see https://github.com/aws/aws-sdk-go-v2/issues/2163 + writer.write("$L[$S] = region", IDENTIFIER_MAP, "sdk#Region"); + for (MemberShape member : getMembersUsedAsIdForDiscovery(model, service, operation)) { String memberName = member.getMemberName(); Shape targetShape = model.expectShape(member.getTarget()); @@ -385,13 +390,13 @@ private static void generateFetchDiscoveredEndpointFunction( // if discovery not required, then spin up a unblocking go routine if (!operationRequiresEndpointDiscovery(model, service, operation)) { - writer.write("go c.$L(ctx, $L, key, opt)", DISCOVERY_ENDPOINT_HANDLER_NAME, + writer.write("go c.$L(ctx, $L, region, key, opt)", DISCOVERY_ENDPOINT_HANDLER_NAME, DISCOVERY_OPERATION_INPUT_NAME); writer.write("return $T{}, nil", DISCOVERY_ENDPOINT_WEIGHTED_ADDRESS); return; } - writer.write("endpoint, err := c.$L(ctx, $L, key, opt)", DISCOVERY_ENDPOINT_HANDLER_NAME, + writer.write("endpoint, err := c.$L(ctx, $L, region, key, opt)", DISCOVERY_ENDPOINT_HANDLER_NAME, DISCOVERY_OPERATION_INPUT_NAME); writer.write("if err != nil { return $T{}, err }", DISCOVERY_ENDPOINT_WEIGHTED_ADDRESS); writer.write(""); diff --git a/service/dynamodb/api_client.go b/service/dynamodb/api_client.go index aea21d7feea..2af366f13db 100644 --- a/service/dynamodb/api_client.go +++ b/service/dynamodb/api_client.go @@ -473,8 +473,10 @@ func resolveEnableEndpointDiscovery(o *Options) { o.EndpointDiscovery.EnableEndpointDiscovery = aws.EndpointDiscoveryAuto } -func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { +func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, region, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { output, err := c.DescribeEndpoints(ctx, input, func(o *Options) { + o.Region = region + o.EndpointOptions.DisableHTTPS = opt.DisableHTTPS o.Logger = opt.Logger }) diff --git a/service/dynamodb/api_op_BatchGetItem.go b/service/dynamodb/api_op_BatchGetItem.go index 2cd44f71344..3b715ebeda6 100644 --- a/service/dynamodb/api_op_BatchGetItem.go +++ b/service/dynamodb/api_op_BatchGetItem.go @@ -266,10 +266,11 @@ func addOpBatchGetItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Opti DiscoverOperation: c.fetchOpBatchGetItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpBatchGetItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpBatchGetItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*BatchGetItemInput) if !ok { @@ -278,6 +279,7 @@ func (c *Client) fetchOpBatchGetItemDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -292,7 +294,7 @@ func (c *Client) fetchOpBatchGetItemDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_BatchWriteItem.go b/service/dynamodb/api_op_BatchWriteItem.go index 01569a15826..19d9eb5177a 100644 --- a/service/dynamodb/api_op_BatchWriteItem.go +++ b/service/dynamodb/api_op_BatchWriteItem.go @@ -284,10 +284,11 @@ func addOpBatchWriteItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpBatchWriteItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpBatchWriteItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpBatchWriteItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*BatchWriteItemInput) if !ok { @@ -296,6 +297,7 @@ func (c *Client) fetchOpBatchWriteItemDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -310,7 +312,7 @@ func (c *Client) fetchOpBatchWriteItemDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_CreateBackup.go b/service/dynamodb/api_op_CreateBackup.go index 73115570dbf..83c266cbd65 100644 --- a/service/dynamodb/api_op_CreateBackup.go +++ b/service/dynamodb/api_op_CreateBackup.go @@ -171,10 +171,11 @@ func addOpCreateBackupDiscoverEndpointMiddleware(stack *middleware.Stack, o Opti DiscoverOperation: c.fetchOpCreateBackupDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateBackupDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateBackupDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateBackupInput) if !ok { @@ -183,6 +184,7 @@ func (c *Client) fetchOpCreateBackupDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -197,7 +199,7 @@ func (c *Client) fetchOpCreateBackupDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_CreateGlobalTable.go b/service/dynamodb/api_op_CreateGlobalTable.go index 4e7d48b7786..3747567a61e 100644 --- a/service/dynamodb/api_op_CreateGlobalTable.go +++ b/service/dynamodb/api_op_CreateGlobalTable.go @@ -190,10 +190,11 @@ func addOpCreateGlobalTableDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpCreateGlobalTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateGlobalTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateGlobalTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateGlobalTableInput) if !ok { @@ -202,6 +203,7 @@ func (c *Client) fetchOpCreateGlobalTableDiscoverEndpoint(ctx context.Context, o _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -216,7 +218,7 @@ func (c *Client) fetchOpCreateGlobalTableDiscoverEndpoint(ctx context.Context, o fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_CreateTable.go b/service/dynamodb/api_op_CreateTable.go index 2688198b8a7..f13d1cf0c88 100644 --- a/service/dynamodb/api_op_CreateTable.go +++ b/service/dynamodb/api_op_CreateTable.go @@ -291,10 +291,11 @@ func addOpCreateTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpCreateTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateTableInput) if !ok { @@ -303,6 +304,7 @@ func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -317,7 +319,7 @@ func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DeleteBackup.go b/service/dynamodb/api_op_DeleteBackup.go index 9e2e2382e1f..8cdc7465d5f 100644 --- a/service/dynamodb/api_op_DeleteBackup.go +++ b/service/dynamodb/api_op_DeleteBackup.go @@ -150,10 +150,11 @@ func addOpDeleteBackupDiscoverEndpointMiddleware(stack *middleware.Stack, o Opti DiscoverOperation: c.fetchOpDeleteBackupDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteBackupDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteBackupDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteBackupInput) if !ok { @@ -162,6 +163,7 @@ func (c *Client) fetchOpDeleteBackupDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -176,7 +178,7 @@ func (c *Client) fetchOpDeleteBackupDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DeleteItem.go b/service/dynamodb/api_op_DeleteItem.go index 2f4cb0447c9..a419f531c14 100644 --- a/service/dynamodb/api_op_DeleteItem.go +++ b/service/dynamodb/api_op_DeleteItem.go @@ -286,10 +286,11 @@ func addOpDeleteItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Option DiscoverOperation: c.fetchOpDeleteItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteItemInput) if !ok { @@ -298,6 +299,7 @@ func (c *Client) fetchOpDeleteItemDiscoverEndpoint(ctx context.Context, optFns . _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -312,7 +314,7 @@ func (c *Client) fetchOpDeleteItemDiscoverEndpoint(ctx context.Context, optFns . fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DeleteTable.go b/service/dynamodb/api_op_DeleteTable.go index 4d4887ade42..620e0dc83b9 100644 --- a/service/dynamodb/api_op_DeleteTable.go +++ b/service/dynamodb/api_op_DeleteTable.go @@ -165,10 +165,11 @@ func addOpDeleteTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpDeleteTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteTableInput) if !ok { @@ -177,6 +178,7 @@ func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -191,7 +193,7 @@ func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeBackup.go b/service/dynamodb/api_op_DescribeBackup.go index 4d8df37a8e4..6fbbc24848e 100644 --- a/service/dynamodb/api_op_DescribeBackup.go +++ b/service/dynamodb/api_op_DescribeBackup.go @@ -150,10 +150,11 @@ func addOpDescribeBackupDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpDescribeBackupDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeBackupDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeBackupDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeBackupInput) if !ok { @@ -162,6 +163,7 @@ func (c *Client) fetchOpDescribeBackupDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -176,7 +178,7 @@ func (c *Client) fetchOpDescribeBackupDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeContinuousBackups.go b/service/dynamodb/api_op_DescribeContinuousBackups.go index a8c8a551c9a..b34230c0f86 100644 --- a/service/dynamodb/api_op_DescribeContinuousBackups.go +++ b/service/dynamodb/api_op_DescribeContinuousBackups.go @@ -159,10 +159,11 @@ func addOpDescribeContinuousBackupsDiscoverEndpointMiddleware(stack *middleware. DiscoverOperation: c.fetchOpDescribeContinuousBackupsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeContinuousBackupsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeContinuousBackupsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeContinuousBackupsInput) if !ok { @@ -171,6 +172,7 @@ func (c *Client) fetchOpDescribeContinuousBackupsDiscoverEndpoint(ctx context.Co _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -185,7 +187,7 @@ func (c *Client) fetchOpDescribeContinuousBackupsDiscoverEndpoint(ctx context.Co fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeGlobalTable.go b/service/dynamodb/api_op_DescribeGlobalTable.go index cc19679a267..54018ab9546 100644 --- a/service/dynamodb/api_op_DescribeGlobalTable.go +++ b/service/dynamodb/api_op_DescribeGlobalTable.go @@ -157,10 +157,11 @@ func addOpDescribeGlobalTableDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpDescribeGlobalTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeGlobalTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeGlobalTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeGlobalTableInput) if !ok { @@ -169,6 +170,7 @@ func (c *Client) fetchOpDescribeGlobalTableDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -183,7 +185,7 @@ func (c *Client) fetchOpDescribeGlobalTableDiscoverEndpoint(ctx context.Context, fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeGlobalTableSettings.go b/service/dynamodb/api_op_DescribeGlobalTableSettings.go index d82dd82b413..a4bc35832ed 100644 --- a/service/dynamodb/api_op_DescribeGlobalTableSettings.go +++ b/service/dynamodb/api_op_DescribeGlobalTableSettings.go @@ -160,10 +160,11 @@ func addOpDescribeGlobalTableSettingsDiscoverEndpointMiddleware(stack *middlewar DiscoverOperation: c.fetchOpDescribeGlobalTableSettingsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeGlobalTableSettingsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeGlobalTableSettingsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeGlobalTableSettingsInput) if !ok { @@ -172,6 +173,7 @@ func (c *Client) fetchOpDescribeGlobalTableSettingsDiscoverEndpoint(ctx context. _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -186,7 +188,7 @@ func (c *Client) fetchOpDescribeGlobalTableSettingsDiscoverEndpoint(ctx context. fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go b/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go index 81dbdeb841c..dc1a38b22d5 100644 --- a/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go @@ -152,10 +152,11 @@ func addOpDescribeKinesisStreamingDestinationDiscoverEndpointMiddleware(stack *m DiscoverOperation: c.fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeKinesisStreamingDestinationInput) if !ok { @@ -164,6 +165,7 @@ func (c *Client) fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint(ctx _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -178,7 +180,7 @@ func (c *Client) fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint(ctx fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeLimits.go b/service/dynamodb/api_op_DescribeLimits.go index 89753aa12d1..ebeb13a1092 100644 --- a/service/dynamodb/api_op_DescribeLimits.go +++ b/service/dynamodb/api_op_DescribeLimits.go @@ -193,10 +193,11 @@ func addOpDescribeLimitsDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpDescribeLimitsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeLimitsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeLimitsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeLimitsInput) if !ok { @@ -205,6 +206,7 @@ func (c *Client) fetchOpDescribeLimitsDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -219,7 +221,7 @@ func (c *Client) fetchOpDescribeLimitsDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeTable.go b/service/dynamodb/api_op_DescribeTable.go index 5b7bc648663..f57a700479e 100644 --- a/service/dynamodb/api_op_DescribeTable.go +++ b/service/dynamodb/api_op_DescribeTable.go @@ -163,10 +163,11 @@ func addOpDescribeTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpDescribeTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeTableInput) if !ok { @@ -175,6 +176,7 @@ func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -189,7 +191,7 @@ func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DescribeTimeToLive.go b/service/dynamodb/api_op_DescribeTimeToLive.go index 1dd79dc1323..524def9c942 100644 --- a/service/dynamodb/api_op_DescribeTimeToLive.go +++ b/service/dynamodb/api_op_DescribeTimeToLive.go @@ -149,10 +149,11 @@ func addOpDescribeTimeToLiveDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpDescribeTimeToLiveDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeTimeToLiveDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeTimeToLiveDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeTimeToLiveInput) if !ok { @@ -161,6 +162,7 @@ func (c *Client) fetchOpDescribeTimeToLiveDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -175,7 +177,7 @@ func (c *Client) fetchOpDescribeTimeToLiveDiscoverEndpoint(ctx context.Context, fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_DisableKinesisStreamingDestination.go b/service/dynamodb/api_op_DisableKinesisStreamingDestination.go index 67ea0f2ea6b..81b43d04dfe 100644 --- a/service/dynamodb/api_op_DisableKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_DisableKinesisStreamingDestination.go @@ -161,10 +161,11 @@ func addOpDisableKinesisStreamingDestinationDiscoverEndpointMiddleware(stack *mi DiscoverOperation: c.fetchOpDisableKinesisStreamingDestinationDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDisableKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDisableKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DisableKinesisStreamingDestinationInput) if !ok { @@ -173,6 +174,7 @@ func (c *Client) fetchOpDisableKinesisStreamingDestinationDiscoverEndpoint(ctx c _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -187,7 +189,7 @@ func (c *Client) fetchOpDisableKinesisStreamingDestinationDiscoverEndpoint(ctx c fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_EnableKinesisStreamingDestination.go b/service/dynamodb/api_op_EnableKinesisStreamingDestination.go index 74784c52cf0..6eee7606b65 100644 --- a/service/dynamodb/api_op_EnableKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_EnableKinesisStreamingDestination.go @@ -163,10 +163,11 @@ func addOpEnableKinesisStreamingDestinationDiscoverEndpointMiddleware(stack *mid DiscoverOperation: c.fetchOpEnableKinesisStreamingDestinationDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpEnableKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpEnableKinesisStreamingDestinationDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*EnableKinesisStreamingDestinationInput) if !ok { @@ -175,6 +176,7 @@ func (c *Client) fetchOpEnableKinesisStreamingDestinationDiscoverEndpoint(ctx co _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -189,7 +191,7 @@ func (c *Client) fetchOpEnableKinesisStreamingDestinationDiscoverEndpoint(ctx co fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_GetItem.go b/service/dynamodb/api_op_GetItem.go index df6595e8ce9..e4a3ed39e7e 100644 --- a/service/dynamodb/api_op_GetItem.go +++ b/service/dynamodb/api_op_GetItem.go @@ -230,10 +230,11 @@ func addOpGetItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, DiscoverOperation: c.fetchOpGetItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpGetItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpGetItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*GetItemInput) if !ok { @@ -242,6 +243,7 @@ func (c *Client) fetchOpGetItemDiscoverEndpoint(ctx context.Context, optFns ...f _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -256,7 +258,7 @@ func (c *Client) fetchOpGetItemDiscoverEndpoint(ctx context.Context, optFns ...f fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_ListBackups.go b/service/dynamodb/api_op_ListBackups.go index 5d7f269a761..7b4337aa3cf 100644 --- a/service/dynamodb/api_op_ListBackups.go +++ b/service/dynamodb/api_op_ListBackups.go @@ -190,10 +190,11 @@ func addOpListBackupsDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpListBackupsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListBackupsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListBackupsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListBackupsInput) if !ok { @@ -202,6 +203,7 @@ func (c *Client) fetchOpListBackupsDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -216,7 +218,7 @@ func (c *Client) fetchOpListBackupsDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_ListGlobalTables.go b/service/dynamodb/api_op_ListGlobalTables.go index c3e07f76d08..c95a235d243 100644 --- a/service/dynamodb/api_op_ListGlobalTables.go +++ b/service/dynamodb/api_op_ListGlobalTables.go @@ -165,10 +165,11 @@ func addOpListGlobalTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpListGlobalTablesDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListGlobalTablesDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListGlobalTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListGlobalTablesInput) if !ok { @@ -177,6 +178,7 @@ func (c *Client) fetchOpListGlobalTablesDiscoverEndpoint(ctx context.Context, op _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -191,7 +193,7 @@ func (c *Client) fetchOpListGlobalTablesDiscoverEndpoint(ctx context.Context, op fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_ListTables.go b/service/dynamodb/api_op_ListTables.go index 1bcfe6f4c41..8f452044797 100644 --- a/service/dynamodb/api_op_ListTables.go +++ b/service/dynamodb/api_op_ListTables.go @@ -164,10 +164,11 @@ func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Option DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListTablesInput) if !ok { @@ -176,6 +177,7 @@ func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns . _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -190,7 +192,7 @@ func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns . fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_ListTagsOfResource.go b/service/dynamodb/api_op_ListTagsOfResource.go index 6f92cc2e412..d5e4a398efb 100644 --- a/service/dynamodb/api_op_ListTagsOfResource.go +++ b/service/dynamodb/api_op_ListTagsOfResource.go @@ -162,10 +162,11 @@ func addOpListTagsOfResourceDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpListTagsOfResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListTagsOfResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListTagsOfResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListTagsOfResourceInput) if !ok { @@ -174,6 +175,7 @@ func (c *Client) fetchOpListTagsOfResourceDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -188,7 +190,7 @@ func (c *Client) fetchOpListTagsOfResourceDiscoverEndpoint(ctx context.Context, fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_PutItem.go b/service/dynamodb/api_op_PutItem.go index fb61bdbedbc..9b283842cd0 100644 --- a/service/dynamodb/api_op_PutItem.go +++ b/service/dynamodb/api_op_PutItem.go @@ -305,10 +305,11 @@ func addOpPutItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, DiscoverOperation: c.fetchOpPutItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpPutItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpPutItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*PutItemInput) if !ok { @@ -317,6 +318,7 @@ func (c *Client) fetchOpPutItemDiscoverEndpoint(ctx context.Context, optFns ...f _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -331,7 +333,7 @@ func (c *Client) fetchOpPutItemDiscoverEndpoint(ctx context.Context, optFns ...f fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_Query.go b/service/dynamodb/api_op_Query.go index 7a974b4efff..f5cff1836d4 100644 --- a/service/dynamodb/api_op_Query.go +++ b/service/dynamodb/api_op_Query.go @@ -440,10 +440,11 @@ func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*QueryInput) if !ok { @@ -452,6 +453,7 @@ func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...fun _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -466,7 +468,7 @@ func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...fun fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_RestoreTableFromBackup.go b/service/dynamodb/api_op_RestoreTableFromBackup.go index fe3d9178814..fbdc19e40d8 100644 --- a/service/dynamodb/api_op_RestoreTableFromBackup.go +++ b/service/dynamodb/api_op_RestoreTableFromBackup.go @@ -182,10 +182,11 @@ func addOpRestoreTableFromBackupDiscoverEndpointMiddleware(stack *middleware.Sta DiscoverOperation: c.fetchOpRestoreTableFromBackupDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpRestoreTableFromBackupDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpRestoreTableFromBackupDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*RestoreTableFromBackupInput) if !ok { @@ -194,6 +195,7 @@ func (c *Client) fetchOpRestoreTableFromBackupDiscoverEndpoint(ctx context.Conte _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -208,7 +210,7 @@ func (c *Client) fetchOpRestoreTableFromBackupDiscoverEndpoint(ctx context.Conte fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_RestoreTableToPointInTime.go b/service/dynamodb/api_op_RestoreTableToPointInTime.go index cda6519fbe1..79a98b606f9 100644 --- a/service/dynamodb/api_op_RestoreTableToPointInTime.go +++ b/service/dynamodb/api_op_RestoreTableToPointInTime.go @@ -204,10 +204,11 @@ func addOpRestoreTableToPointInTimeDiscoverEndpointMiddleware(stack *middleware. DiscoverOperation: c.fetchOpRestoreTableToPointInTimeDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpRestoreTableToPointInTimeDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpRestoreTableToPointInTimeDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*RestoreTableToPointInTimeInput) if !ok { @@ -216,6 +217,7 @@ func (c *Client) fetchOpRestoreTableToPointInTimeDiscoverEndpoint(ctx context.Co _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -230,7 +232,7 @@ func (c *Client) fetchOpRestoreTableToPointInTimeDiscoverEndpoint(ctx context.Co fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_Scan.go b/service/dynamodb/api_op_Scan.go index baea197ce34..935e0b1f623 100644 --- a/service/dynamodb/api_op_Scan.go +++ b/service/dynamodb/api_op_Scan.go @@ -389,10 +389,11 @@ func addOpScanDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c * DiscoverOperation: c.fetchOpScanDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ScanInput) if !ok { @@ -401,6 +402,7 @@ func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, optFns ...func _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -415,7 +417,7 @@ func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, optFns ...func fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_TagResource.go b/service/dynamodb/api_op_TagResource.go index 96549a798da..baed093265a 100644 --- a/service/dynamodb/api_op_TagResource.go +++ b/service/dynamodb/api_op_TagResource.go @@ -156,10 +156,11 @@ func addOpTagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpTagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*TagResourceInput) if !ok { @@ -168,6 +169,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -182,7 +184,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_TransactGetItems.go b/service/dynamodb/api_op_TransactGetItems.go index 064311ce6a8..f61d74fd0cc 100644 --- a/service/dynamodb/api_op_TransactGetItems.go +++ b/service/dynamodb/api_op_TransactGetItems.go @@ -179,10 +179,11 @@ func addOpTransactGetItemsDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpTransactGetItemsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpTransactGetItemsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpTransactGetItemsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*TransactGetItemsInput) if !ok { @@ -191,6 +192,7 @@ func (c *Client) fetchOpTransactGetItemsDiscoverEndpoint(ctx context.Context, op _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -205,7 +207,7 @@ func (c *Client) fetchOpTransactGetItemsDiscoverEndpoint(ctx context.Context, op fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_TransactWriteItems.go b/service/dynamodb/api_op_TransactWriteItems.go index 18f74fbbef5..a74c74322ce 100644 --- a/service/dynamodb/api_op_TransactWriteItems.go +++ b/service/dynamodb/api_op_TransactWriteItems.go @@ -236,10 +236,11 @@ func addOpTransactWriteItemsDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpTransactWriteItemsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpTransactWriteItemsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpTransactWriteItemsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*TransactWriteItemsInput) if !ok { @@ -248,6 +249,7 @@ func (c *Client) fetchOpTransactWriteItemsDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -262,7 +264,7 @@ func (c *Client) fetchOpTransactWriteItemsDiscoverEndpoint(ctx context.Context, fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UntagResource.go b/service/dynamodb/api_op_UntagResource.go index 67ebd3c4671..780af8f9797 100644 --- a/service/dynamodb/api_op_UntagResource.go +++ b/service/dynamodb/api_op_UntagResource.go @@ -154,10 +154,11 @@ func addOpUntagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpUntagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UntagResourceInput) if !ok { @@ -166,6 +167,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -180,7 +182,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateContinuousBackups.go b/service/dynamodb/api_op_UpdateContinuousBackups.go index 92b6eb9fa33..f423f10ec3f 100644 --- a/service/dynamodb/api_op_UpdateContinuousBackups.go +++ b/service/dynamodb/api_op_UpdateContinuousBackups.go @@ -163,10 +163,11 @@ func addOpUpdateContinuousBackupsDiscoverEndpointMiddleware(stack *middleware.St DiscoverOperation: c.fetchOpUpdateContinuousBackupsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateContinuousBackupsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateContinuousBackupsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateContinuousBackupsInput) if !ok { @@ -175,6 +176,7 @@ func (c *Client) fetchOpUpdateContinuousBackupsDiscoverEndpoint(ctx context.Cont _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -189,7 +191,7 @@ func (c *Client) fetchOpUpdateContinuousBackupsDiscoverEndpoint(ctx context.Cont fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateGlobalTable.go b/service/dynamodb/api_op_UpdateGlobalTable.go index 951600088ad..c72d117e4d2 100644 --- a/service/dynamodb/api_op_UpdateGlobalTable.go +++ b/service/dynamodb/api_op_UpdateGlobalTable.go @@ -176,10 +176,11 @@ func addOpUpdateGlobalTableDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpUpdateGlobalTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateGlobalTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateGlobalTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateGlobalTableInput) if !ok { @@ -188,6 +189,7 @@ func (c *Client) fetchOpUpdateGlobalTableDiscoverEndpoint(ctx context.Context, o _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -202,7 +204,7 @@ func (c *Client) fetchOpUpdateGlobalTableDiscoverEndpoint(ctx context.Context, o fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateGlobalTableSettings.go b/service/dynamodb/api_op_UpdateGlobalTableSettings.go index 2fa225e7f41..5f9fda591b8 100644 --- a/service/dynamodb/api_op_UpdateGlobalTableSettings.go +++ b/service/dynamodb/api_op_UpdateGlobalTableSettings.go @@ -185,10 +185,11 @@ func addOpUpdateGlobalTableSettingsDiscoverEndpointMiddleware(stack *middleware. DiscoverOperation: c.fetchOpUpdateGlobalTableSettingsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateGlobalTableSettingsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateGlobalTableSettingsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateGlobalTableSettingsInput) if !ok { @@ -197,6 +198,7 @@ func (c *Client) fetchOpUpdateGlobalTableSettingsDiscoverEndpoint(ctx context.Co _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -211,7 +213,7 @@ func (c *Client) fetchOpUpdateGlobalTableSettingsDiscoverEndpoint(ctx context.Co fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateItem.go b/service/dynamodb/api_op_UpdateItem.go index eef7727a1b1..ec34acc5847 100644 --- a/service/dynamodb/api_op_UpdateItem.go +++ b/service/dynamodb/api_op_UpdateItem.go @@ -348,10 +348,11 @@ func addOpUpdateItemDiscoverEndpointMiddleware(stack *middleware.Stack, o Option DiscoverOperation: c.fetchOpUpdateItemDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateItemDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateItemDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateItemInput) if !ok { @@ -360,6 +361,7 @@ func (c *Client) fetchOpUpdateItemDiscoverEndpoint(ctx context.Context, optFns . _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -374,7 +376,7 @@ func (c *Client) fetchOpUpdateItemDiscoverEndpoint(ctx context.Context, optFns . fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateTable.go b/service/dynamodb/api_op_UpdateTable.go index 310a1a2c4f0..5ff1bd9e917 100644 --- a/service/dynamodb/api_op_UpdateTable.go +++ b/service/dynamodb/api_op_UpdateTable.go @@ -217,10 +217,11 @@ func addOpUpdateTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpUpdateTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateTableInput) if !ok { @@ -229,6 +230,7 @@ func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -243,7 +245,7 @@ func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/dynamodb/api_op_UpdateTimeToLive.go b/service/dynamodb/api_op_UpdateTimeToLive.go index 9c0142d9826..c5ac3ef58e4 100644 --- a/service/dynamodb/api_op_UpdateTimeToLive.go +++ b/service/dynamodb/api_op_UpdateTimeToLive.go @@ -173,10 +173,11 @@ func addOpUpdateTimeToLiveDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpUpdateTimeToLiveDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: false, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateTimeToLiveDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateTimeToLiveDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateTimeToLiveInput) if !ok { @@ -185,6 +186,7 @@ func (c *Client) fetchOpUpdateTimeToLiveDiscoverEndpoint(ctx context.Context, op _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("DynamoDB.%v", identifierMap) @@ -199,7 +201,7 @@ func (c *Client) fetchOpUpdateTimeToLiveDiscoverEndpoint(ctx context.Context, op fn(&opt) } - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) return internalEndpointDiscovery.WeightedAddress{}, nil } diff --git a/service/internal/endpoint-discovery/middleware.go b/service/internal/endpoint-discovery/middleware.go index 882dd3475d8..c6b073d21fa 100644 --- a/service/internal/endpoint-discovery/middleware.go +++ b/service/internal/endpoint-discovery/middleware.go @@ -38,7 +38,7 @@ type DiscoverEndpoint struct { // DiscoverOperation represents the endpoint discovery operation that // returns an Endpoint or error. - DiscoverOperation func(ctx context.Context, options ...func(*DiscoverEndpointOptions)) (WeightedAddress, error) + DiscoverOperation func(ctx context.Context, region string, options ...func(*DiscoverEndpointOptions)) (WeightedAddress, error) // EndpointDiscoveryEnableState represents the customer configuration for endpoint // discovery feature. @@ -47,6 +47,9 @@ type DiscoverEndpoint struct { // EndpointDiscoveryRequired states if an operation requires to perform // endpoint discovery. EndpointDiscoveryRequired bool + + // The client region + Region string } // ID represents the middleware identifier @@ -79,7 +82,7 @@ func (d *DiscoverEndpoint) HandleFinalize( return next.HandleFinalize(ctx, in) } - weightedAddress, err := d.DiscoverOperation(ctx, d.Options...) + weightedAddress, err := d.DiscoverOperation(ctx, d.Region, d.Options...) if err != nil { return middleware.FinalizeOutput{}, middleware.Metadata{}, err } diff --git a/service/timestreamquery/api_client.go b/service/timestreamquery/api_client.go index 1982b9511b2..1860f24279a 100644 --- a/service/timestreamquery/api_client.go +++ b/service/timestreamquery/api_client.go @@ -476,7 +476,7 @@ func resolveEnableEndpointDiscovery(o *Options) { o.EndpointDiscovery.EnableEndpointDiscovery = aws.EndpointDiscoveryAuto } -func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { +func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, region, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { // assert endpoint resolver interface is of expected type. endpointResolver, ok := opt.EndpointResolverUsedForDiscovery.(EndpointResolver) if opt.EndpointResolverUsedForDiscovery != nil && !ok { @@ -485,6 +485,8 @@ func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input * } output, err := c.DescribeEndpoints(ctx, input, func(o *Options) { + o.Region = region + o.EndpointOptions.DisableHTTPS = opt.DisableHTTPS o.Logger = opt.Logger if endpointResolver != nil { diff --git a/service/timestreamquery/api_op_CancelQuery.go b/service/timestreamquery/api_op_CancelQuery.go index 98e46a3a975..6e99abe40e7 100644 --- a/service/timestreamquery/api_op_CancelQuery.go +++ b/service/timestreamquery/api_op_CancelQuery.go @@ -150,10 +150,11 @@ func addOpCancelQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpCancelQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCancelQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCancelQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CancelQueryInput) if !ok { @@ -162,6 +163,7 @@ func (c *Client) fetchOpCancelQueryDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -176,7 +178,7 @@ func (c *Client) fetchOpCancelQueryDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_CreateScheduledQuery.go b/service/timestreamquery/api_op_CreateScheduledQuery.go index fd40eff1a7d..befa051e119 100644 --- a/service/timestreamquery/api_op_CreateScheduledQuery.go +++ b/service/timestreamquery/api_op_CreateScheduledQuery.go @@ -214,10 +214,11 @@ func addOpCreateScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack DiscoverOperation: c.fetchOpCreateScheduledQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateScheduledQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateScheduledQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateScheduledQueryInput) if !ok { @@ -226,6 +227,7 @@ func (c *Client) fetchOpCreateScheduledQueryDiscoverEndpoint(ctx context.Context _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -240,7 +242,7 @@ func (c *Client) fetchOpCreateScheduledQueryDiscoverEndpoint(ctx context.Context fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_DeleteScheduledQuery.go b/service/timestreamquery/api_op_DeleteScheduledQuery.go index ae720bd477e..f2a93f948f2 100644 --- a/service/timestreamquery/api_op_DeleteScheduledQuery.go +++ b/service/timestreamquery/api_op_DeleteScheduledQuery.go @@ -139,10 +139,11 @@ func addOpDeleteScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack DiscoverOperation: c.fetchOpDeleteScheduledQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteScheduledQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteScheduledQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteScheduledQueryInput) if !ok { @@ -151,6 +152,7 @@ func (c *Client) fetchOpDeleteScheduledQueryDiscoverEndpoint(ctx context.Context _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -165,7 +167,7 @@ func (c *Client) fetchOpDeleteScheduledQueryDiscoverEndpoint(ctx context.Context fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_DescribeScheduledQuery.go b/service/timestreamquery/api_op_DescribeScheduledQuery.go index 57b1d59ae06..ac4650a5737 100644 --- a/service/timestreamquery/api_op_DescribeScheduledQuery.go +++ b/service/timestreamquery/api_op_DescribeScheduledQuery.go @@ -146,10 +146,11 @@ func addOpDescribeScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Sta DiscoverOperation: c.fetchOpDescribeScheduledQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeScheduledQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeScheduledQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeScheduledQueryInput) if !ok { @@ -158,6 +159,7 @@ func (c *Client) fetchOpDescribeScheduledQueryDiscoverEndpoint(ctx context.Conte _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -172,7 +174,7 @@ func (c *Client) fetchOpDescribeScheduledQueryDiscoverEndpoint(ctx context.Conte fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_ExecuteScheduledQuery.go b/service/timestreamquery/api_op_ExecuteScheduledQuery.go index 44e15465ace..4668a545c27 100644 --- a/service/timestreamquery/api_op_ExecuteScheduledQuery.go +++ b/service/timestreamquery/api_op_ExecuteScheduledQuery.go @@ -151,10 +151,11 @@ func addOpExecuteScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stac DiscoverOperation: c.fetchOpExecuteScheduledQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpExecuteScheduledQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpExecuteScheduledQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ExecuteScheduledQueryInput) if !ok { @@ -163,6 +164,7 @@ func (c *Client) fetchOpExecuteScheduledQueryDiscoverEndpoint(ctx context.Contex _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -177,7 +179,7 @@ func (c *Client) fetchOpExecuteScheduledQueryDiscoverEndpoint(ctx context.Contex fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_ListScheduledQueries.go b/service/timestreamquery/api_op_ListScheduledQueries.go index 198c26c8116..43d981969fa 100644 --- a/service/timestreamquery/api_op_ListScheduledQueries.go +++ b/service/timestreamquery/api_op_ListScheduledQueries.go @@ -152,10 +152,11 @@ func addOpListScheduledQueriesDiscoverEndpointMiddleware(stack *middleware.Stack DiscoverOperation: c.fetchOpListScheduledQueriesDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListScheduledQueriesInput) if !ok { @@ -164,6 +165,7 @@ func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -178,7 +180,7 @@ func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_ListTagsForResource.go b/service/timestreamquery/api_op_ListTagsForResource.go index d84eec33b4f..29cfc434d41 100644 --- a/service/timestreamquery/api_op_ListTagsForResource.go +++ b/service/timestreamquery/api_op_ListTagsForResource.go @@ -157,10 +157,11 @@ func addOpListTagsForResourceDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpListTagsForResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListTagsForResourceInput) if !ok { @@ -169,6 +170,7 @@ func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -183,7 +185,7 @@ func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_PrepareQuery.go b/service/timestreamquery/api_op_PrepareQuery.go index ba6052d50c7..6d4ced4aefa 100644 --- a/service/timestreamquery/api_op_PrepareQuery.go +++ b/service/timestreamquery/api_op_PrepareQuery.go @@ -165,10 +165,11 @@ func addOpPrepareQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Opti DiscoverOperation: c.fetchOpPrepareQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpPrepareQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpPrepareQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*PrepareQueryInput) if !ok { @@ -177,6 +178,7 @@ func (c *Client) fetchOpPrepareQueryDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -191,7 +193,7 @@ func (c *Client) fetchOpPrepareQueryDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_Query.go b/service/timestreamquery/api_op_Query.go index 39c4a4e9952..6316c5c95bd 100644 --- a/service/timestreamquery/api_op_Query.go +++ b/service/timestreamquery/api_op_Query.go @@ -234,10 +234,11 @@ func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*QueryInput) if !ok { @@ -246,6 +247,7 @@ func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...fun _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -260,7 +262,7 @@ func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, optFns ...fun fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_TagResource.go b/service/timestreamquery/api_op_TagResource.go index bf3b17a2b55..1d6a9000b38 100644 --- a/service/timestreamquery/api_op_TagResource.go +++ b/service/timestreamquery/api_op_TagResource.go @@ -148,10 +148,11 @@ func addOpTagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpTagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*TagResourceInput) if !ok { @@ -160,6 +161,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -174,7 +176,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_UntagResource.go b/service/timestreamquery/api_op_UntagResource.go index 8e5af2c54ed..b14d0652a87 100644 --- a/service/timestreamquery/api_op_UntagResource.go +++ b/service/timestreamquery/api_op_UntagResource.go @@ -146,10 +146,11 @@ func addOpUntagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpUntagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UntagResourceInput) if !ok { @@ -158,6 +159,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -172,7 +174,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamquery/api_op_UpdateScheduledQuery.go b/service/timestreamquery/api_op_UpdateScheduledQuery.go index c56ac180026..cf681bfb569 100644 --- a/service/timestreamquery/api_op_UpdateScheduledQuery.go +++ b/service/timestreamquery/api_op_UpdateScheduledQuery.go @@ -145,10 +145,11 @@ func addOpUpdateScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack DiscoverOperation: c.fetchOpUpdateScheduledQueryDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateScheduledQueryDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateScheduledQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateScheduledQueryInput) if !ok { @@ -157,6 +158,7 @@ func (c *Client) fetchOpUpdateScheduledQueryDiscoverEndpoint(ctx context.Context _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Query.%v", identifierMap) @@ -171,7 +173,7 @@ func (c *Client) fetchOpUpdateScheduledQueryDiscoverEndpoint(ctx context.Context fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_client.go b/service/timestreamwrite/api_client.go index 105451655ad..4df619efbfd 100644 --- a/service/timestreamwrite/api_client.go +++ b/service/timestreamwrite/api_client.go @@ -476,7 +476,7 @@ func resolveEnableEndpointDiscovery(o *Options) { o.EndpointDiscovery.EnableEndpointDiscovery = aws.EndpointDiscoveryAuto } -func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { +func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input *DescribeEndpointsInput, region, key string, opt internalEndpointDiscovery.DiscoverEndpointOptions) (internalEndpointDiscovery.Endpoint, error) { // assert endpoint resolver interface is of expected type. endpointResolver, ok := opt.EndpointResolverUsedForDiscovery.(EndpointResolver) if opt.EndpointResolverUsedForDiscovery != nil && !ok { @@ -485,6 +485,8 @@ func (c *Client) handleEndpointDiscoveryFromService(ctx context.Context, input * } output, err := c.DescribeEndpoints(ctx, input, func(o *Options) { + o.Region = region + o.EndpointOptions.DisableHTTPS = opt.DisableHTTPS o.Logger = opt.Logger if endpointResolver != nil { diff --git a/service/timestreamwrite/api_op_CreateBatchLoadTask.go b/service/timestreamwrite/api_op_CreateBatchLoadTask.go index 2313de53004..9564bdf7dab 100644 --- a/service/timestreamwrite/api_op_CreateBatchLoadTask.go +++ b/service/timestreamwrite/api_op_CreateBatchLoadTask.go @@ -183,10 +183,11 @@ func addOpCreateBatchLoadTaskDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpCreateBatchLoadTaskDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateBatchLoadTaskDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateBatchLoadTaskDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateBatchLoadTaskInput) if !ok { @@ -195,6 +196,7 @@ func (c *Client) fetchOpCreateBatchLoadTaskDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -209,7 +211,7 @@ func (c *Client) fetchOpCreateBatchLoadTaskDiscoverEndpoint(ctx context.Context, fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_CreateDatabase.go b/service/timestreamwrite/api_op_CreateDatabase.go index eb555ee40d0..3e2f123657e 100644 --- a/service/timestreamwrite/api_op_CreateDatabase.go +++ b/service/timestreamwrite/api_op_CreateDatabase.go @@ -158,10 +158,11 @@ func addOpCreateDatabaseDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpCreateDatabaseDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateDatabaseDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateDatabaseDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateDatabaseInput) if !ok { @@ -170,6 +171,7 @@ func (c *Client) fetchOpCreateDatabaseDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -184,7 +186,7 @@ func (c *Client) fetchOpCreateDatabaseDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_CreateTable.go b/service/timestreamwrite/api_op_CreateTable.go index 9fa486b95f5..880a333d5d8 100644 --- a/service/timestreamwrite/api_op_CreateTable.go +++ b/service/timestreamwrite/api_op_CreateTable.go @@ -169,10 +169,11 @@ func addOpCreateTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpCreateTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*CreateTableInput) if !ok { @@ -181,6 +182,7 @@ func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -195,7 +197,7 @@ func (c *Client) fetchOpCreateTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_DeleteDatabase.go b/service/timestreamwrite/api_op_DeleteDatabase.go index 0bcf70799cd..ab924b7c33e 100644 --- a/service/timestreamwrite/api_op_DeleteDatabase.go +++ b/service/timestreamwrite/api_op_DeleteDatabase.go @@ -145,10 +145,11 @@ func addOpDeleteDatabaseDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpDeleteDatabaseDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteDatabaseDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteDatabaseDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteDatabaseInput) if !ok { @@ -157,6 +158,7 @@ func (c *Client) fetchOpDeleteDatabaseDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -171,7 +173,7 @@ func (c *Client) fetchOpDeleteDatabaseDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_DeleteTable.go b/service/timestreamwrite/api_op_DeleteTable.go index 137d94d59c3..51a02dcd3c9 100644 --- a/service/timestreamwrite/api_op_DeleteTable.go +++ b/service/timestreamwrite/api_op_DeleteTable.go @@ -149,10 +149,11 @@ func addOpDeleteTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpDeleteTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DeleteTableInput) if !ok { @@ -161,6 +162,7 @@ func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -175,7 +177,7 @@ func (c *Client) fetchOpDeleteTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_DescribeBatchLoadTask.go b/service/timestreamwrite/api_op_DescribeBatchLoadTask.go index bfc1fca5169..5a7691acbe6 100644 --- a/service/timestreamwrite/api_op_DescribeBatchLoadTask.go +++ b/service/timestreamwrite/api_op_DescribeBatchLoadTask.go @@ -149,10 +149,11 @@ func addOpDescribeBatchLoadTaskDiscoverEndpointMiddleware(stack *middleware.Stac DiscoverOperation: c.fetchOpDescribeBatchLoadTaskDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeBatchLoadTaskDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeBatchLoadTaskDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeBatchLoadTaskInput) if !ok { @@ -161,6 +162,7 @@ func (c *Client) fetchOpDescribeBatchLoadTaskDiscoverEndpoint(ctx context.Contex _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -175,7 +177,7 @@ func (c *Client) fetchOpDescribeBatchLoadTaskDiscoverEndpoint(ctx context.Contex fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_DescribeDatabase.go b/service/timestreamwrite/api_op_DescribeDatabase.go index d1d1356e0fe..e7665f9b478 100644 --- a/service/timestreamwrite/api_op_DescribeDatabase.go +++ b/service/timestreamwrite/api_op_DescribeDatabase.go @@ -148,10 +148,11 @@ func addOpDescribeDatabaseDiscoverEndpointMiddleware(stack *middleware.Stack, o DiscoverOperation: c.fetchOpDescribeDatabaseDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeDatabaseDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeDatabaseDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeDatabaseInput) if !ok { @@ -160,6 +161,7 @@ func (c *Client) fetchOpDescribeDatabaseDiscoverEndpoint(ctx context.Context, op _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -174,7 +176,7 @@ func (c *Client) fetchOpDescribeDatabaseDiscoverEndpoint(ctx context.Context, op fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_DescribeTable.go b/service/timestreamwrite/api_op_DescribeTable.go index 37bc96087d1..ab126404f05 100644 --- a/service/timestreamwrite/api_op_DescribeTable.go +++ b/service/timestreamwrite/api_op_DescribeTable.go @@ -153,10 +153,11 @@ func addOpDescribeTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpDescribeTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*DescribeTableInput) if !ok { @@ -165,6 +166,7 @@ func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -179,7 +181,7 @@ func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_ListBatchLoadTasks.go b/service/timestreamwrite/api_op_ListBatchLoadTasks.go index e9385c48ac5..a704cc0545d 100644 --- a/service/timestreamwrite/api_op_ListBatchLoadTasks.go +++ b/service/timestreamwrite/api_op_ListBatchLoadTasks.go @@ -155,10 +155,11 @@ func addOpListBatchLoadTasksDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpListBatchLoadTasksDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListBatchLoadTasksInput) if !ok { @@ -167,6 +168,7 @@ func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -181,7 +183,7 @@ func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_ListDatabases.go b/service/timestreamwrite/api_op_ListDatabases.go index f056dfc4ce4..8feff9dc804 100644 --- a/service/timestreamwrite/api_op_ListDatabases.go +++ b/service/timestreamwrite/api_op_ListDatabases.go @@ -151,10 +151,11 @@ func addOpListDatabasesDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpListDatabasesDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListDatabasesInput) if !ok { @@ -163,6 +164,7 @@ func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -177,7 +179,7 @@ func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_ListTables.go b/service/timestreamwrite/api_op_ListTables.go index 2a6846c87af..0095ba670aa 100644 --- a/service/timestreamwrite/api_op_ListTables.go +++ b/service/timestreamwrite/api_op_ListTables.go @@ -155,10 +155,11 @@ func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Option DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListTablesInput) if !ok { @@ -167,6 +168,7 @@ func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns . _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -181,7 +183,7 @@ func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, optFns . fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_ListTagsForResource.go b/service/timestreamwrite/api_op_ListTagsForResource.go index 383ea9525a3..0d105849896 100644 --- a/service/timestreamwrite/api_op_ListTagsForResource.go +++ b/service/timestreamwrite/api_op_ListTagsForResource.go @@ -145,10 +145,11 @@ func addOpListTagsForResourceDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpListTagsForResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ListTagsForResourceInput) if !ok { @@ -157,6 +158,7 @@ func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -171,7 +173,7 @@ func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_ResumeBatchLoadTask.go b/service/timestreamwrite/api_op_ResumeBatchLoadTask.go index b35ddf54d9b..0ca83f77cb3 100644 --- a/service/timestreamwrite/api_op_ResumeBatchLoadTask.go +++ b/service/timestreamwrite/api_op_ResumeBatchLoadTask.go @@ -138,10 +138,11 @@ func addOpResumeBatchLoadTaskDiscoverEndpointMiddleware(stack *middleware.Stack, DiscoverOperation: c.fetchOpResumeBatchLoadTaskDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpResumeBatchLoadTaskDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpResumeBatchLoadTaskDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*ResumeBatchLoadTaskInput) if !ok { @@ -150,6 +151,7 @@ func (c *Client) fetchOpResumeBatchLoadTaskDiscoverEndpoint(ctx context.Context, _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -164,7 +166,7 @@ func (c *Client) fetchOpResumeBatchLoadTaskDiscoverEndpoint(ctx context.Context, fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_TagResource.go b/service/timestreamwrite/api_op_TagResource.go index e98bf9d5494..cc7d24c1591 100644 --- a/service/timestreamwrite/api_op_TagResource.go +++ b/service/timestreamwrite/api_op_TagResource.go @@ -148,10 +148,11 @@ func addOpTagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpTagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*TagResourceInput) if !ok { @@ -160,6 +161,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -174,7 +176,7 @@ func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_UntagResource.go b/service/timestreamwrite/api_op_UntagResource.go index e5196178238..d68ab28b3d9 100644 --- a/service/timestreamwrite/api_op_UntagResource.go +++ b/service/timestreamwrite/api_op_UntagResource.go @@ -146,10 +146,11 @@ func addOpUntagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Opt DiscoverOperation: c.fetchOpUntagResourceDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UntagResourceInput) if !ok { @@ -158,6 +159,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -172,7 +174,7 @@ func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, optFn fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_UpdateDatabase.go b/service/timestreamwrite/api_op_UpdateDatabase.go index 69fe3db2d7e..4204e58faa9 100644 --- a/service/timestreamwrite/api_op_UpdateDatabase.go +++ b/service/timestreamwrite/api_op_UpdateDatabase.go @@ -163,10 +163,11 @@ func addOpUpdateDatabaseDiscoverEndpointMiddleware(stack *middleware.Stack, o Op DiscoverOperation: c.fetchOpUpdateDatabaseDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateDatabaseDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateDatabaseDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateDatabaseInput) if !ok { @@ -175,6 +176,7 @@ func (c *Client) fetchOpUpdateDatabaseDiscoverEndpoint(ctx context.Context, optF _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -189,7 +191,7 @@ func (c *Client) fetchOpUpdateDatabaseDiscoverEndpoint(ctx context.Context, optF fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_UpdateTable.go b/service/timestreamwrite/api_op_UpdateTable.go index 5b34b5d609a..0da05da0d36 100644 --- a/service/timestreamwrite/api_op_UpdateTable.go +++ b/service/timestreamwrite/api_op_UpdateTable.go @@ -165,10 +165,11 @@ func addOpUpdateTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Optio DiscoverOperation: c.fetchOpUpdateTableDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*UpdateTableInput) if !ok { @@ -177,6 +178,7 @@ func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -191,7 +193,7 @@ func (c *Client) fetchOpUpdateTableDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err } diff --git a/service/timestreamwrite/api_op_WriteRecords.go b/service/timestreamwrite/api_op_WriteRecords.go index 83617e7e484..b7778a6190c 100644 --- a/service/timestreamwrite/api_op_WriteRecords.go +++ b/service/timestreamwrite/api_op_WriteRecords.go @@ -196,10 +196,11 @@ func addOpWriteRecordsDiscoverEndpointMiddleware(stack *middleware.Stack, o Opti DiscoverOperation: c.fetchOpWriteRecordsDiscoverEndpoint, EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, EndpointDiscoveryRequired: true, + Region: o.Region, }, "ResolveEndpointV2", middleware.After) } -func (c *Client) fetchOpWriteRecordsDiscoverEndpoint(ctx context.Context, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { +func (c *Client) fetchOpWriteRecordsDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { input := getOperationInput(ctx) in, ok := input.(*WriteRecordsInput) if !ok { @@ -208,6 +209,7 @@ func (c *Client) fetchOpWriteRecordsDiscoverEndpoint(ctx context.Context, optFns _ = in identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region key := fmt.Sprintf("Timestream Write.%v", identifierMap) @@ -222,7 +224,7 @@ func (c *Client) fetchOpWriteRecordsDiscoverEndpoint(ctx context.Context, optFns fn(&opt) } - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) if err != nil { return internalEndpointDiscovery.WeightedAddress{}, err }