cm_client.ExternalAccountsResourceApi

All URIs are relative to /api/v58

Method HTTP request Description
create_account POST /externalAccounts/create
delete_account DELETE /externalAccounts/delete/{name}
external_account_command_by_name POST /externalAccounts/account/{name}/commands/{commandName}
get_supported_categories GET /externalAccounts/supportedCategories
get_supported_types GET /externalAccounts/supportedTypes/{categoryName}
list_external_account_commands GET /externalAccounts/typeInfo/{typeName}/commandsByName
read_account GET /externalAccounts/account/{name}
read_account_by_display_name GET /externalAccounts/accountByDisplayName/{displayName}
read_account_credentials GET /externalAccounts/account/{name}/credentials
read_accounts GET /externalAccounts/type/{typeName}
read_config GET /externalAccounts/account/{name}/config
update_account PUT /externalAccounts/update
update_config PUT /externalAccounts/account/{name}/config

create_account

ApiExternalAccount create_account(body=body)

Create a new external account. Account names and display names must be unique, i.e. they must not share names or display names with an existing account. Server generates an account ID for the requested account.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiExternalAccount() # ApiExternalAccount |  (optional)

try:
    api_response = api_instance.create_account(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->create_account: %s\n" % e)

Parameters

Name Type Description Notes
body ApiExternalAccount [optional]

Return type

ApiExternalAccount

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_account

ApiExternalAccount delete_account(name)

Delete an external account, specifying its name.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
name = 'name_example' # str | 

try:
    api_response = api_instance.delete_account(name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->delete_account: %s\n" % e)

Parameters

Name Type Description Notes
name str

Return type

ApiExternalAccount

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

external_account_command_by_name

ApiCommand external_account_command_by_name(command_name, name)

Executes a command on the external account specified by name.

Available since API v16.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
command_name = 'command_name_example' # str | The command name.
name = 'name_example' # str | The external account name.

try:
    api_response = api_instance.external_account_command_by_name(command_name, name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->external_account_command_by_name: %s\n" % e)

Parameters

Name Type Description Notes
command_name str The command name.
name str The external account name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_supported_categories

ApiExternalAccountCategoryList get_supported_categories()

List of external account categories supported by this Cloudera Manager.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))

try:
    api_response = api_instance.get_supported_categories()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->get_supported_categories: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ApiExternalAccountCategoryList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_supported_types

ApiExternalAccountTypeList get_supported_types(category_name)

List of external account types supported by this Cloudera Manager by category.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
category_name = 'category_name_example' # str | 

try:
    api_response = api_instance.get_supported_types(category_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->get_supported_types: %s\n" % e)

Parameters

Name Type Description Notes
category_name str

Return type

ApiExternalAccountTypeList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_external_account_commands

ApiCommandMetadataList list_external_account_commands(type_name)

Lists all the commands that can be executed by name on the provided external account type.

Available since API v16.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
type_name = 'type_name_example' # str | The external account type name

try:
    api_response = api_instance.list_external_account_commands(type_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->list_external_account_commands: %s\n" % e)

Parameters

Name Type Description Notes
type_name str The external account type name

Return type

ApiCommandMetadataList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_account

ApiExternalAccount read_account(name, view=view)

Get a single external account by account name.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
name = 'name_example' # str | 
view = 'view_example' # str |  (optional)

try:
    api_response = api_instance.read_account(name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->read_account: %s\n" % e)

Parameters

Name Type Description Notes
name str
view str [optional]

Return type

ApiExternalAccount

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_account_by_display_name

ApiExternalAccount read_account_by_display_name(display_name, view=view)

Get a single external account by display name.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
display_name = 'display_name_example' # str | 
view = 'view_example' # str |  (optional)

try:
    api_response = api_instance.read_account_by_display_name(display_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->read_account_by_display_name: %s\n" % e)

Parameters

Name Type Description Notes
display_name str
view str [optional]

Return type

ApiExternalAccount

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_account_credentials

ApiConfigList read_account_credentials(name)

Get un-redacted credentials of an external account for the given account name, currently supported only for ALTUS accounts.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
name = 'name_example' # str | The external account name

try:
    api_response = api_instance.read_account_credentials(name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->read_account_credentials: %s\n" % e)

Parameters

Name Type Description Notes
name str The external account name

Return type

ApiConfigList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_accounts

ApiExternalAccountList read_accounts(type_name, view=view)

Get a list of external accounts for a specific account type.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
type_name = 'type_name_example' # str | 
view = 'view_example' # str |  (optional)

try:
    api_response = api_instance.read_accounts(type_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->read_accounts: %s\n" % e)

Parameters

Name Type Description Notes
type_name str
view str [optional]

Return type

ApiExternalAccountList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_config

ApiConfigList read_config(name, view=view)

Get configs of external account for the given account name.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
name = 'name_example' # str | The external account name
view = 'summary' # str | The view to materialize, either \"summary\" or \"full\". (optional) (default to summary)

try:
    api_response = api_instance.read_config(name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->read_config: %s\n" % e)

Parameters

Name Type Description Notes
name str The external account name
view str The view to materialize, either "summary" or "full". [optional] [default to summary]

Return type

ApiConfigList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_account

ApiExternalAccount update_account(body=body)

Update an external account.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiExternalAccount() # ApiExternalAccount |  (optional)

try:
    api_response = api_instance.update_account(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->update_account: %s\n" % e)

Parameters

Name Type Description Notes
body ApiExternalAccount [optional]

Return type

ApiExternalAccount

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_config

ApiConfigList update_config(name, body=body, message=message)

Upadate configs of external account for the given account name.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ExternalAccountsResourceApi(cm_client.ApiClient(configuration))
name = 'name_example' # str | The external account name
body = cm_client.ApiConfigList() # ApiConfigList | Settings to update. (optional)
message = 'message_example' # str | Optional message describing the changes. (optional)

try:
    api_response = api_instance.update_config(name, body=body, message=message)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalAccountsResourceApi->update_config: %s\n" % e)

Parameters

Name Type Description Notes
name str The external account name
body ApiConfigList Settings to update. [optional]
message str Optional message describing the changes. [optional]

Return type

ApiConfigList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]