UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

35 lines • 1.33 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { SinglePage } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseReferences = /* @__PURE__ */ (() => { class BaseReferences extends APIResource { /** * Get the list of resources that reference the provided monitor. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const referenceGetResponse of client.loadBalancers.monitors.references.get( * 'f1aba936b94213e5b8dca0c0dbf1f9cc', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ get(monitorID, params, options) { const { account_id } = params; return this._client.getAPIList(path `/accounts/${account_id}/load_balancers/monitors/${monitorID}/references`, (SinglePage), options); } } BaseReferences._key = Object.freeze([ 'loadBalancers', 'monitors', 'references', ]); return BaseReferences; })(); export class References extends BaseReferences { } //# sourceMappingURL=references.mjs.map