cloudflare
Version:
The official TypeScript library for the Cloudflare API
63 lines • 1.96 kB
text/typescript
import { APIResource } from "../../../core/resource.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class BaseRetention extends APIResource {
static readonly _key: readonly ['logs', 'control', 'retention'];
/**
* Updates log retention flag for Logpull API.
*
* @example
* ```ts
* const retention =
* await client.logs.control.retention.create({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
create(params: RetentionCreateParams, options?: RequestOptions): APIPromise<RetentionCreateResponse | null>;
/**
* Gets log retention flag for Logpull API.
*
* @example
* ```ts
* const retention = await client.logs.control.retention.get({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params: RetentionGetParams, options?: RequestOptions): APIPromise<RetentionGetResponse | null>;
}
export declare class Retention extends BaseRetention {
}
export interface RetentionCreateResponse {
/**
* The log retention flag for Logpull API.
*/
flag?: boolean;
}
export interface RetentionGetResponse {
/**
* The log retention flag for Logpull API.
*/
flag?: boolean;
}
export interface RetentionCreateParams {
/**
* Path param: Identifier.
*/
zone_id: string;
/**
* Body param: The log retention flag for Logpull API.
*/
flag?: boolean;
}
export interface RetentionGetParams {
/**
* Identifier.
*/
zone_id: string;
}
export declare namespace Retention {
export { type RetentionCreateResponse as RetentionCreateResponse, type RetentionGetResponse as RetentionGetResponse, type RetentionCreateParams as RetentionCreateParams, type RetentionGetParams as RetentionGetParams, };
}
//# sourceMappingURL=retention.d.mts.map