cloudflare
Version:
The official TypeScript library for the Cloudflare API
55 lines • 2.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InitialResolvedIP = exports.BaseInitialResolvedIP = 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 BaseInitialResolvedIP = /* @__PURE__ */ (() => {
class BaseInitialResolvedIP extends resource_1.APIResource {
/**
* Updates the CIDR for the account's default Initial Resolved IP Subnet of the
* given address family. The new CIDR must not conflict with existing private
* routes in the account.
*
* @example
* ```ts
* const subnet =
* await client.zeroTrust.networks.subnets.initialResolvedIP.update(
* 'v4',
* { account_id: '699d98642c564d2e855e9661899b7252' },
* );
* ```
*/
update(addressFamily, params, options) {
const { account_id, ...body } = params;
return this._client.put((0, path_1.path) `/accounts/${account_id}/zerotrust/subnets/initial_resolved_ip/${addressFamily}`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Returns the account's default Initial Resolved IP Subnet for the given address
* family.
*
* @example
* ```ts
* const subnet =
* await client.zeroTrust.networks.subnets.initialResolvedIP.get(
* 'v4',
* { account_id: '699d98642c564d2e855e9661899b7252' },
* );
* ```
*/
get(addressFamily, params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/zerotrust/subnets/initial_resolved_ip/${addressFamily}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseInitialResolvedIP._key = Object.freeze(['zeroTrust', 'networks', 'subnets', 'initialResolvedIP']);
return BaseInitialResolvedIP;
})();
exports.BaseInitialResolvedIP = BaseInitialResolvedIP;
class InitialResolvedIP extends BaseInitialResolvedIP {
}
exports.InitialResolvedIP = InitialResolvedIP;
//# sourceMappingURL=initial-resolved-ip.js.map