moto/scripts/template/lib/responses.py.j2

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
839 B
Plaintext
Raw Normal View History

"""Handles incoming {{ escaped_service }} requests, invokes methods, returns responses."""
import json
from moto.core.responses import BaseResponse
from .models import {{ escaped_service }}_backends
class {{ service_class }}Response(BaseResponse):
"""Handler for {{ service_class }} requests and responses."""
2022-08-13 09:49:43 +00:00
def __init__(self):
super().__init__(service_name="{{ escaped_service }}")
@property
def {{ escaped_service }}_backend(self):
"""Return backend instance specific for this region."""
2023-12-02 20:56:18 +00:00
# TODO
# {{ escaped_service }}_backends is not yet typed
# Please modify moto/backends.py to add the appropriate type annotations for this service
2022-08-13 09:49:43 +00:00
return {{ escaped_service }}_backends[self.current_account][self.region]
# add methods from here
2017-09-26 15:46:18 +00:00
# add templates from here