Service Group

A cloud provider group within an organization service. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr organization_service_id:
 The ID of the parent organization service (cloud)
attr group_id:The ID of the group
attr name:The name assigned to the group
attr arn:The Amazon resource name associated with the group
attr create_date:
 Creation date of this group
attr inline_policies:
 Policies that are embedded directly into this group
attr resource_id:
 The primary resource identifier that takes the form of a prefix followed by numbers and letters
class DivvyResource.Resources.servicegroup.ServiceGroup(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

ServiceGroup Operations

delete(user_resource_id=None)

Delete this resource.

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()

Override the default implementation to pull associations with both the left and the right resource_id.

static get_resource_type()
get_supported_actions()

Retrieve all the actions which are supported by this resource.

group
handle_resource_created(user_resource_id=None, project_resource_id=None)

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)

handle_resource_destroyed(user_resource_id=None)

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