Skip to content

Commit d284360

Browse files
committed
run docs generate task to create related docusaurus documentation pages
1 parent a76a8d9 commit d284360

7 files changed

Lines changed: 1002 additions & 17 deletions

File tree

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ sidebarTitle: attribute
1111

1212
Represents an attribute of a Node, including its schema, value, and properties.
1313

14+
An ``Attribute`` wraps a single attribute on an :class:`InfrahubNode`. It tracks the
15+
current value, the metadata properties (``source``, ``owner``, ``is_protected``, ...),
16+
and whether the value has been mutated since the node was loaded. Mutation tracking is
17+
used by ``InfrahubNode.update()`` to send only the changed fields to the API.
18+
19+
**Attributes:**
20+
21+
- `name`: The name of the attribute.
22+
- `id`: The unique identifier of the attribute, when known.
23+
- `value`: The current attribute value. Setting this marks the attribute as mutated.
24+
- `value_has_been_mutated`: True when ``value`` has been assigned after construction.
25+
- `is_default`: True when the value comes from the schema default.
26+
- `is_from_profile`: True when the value is inherited from a profile.
27+
- `is_inherited`: True when the attribute is inherited from a generic.
28+
- `is_protected`: True when the attribute is protected from modification.
29+
- `updated_at`: ISO-8601 timestamp of the most recent update.
30+
- `source`: The node that supplied this attribute value.
31+
- `owner`: The node that owns this attribute.
32+
- `updated_by`: The account that performed the most recent update.
33+
1434
**Methods:**
1535

1636
#### `value`

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/metadata.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ sidebarTitle: metadata
1111

1212
Represents metadata about a node (created_at, created_by, updated_at, updated_by).
1313

14+
Populated from the ``node_metadata`` GraphQL block when ``include_metadata=True``
15+
is passed to a query. The ``*_by`` fields point to the user who created or last
16+
updated the node, exposed as :class:`NodeProperty` references.
17+
18+
**Attributes:**
19+
20+
- `created_at`: ISO-8601 timestamp of node creation.
21+
- `created_by`: The account that created the node.
22+
- `updated_at`: ISO-8601 timestamp of the most recent update.
23+
- `updated_by`: The account that performed the most recent update.
24+
1425
### `RelationshipMetadata`
1526

1627
Represents metadata about a relationship edge (updated_at, updated_by).
28+
29+
Populated from the ``relationship_metadata`` GraphQL block when ``include_metadata=True``
30+
is passed to a query. Unlike :class:`NodeMetadata`, this only carries update info because
31+
the creation timestamp of an edge is not tracked separately from its peer node.
32+
33+
**Attributes:**
34+
35+
- `updated_at`: ISO-8601 timestamp of the most recent edge update.
36+
- `updated_by`: The account that performed the most recent edge update.

0 commit comments

Comments
 (0)