cloudflare
Version:
The official TypeScript library for the Cloudflare API
31 lines • 1.32 kB
JavaScript
// 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 BaseConnections = /* @__PURE__ */ (() => {
class BaseConnections extends APIResource {
/**
* Fetches connection details for a WARP Connector Tunnel.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const connectionGetResponse of client.zeroTrust.tunnels.warpConnector.connections.get(
* 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415',
* { account_id: '699d98642c564d2e855e9661899b7252' },
* )) {
* // ...
* }
* ```
*/
get(tunnelID, params, options) {
const { account_id } = params;
return this._client.getAPIList(path `/accounts/${account_id}/warp_connector/${tunnelID}/connections`, (SinglePage), options);
}
}
BaseConnections._key = Object.freeze(['zeroTrust', 'tunnels', 'warpConnector', 'connections']);
return BaseConnections;
})();
export class Connections extends BaseConnections {
}
//# sourceMappingURL=connections.mjs.map