Conversation
…me_suffix Made changes to code per discussion in issue Such that Simplify - no datetime needed to be imported; people are free to set the api_name_suffix however they want. It defaults to the previous suffix of " - IP Rotate API" Backward Compatible - api_name_suffix is prepopulated with the same suffix as before so it doesn't break any existing method calls Greater Flexibility - by making the api_name_suffix a string argument, folks can add whaatever they want. If they want a random suffix, great. If they want to call it something else, they can as well. The world is their oyster.
|
@Ge0rg3 any issues with accepting the PR? I made it better than my original PR: |
|
Hey @ericy1000, will check this before end of week |
|
Thank you; should be an easy code review Thank you again for putting together this library! |
|
Any chance to review this, @Ge0rg3 ? Thank you |
#77
Per submitted issue, making the api_name unique through combination of datetime and random number will significantly reduce the chances of collision (aka same api_name)
Problem: When you utilize concurrent.futures as part of POC from #6 , the delete_gateway behavior will delete all ApiGateways with matching api_name. The api_name is just the site name and appended " - IP Rotate API" label. If you create multiple ApiGateways to same site, the delete behavior deletes all ApiGateways as they would all have the same api_name.
I do not believe having the same api_name causes issues when creating new ApiGateways as I believe I've seen multiple ApiGateways when viewing in AWS console. The deletion is the only issue.
Solution: By appending a datetime and random number from 0 to 99999, any collisions from matching api names should all but be eliminated (If you created 25 ApiGateway at the exact same second, the odds of any matching API names is 0.3%. Pair that with the odds that all 25 Gateways would be created at the exact same second, the odds get even lower of collision.