import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| getTableMaintenanceConfig | GET /accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs | Get table maintenance configuration |
| updateTableMaintenanceConfig | POST /accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs | Update table maintenance configuration |
GetTableMaintenanceConfig200Response getTableMaintenanceConfig(accountId, bucketName, namespace, tableName)
Get table maintenance configuration
Retrieve the maintenance configuration for a specific table, including compaction settings.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getTableMaintenanceConfigurationApi();
final String accountId = accountId_example; // String | Identifies the account.
final String bucketName = bucketName_example; // String | Specifies the R2 bucket name.
final String namespace = my_namespace%1Fsub_namespace; // String | The namespace identifier (use %1F as separator for nested namespaces).
final String tableName = my_table; // String | The table name.
try {
final response = api.getTableMaintenanceConfig(accountId, bucketName, namespace, tableName);
print(response);
} catch on DioException (e) {
print('Exception when calling TableMaintenanceConfigurationApi->getTableMaintenanceConfig: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Identifies the account. | |
| bucketName | String | Specifies the R2 bucket name. | |
| namespace | String | The namespace identifier (use %1F as separator for nested namespaces). | |
| tableName | String | The table name. |
GetTableMaintenanceConfig200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateTableMaintenanceConfig200Response updateTableMaintenanceConfig(accountId, bucketName, namespace, tableName, r2DataCatalogTableMaintenanceUpdateRequest)
Update table maintenance configuration
Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getTableMaintenanceConfigurationApi();
final String accountId = accountId_example; // String | Identifies the account.
final String bucketName = bucketName_example; // String | Specifies the R2 bucket name.
final String namespace = my_namespace%1Fsub_namespace; // String | The namespace identifier (use %1F as separator for nested namespaces).
final String tableName = my_table; // String | The table name.
final R2DataCatalogTableMaintenanceUpdateRequest r2DataCatalogTableMaintenanceUpdateRequest = {"compaction":{"state":"enabled","target_size_mb":"256"}}; // R2DataCatalogTableMaintenanceUpdateRequest |
try {
final response = api.updateTableMaintenanceConfig(accountId, bucketName, namespace, tableName, r2DataCatalogTableMaintenanceUpdateRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling TableMaintenanceConfigurationApi->updateTableMaintenanceConfig: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Identifies the account. | |
| bucketName | String | Specifies the R2 bucket name. | |
| namespace | String | The namespace identifier (use %1F as separator for nested namespaces). | |
| tableName | String | The table name. | |
| r2DataCatalogTableMaintenanceUpdateRequest | R2DataCatalogTableMaintenanceUpdateRequest |
UpdateTableMaintenanceConfig200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]