ResourceBuilder
Usage
ResourceBuilder(
name,
template_name,
template_version="1.0",
*,
backend,
namespace_context,
parent=None,
resource_id=None,
on_existing="warn",
command_context,
transaction=None,
in_place=False
)Methods
| Name | Description |
|---|---|
| finalize() | Finalize mutable resources, optionally including a pruned subtree. |
| get_model() | Return a pydantic model representing the resource, optionally reloading |
finalize()
Finalize mutable resources, optionally including a pruned subtree.
Usage
finalize(*, recursive_depth=0)recursive_depth=0 targets only this resource; 1 includes direct children, and None includes all descendants. Archived branches are skipped. Changes are committed on a successful builder flush/context exit.
get_model()
Return a pydantic model representing the resource, optionally reloading
Usage
get_model(*, update=False)from the backend first. Critical fields are locked against mutation.