Skip to content

Commit c85e9af

Browse files
Fixed missing comma in nuget files for Transfer and Identity Management. Added china endpoint calculation to endpoints files.
1 parent e1278d2 commit c85e9af

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

aws-cpp-sdk-identity-management/nuget/aws-cpp-sdk-identity-management.autopkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ nuget {
4848

4949
dependencies {
5050
packages: {
51-
AWSSDKCPP-Core/1.0
51+
AWSSDKCPP-Core/1.0,
5252
AWSSDKCPP-CognitoIdentity/1.0.20140630
5353
}
5454
}

aws-cpp-sdk-transfer/nuget/aws-cpp-sdk-transfer.autopkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ nuget {
4848

4949
dependencies {
5050
packages: {
51-
AWSSDKCPP-Core/1.0
51+
AWSSDKCPP-Core/1.0,
5252
AWSSDKCPP-S3/1.0.20060301
5353
}
5454
}

code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/EndpointEnumSource.vm

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ namespace ${metadata.namespace}
1515
{
1616
namespace ${metadata.classNamePrefix}Endpoint
1717
{
18-
18+
static const int CN_REGION_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
19+
1920
#foreach($regionEndpointPair in $endpointMapping.entrySet())
2021
static const int ${regionEndpointPair.key.toUpperCase().replace("-", "_")}_HASH = Aws::Utils::HashingUtils::HashString("${regionEndpointPair.key}");
2122
#end
2223

2324
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
2425
{
26+
auto hash = Aws::Utils::HashingUtils::HashString(regionName.c_str());
27+
2528
#if($endpointMapping.size() > 0)
2629
if(!useDualStack)
27-
{
28-
auto hash = Aws::Utils::HashingUtils::HashString(regionName.c_str());
29-
30+
{
3031
#set($elseText = "")
3132
#foreach($regionEndpointPair in $endpointMapping.entrySet())
3233
${elseText}if(hash == ${regionEndpointPair.key.toUpperCase().replace("-", "_")}_HASH)
@@ -46,6 +47,12 @@ namespace ${metadata.classNamePrefix}Endpoint
4647
}
4748

4849
ss << regionName << ".amazonaws.com";
50+
51+
if(hash == CN_REGION_HASH)
52+
{
53+
ss << ".cn";
54+
}
55+
4956
return ss.str();
5057
}
5158

0 commit comments

Comments
 (0)