import { APIResource } from "../../../core/resource.mjs"; import { APIPromise } from "../../../core/api-promise.mjs"; import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../../core/pagination.mjs"; import { RequestOptions } from "../../../internal/request-options.mjs"; export declare class BasePrefixBindings extends APIResource { static readonly _key: readonly ['dls', 'regionalServices', 'prefixBindings']; /** * Bind a CIDR from a BYOIP prefix to a region. * * This requires the **IP Prefixes Write** permission in addition to **DLS Write**, * because the binding is created against a BYOIP prefix in Addressing. * * @example * ```ts * const prefixBinding = * await client.dls.regionalServices.prefixBindings.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * cidr: '10.0.1.0/24', * prefix_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', * region_key: 'eu', * }); * ``` */ create(params: PrefixBindingCreateParams, options?: RequestOptions): APIPromise; /** * List the BYOIP prefix bindings configured for an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const prefixBindingListResponse of client.dls.regionalServices.prefixBindings.list( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params: PrefixBindingListParams, options?: RequestOptions): PagePromise; /** * Delete a BYOIP prefix binding. * * Like creating a binding, this requires **IP Prefixes Write** in addition to * **DLS Write**. * * @example * ```ts * const prefixBinding = * await client.dls.regionalServices.prefixBindings.delete( * 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(bindingID: string, params: PrefixBindingDeleteParams, options?: RequestOptions): APIPromise; /** * Update the region of an existing BYOIP prefix binding. * * Like creating a binding, this requires **IP Prefixes Write** in addition to * **DLS Write**. * * @example * ```ts * const response = * await client.dls.regionalServices.prefixBindings.edit( * 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * region_key: 'eu', * }, * ); * ``` */ edit(bindingID: string, params: PrefixBindingEditParams, options?: RequestOptions): APIPromise; /** * Retrieve a single BYOIP prefix binding by ID. * * @example * ```ts * const prefixBinding = * await client.dls.regionalServices.prefixBindings.get( * 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(bindingID: string, params: PrefixBindingGetParams, options?: RequestOptions): APIPromise; } export declare class PrefixBindings extends BasePrefixBindings { } export type PrefixBindingListResponsesCursorPagination = CursorPagination; export interface PrefixBindingCreateResponse { /** * The ID of the binding. */ id: string; /** * The CIDR that is bound. */ cidr: string; /** * The ID of the parent prefix. */ prefix_id: string; /** * The region key used for the binding. */ region_key: string; } export interface PrefixBindingListResponse { /** * The ID of the binding. */ id: string; /** * The CIDR that is bound. */ cidr: string; /** * The ID of the parent prefix. */ prefix_id: string; /** * The region key used for the binding. */ region_key: string; } export interface PrefixBindingDeleteResponse { messages: Array; success: boolean; errors?: Array; } export declare namespace PrefixBindingDeleteResponse { interface Message { code: number; message: string; /** * Optional upstream error context for APIv4 errors that wrap downstream service * failures. */ error_chain?: Array; } interface Error { code: number; message: string; /** * Optional upstream error context for APIv4 errors that wrap downstream service * failures. */ error_chain?: Array; } } export interface PrefixBindingEditResponse { /** * The ID of the binding. */ id: string; /** * The CIDR that is bound. */ cidr: string; /** * The ID of the parent prefix. */ prefix_id: string; /** * The region key used for the binding. */ region_key: string; } export interface PrefixBindingGetResponse { /** * The ID of the binding. */ id: string; /** * The CIDR that is bound. */ cidr: string; /** * The ID of the parent prefix. */ prefix_id: string; /** * The region key used for the binding. */ region_key: string; } export interface PrefixBindingCreateParams { /** * Path param: Identifier of a Cloudflare account. */ account_id: string; /** * Body param: IP prefix in CIDR notation to bind. */ cidr: string; /** * Body param: The ID of the parent IP prefix that contains the CIDR. */ prefix_id: string; /** * Body param: Region key from managed regions (e.g., "us", "eu"). */ region_key: string; } export interface PrefixBindingListParams extends CursorPaginationParams { /** * Path param: Identifier of a Cloudflare account. */ account_id: string; } export interface PrefixBindingDeleteParams { /** * Identifier of a Cloudflare account. */ account_id: string; } export interface PrefixBindingEditParams { /** * Path param: Identifier of a Cloudflare account. */ account_id: string; /** * Body param: New region key to assign (e.g., "us", "eu", "cfcanary"). */ region_key: string; } export interface PrefixBindingGetParams { /** * Identifier of a Cloudflare account. */ account_id: string; } export declare namespace PrefixBindings { export { type PrefixBindingCreateResponse as PrefixBindingCreateResponse, type PrefixBindingListResponse as PrefixBindingListResponse, type PrefixBindingDeleteResponse as PrefixBindingDeleteResponse, type PrefixBindingEditResponse as PrefixBindingEditResponse, type PrefixBindingGetResponse as PrefixBindingGetResponse, type PrefixBindingListResponsesCursorPagination as PrefixBindingListResponsesCursorPagination, type PrefixBindingCreateParams as PrefixBindingCreateParams, type PrefixBindingListParams as PrefixBindingListParams, type PrefixBindingDeleteParams as PrefixBindingDeleteParams, type PrefixBindingEditParams as PrefixBindingEditParams, type PrefixBindingGetParams as PrefixBindingGetParams, }; } //# sourceMappingURL=prefix-bindings.d.mts.map