flayer.providers.lifecycle¶
flayer.providers.lifecycle ¶
Immutable lifecycle requests and explicit, ownership-bound mutation contracts.
JsonValue
module-attribute
¶
JsonValue: TypeAlias = str | int | bool | None | tuple['JsonValue', ...]
ResourceSpec
dataclass
¶
ResourceSpec(logical_id: str, kind: ResourceKind, name: str, parameters: tuple[tuple[str, JsonValue], ...] = (), dependencies: tuple[str, ...] = ())
A desired logical resource with immutable options and explicit dependencies.
parameters
class-attribute
instance-attribute
¶
parameters: tuple[tuple[str, JsonValue], ...] = field(default=(), repr=False)
OwnershipLabels ¶
OwnershipLabels(identity: StackIdentity) -> tuple[tuple[str, str], ...]
Bind one logical resource to the complete stack ownership boundary.
Source code in installed/flayer/providers/lifecycle.py
102 103 104 105 106 107 108 109 110 111 | |
MutationError ¶
MutationError(code: ProviderErrorCode, operation: str, outcome_unknown: bool)
Bases: ProviderError
A sanitized mutation failure that distinguishes an uncertain remote outcome.
Retain only a stable failure category and whether submission may have occurred.
Source code in installed/flayer/providers/lifecycle.py
117 118 119 120 121 122 123 124 125 126 127 | |
LifecycleProvider ¶
Bases: Protocol
Mutation boundary with exact scope, stable reconciliation and owned deletion.
Identity
property
¶
Identity: ProviderIdentity
Return the provider and explicit scope used by every observation and command.
Capabilities
property
¶
Capabilities: frozenset[ProviderCapability]
Advertise implemented mutation operations independently of account permissions.
ValidateSpec ¶
ValidateSpec(spec: ResourceSpec) -> None
Reject unsupported resource options without accessing infrastructure.
Source code in installed/flayer/providers/lifecycle.py
146 147 148 149 | |
FindResource ¶
FindResource(spec: ResourceSpec, identity: StackIdentity) -> ProviderResource | None
Find the unique complete ownership-label match or reject ambiguous inventory.
Source code in installed/flayer/providers/lifecycle.py
151 152 153 154 155 156 | |
GetResource ¶
GetResource(reference: ResourceReference) -> ProviderResource
Observe an exact reference with scope validation and sanitized failures.
Source code in installed/flayer/providers/lifecycle.py
158 159 160 161 | |
CreateResource ¶
CreateResource(spec: ResourceSpec, identity: StackIdentity, dependencies: Mapping[str, ProviderResource], operation_id: str) -> ProviderResource
Create once from validated owned dependencies; never retry uncertain creation.
Source code in installed/flayer/providers/lifecycle.py
163 164 165 166 167 168 169 | |
DeleteResource ¶
DeleteResource(reference: ResourceReference, identity: StackIdentity, logical_id: str, operation_id: str | None = None) -> None
Re-read exact scope and complete ownership immediately before deleting by ID.
Source code in installed/flayer/providers/lifecycle.py
171 172 173 174 175 176 177 | |