UNPKG

@altostra/core

Version:

Core library for shared types and logic

23 lines (22 loc) 980 B
import type { Maybe } from "../../Common"; import type { RelationalDBEngine } from "../../Resources"; import type { RDSProxyTargetType, RelationalDBProxyType } from "../../Resources/RelationalDatabase/DBProxy"; import type { ResourceHelper } from "../ResourceHelper"; export declare function getRelationalDBProxyResourceUtils(resource: ResourceHelper<RelationalDBProxyType>): RelationalDBProxyResourceUtils; export interface RelationalDBProxyResourceUtils { /** * Validate if rds version is supported by proxy resource * @param version db version * @param engine engine type */ isDbVersionValidForProxy(version: string, engine: RelationalDBEngine): boolean; /** * returns number of connected rdb resources */ getProxyTargetsCount(): number; /** * Returns proxy's connected RDS. * If proxy connects to more than one RDS, method throws error */ getValidProxyTarget(): Maybe<ResourceHelper<RDSProxyTargetType>>; }