UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

182 lines • 5.84 kB
import { APIResource } from "../../../core/resource.mjs"; import { APIPromise } from "../../../core/api-promise.mjs"; import { RequestOptions } from "../../../internal/request-options.mjs"; export declare class BaseIngresses extends APIResource { static readonly _key: readonly ['intel', 'sinkholes', 'ingresses']; /** * Create a new ingress rule for the specified sinkhole. The CIDR block must be a * Cloudflare BYOIP associated with your account. The zone_id must be a zone with * the ability to create Spectrum Apps. The sinkhole must belong to the same * account as the zone. * * @example * ```ts * const ingress = * await client.intel.sinkholes.ingresses.create( * '93defa6e909e464e8c89a85859f36d3c', * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * cidr: 'cidr', * }, * ); * ``` */ create(sinkholeID: string, params: IngressCreateParams, options?: RequestOptions): APIPromise<IngressCreateResponse>; /** * Replaces the specified ingress rule. The sinkhole must belong to the same * account as the zone. * * @example * ```ts * const ingress = * await client.intel.sinkholes.ingresses.update( * 'de32ae5203724ed08dcc26e971a4d22f', * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * sinkhole_id: '93defa6e909e464e8c89a85859f36d3c', * cidr: 'cidr', * }, * ); * ``` */ update(ingressID: string, params: IngressUpdateParams, options?: RequestOptions): APIPromise<IngressUpdateResponse>; /** * Delete the specified ingress rule. The sinkhole must belong to the same account * as the zone. * * @example * ```ts * const ingress = * await client.intel.sinkholes.ingresses.delete( * 'de32ae5203724ed08dcc26e971a4d22f', * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * sinkhole_id: '93defa6e909e464e8c89a85859f36d3c', * }, * ); * ``` */ delete(ingressID: string, params: IngressDeleteParams, options?: RequestOptions): APIPromise<IngressDeleteResponse>; /** * Get the specified ingress rule associated with a sinkhole. The sinkhole must * belong to the same account as the zone. * * @example * ```ts * const ingress = await client.intel.sinkholes.ingresses.get( * 'de32ae5203724ed08dcc26e971a4d22f', * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * sinkhole_id: '93defa6e909e464e8c89a85859f36d3c', * }, * ); * ``` */ get(ingressID: string, params: IngressGetParams, options?: RequestOptions): APIPromise<IngressGetResponse>; } export declare class Ingresses extends BaseIngresses { } export interface IngressCreateResponse { /** * The unique identifier for the ingress rule. */ id?: string; /** * The CIDR block for the ingress rule. */ cidr?: string; /** * The date and time when the ingress rule was created. */ created_on?: string; /** * The date and time when the ingress rule was last modified. */ modified_on?: string; /** * The sinkhole this ingress rule belongs to. */ sinkhole_id?: string; /** * The zone tag associated with this ingress rule. */ zone_tag?: string; } export type IngressUpdateResponse = unknown; export type IngressDeleteResponse = unknown; export interface IngressGetResponse { /** * The unique identifier for the ingress rule. */ id?: string; /** * The CIDR block for the ingress rule. */ cidr?: string; /** * The date and time when the ingress rule was created. */ created_on?: string; /** * The date and time when the ingress rule was last modified. */ modified_on?: string; /** * The sinkhole this ingress rule belongs to. */ sinkhole_id?: string; /** * The zone tag associated with this ingress rule. */ zone_tag?: string; } export interface IngressCreateParams { /** * Path param: The unique identifier for the Cloudflare zone. */ zone_id: string; /** * Body param: The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., * 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns. */ cidr: string; } export interface IngressUpdateParams { /** * Path param: The unique identifier for the Cloudflare zone. */ zone_id: string; /** * Path param: The unique identifier for the sinkhole. */ sinkhole_id: string; /** * Body param: The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., * 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns. */ cidr: string; } export interface IngressDeleteParams { /** * The unique identifier for the Cloudflare zone. */ zone_id: string; /** * The unique identifier for the sinkhole. */ sinkhole_id: string; } export interface IngressGetParams { /** * The unique identifier for the Cloudflare zone. */ zone_id: string; /** * The unique identifier for the sinkhole. */ sinkhole_id: string; } export declare namespace Ingresses { export { type IngressCreateResponse as IngressCreateResponse, type IngressUpdateResponse as IngressUpdateResponse, type IngressDeleteResponse as IngressDeleteResponse, type IngressGetResponse as IngressGetResponse, type IngressCreateParams as IngressCreateParams, type IngressUpdateParams as IngressUpdateParams, type IngressDeleteParams as IngressDeleteParams, type IngressGetParams as IngressGetParams, }; } //# sourceMappingURL=ingresses.d.mts.map