AccountManager

class SoftLayer.managers.AccountManager(client)[source]

Common functions for getting information from the Account service

Parameters:

client (SoftLayer.API.BaseClient) – the client instance

__init__(client)[source]

Methods

__init__(client)

ack_event(event_id)

Acknowledge an event.

add_event_filter(_filter, event_type[, date_min])

Add data to the object filter.

cancel_item(identifier[, reason, note])

Cancels a specific billing item with a reason

create_provisioning(name, uri)

create a provisioning script

delete_provisioning(identifier)

Delete a provisioning script

getBandwidthDetail(identifier)

Gets bandwidth pool detail.

get_account_all_billing_orders([limit, mask])

Gets all the topLevelBillingItems currently active on the account

get_account_billing_items([create, ...])

Gets all the topLevelBillingItems currently active on the account

get_account_upgrade_orders([limit])

Gets upgrade order list

get_active_account_licenses()

Gets all active account licenses.

get_active_virtual_licenses()

Gets all active virtual licenses account.

get_bandwidth_pool_counts(identifier)

Gets a count of all servers in a bandwidth pool

get_bandwidth_pools([mask])

Gets all the bandwidth pools on an account

get_billing_item(identifier[, mask])

Gets details about a billing item

get_billing_item_from_invoice(identifier[, mask])

Gets details about a billing item of a billing invoice item

get_billing_items(identifier)

Gets all topLevelBillingItems from a specific invoice

get_event(event_id)

Gets details about a maintenance event

get_invoices([limit, closed, get_all])

Gets an accounts invoices.

get_item_detail(identifier)

Gets details about a billing item

get_network_message_delivery_accounts()

Gets all Network Message delivery accounts.

get_provisioning_scripts()

Gets a provisioning hooks.

get_routers([location, mask])

Gets all the routers currently active on the account

get_summary()

Gets some basic account information

get_upcoming_events(event_type[, date_min])

Retrieves a list of Notification_Occurrence_Events that have not ended yet

resolve_ids(identifier)

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

Attributes

resolvers

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

create_provisioning(name, uri)[source]

create a provisioning script

Parameters:
  • name – Name of the hook.

  • uri – endpoint that the script will be downloaded

delete_provisioning(identifier)[source]

Delete a provisioning script

param: identifier provisioning script identifier

Returns: boolean

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(create=None, category=None, mask=None)[source]

Gets all the topLevelBillingItems currently active on the account

Parameters:

mask (string) – Object Mask

Returns:

Billing_Item

get_account_upgrade_orders(limit=100)[source]

Gets upgrade order list

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: