-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for CreateSigningKey, RevokeSigningKey, and ListSigningKeys APIs #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
@@ -70,5 +80,58 @@ async def list_caches(self, next_token: Optional[str] = None) -> ListCachesRespo | |||
except Exception as e: | |||
raise _cache_service_errors_converter.convert(e) | |||
|
|||
async def create_signing_key( | |||
self, ttl_minutes: int, endpoint: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it a little awkward to pass the endpoint
as an arg here just to be re-packaged into CreateSigningKeyResponse
and returned.
If you assign self._endpoint = endpoint
in the ctor you can use that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the data plane endpoint, not the control plane endpoint. That's why I'm passing it differently here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right!
e44259f
self, ttl_minutes: int, endpoint: str | ||
) -> CreateSigningKeyResponse: | ||
_validate_ttl_minutes(ttl_minutes) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You could make this code read a little nicer with a decorator so you're not copypasting try:except->converter.convert all over the place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree, happy to pick this up in a separate PR. Tracking this in #83 so we don't forget
Adds support for new APIs