Skip to content

Latest commit

 

History

History
131 lines (96 loc) · 6.21 KB

File metadata and controls

131 lines (96 loc) · 6.21 KB

cloudflare_dart.api.TableMaintenanceConfigurationApi

Load the API package

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

getTableMaintenanceConfig

GetTableMaintenanceConfig200Response getTableMaintenanceConfig(accountId, bucketName, namespace, tableName)

Get table maintenance configuration

Retrieve the maintenance configuration for a specific table, including compaction settings.

Example

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');
}

Parameters

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.

Return type

GetTableMaintenanceConfig200Response

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTableMaintenanceConfig

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.

Example

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');
}

Parameters

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

Return type

UpdateTableMaintenanceConfig200Response

Authorization

api_key, api_token, api_email

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]