Load Balancer

Load balancers are used in multi-tier apps to distribute load across a variety of compute instances. This class inherits from TopLevelResource and has direct access to the resource’s database object.

Attribute

Description

resource_id

The primary resource identifier that takes the form of a prefix followed by numbers and letters

organization_service_id

The ID of the parent organization service (cloud)

region_name

The region that the instance resides in

load_balancer_id

The provider ID of the load balancer

name

The name of the load balancer

lb_type

The type of load balancer (eg: Application, Classic, Network)

created_time

The time the resource was created. Returns a list of associated security groups

fqdn

The fully qualified domain name of the load balancer

scheme

Denotes whether or not the load balancer is public facing

arn

The ARN associated with this load balancer

attributes

networks

Returns a list of associated networks

subnets

Returns a list of subnets associated with this load balancer

instances

Returns a list of instances associated with this load balancer

access_lists

Returns a list of associated security groups

LoadBalancer Operations

delete(user_resource_id=None)
Delete this resource. If wrapped in a with JobQueue() block, this will queue the deletion job to the wrapped queue, otherwise it calls immediately.
classmethod filter_query_for_global_search(query, search_string)
Apply the query filters that will restrict a provided query to the provided global search string and return the modified query.
Parameters:
query (sqlalchemy.orm.query) – Original query that includes this resource type
search_string (basestring) – Single string to search for across all important text fields for this resource
Returns: Modified query including filters that match search string
Return type: sqlalchemy.orm.query
get_date_created()
Retrieve the time from the provider that this resource was created (if available).

static get_db_class()

static get_provider_id_field()

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

load_balancer_id

loadbalancer

top_level_resource = True