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

Module external_accounts

source code

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

get_supported_categories(resource_root)

source code 

Lookup all supported categories.

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

get_supported_types(resource_root, category_name)

source code 

Lookup all supported types in a category.

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

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

source code 

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

get_external_account(resource_root, name, view=None)

source code 

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)

source code 

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_all_external_accounts(resource_root, type_name, view=None)

source code 

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

update_external_account(resource_root, account)

source code 

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

delete_external_account(resource_root, name)

source code 

Delete an external account by name

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