PokaInc / arnparse

Parse ARNs using Python
MIT License
36 stars 7 forks source link

Generate arn? #2

Closed foresmac closed 6 years ago

foresmac commented 6 years ago

Seems like it would be useful for the Arn class to have a method to generate a valid ARN—i.e., arnparse in reverse, like geturl() in urlparse.

spg commented 6 years ago

What use case(s) did you have in mind?

foresmac commented 6 years ago

TBH, I don't really have one off the top of my head. I just know that a lot of AWS APIs use those ARNs, and I was thinking there's probably a time when you need to go the other way to do something useful. E.g., parse the ARN, change one of the properties, rebuild that ARN to fix something?

foresmac commented 6 years ago

OTOH, I imagine boto probably handles that internally in a way you don't need to think about it, though.

spg commented 6 years ago

I agree, it might come in useful in the future. I'll wait for a concrete use case before going ahead with this. Thanks for the suggestion!