UNPKG

2.22 kBTypeScriptView Raw
1import * as cxapi from '@aws-cdk/cx-api';
2import type { SDK } from './aws-auth';
3import { type CloudFormationStack } from './deployments/cloudformation';
4export declare const DEFAULT_TOOLKIT_STACK_NAME = "CDKToolkit";
5/**
6 * Information on the Bootstrap stack of the environment we're deploying to.
7 *
8 * This class serves to:
9 *
10 * - Inspect the bootstrap stack, and return various properties of it for successful
11 * asset deployment (in case of legacy-synthesized stacks).
12 * - Validate the version of the target environment, and nothing else (in case of
13 * default-synthesized stacks).
14 *
15 * An object of this type might represent a bootstrap stack that could not be found.
16 * This is not an issue unless any members are used that require the bootstrap stack
17 * to have been found, in which case an error is thrown (default-synthesized stacks
18 * should never run into this as they don't need information from the bootstrap
19 * stack, all information is already encoded into the Cloud Assembly Manifest).
20 *
21 * Nevertheless, an instance of this class exists to serve as a cache for SSM
22 * parameter lookups (otherwise, the "bootstrap stack version" parameter would
23 * need to be read repeatedly).
24 *
25 * Called "ToolkitInfo" for historical reasons.
26 *
27 */
28export declare abstract class ToolkitInfo {
29 static determineName(overrideName?: string): string;
30 static lookup(environment: cxapi.Environment, sdk: SDK, stackName: string | undefined): Promise<ToolkitInfo>;
31 static fromStack(stack: CloudFormationStack): ToolkitInfo;
32 static bootstrapStackNotFoundInfo(stackName: string): ToolkitInfo;
33 static bootstrapStackLookupError(stackName: string, e: Error): ToolkitInfo;
34 abstract readonly found: boolean;
35 abstract readonly bucketUrl: string;
36 abstract readonly bucketName: string;
37 abstract readonly repositoryName: string;
38 abstract readonly version: number;
39 abstract readonly variant: string;
40 abstract readonly bootstrapStack: CloudFormationStack;
41 abstract readonly stackName: string;
42 constructor();
43}
44export interface EcrRepositoryInfo {
45 repositoryUri: string;
46}
47export interface EcrCredentials {
48 username: string;
49 password: string;
50 endpoint: string;
51}