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, date_min=None)[source]

Add data to the object filter.

Param

_filter: event filter.

Param

string event_type: event type.

Param

string date_min: greater Than Date to data recovery, default is 2 days ago.

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

getBandwidthDetail(identifier)[source]

Gets bandwidth pool detail.

Returns

bandwidth pool detail

get_account_all_billing_orders(limit=100, mask=None)[source]

Gets all the topLevelBillingItems currently active on the account

Parameters

mask (string) – Object Mask

Returns

Billing_Item

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_active_account_licenses()[source]

Gets all active account licenses.

Returns

Active account Licenses

get_active_virtual_licenses()[source]

Gets all active virtual licenses account.

Returns

active virtual licenses account

get_bandwidth_pool_counts(identifier)[source]

Gets a count of all servers in a bandwidth pool

Getting the server counts individually is significantly faster than pulling them in with the get_bandwidth_pools api call.

get_bandwidth_pools(mask=None)[source]

Gets all the bandwidth pools on an account

get_billing_item(identifier, mask=None)[source]

Gets details about a billing item

Parameters
  • identifier (int) – Billing_Item id

  • mask (string) – Object mask to use.

Returns

Billing_Item

get_billing_item_from_invoice(identifier, mask=None)[source]

Gets details about a billing item of a billing invoice item

Parameters
  • identifier (int) – Billing_Invoice_Item id

  • mask – Object mask to use.

Returns

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_item_detail(identifier)[source]

Gets details about a billing item

Parameters

identifier (int) – Billing_Item id or Billing_Invoice_Item

Returns

Billing_Item

get_network_message_delivery_accounts()[source]

Gets all Network Message delivery accounts.

Returns

Network Message delivery accounts

get_provisioning_scripts()[source]

Gets a provisioning hooks.

Returns

provisioning hook

get_routers(location=None, mask=None)[source]

Gets all the routers currently active on the account

Parameters
  • mask (string) – Object Mask

  • location (string) – location string

Returns

Routers

get_summary()[source]

Gets some basic account information

Returns

Account object

get_upcoming_events(event_type, date_min=None)[source]

Retrieves a list of Notification_Occurrence_Events that have not ended yet

Param

String event_type: notification event type.

Param

String date_min: greater Than Date to data recovery, default is 2 days ago.

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