getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.

Home Page:http://docs.getmoto.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Modify Backend Dict

gadelkareem opened this issue · comments

We need a simple way to modify the backend dictionary supported by Moto out of the box.
Current:

moto.backends.get_backend("rds")["123456789012"]["us-east-1"].databases[
        "instance-1"
    ].instance_create_time = now()

Improved:

moto.backends.get_backend("rds").modify_db_instance("instance-1",  "123456789012", instance_create_time = now())

Hi @gadelkareem!

The Backend isn't part of the public API. It can be used for convenience, but it is only designed to support the relevant boto3-operations.

Making the API more user-friendly is out of scope as far as I'm concerned, just because it's adds an enormous amount of maintenance.