import { EngineEvent } from "./events"; import { DestroyResult, OutputMap, PreviewResult, RefreshResult, UpdateSummary, UpResult } from "./stack"; import { Deployment } from "./workspace"; /** * RemoteStack is an isolated, independencly configurable instance of a Pulumi program that is * operated on remotely (up/preview/refresh/destroy). */ export declare class RemoteStack { private readonly stack; private constructor(); /** * The name identifying the Stack. */ get name(): string; /** * Creates or updates the resources in a stack by executing the program in the Workspace. * https://www.pulumi.com/docs/cli/commands/pulumi_up/ * This operation runs remotely. * * @param opts Options to customize the behavior of the update. */ up(opts?: RemoteUpOptions): Promise; /** * Performs a dry-run update to a stack, returning pending changes. * https://www.pulumi.com/docs/cli/commands/pulumi_preview/ * This operation runs remotely. * * @param opts Options to customize the behavior of the preview. */ preview(opts?: RemotePreviewOptions): Promise; /** * Compares the current stack’s resource state with the state known to exist in the actual * cloud provider. Any such changes are adopted into the current stack. * This operation runs remotely. * * @param opts Options to customize the behavior of the refresh. */ refresh(opts?: RemoteRefreshOptions): Promise; /** * Destroy deletes all resources in a stack, leaving all history and configuration intact. * This operation runs remotely. * * @param opts Options to customize the behavior of the destroy. */ destroy(opts?: RemoteDestroyOptions): Promise; /** * Gets the current set of Stack outputs from the last Stack.up(). */ outputs(): Promise; /** * Returns a list summarizing all previous and current results from Stack lifecycle operations * (up/preview/refresh/destroy). */ history(pageSize?: number, page?: number): Promise; /** * Cancel stops a stack's currently running update. It returns an error if no update is currently running. * Note that this operation is _very dangerous_, and may leave the stack in an inconsistent state * if a resource operation was pending when the update was canceled. * This command is not supported for local backends. */ cancel(): Promise; /** * exportStack exports the deployment state of the stack. * This can be combined with Stack.importStack to edit a stack's state (such as recovery from failed deployments). */ exportStack(): Promise; /** * importStack imports the specified deployment state into a pre-existing stack. * This can be combined with Stack.exportStack to edit a stack's state (such as recovery from failed deployments). * * @param state the stack state to import. */ importStack(state: Deployment): Promise; } /** * Options controlling the behavior of a RemoteStack.up() operation. */ export interface RemoteUpOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a RemoteStack.preview() operation. */ export interface RemotePreviewOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a RemoteStack.refresh() operation. */ export interface RemoteRefreshOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a RemoteStack.destroy() operation. */ export interface RemoteDestroyOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; }