Skip to content

Commit

Permalink
fix: AWS Endpoint Generation (#5268)
Browse files Browse the repository at this point in the history

#### Summary

ECR public API has been added to the endpoint list... we no longer need to hard code it.

Fixes #5250

<!--
Explain what problem this PR addresses
-->

<!--
  • Loading branch information
bbernays committed Dec 1, 2022
1 parent e406ef1 commit 9cf87c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 6 additions & 4 deletions plugins/source/aws/client/data/partition_service_region.json
Original file line number Diff line number Diff line change
Expand Up @@ -2820,8 +2820,6 @@
"ap-southeast-1": {},
"ap-southeast-2": {},
"ca-central-1": {},
"dataplane-ap-south-1": {},
"dataplane-us-east-2": {},
"eu-central-1": {},
"eu-west-1": {},
"eu-west-2": {},
Expand Down Expand Up @@ -4959,6 +4957,11 @@
"us-west-2": {}
}
},
"sagemaker-geospatial": {
"regions": {
"us-west-2": {}
}
},
"savingsplans": {
"regions": {
"aws-global": {}
Expand Down Expand Up @@ -6499,8 +6502,7 @@
},
"greengrass": {
"regions": {
"cn-north-1": {},
"dataplane-cn-north-1": {}
"cn-north-1": {}
}
},
"guardduty": {
Expand Down
10 changes: 0 additions & 10 deletions plugins/source/aws/tools/endpoints/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@ func partitionRegionServiceGenerator() error {
return err
}

if _, ok := data.Partitions["aws"].Services["api.ecr-public"]; ok {
panic("api.ecr-public has been added to the list and code should be updated")
}
data.Partitions["aws"].Services["api.ecr-public"] = &client.AwsService{
Regions: map[string]*map[string]interface{}{
"us-east-1": {},
"us-west-2": {},
},
}

err = saveToJsonFile(data, filepath.Join("client", client.PartitionServiceRegionFile))
return err
}
Expand Down

0 comments on commit 9cf87c4

Please sign in to comment.