# CdpResourceApi

All URIs are relative to */api/v57*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createEnvironmentCommand**](CdpResourceApi.md#createEnvironmentCommand) | **POST** /cdp/createEnvironment | Create an environment in ECS.
[**getRemoteContext**](CdpResourceApi.md#getRemoteContext) | **GET** /cdp/remoteContext/byContext/{dataContextName} | Get a JSON for creating a remote data context in a Workload cluster.
[**getRemoteContextByCluster**](CdpResourceApi.md#getRemoteContextByCluster) | **GET** /cdp/remoteContext/byCluster/{clusterName} | Get a JSON for creating a remote data context in a Workload cluster.
[**postRemoteContext**](CdpResourceApi.md#postRemoteContext) | **POST** /cdp/remoteContext | Create or update the remote data context in the Workload cluster.

<a name="createEnvironmentCommand"></a>
# **createEnvironmentCommand**
> ApiCommand createEnvironmentCommand(body, serviceName)

Create an environment in ECS.

Create an environment in ECS

### Example
```java
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CdpResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

CdpResourceApi apiInstance = new CdpResourceApi();
ApiCreateEnvironment body = new ApiCreateEnvironment(); // ApiCreateEnvironment | 
String serviceName = "serviceName_example"; // String | 
try {
    ApiCommand result = apiInstance.createEnvironmentCommand(body, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CdpResourceApi#createEnvironmentCommand");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ApiCreateEnvironment**](ApiCreateEnvironment.md)|  | [optional]
 **serviceName** | **String**|  | [optional]

### Return type

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

### Authorization

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

### HTTP request headers

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

<a name="getRemoteContext"></a>
# **getRemoteContext**
> ApiRemoteDataContext getRemoteContext(dataContextName)

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
```java
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CdpResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

CdpResourceApi apiInstance = new CdpResourceApi();
String dataContextName = "dataContextName_example"; // String | The name of the DataContext.
try {
    ApiRemoteDataContext result = apiInstance.getRemoteContext(dataContextName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CdpResourceApi#getRemoteContext");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dataContextName** | **String**| 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

<a name="getRemoteContextByCluster"></a>
# **getRemoteContextByCluster**
> ApiRemoteDataContext getRemoteContextByCluster(clusterName)

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
```java
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CdpResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

CdpResourceApi apiInstance = new CdpResourceApi();
String clusterName = "clusterName_example"; // String | The name of the DataContext.
try {
    ApiRemoteDataContext result = apiInstance.getRemoteContextByCluster(clusterName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CdpResourceApi#getRemoteContextByCluster");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clusterName** | **String**| 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

<a name="postRemoteContext"></a>
# **postRemoteContext**
> ApiRemoteDataContext postRemoteContext(body)

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

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

### Example
```java
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CdpResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

CdpResourceApi apiInstance = new CdpResourceApi();
ApiRemoteDataContext body = new ApiRemoteDataContext(); // ApiRemoteDataContext | 
try {
    ApiRemoteDataContext result = apiInstance.postRemoteContext(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CdpResourceApi#postRemoteContext");
    e.printStackTrace();
}
```

### 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

