Snapshots are point in time backups of a volume. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:
|The ID of the parent organization service (cloud)|
|The region that the snapshot resides in|
|The provider ID of the snapshot|
|The resource ID of the volume this snapshot was created from|
|attr name:||The name of the volume’s snapshot|
|Description of the snapshot|
|attr state:||The current lifecycle state of the snapshot|
|attr progress:||The creation progress of the snapshot|
|attr size:||The size in gigabytes of the volume|
|attr public:||Denotes whether the snapshot is publicly available|
|The time when the snapshot was created|
|attr encrypted:||Denotes whether the snapshot is encrypted|
Delete this resource. If wrapped with JobQueue() block, this will queue the deletion job to the wrapped queue, otherwise it calls immediately.
Retrieve the time from the provider that this resource was created (if available).
Retrieve a list of db objects for private images created from the snapshot (if any)
Retrieve the dependencies for a particular resources. This is an override of the parent function because we don’t have ResourceLink relationships for volumes and private/public images where the snapshot ID is included in the block device mapping.
Retrieve the size of the snapshot
Retrieve all the actions which are supported by this resource.
This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to groups, alerts, etc)
This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from groups, alerts, etc)
handle_resource_modified(resource, *args, **kwargs)¶
This should be called when a resource is modified after the new data has been updated in the DB session This gives an opportunity for post-modification hooks
Determine if this snapshot represents a volume backup.