cloudflare
Version:
The official TypeScript library for the Cloudflare API
52 lines • 1.85 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseIPs = /* @__PURE__ */ (() => {
class BaseIPs extends APIResource {
/**
* Add an IP from a prefix owned by the account to a particular address map.
*
* @example
* ```ts
* const ip = await client.addressing.addressMaps.ips.update(
* '192.0.2.1',
* {
* account_id: '258def64c72dae45f3e4c8516e2111f2',
* address_map_id: '055817b111884e0227e1be16a0be6ee0',
* },
* );
* ```
*/
update(ipAddress, params, options) {
const { account_id, address_map_id } = params;
return this._client.put(path `/accounts/${account_id}/addressing/address_maps/${address_map_id}/ips/${ipAddress}`, options);
}
/**
* Remove an IP from a particular address map.
*
* @example
* ```ts
* const ip = await client.addressing.addressMaps.ips.delete(
* '192.0.2.1',
* {
* account_id: '258def64c72dae45f3e4c8516e2111f2',
* address_map_id: '055817b111884e0227e1be16a0be6ee0',
* },
* );
* ```
*/
delete(ipAddress, params, options) {
const { account_id, address_map_id } = params;
return this._client.delete(path `/accounts/${account_id}/addressing/address_maps/${address_map_id}/ips/${ipAddress}`, options);
}
}
BaseIPs._key = Object.freeze([
'addressing',
'addressMaps',
'ips',
]);
return BaseIPs;
})();
export class IPs extends BaseIPs {
}
//# sourceMappingURL=ips.mjs.map