Storage Containers are scalable data storage. An example of this would be Amazon S3 buckets. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:
|The primary resource identifier that takes the form of a prefix followed by numbers and letters|
|The ID of the parent organization service (cloud)|
|The region that the storage container resides in|
|attr name:||The name of the storage container|
|The date that the the storage container was created|
|The date that the storage container was last modified|
|The total number of objects within storage container|
|The total size of the storage container (bytes)|
|attr policy:||Denotes whether a container or user policy is associated with this storage container|
|attr encrypted:||Denotes whether this storage container is encrypted|
|attr logging:||Denotes whether access logging is enabled|
|Denotes whether object versioning is enabled|
Storage Container Operations
- calls immediately.
Retrieve the time from the provider that this resource was created (if available).
Build a list of current and existing permissions. This is requred as the cloud providers want a full list of permissions. If you do not do this then existing permissions will be lost.
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
This is a temporary override similar to how we set up the resource object for resource groups and other select resources. For some reason even though the DivvyDbObject definition inherits LinkedResource_Mixin there are select corner cases where properties is not found. After spending three hours debugging it was decided that this is the less expensive route. It fixes the bug in the current version.
TODO: If someone really has the time, find out why this is required and then burn this override with fire.