Skip to content

Latest commit

 

History

History
453 lines (313 loc) · 14 KB

DatabaseServersApi.md

File metadata and controls

453 lines (313 loc) · 14 KB

cloudera.director.DatabaseServersApi

All URIs are relative to https://localhost

Method HTTP request Description
create POST /api/d6.2/environments/{environment}/databaseServers Create a new external database server
delete DELETE /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer} Delete an external database server by name
get_database_server_usage GET /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer}/usage Get an external database server usage by name
get_redacted GET /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer} Get an external database server by name
get_status GET /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer}/status Get an external database server status by name
get_template_redacted GET /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer}/template Get an external database server template by name
list GET /api/d6.2/environments/{environment}/databaseServers List all externalDatabaseServers
update PUT /api/d6.2/environments/{environment}/databaseServers/{externalDatabaseServer} Update an existing external database server (unsupported)

create

create(environment, external_database_server_template)

Create a new external database server

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server_template = cloudera.director.ExternalDatabaseServerTemplate() # ExternalDatabaseServerTemplate | 

try:
    # Create a new external database server
    api_instance.create(environment, external_database_server_template)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->create: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server_template ExternalDatabaseServerTemplate

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

delete

delete(environment, external_database_server)

Delete an external database server by name

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 

try:
    # Delete an external database server by name
    api_instance.delete(environment, external_database_server)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->delete: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_database_server_usage

ExternalDatabaseServerUsage get_database_server_usage(environment, external_database_server)

Get an external database server usage by name

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 

try:
    # Get an external database server usage by name
    api_response = api_instance.get_database_server_usage(environment, external_database_server)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->get_database_server_usage: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str

Return type

ExternalDatabaseServerUsage

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_redacted

ExternalDatabaseServer get_redacted(environment, external_database_server)

Get an external database server by name

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 

try:
    # Get an external database server by name
    api_response = api_instance.get_redacted(environment, external_database_server)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->get_redacted: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str

Return type

ExternalDatabaseServer

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_status

Status get_status(environment, external_database_server)

Get an external database server status by name

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 

try:
    # Get an external database server status by name
    api_response = api_instance.get_status(environment, external_database_server)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->get_status: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str

Return type

Status

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_template_redacted

ExternalDatabaseServerTemplate get_template_redacted(environment, external_database_server)

Get an external database server template by name

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 

try:
    # Get an external database server template by name
    api_response = api_instance.get_template_redacted(environment, external_database_server)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->get_template_redacted: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str

Return type

ExternalDatabaseServerTemplate

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

list

list[str] list(environment)

List all externalDatabaseServers

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 

try:
    # List all externalDatabaseServers
    api_response = api_instance.list(environment)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->list: %s\n" % e)

Parameters

Name Type Description Notes
environment str

Return type

list[str]

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

update

update(environment, external_database_server, updated_template)

Update an existing external database server (unsupported)

Example

from __future__ import print_function
import time
import cloudera.director
from cloudera.director.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cloudera.director.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cloudera.director.DatabaseServersApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str | 
external_database_server = 'external_database_server_example' # str | 
updated_template = cloudera.director.ExternalDatabaseServerTemplate() # ExternalDatabaseServerTemplate | 

try:
    # Update an existing external database server (unsupported)
    api_instance.update(environment, external_database_server, updated_template)
except ApiException as e:
    print("Exception when calling DatabaseServersApi->update: %s\n" % e)

Parameters

Name Type Description Notes
environment str
external_database_server str
updated_template ExternalDatabaseServerTemplate

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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