All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
create | POST /api/d6.2/environments | Create a new environment |
delete | DELETE /api/d6.2/environments/{name} | Delete an environment by name |
get_redacted | GET /api/d6.2/environments/{name} | Get an environment by name |
list | GET /api/d6.2/environments | List all environments |
update | PUT /api/d6.2/environments/{name} | Update an existing environment |
update_provider_credentials | PUT /api/d6.2/environments/{name}/provider/credentials | Update provider credentials for a specific environment |
create(environment)
Create a new environment
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
environment = cloudera.director.Environment() # Environment |
try:
# Create a new environment
api_instance.create(environment)
except ApiException as e:
print("Exception when calling EnvironmentsApi->create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | Environment |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete(name)
Delete an environment by name
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
name = 'name_example' # str |
try:
# Delete an environment by name
api_instance.delete(name)
except ApiException as e:
print("Exception when calling EnvironmentsApi->delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment get_redacted(name)
Get an environment by name
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
name = 'name_example' # str |
try:
# Get an environment by name
api_response = api_instance.get_redacted(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling EnvironmentsApi->get_redacted: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[str] list()
List all environments
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
try:
# List all environments
api_response = api_instance.list()
pprint(api_response)
except ApiException as e:
print("Exception when calling EnvironmentsApi->list: %s\n" % e)
This endpoint does not need any parameter.
list[str]
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update(name, environment)
Update an existing environment
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
name = 'name_example' # str |
environment = cloudera.director.Environment() # Environment |
try:
# Update an existing environment
api_instance.update(name, environment)
except ApiException as e:
print("Exception when calling EnvironmentsApi->update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | ||
environment | Environment |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_provider_credentials(name, credentials)
Update provider credentials for a specific environment
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.EnvironmentsApi(cloudera.director.ApiClient(configuration))
name = 'name_example' # str |
credentials = NULL # object |
try:
# Update provider credentials for a specific environment
api_instance.update_provider_credentials(name, credentials)
except ApiException as e:
print("Exception when calling EnvironmentsApi->update_provider_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | ||
credentials | object |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]