import { type AwsService } from '../services.js'; /** * * @param operation The operation to run. * @returns If successful, returns the result of operation. If operation returns a 404, returns undefined. * @throws If operation returns a non 404 error, rethrows that error. */ export declare function runAndCatch404(operation: () => Promise): Promise; /** * * @param operation The operation to run. * @returns If successful, returns the result of operation. If operation returns a 404, returns undefined. * @throws If operation returns a non 400 error, rethrows that error. */ export declare function runAndCatchAccessDenied(operation: () => Promise, onError?: (error: any) => Promise): Promise; export declare function runAndCatchAccessDeniedWithLog(arn: string, awsService: AwsService, resourceType: string, field: string, operation: () => Promise): Promise; /** * Run an operation and catch a specific error by name. Return undefined if the error matches, otherwise rethrow the error. * * @param errorName the name of the error to catch * @param operation the operation to run * @returns If successful, returns the result of operation. If operation throws an error with the specified name, returns undefined. * @throws If operation throws an error with a different name, rethrows that error. */ export declare function runAndCatchError(errorName: string, operation: () => Promise, onError?: (error: any) => Promise): Promise; /** * Retry a function that may fail due to DNS resolution issues. * * @param fn the function to retry * @param tries the number of times to retry the function * @returns the result of the function if successful, otherwise throws the last error encountered */ export declare function withDnsRetry(fn: () => Promise, tries?: number): Promise; //# sourceMappingURL=client-tools.d.ts.map