Public IP

Public IP addresses are used to communicate over the Internet. Examples of these include AWS Elastic IPs and OpenStack Floating IPs. 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 public IP resides in

public_ip

The publicly accessible IP address

private_ip

The private IP that this public IP will pass through to

domain

The domain associated with this public IP

network_interface_resource_id

The resource ID of the network interface the IP is associated to

allocation_id

The provider allocation ID of the public IP

association_id

The provider association ID

allocation_type

Denotes an ephemeral vs persistent IP address

IP Address Operations (Elastic/Floating/Public IPs)

allocation_id

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.
get_attached_instance()
Retrieve the attached instance (Resource object).
get_attached_network_interface()
Retrieve the network interface (Resource object) this IP is attached to, or None if not attached.

static get_db_class()

get_domain()
Retrieve the domain of the resource (e.g., vpc)

static get_provider_id_field()

get_resource_name()
Public IPs are not named by the user. We return the ip address itself.

static get_resource_name_field()

static get_resource_type()

get_supported_actions()

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 projects/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 projects/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.

ip_address

is_ephemeral

public_ip

top_level_resource = True