UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

31 lines • 1.08 kB
// 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 BaseTokens = /* @__PURE__ */ (() => { class BaseTokens extends APIResource { /** * Generate authentication token for VPC flow logs export. * * @example * ```ts * const token = * await client.magicNetworkMonitoring.vpcFlows.tokens.create( * { account_id: '6f91088a406011ed95aed352566e8d4c' }, * ); * ``` */ create(params, options) { const { account_id } = params; return this._client.post(path `/accounts/${account_id}/mnm/vpc-flows/token`, options)._thenUnwrap((obj) => obj.result); } } BaseTokens._key = Object.freeze([ 'magicNetworkMonitoring', 'vpcFlows', 'tokens', ]); return BaseTokens; })(); export class Tokens extends BaseTokens { } //# sourceMappingURL=tokens.mjs.map