Package cm_api :: Package endpoints :: Module external_accounts
[hide private]
[frames] | no frames]

Module external_accounts

Classes [hide private]
  ApiExternalAccount
  ApiExternalAccountCategory
  ApiExternalAccountType
Functions [hide private]
 
create_external_account(resource_root, name, display_name, type_name, account_configs=None)
Create an external account
 
delete_external_account(resource_root, name)
Delete an external account by name
 
get_all_external_accounts(resource_root, type_name, view=None)
Lookup all external accounts of a particular type, by type name.
 
get_external_account(resource_root, name, view=None)
Lookup an external account by name
 
get_external_account_by_display_name(resource_root, display_name, view=None)
Lookup an external account by display name
 
get_supported_categories(resource_root)
Lookup all supported categories.
 
get_supported_types(resource_root, category_name)
Lookup all supported types in a category.
 
update_external_account(resource_root, account)
Update an external account
Variables [hide private]
  EXTERNAL_ACCOUNT_FETCH_PATH = '/externalAccounts/%s/%s'
  EXTERNAL_ACCOUNT_PATH = '/externalAccounts/%s'
  __package__ = 'cm_api.endpoints'
Function Details [hide private]

create_external_account(resource_root, name, display_name, type_name, account_configs=None)

 

Create an external account

Parameters:
  • resource_root - The root Resource object.
  • name - Immutable external account name
  • display_name - Display name
  • type_name - Account type
  • account_configs - Optional account configuration (ApiList of ApiConfig objects)
Returns:
An ApiExternalAccount object matching the newly created account

delete_external_account(resource_root, name)

 

Delete an external account by name

Parameters:
  • resource_root - The root Resource object.
  • name - Account name
Returns:
The deleted ApiExternalAccount object

get_all_external_accounts(resource_root, type_name, view=None)

 

Lookup all external accounts of a particular type, by type name.

Parameters:
  • resource_root - The root Resource object.
  • type_name - Type name
  • view - View
Returns:
An ApiList of ApiExternalAccount objects matching the specified type

get_external_account(resource_root, name, view=None)

 

Lookup an external account by name

Parameters:
  • resource_root - The root Resource object.
  • name - Account name
  • view - View
Returns:
An ApiExternalAccount object

get_external_account_by_display_name(resource_root, display_name, view=None)

 

Lookup an external account by display name

Parameters:
  • resource_root - The root Resource object.
  • display_name - Account display name
  • view - View
Returns:
An ApiExternalAccount object

get_supported_categories(resource_root)

 

Lookup all supported categories.

Parameters:
  • resource_root - The root Resource object.
Returns:
An ApiExternalAcccountCategory list

get_supported_types(resource_root, category_name)

 

Lookup all supported types in a category.

Parameters:
  • resource_root - The root Resource object.
  • category_name - The category name
Returns:
An ApiExternalAcccountType list

update_external_account(resource_root, account)

 

Update an external account

Parameters:
  • resource_root - The root Resource object.
  • account - Account to update, account name must be specified.
Returns:
An ApiExternalAccount object, representing the updated external account