export type SystemMountsTuneRequest = {allowed_managed_keys?: Array | undefined, allowed_response_headers?: Array | undefined, audit_non_hmac_request_keys?: Array | undefined, audit_non_hmac_response_keys?: Array | undefined, default_lease_ttl?: string | undefined, description?: string | undefined, listing_visibility?: string | undefined, max_lease_ttl?: string | undefined, options?: Record | undefined, passthrough_request_headers?: Array | undefined, plugin_version?: string | undefined, token_type?: string | undefined}; export type CreateApiSysMountsPathTuneArgs = {body: SystemMountsTuneRequest}; export type CreateApiSysMountsPathTuneOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Tune backend configuration parameters for this mount. * * POST /sys/mounts/{path}/tune */ export const createApiSysMountsPathTune = async (args: CreateApiSysMountsPathTuneArgs, options: CreateApiSysMountsPathTuneOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/sys/mounts/${encodeURIComponent(String(args.path))}/tune${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };