moto/scripts/template/lib/responses.py.j2
2023-12-02 19:56:18 -01:00

27 lines
839 B
Django/Jinja

"""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."""
def __init__(self):
super().__init__(service_name="{{ escaped_service }}")
@property
def {{ escaped_service }}_backend(self):
"""Return backend instance specific for this region."""
# TODO
# {{ escaped_service }}_backends is not yet typed
# Please modify moto/backends.py to add the appropriate type annotations for this service
return {{ escaped_service }}_backends[self.current_account][self.region]
# add methods from here
# add templates from here