import { CloudFormationClient, CloudFormationClientConfig, DescribeChangeSetOutput, StackEvent } from '@aws-sdk/client-cloudformation';
import { S3Client, S3ClientConfig } from '@aws-sdk/client-s3';
import { TypedEmitter } from 'tiny-typed-emitter';
import { AwsCommonServiceConfig } from './CommonServiceConfig.js';
import { DownloadTemplateProgressStats } from './DownloadTemplateProgressStats.js';
import { ParameterValue } from './ParameterValue.js';
import { ParameterValueProviders, SetParameterValues } from './setParameters.js';
import { TemplateLocation } from './TemplateLocation.js';
export interface CreateChangeSetOptions
{
name?: string;
parameterDefaults?: SetParameterValues
;
parameters?: SetParameterValues
;
provideParameterDefaults?: ParameterValueProviders
;
provideParameters?: (current: Record
) => SetParameterValues
| PromiseLike>;
}
export declare enum ChangeSetCreateStatus {
ChangeSetCreateComplete = "ChangeSetCreateComplete",
ChangeSetCreateInProgress = "ChangeSetCreateInProgress",
ChangeSetCreating = "ChangeSetCreating",
DescribeStack = "DescribeStack",
PrepareParameters = "PrepareParameters"
}
export declare enum ChangeSetExecuteStatus {
ChangeSetCreateComplete = "ChangeSetCreateComplete",
ChangeSetCreateInProgress = "ChangeSetCreateInProgress",
ChangeSetCreating = "ChangeSetCreating",
DescribeStack = "DescribeStack",
PrepareParameters = "PrepareParameters"
}
export declare enum CloudFormationStackEventKey {
ChangeSetCreateStatus = "ChangesetCreateStatus",
DownloadTemplateProgress = "DownloadTemplateProgress",
ExecuteEvent = "ExecuteEvent"
}
export interface CloudFormationStackEvents {
[CloudFormationStackEventKey.ChangeSetCreateStatus](status: ChangeSetCreateStatus, changeset?: DescribeChangeSetOutput): void;
[CloudFormationStackEventKey.DownloadTemplateProgress](stats: DownloadTemplateProgressStats): void;
[CloudFormationStackEventKey.ExecuteEvent](event: StackEvent): void;
}
export declare class CloudFormationStackDeployer extends TypedEmitter {
private readonly cfn;
private readonly s3;
private readonly stackName;
private readonly templateLocation;
private _changeset;
private _template;
get changeset(): DescribeChangeSetOutput | undefined;
private set changeset(value);
constructor(dep: {
awsConfig?: AwsCommonServiceConfig;
cfn?: CloudFormationClient;
cfnConfig?: CloudFormationClientConfig;
s3?: S3Client;
s3Config?: S3ClientConfig;
stackName: string;
template?: TemplateLocation;
});
/**
* Create a changeset for the stack.
*/
createChangeSet(opts?: CreateChangeSetOptions): Promise;
/**
* Execute the changeset.
*/
executeChangeSet(): Promise;
/**
* Stream events for the changeset.
*/
streamEvents(stackId: string, token?: string): Promise;
/**
* Get the existing stack info, if any.
*/
private getStack;
/**
* Download and validate the template data.
*/
private getTemplate;
}
//# sourceMappingURL=CloudFormationStackDeployer.d.ts.map