# cm_client.CdpResourceApi

All URIs are relative to */api/v57*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_environment_command**](CdpResourceApi.md#create_environment_command) | **POST** /cdp/createEnvironment | Create an environment in ECS.
[**get_remote_context**](CdpResourceApi.md#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**](CdpResourceApi.md#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**](CdpResourceApi.md#post_remote_context) | **POST** /cdp/remoteContext | Create or update the remote data context in the Workload cluster.

<a name="create_environment_command" id="create_environment_command"></a>
# **create_environment_command**
> ApiCommand create_environment_command(body=body, service_name=service_name)

Create an environment in ECS.

Create an environment in ECS

### Example
```python
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**](ApiCreateEnvironment.md)|  | [optional] 
 **service_name** | **str**|  | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_remote_context" id="get_remote_context"></a>
# **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
```python
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**](ApiRemoteDataContext.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_remote_context_by_cluster" id="get_remote_context_by_cluster"></a>
# **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
```python
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**](ApiRemoteDataContext.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="post_remote_context" id="post_remote_context"></a>
# **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
```python
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**](ApiRemoteDataContext.md)|  | [optional] 

### Return type

[**ApiRemoteDataContext**](ApiRemoteDataContext.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

