SnapshotsResourceApi

All URIs are relative to https://localhost/api/v42

Method HTTP request Description
adhocSnapshot POST /clusters/{clusterName}/services/{serviceName}/snapshots Creates one or more snapshot policies.
createPolicies POST /clusters/{clusterName}/services/{serviceName}/snapshots/policies Creates one or more snapshot policies.
deletePolicy DELETE /clusters/{clusterName}/services/{serviceName}/snapshots/policies/{policyName} Deletes an existing snapshot policy.
readHistory GET /clusters/{clusterName}/services/{serviceName}/snapshots/policies/{policyName}/history Returns a list of commands triggered by a snapshot policy.
readPolicies GET /clusters/{clusterName}/services/{serviceName}/snapshots/policies Returns information for all snapshot policies.
readPolicy GET /clusters/{clusterName}/services/{serviceName}/snapshots/policies/{policyName} Returns information for a specific snapshot policy.
updatePolicy PUT /clusters/{clusterName}/services/{serviceName}/snapshots/policies/{policyName} Updates an existing snapshot policy.

adhocSnapshot

ApiCommand adhocSnapshot(clusterName, serviceName, body)

Creates one or more snapshot policies.

Creates one or more snapshot policies.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiAdhocSnapshot body = new ApiAdhocSnapshot(); // ApiAdhocSnapshot | 
try {
    ApiCommand result = apiInstance.adhocSnapshot(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#adhocSnapshot");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiAdhocSnapshot [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

createPolicies

ApiSnapshotPolicyList createPolicies(clusterName, serviceName, body)

Creates one or more snapshot policies.

Creates one or more snapshot policies.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiSnapshotPolicyList body = new ApiSnapshotPolicyList(); // ApiSnapshotPolicyList | List of the snapshot policies to create.
try {
    ApiSnapshotPolicyList result = apiInstance.createPolicies(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#createPolicies");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiSnapshotPolicyList List of the snapshot policies to create. [optional]

Return type

ApiSnapshotPolicyList

Authorization

basic

HTTP request headers

deletePolicy

ApiSnapshotPolicy deletePolicy(clusterName, policyName, serviceName)

Deletes an existing snapshot policy.

Deletes an existing snapshot policy.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String policyName = "policyName_example"; // String | Name of an existing snapshot policy.
String serviceName = "serviceName_example"; // String | 
try {
    ApiSnapshotPolicy result = apiInstance.deletePolicy(clusterName, policyName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#deletePolicy");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
policyName String Name of an existing snapshot policy.
serviceName String

Return type

ApiSnapshotPolicy

Authorization

basic

HTTP request headers

readHistory

ApiSnapshotCommandList readHistory(clusterName, policyName, serviceName, limit, offset, view)

Returns a list of commands triggered by a snapshot policy.

Returns a list of commands triggered by a snapshot policy.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String policyName = "policyName_example"; // String | Name of an existing snapshot policy.
String serviceName = "serviceName_example"; // String | 
Integer limit = 20; // Integer | Maximum number of commands to retrieve.
Integer offset = 0; // Integer | Index of first command to retrieve.
String view = "summary"; // String | The view to materialize.
try {
    ApiSnapshotCommandList result = apiInstance.readHistory(clusterName, policyName, serviceName, limit, offset, view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#readHistory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
policyName String Name of an existing snapshot policy.
serviceName String
limit Integer Maximum number of commands to retrieve. [optional] [default to 20]
offset Integer Index of first command to retrieve. [optional] [default to 0]
view String The view to materialize. [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiSnapshotCommandList

Authorization

basic

HTTP request headers

readPolicies

ApiSnapshotPolicyList readPolicies(clusterName, serviceName, view)

Returns information for all snapshot policies.

Returns information for all snapshot policies.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
String view = "summary"; // String | The view to materialize.
try {
    ApiSnapshotPolicyList result = apiInstance.readPolicies(clusterName, serviceName, view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#readPolicies");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
view String The view to materialize. [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiSnapshotPolicyList

Authorization

basic

HTTP request headers

readPolicy

ApiSnapshotPolicy readPolicy(clusterName, policyName, serviceName, view)

Returns information for a specific snapshot policy.

Returns information for a specific snapshot policy.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String policyName = "policyName_example"; // String | Name of an existing snapshot policy.
String serviceName = "serviceName_example"; // String | 
String view = "summary"; // String | The view to materialize.
try {
    ApiSnapshotPolicy result = apiInstance.readPolicy(clusterName, policyName, serviceName, view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#readPolicy");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
policyName String Name of an existing snapshot policy.
serviceName String
view String The view to materialize. [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiSnapshotPolicy

Authorization

basic

HTTP request headers

updatePolicy

ApiSnapshotPolicy updatePolicy(clusterName, policyName, serviceName, body)

Updates an existing snapshot policy.

Updates an existing snapshot policy.

Example

// 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.SnapshotsResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

SnapshotsResourceApi apiInstance = new SnapshotsResourceApi();
String clusterName = "clusterName_example"; // String | 
String policyName = "policyName_example"; // String | Name of an existing snapshot policy.
String serviceName = "serviceName_example"; // String | 
ApiSnapshotPolicy body = new ApiSnapshotPolicy(); // ApiSnapshotPolicy | Modified policy.
try {
    ApiSnapshotPolicy result = apiInstance.updatePolicy(clusterName, policyName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnapshotsResourceApi#updatePolicy");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
policyName String Name of an existing snapshot policy.
serviceName String
body ApiSnapshotPolicy Modified policy. [optional]

Return type

ApiSnapshotPolicy

Authorization

basic

HTTP request headers