SnapshotsApi
SnapshotsApi
Method
HTTP request
Description
clustersSnapshotsGet
Example
// Import classes:
import com.ionoscloud.dbaasmongo.ApiClient;
import com.ionoscloud.dbaasmongo.ApiException;
import com.ionoscloud.dbaasmongo.Configuration;
import com.ionoscloud.dbaasmongo.auth.*;
import com.ionoscloud.dbaasmongo.model.*;
import com.ionoscloud.dbaasmongo.api.SnapshotsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
SnapshotsApi apiInstance = new SnapshotsApi(defaultClient);
String clusterId = "clusterId_example"; // String | The unique ID of the cluster.
Integer limit = 100; // Integer | The maximum number of elements to return. Use together with 'offset' for pagination.
Integer offset = 0; // Integer | The first element to return. Use together with 'limit' for pagination.
try {
SnapshotList result = apiInstance.clustersSnapshotsGet(clusterId, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SnapshotsApi#clustersSnapshotsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
Last updated
