UNPKG

aws-cdk

Version:

CDK Toolkit, the command line tool for CDK apps

51 lines (50 loc) 2.38 kB
import { Environment } from '@aws-cdk/cx-api'; import { SdkProvider } from '../api'; /** The list of languages supported by the built-in noctilucent binary. */ export declare const MIGRATE_SUPPORTED_LANGUAGES: readonly string[]; /** * Generates a CDK app from a yaml or json template. * * @param stackName The name to assign to the stack in the generated app * @param stack The yaml or json template for the stack * @param language The language to generate the CDK app in * @param outputPath The path at which to generate the CDK app */ export declare function generateCdkApp(stackName: string, stack: string, language: string, outputPath?: string, compress?: boolean): Promise<void>; /** * Generates a CDK stack file. * @param template The template to translate into a CDK stack * @param stackName The name to assign to the stack * @param language The language to generate the stack in * @returns A string representation of a CDK stack file */ export declare function generateStack(template: string, stackName: string, language: string): string; /** * Reads and returns a stack template from a local path. * * @param inputPath The location of the template * @returns A string representation of the template if present, otherwise undefined */ export declare function readFromPath(inputPath?: string): string | undefined; /** * Reads and returns a stack template from a deployed CloudFormation stack. * * @param stackName The name of the stack * @param sdkProvider The sdk provider for making CloudFormation calls * @param environment The account and region where the stack is deployed * @returns A string representation of the template if present, otherwise undefined */ export declare function readFromStack(stackName: string, sdkProvider: SdkProvider, environment: Environment): Promise<string | undefined>; /** * Sets the account and region for making CloudFormation calls. * @param account The account to use * @param region The region to use * @returns The environment object */ export declare function setEnvironment(account?: string, region?: string): Environment; /** * Validates that exactly one source option has been provided. * @param fromPath The content of the flag `--from-path` * @param fromStack the content of the flag `--from-stack` */ export declare function validateSourceOptions(fromPath?: string, fromStack?: boolean): void;