Stack Template

Stack Templates, such as AWS Cloud Formation Templates, allow you to code your infrastructure from scratch and deploy from there. This class inherits from Resource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr resource_id:
 The primary resource identifier that takes the form of a prefix followed by numbers and letters
attr organization_service_id:
 The ID of the parent organization service (cloud)
attr region_name:
 The region where the stack template resides
attr stack_id:The provider ID of the stack template
attr name:The name of the stack template
attr description:
 The description of the stack template
attr state:The state of the stack template (CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, etc)
attr create_date:
 The date and time the stack template was created
attr template:JSON field of the stack template
class DivvyResource.Resources.stacktemplate.StackTemplate(resource_id)

Bases: DivvyResource.Resources.resource.Resource

Describes a cloud provider access key within a organization service

delete(user_resource_id=None)

Delete this resource. If wrapped with JobQueue() block, this will queue the deletion job to the wrapped queue, otherwise it calls immediately.

get_date_created()

Retrieve the time from the provider that this resource was created (if available).

static get_db_class()
get_db_pk()
static get_provider_id_field()
get_resource_dependencies()

Retrieve the dependencies for a particular resources. This is an override of the parent function because we need to reverse the order on our resource lookups.

get_resource_name()

Returns the ID of the access key as there is no name

static get_resource_name_field()

Overrides parent function and returns the description field of this resource. This is required because not all resource types have a field explicitly called name.

static get_resource_type()
get_supported_actions()

Retrieve all the actions which are supported by this resource.

handle_resource_created(user_resource_id=None, project_resource_id=None)
handle_resource_destroyed(user_resource_id=None)
handle_resource_modified(resource, *args, **kwargs)
stack_template