cm_client.CdpResourceApi

All URIs are relative to /api/v57

Method HTTP request Description
create_environment_command POST /cdp/createEnvironment Create an environment in ECS.
get_remote_context GET /cdp/remoteContext/byContext/{dataContextName} Get a JSON for creating a remote data context in a Workload cluster.
get_remote_context_by_cluster GET /cdp/remoteContext/byCluster/{clusterName} Get a JSON for creating a remote data context in a Workload cluster.
post_remote_context POST /cdp/remoteContext Create or update the remote data context in the Workload cluster.

create_environment_command

ApiCommand create_environment_command(body=body, service_name=service_name)

Create an environment in ECS.

Create an environment in ECS

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.CdpResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiCreateEnvironment() # ApiCreateEnvironment |  (optional)
service_name = 'service_name_example' # str |  (optional)

try:
    # Create an environment in ECS.
    api_response = api_instance.create_environment_command(body=body, service_name=service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CdpResourceApi->create_environment_command: %s\n" % e)

Parameters

Name Type Description Notes
body ApiCreateEnvironment [optional]
service_name str [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

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

get_remote_context

ApiRemoteDataContext get_remote_context(data_context_name)

Get a JSON for creating a remote data context in a Workload cluster.

Get a JSON for creating a remote data context in a Workload cluster.

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.CdpResourceApi(cm_client.ApiClient(configuration))
data_context_name = 'data_context_name_example' # str | The name of the DataContext.

try:
    # Get a JSON for creating a remote data context in a Workload cluster.
    api_response = api_instance.get_remote_context(data_context_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CdpResourceApi->get_remote_context: %s\n" % e)

Parameters

Name Type Description Notes
data_context_name str The name of the DataContext.

Return type

ApiRemoteDataContext

Authorization

basic

HTTP request headers

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

get_remote_context_by_cluster

ApiRemoteDataContext get_remote_context_by_cluster(cluster_name)

Get a JSON for creating a remote data context in a Workload cluster.

Get a JSON for creating a remote data context in a Workload cluster.

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.CdpResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the DataContext.

try:
    # Get a JSON for creating a remote data context in a Workload cluster.
    api_response = api_instance.get_remote_context_by_cluster(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CdpResourceApi->get_remote_context_by_cluster: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str The name of the DataContext.

Return type

ApiRemoteDataContext

Authorization

basic

HTTP request headers

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

post_remote_context

ApiRemoteDataContext post_remote_context(body=body)

Create or update the remote data context in the Workload cluster.

Create or update the remote data context in the Workload cluster.

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.CdpResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRemoteDataContext() # ApiRemoteDataContext |  (optional)

try:
    # Create or update the remote data context in the Workload cluster.
    api_response = api_instance.post_remote_context(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CdpResourceApi->post_remote_context: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRemoteDataContext [optional]

Return type

ApiRemoteDataContext

Authorization

basic

HTTP request headers

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