cloudflare
Version:
The official TypeScript library for the Cloudflare API
37 lines • 1.31 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseToken extends APIResource {
static readonly _key: readonly ['zeroTrust', 'tunnels', 'cloudflared', 'token'];
/**
* Retrieves the token used to run cloudflared and associate it with a specific
* Cloudflare Tunnel. Treat the token as a secret.
*
* @example
* ```ts
* const token =
* await client.zeroTrust.tunnels.cloudflared.token.get(
* 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415',
* { account_id: '699d98642c564d2e855e9661899b7252' },
* );
* ```
*/
get(tunnelID: string, params: TokenGetParams, options?: RequestOptions): APIPromise<TokenGetResponse>;
}
export declare class Token extends BaseToken {
}
/**
* The Tunnel Token is used as a mechanism to authenticate the operation of a
* tunnel.
*/
export type TokenGetResponse = string;
export interface TokenGetParams {
/**
* Cloudflare account ID
*/
account_id: string;
}
export declare namespace Token {
export { type TokenGetResponse as TokenGetResponse, type TokenGetParams as TokenGetParams };
}
//# sourceMappingURL=token.d.ts.map