Skip to content

Commit

Permalink
Updated to latest endpoints.json
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorrowe committed Apr 26, 2016
1 parent 9ec5145 commit 4b4eb55
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
17 changes: 15 additions & 2 deletions aws-sdk-core/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@
"ap-northeast-1": {}
}
},
"cognito-idp": {
"endpoints": {
"us-east-1": {},
"eu-west-1": {},
"ap-northeast-1": {}
}
},
"cognito-sync": {
"endpoints": {
"us-east-1": {},
Expand Down Expand Up @@ -519,8 +526,13 @@
"aws-global": {
"hostname": "importexport.amazonaws.com",
"signatureVersions": [
"v2"
]
"v2",
"v4"
],
"credentialScope": {
"service": "IngestionService",
"region": "us-east-1"
}
}
}
},
Expand All @@ -542,6 +554,7 @@
"us-east-1": {},
"us-west-2": {},
"ap-northeast-1": {},
"ap-southeast-1": {},
"eu-west-1": {},
"eu-central-1": {}
}
Expand Down
4 changes: 3 additions & 1 deletion aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def build(partition)
# @return [Hash<String,Region>]
def build_regions(partition)
partition['regions'].inject({}) do |regions, (region_name, region)|
regions[region_name] = Region.build(region_name, region, partition)
unless region_name == "#{partition['partition']}-global"
regions[region_name] = Region.build(region_name, region, partition)
end
regions
end
end
Expand Down
8 changes: 3 additions & 5 deletions aws-sdk-core/lib/aws-sdk-core/partitions/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ def regions(service, partition)
def partition_region(service)
if service['partitionEndpoint']
endpoint = service['endpoints'][service['partitionEndpoint']]
region = if endpoint['credentialScope']
if endpoint['credentialScope']
endpoint['credentialScope']['region']
elsif service['defaults'] && service['defaults']['credentialScope']
service['defaults']['credentialScope']['region']
else
service['partitionEndpoint']
end
unless region
raise "missing partition endpoint region for #{service.inspect}"
end
region
end
end

Expand Down

0 comments on commit 4b4eb55

Please sign in to comment.