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 |
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.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| body | ApiExternalAccount | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccount delete_account(name)
Delete an external account, specifying its name.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand external_account_command_by_name(command_name, name)
Executes a command on the external account specified by name.
Available since API v16.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| command_name | str | The command name. | |
| name | str | The external account name. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccountCategoryList get_supported_categories()
List of external account categories supported by this Cloudera Manager.
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)
This endpoint does not need any parameter.
ApiExternalAccountCategoryList
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccountTypeList get_supported_types(category_name)
List of external account types supported by this Cloudera Manager by category.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| category_name | str |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| type_name | str | The external account type name |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccount read_account(name, view=view)
Get a single external account by account name.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| view | str | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccount read_account_by_display_name(display_name, view=view)
Get a single external account by display name.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| display_name | str | ||
| view | str | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiConfigList read_account_credentials(name)
Get un-redacted credentials of an external account for the given account name, currently supported only for ALTUS accounts.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | The external account name |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccountList read_accounts(type_name, view=view)
Get a list of external accounts for a specific account type.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| type_name | str | ||
| view | str | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiConfigList read_config(name, view=view)
Get configs of external account for the given account name.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | The external account name | |
| view | str | The view to materialize, either "summary" or "full". | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiExternalAccount update_account(body=body)
Update an external account.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| body | ApiExternalAccount | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiConfigList update_config(name, body=body, message=message)
Upadate configs of external account for the given account name.
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)
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | The external account name | |
| body | ApiConfigList | Settings to update. | [optional] |
| message | str | Optional message describing the changes. | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]