CloudWanderer Resource¶
Standardised dataclasses for returning resources from storage.
-
class
CloudWandererResource
(urn, resource_data, secondary_attributes=None, loader=None)¶ A simple representation of a resource that prevents any storage metadata polluting the resource dictionary.
-
cloudwanderer_metadata
¶ The raw metadata of this resource.
- Type
-
get_secondary_attribute
(jmes_path)¶ Get an attribute not returned in the resource’s standard
describe
method.- Parameters
jmes_path (str) – A JMES path to the secondary attribute. e.g.
[].EnableDnsSupport.Value
- Return type
None
-
property
is_inflated
¶ Return whether this resource has all the attributes from storage.
-
load
()¶ Inflate this resource with all data from the original storage connector it was spawned from.
- Raises
ValueError – Occurs if the storage connector loader isn’t populated or the resource no longer exists in the StorageConnector’s storage.
- Return type
None
-
-
class
ResourceMetadata
(resource_data, secondary_attributes)¶ Metadata for a
CloudWandererResource
.Contains the original dictionaries of the resource and its attributes.
-
resource_data
¶ The raw dictionary representation of the Resource.
- Type
dict
-
secondary_attributes
¶ the list of raw dictionary representation of the Resource’s secondary attributes.
- Type
list
-