TimestreamWrite: Add docs on how to check records using the internal API (#5772)
This commit is contained in:
parent
a4146f0179
commit
c5094cca3c
@ -12,6 +12,8 @@
|
|||||||
timestream-write
|
timestream-write
|
||||||
================
|
================
|
||||||
|
|
||||||
|
.. autoclass:: moto.timestreamwrite.models.TimestreamWriteBackend
|
||||||
|
|
||||||
|start-h3| Example usage |end-h3|
|
|start-h3| Example usage |end-h3|
|
||||||
|
|
||||||
.. sourcecode:: python
|
.. sourcecode:: python
|
||||||
|
@ -104,6 +104,19 @@ class TimestreamDatabase(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class TimestreamWriteBackend(BaseBackend):
|
class TimestreamWriteBackend(BaseBackend):
|
||||||
|
"""
|
||||||
|
When using the decorators, you can use the following internal API to verify records have arrived:
|
||||||
|
|
||||||
|
.. sourcecode:: python
|
||||||
|
|
||||||
|
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
|
||||||
|
from moto.timestreamwrite.models import timestreamwrite_backends
|
||||||
|
|
||||||
|
backend = timestreamwrite_backends[ACCOUNT_ID]["us-east-1"]
|
||||||
|
records = backend.databases["mydatabase"].tables["mytable"].records
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, region_name, account_id):
|
def __init__(self, region_name, account_id):
|
||||||
super().__init__(region_name, account_id)
|
super().__init__(region_name, account_id)
|
||||||
self.databases = dict()
|
self.databases = dict()
|
||||||
|
Loading…
Reference in New Issue
Block a user