import { EngineEvent } from "./events"; import { DestroyResult, OutputMap, PreviewResult, RefreshResult, UpdateSummary, UpResult } from "./stack"; import { Deployment } from "./workspace"; /** * {@link RemoteStack} is an isolated, independently configurable instance of a * Pulumi program that is operated on remotely. */ 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. This operation runs remotely. * * @param opts * Options to customize the behavior of the update. * * @see https://www.pulumi.com/docs/cli/commands/pulumi_up/ */ up(opts?: RemoteUpOptions): Promise; /** * Performs a dry-run update to a stack, returning pending changes. This * operation runs remotely. * * @param opts * Options to customize the behavior of the preview. * * @see https://www.pulumi.com/docs/cli/commands/pulumi_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; /** * 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 {@link 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; /** * 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. */ cancel(): Promise; /** * Exports the deployment state of the stack. This can be combined with * {@link Stack.importStack} to edit a stack's state (such as recovery from * failed deployments). */ exportStack(): Promise; /** * Imports the specified deployment state into a pre-existing stack. This * can be combined with {@link 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 {@link RemoteStack.up} operation. */ export interface RemoteUpOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a {@link RemoteStack.preview} operation. */ export interface RemotePreviewOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a {@link RemoteStack.refresh} operation. */ export interface RemoteRefreshOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; } /** * Options controlling the behavior of a {@link RemoteStack.destroy} operation. */ export interface RemoteDestroyOptions { onOutput?: (out: string) => void; onEvent?: (event: EngineEvent) => void; }