import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| getMaintenanceConfig | GET /accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs | Get catalog maintenance configuration |
| updateMaintenanceConfig | POST /accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs | Update catalog maintenance configuration |
GetMaintenanceConfig200Response getMaintenanceConfig(accountId, bucketName)
Get catalog maintenance configuration
Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.
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().getMaintenanceConfigurationApi();
final String accountId = accountId_example; // String | Identifies the account.
final String bucketName = bucketName_example; // String | Specifies the R2 bucket name.
try {
final response = api.getMaintenanceConfig(accountId, bucketName);
print(response);
} catch on DioException (e) {
print('Exception when calling MaintenanceConfigurationApi->getMaintenanceConfig: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Identifies the account. | |
| bucketName | String | Specifies the R2 bucket name. |
GetMaintenanceConfig200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateMaintenanceConfig200Response updateMaintenanceConfig(accountId, bucketName, r2DataCatalogCatalogMaintenanceUpdateRequest)
Update catalog maintenance configuration
Update the maintenance configuration for a catalog. 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().getMaintenanceConfigurationApi();
final String accountId = accountId_example; // String | Identifies the account.
final String bucketName = bucketName_example; // String | Specifies the R2 bucket name.
final R2DataCatalogCatalogMaintenanceUpdateRequest r2DataCatalogCatalogMaintenanceUpdateRequest = {"compaction":{"state":"enabled","target_size_mb":"256"}}; // R2DataCatalogCatalogMaintenanceUpdateRequest |
try {
final response = api.updateMaintenanceConfig(accountId, bucketName, r2DataCatalogCatalogMaintenanceUpdateRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling MaintenanceConfigurationApi->updateMaintenanceConfig: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Identifies the account. | |
| bucketName | String | Specifies the R2 bucket name. | |
| r2DataCatalogCatalogMaintenanceUpdateRequest | R2DataCatalogCatalogMaintenanceUpdateRequest |
UpdateMaintenanceConfig200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]