UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

55 lines • 2.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Configurations = exports.BaseConfigurations = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseConfigurations = /* @__PURE__ */ (() => { class BaseConfigurations extends resource_1.APIResource { /** * Adds or updates the high-availability configuration for a WARP Connector tunnel. * * @example * ```ts * const configuration = * await client.zeroTrust.tunnels.warpConnector.configurations.update( * 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * ha_mode: 'aws', * }, * ); * ``` */ update(tunnelID, params, options) { const { account_id, ...body } = params; return this._client.put((0, path_1.path) `/accounts/${account_id}/warp_connector/${tunnelID}/configurations`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Gets the high-availability configuration for a WARP Connector tunnel. * * @example * ```ts * const configuration = * await client.zeroTrust.tunnels.warpConnector.configurations.get( * 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(tunnelID, params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/warp_connector/${tunnelID}/configurations`, options)._thenUnwrap((obj) => obj.result); } } BaseConfigurations._key = Object.freeze(['zeroTrust', 'tunnels', 'warpConnector', 'configurations']); return BaseConfigurations; })(); exports.BaseConfigurations = BaseConfigurations; class Configurations extends BaseConfigurations { } exports.Configurations = Configurations; //# sourceMappingURL=configurations.js.map