pub struct SageMakerData {
pub resources: BTreeMap<String, BTreeMap<String, Value>>,
pub tags: BTreeMap<String, BTreeMap<String, String>>,
pub singletons: BTreeMap<String, Value>,
pub seq: u64,
}Expand description
Per-account SageMaker control-plane state.
Fields§
§resources: BTreeMap<String, BTreeMap<String, Value>>family -> id -> record. The record is the resource’s persisted JSON
attributes plus any minted ARN / id / timestamps.
Resource tags keyed by ARN.
singletons: BTreeMap<String, Value>Account-scoped singleton values keyed by a stable string.
seq: u64Monotonic counter used to mint unique ids within an account.
Implementations§
Source§impl SageMakerData
impl SageMakerData
Sourcepub fn get_resource(&self, family: &str, id: &str) -> Option<&Value>
pub fn get_resource(&self, family: &str, id: &str) -> Option<&Value>
Fetch a resource record by family + id.
Sourcepub fn get_resource_mut(&mut self, family: &str, id: &str) -> Option<&mut Value>
pub fn get_resource_mut(&mut self, family: &str, id: &str) -> Option<&mut Value>
Fetch a mutable resource record by family + id.
Sourcepub fn put_resource(&mut self, family: &str, id: &str, record: Value)
pub fn put_resource(&mut self, family: &str, id: &str, record: Value)
Insert / replace a resource record.
Sourcepub fn remove_resource(&mut self, family: &str, id: &str) -> Option<Value>
pub fn remove_resource(&mut self, family: &str, id: &str) -> Option<Value>
Remove a resource record, returning it if present.
Sourcepub fn resolve_key(&self, family: &str, value: &str) -> Option<String>
pub fn resolve_key(&self, family: &str, value: &str) -> Option<String>
Resolve a caller-supplied identifier value to a stored key within a
family. Matches the direct storage key first, then falls back to a record
whose canonical identifier member — {Family}Name, {Family}Id or
{Family}Arn — equals the value (so a resource keyed by its Name can
still be described by the minted Id or ARN the create returned).
The fallback is restricted to the family’s own canonical members rather
than any suffix-matching *Name / *Id / *Arn member, so an unrelated
member that happens to carry an equal value (e.g. a shared RoleArn, or a
cross-referenced SourceArn) on a sibling record cannot mis-resolve to
the wrong record.
Trait Implementations§
Source§impl AccountState for SageMakerData
impl AccountState for SageMakerData
Source§fn new_for_account(_account_id: &str, _region: &str, _endpoint: &str) -> Self
fn new_for_account(_account_id: &str, _region: &str, _endpoint: &str) -> Self
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Source§impl Clone for SageMakerData
impl Clone for SageMakerData
Source§fn clone(&self) -> SageMakerData
fn clone(&self) -> SageMakerData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more