UNPKG

@phala/cloud

Version:
34 lines 1.51 kB
import { z } from "zod"; import type { Client, SafeResult } from "../client"; import { type KmsInfo } from "../types/kms_info"; import { ActionParameters, ActionReturnType } from "../types/common"; export declare const GetKmsInfoRequestSchema: z.ZodObject<{ kms_id: z.ZodString; }, "strip", z.ZodTypeAny, { kms_id: string; }, { kms_id: string; }>; export type GetKmsInfoRequest = z.infer<typeof GetKmsInfoRequestSchema>; export type GetKmsInfoParameters<T = undefined> = ActionParameters<T>; export type GetKmsInfoReturnType<T = undefined> = ActionReturnType<KmsInfo, T>; /** * Get information about a specific KMS * * @param client - The API client * @param request - Request parameters * @param request.kms_id - ID of the KMS to get information for * @param parameters - Optional behavior parameters * @returns KMS information * * @example * ```typescript * const info = await getKmsInfo(client, { kms_id: "kms-123" }) * ``` */ export declare function getKmsInfo<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetKmsInfoRequest, parameters?: GetKmsInfoParameters<T>): Promise<GetKmsInfoReturnType<T>>; /** * Safe version of getKmsInfo that returns a Result type instead of throwing */ export declare function safeGetKmsInfo<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetKmsInfoRequest, parameters?: GetKmsInfoParameters<T>): Promise<SafeResult<GetKmsInfoReturnType<T>>>; //# sourceMappingURL=get_kms_info.d.ts.map