All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
create | POST /api/d6.2/environments/{environment}/templates/instances | Create a new instance template |
delete | DELETE /api/d6.2/environments/{environment}/templates/instances/{template} | Delete an instance template by name |
get | GET /api/d6.2/environments/{environment}/templates/instances/{template} | Get an instance template by name |
list | GET /api/d6.2/environments/{environment}/templates/instances | List all instance templates |
update | PUT /api/d6.2/environments/{environment}/templates/instances/{template} | Update an existing instance template |
create(environment, instance_template)
Create a new instance template
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.InstanceTemplatesApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str |
instance_template = cloudera.director.InstanceTemplate() # InstanceTemplate |
try:
# Create a new instance template
api_instance.create(environment, instance_template)
except ApiException as e:
print("Exception when calling InstanceTemplatesApi->create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | str | ||
instance_template | InstanceTemplate |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete(environment, template)
Delete an instance template 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.InstanceTemplatesApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str |
template = 'template_example' # str |
try:
# Delete an instance template by name
api_instance.delete(environment, template)
except ApiException as e:
print("Exception when calling InstanceTemplatesApi->delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | str | ||
template | str |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstanceTemplate get(environment, template)
Get an instance template 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.InstanceTemplatesApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str |
template = 'template_example' # str |
try:
# Get an instance template by name
api_response = api_instance.get(environment, template)
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceTemplatesApi->get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | str | ||
template | str |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[str] list(environment)
List all instance templates
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.InstanceTemplatesApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str |
try:
# List all instance templates
api_response = api_instance.list(environment)
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceTemplatesApi->list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | str |
list[str]
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update(environment, template, instance_template)
Update an existing instance template
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.InstanceTemplatesApi(cloudera.director.ApiClient(configuration))
environment = 'environment_example' # str |
template = 'template_example' # str |
instance_template = cloudera.director.InstanceTemplate() # InstanceTemplate |
try:
# Update an existing instance template
api_instance.update(environment, template, instance_template)
except ApiException as e:
print("Exception when calling InstanceTemplatesApi->update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
environment | str | ||
template | str | ||
instance_template | InstanceTemplate |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]