SoftLayer.account

Account manager

license:MIT, see License for more details.
class SoftLayer.managers.account.AccountManager(client)[source]

Common functions for getting information from the Account service

Parameters:client (SoftLayer.API.BaseClient) – the client instance
ack_event(event_id)[source]

Acknowledge an event. This mostly prevents it from appearing as a notification in the control portal.

Parameters:event_id (int) – Notification_Occurrence_Event ID you want to ack
Returns:True on success, Exception otherwise.
static add_event_filter(_filter, event_type)[source]

Add data to the object filter.

Param:_filter: event filter.
Param:string event_type: event type.
cancel_item(identifier, reason='No longer needed', note=None)[source]

Cancels a specific billing item with a reason

Parameters:
  • identifier (int) – Billing_Item id
  • reason (string) – A cancellation reason
  • note (string) – Custom note to set when cancelling. Defaults to information about who canceled the item.
Returns:

bool

get_account_billing_items(mask=None)[source]

Gets all the topLevelBillingItems currently active on the account

Parameters:mask (string) – Object Mask
Returns:Billing_Item
get_billing_item(identifier, mask=None)[source]

Gets details about a billing item

:param int identifier Billing_Item id :param string mask: Object mask to use. :return: Billing_Item

get_billing_items(identifier)[source]

Gets all topLevelBillingItems from a specific invoice

Parameters:identifier (int) – Invoice Id
Returns:Billing_Invoice_Item
get_event(event_id)[source]

Gets details about a maintenance event

Parameters:event_id (int) – Notification_Occurrence_Event ID
Returns:Notification_Occurrence_Event
get_invoices(limit=50, closed=False, get_all=False)[source]

Gets an accounts invoices.

Parameters:
  • limit (int) – Number of invoices to get back in a single call.
  • closed (bool) – If True, will also get CLOSED invoices
  • get_all (bool) – If True, will paginate through invoices until all have been retrieved.
Returns:

Billing_Invoice

get_summary()[source]

Gets some basic account information

Returns:Account object
get_upcoming_events(event_type)[source]

Retrieves a list of Notification_Occurrence_Events that have not ended yet

Param:String event_type: notification event type.
Returns:SoftLayer_Notification_Occurrence_Event
resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

What exactly ‘identifier’ can be depends on the resolvers

Parameters:identifier (string) – identifying string
Returns list: