Skip to content

Commit

Permalink
Revert region changes and add region "us-iso-west-1"
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Nov 8, 2021
1 parent 73a85b1 commit b0435ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/SotoCodeGenerator/AwsService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct AwsService {
context["partitionEndpoints"] = self.getPartitionEndpoints()
.map { (partition: $0.key, endpoint: $0.value.endpoint, region: $0.value.region) }
.sorted { $0.partition < $1.partition }
.map { ".\($0.partition.toSwiftRegionEnumCase()): (endpoint: \"\($0.endpoint)\", region: .\($0.region.toSwiftRegionEnumCase()))" }
.map { ".\($0.partition.toSwiftRegionEnumCase()): (endpoint: \"\($0.endpoint)\", region: .\($0.region.rawValue.toSwiftRegionEnumCase()))" }
}

context["operations"] = operations.operations
Expand Down Expand Up @@ -550,8 +550,8 @@ struct AwsService {
}

// return dictionary of partition endpoints keyed by endpoint name
func getPartitionEndpoints() -> [String: (endpoint: String, region: String)] {
var partitionEndpoints: [String: (endpoint: String, region: String)] = [:]
func getPartitionEndpoints() -> [String: (endpoint: String, region: Region)] {
var partitionEndpoints: [String: (endpoint: String, region: Region)] = [:]
endpoints.partitions.forEach {
if let partitionEndpoint = $0.services[self.serviceEndpointPrefix]?.partitionEndpoint {
guard let service = $0.services[self.serviceEndpointPrefix],
Expand Down
3 changes: 2 additions & 1 deletion Sources/SotoCodeGenerator/Endpoints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ enum Region: String, Decodable {
case usgovwest1 = "us-gov-west-1"
case usisoeast1 = "us-iso-east-1"
case usisobeast1 = "us-isob-east-1"
case usisowest1 = "us-iso-west-1"
}

enum SignatureVersion: String, Decodable {
Expand All @@ -53,7 +54,7 @@ enum SignatureVersion: String, Decodable {

struct Endpoints: Decodable {
struct CredentialScope: Decodable {
var region: String?
var region: Region?
var service: String?
}

Expand Down

0 comments on commit b0435ba

Please sign in to comment.