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.

Use dict(my_resource_dict) to convert this object into a dictionary that contains only the resource’s metadata.

urn

The AWS URN of the resource.

Type

cloudwanderer.aws_urn.AwsUrn

cloudwanderer_metadata

The original storage representation of the resource as it was passed in.

Type

dict

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

Returns 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..

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