UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

74 lines • 2.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuditSSHSettings = exports.BaseAuditSSHSettings = 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 BaseAuditSSHSettings = /* @__PURE__ */ (() => { class BaseAuditSSHSettings extends resource_1.APIResource { /** * Update Zero Trust Audit SSH and SSH with Access for Infrastructure settings for * an account. * * @example * ```ts * const gatewaySettings = * await client.zeroTrust.gateway.auditSSHSettings.update({ * account_id: '699d98642c564d2e855e9661899b7252', * public_key: * '1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=', * }); * ``` */ update(params, options) { const { account_id, ...body } = params; return this._client.put((0, path_1.path) `/accounts/${account_id}/gateway/audit_ssh_settings`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Retrieve all Zero Trust Audit SSH and SSH with Access for Infrastructure * settings for an account. * * @example * ```ts * const gatewaySettings = * await client.zeroTrust.gateway.auditSSHSettings.get({ * account_id: '699d98642c564d2e855e9661899b7252', * }); * ``` */ get(params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/gateway/audit_ssh_settings`, options)._thenUnwrap((obj) => obj.result); } /** * Rotate the SSH account seed that generates the host key identity when connecting * through the Cloudflare SSH Proxy. * * @example * ```ts * const gatewaySettings = * await client.zeroTrust.gateway.auditSSHSettings.rotateSeed( * { account_id: '699d98642c564d2e855e9661899b7252' }, * ); * ``` */ rotateSeed(params, options) { const { account_id } = params; return this._client.post((0, path_1.path) `/accounts/${account_id}/gateway/audit_ssh_settings/rotate_seed`, options)._thenUnwrap((obj) => obj.result); } } BaseAuditSSHSettings._key = Object.freeze([ 'zeroTrust', 'gateway', 'auditSSHSettings', ]); return BaseAuditSSHSettings; })(); exports.BaseAuditSSHSettings = BaseAuditSSHSettings; class AuditSSHSettings extends BaseAuditSSHSettings { } exports.AuditSSHSettings = AuditSSHSettings; //# sourceMappingURL=audit-ssh-settings.js.map