aws-cdk

  • Version 2.1014.0
  • Published
  • 24.8 MB
  • No dependencies
  • Apache-2.0 license

Install

npm i aws-cdk
yarn add aws-cdk
pnpm add aws-cdk

Overview

AWS CDK CLI, the command line tool for CDK apps

Index

Functions

function cli

cli: (args?: string[]) => void;

    function exec

    exec: (args: string[], synthesizer?: Synthesizer) => Promise<number | void>;

      Namespaces

      namespace legacy

      module 'lib/legacy-exports-source.d.ts' {}

        variable aliases

        const aliases: string[];

          variable CI

          let CI: boolean;

            variable command

            const command: string;

              variable describe

              const describe: string;

                variable logLevel

                let logLevel: LogLevel;

                  function availableInitTemplates

                  availableInitTemplates: () => Promise<InitTemplate[]>;

                    function cached

                    cached: <A extends object, B>(obj: A, sym: symbol, fn: () => B) => B;
                    • Deprecated

                    function cli

                    cli: (args?: string[]) => void;

                      function data

                      data: (fmt: string, ...args: unknown[]) => void;

                        function debug

                        debug: (fmt: string, ...args: unknown[]) => false | void;

                          function enableTracing

                          enableTracing: (_enabled: boolean) => void;
                          • Enable tracing in the CDK

                            Deprecated

                            cannot be enabled from outside the CDK

                          function error

                          error: (fmt: string, ...args: unknown[]) => void;

                            function exec

                            exec: (args: string[], synthesizer?: Synthesizer) => Promise<number | void>;

                              function execProgram

                              execProgram: (
                              aws: SdkProvider,
                              ioHelper: IoHelper,
                              config: Configuration
                              ) => Promise<ExecProgramResult>;
                              • Invokes the cloud executable and returns JSON output

                              function formatAsBanner

                              formatAsBanner: (msgs: string[]) => string[];
                              • Returns a set of strings when printed on the console produces a banner msg. The message is in the following format - ******************** *** msg line x *** *** msg line xyz *** ********************

                                Spec: - The width of every line is equal, dictated by the longest message string - The first and last lines are '*'s for the full length of the line - Each line in between is prepended with '*** ' and appended with ' ***' - The text is indented left, i.e. whitespace is right-padded when the length is shorter than the longest.

                                Parameter msgs

                                array of strings containing the message lines to be printed in the banner. Returns empty string if array is empty.

                                Returns

                                array of strings containing the message formatted as a banner

                              function highlight

                              highlight: (fmt: string, ...args: unknown[]) => void;

                                function increaseVerbosity

                                increaseVerbosity: () => void;

                                  function prefix

                                  prefix: (prefixString: string, fn: LoggerFunction) => LoggerFunction;
                                  • Create a logger output that features a constant prefix string.

                                    Parameter prefixString

                                    the prefix string to be appended before any log entry.

                                    Parameter fn

                                    the logger function to be used (typically one of the other functions in this module)

                                    Returns

                                    a new LoggerFunction.

                                  function print

                                  print: (fmt: string, ...args: unknown[]) => void;

                                    function rootDir

                                    rootDir: { (): string; (fail: true): string; (fail: false): string };
                                    • From the current file, find the directory that contains the CLI's package.json

                                      Can't use __dirname in production code, as the CLI will get bundled as it's released and __dirname will refer to a different location in the .ts form as it will in the final executing form.

                                    function setCI

                                    setCI: (newCI: boolean) => void;

                                      function setLogLevel

                                      setLogLevel: (newLogLevel: LogLevel) => void;

                                        function success

                                        success: (fmt: string, ...args: unknown[]) => void;

                                          function trace

                                          trace: (fmt: string, ...args: unknown[]) => false | void;

                                            function versionNumber

                                            versionNumber: () => string;

                                              function warning

                                              warning: (fmt: string, ...args: unknown[]) => void;

                                                function withCorkedLogging

                                                withCorkedLogging: <A>(block: () => Promise<A>) => Promise<A>;

                                                  class CloudExecutable

                                                  class CloudExecutable implements ICloudAssemblySource {}
                                                  • Represent the Cloud Executable and the synthesis we can do on it

                                                  constructor

                                                  constructor(props: CloudExecutableProps);

                                                    property hasApp

                                                    readonly hasApp: boolean;
                                                    • Return whether there is an app command from the configuration

                                                    method produce

                                                    produce: () => Promise<IReadableCloudAssembly>;

                                                      method synthesize

                                                      synthesize: (cacheCloudAssembly?: boolean) => Promise<CloudAssembly>;
                                                      • Synthesize a set of stacks.

                                                        Parameter cacheCloudAssembly

                                                        whether to cache the Cloud Assembly after it has been first synthesized. This is 'true' by default, and only set to 'false' for 'cdk watch', which needs to re-synthesize the Assembly each time it detects a change to the project files

                                                      class Configuration

                                                      class Configuration {}
                                                      • All sources of settings combined

                                                      constructor

                                                      constructor(props?: ConfigurationProps);

                                                        property context

                                                        context: Context;

                                                          property defaultConfig

                                                          readonly defaultConfig: Settings;

                                                            property projectContext

                                                            readonly projectContext: Settings;

                                                              property settings

                                                              settings: Settings;

                                                                method load

                                                                load: () => Promise<this>;
                                                                • Load all config

                                                                method saveContext

                                                                saveContext: () => Promise<this>;
                                                                • Save the project context

                                                                class SdkProvider

                                                                class SdkProvider {}
                                                                • Deprecated

                                                                constructor

                                                                constructor(
                                                                defaultCredentialProvider: AwsCredentialIdentityProvider,
                                                                defaultRegion: string,
                                                                requestHandler?: NodeHttpHandlerOptions,
                                                                logger?: Logger
                                                                );

                                                                  method withAwsCliCompatibleDefaults

                                                                  static withAwsCliCompatibleDefaults: (
                                                                  options?: SdkProviderOptions
                                                                  ) => Promise<SdkProviderCurrentVersion>;

                                                                    interface Account

                                                                    interface Account {}
                                                                    • An AWS account

                                                                      Deprecated

                                                                    property accountId

                                                                    readonly accountId: string;

                                                                      property partition

                                                                      readonly partition: string;

                                                                        interface ContextProviderPlugin

                                                                        interface ContextProviderPlugin {}
                                                                        • Deprecated

                                                                        method getValue

                                                                        getValue: (args: { [key: string]: any }) => Promise<any>;

                                                                          enum Command

                                                                          enum Command {
                                                                          LS = 'ls',
                                                                          LIST = 'list',
                                                                          DIFF = 'diff',
                                                                          BOOTSTRAP = 'bootstrap',
                                                                          DEPLOY = 'deploy',
                                                                          DESTROY = 'destroy',
                                                                          SYNTHESIZE = 'synthesize',
                                                                          SYNTH = 'synth',
                                                                          METADATA = 'metadata',
                                                                          INIT = 'init',
                                                                          VERSION = 'version',
                                                                          WATCH = 'watch',
                                                                          GC = 'gc',
                                                                          ROLLBACK = 'rollback',
                                                                          IMPORT = 'import',
                                                                          ACKNOWLEDGE = 'acknowledge',
                                                                          ACK = 'ack',
                                                                          NOTICES = 'notices',
                                                                          MIGRATE = 'migrate',
                                                                          CONTEXT = 'context',
                                                                          DOCS = 'docs',
                                                                          DOC = 'doc',
                                                                          DOCTOR = 'doctor',
                                                                          REFACTOR = 'refactor',
                                                                          }

                                                                            member ACK

                                                                            ACK = 'ack'

                                                                              member ACKNOWLEDGE

                                                                              ACKNOWLEDGE = 'acknowledge'

                                                                                member BOOTSTRAP

                                                                                BOOTSTRAP = 'bootstrap'

                                                                                  member CONTEXT

                                                                                  CONTEXT = 'context'

                                                                                    member DEPLOY

                                                                                    DEPLOY = 'deploy'

                                                                                      member DESTROY

                                                                                      DESTROY = 'destroy'

                                                                                        member DIFF

                                                                                        DIFF = 'diff'

                                                                                          member DOC

                                                                                          DOC = 'doc'

                                                                                            member DOCS

                                                                                            DOCS = 'docs'

                                                                                              member DOCTOR

                                                                                              DOCTOR = 'doctor'

                                                                                                member GC

                                                                                                GC = 'gc'

                                                                                                  member IMPORT

                                                                                                  IMPORT = 'import'

                                                                                                    member INIT

                                                                                                    INIT = 'init'

                                                                                                      member LIST

                                                                                                      LIST = 'list'

                                                                                                        member LS

                                                                                                        LS = 'ls'

                                                                                                          member METADATA

                                                                                                          METADATA = 'metadata'

                                                                                                            member MIGRATE

                                                                                                            MIGRATE = 'migrate'

                                                                                                              member NOTICES

                                                                                                              NOTICES = 'notices'

                                                                                                                member REFACTOR

                                                                                                                REFACTOR = 'refactor'

                                                                                                                  member ROLLBACK

                                                                                                                  ROLLBACK = 'rollback'

                                                                                                                    member SYNTH

                                                                                                                    SYNTH = 'synth'

                                                                                                                      member SYNTHESIZE

                                                                                                                      SYNTHESIZE = 'synthesize'

                                                                                                                        member VERSION

                                                                                                                        VERSION = 'version'

                                                                                                                          member WATCH

                                                                                                                          WATCH = 'watch'

                                                                                                                            enum LogLevel

                                                                                                                            enum LogLevel {
                                                                                                                            DEFAULT = 0,
                                                                                                                            DEBUG = 1,
                                                                                                                            TRACE = 2,
                                                                                                                            }

                                                                                                                              member DEBUG

                                                                                                                              DEBUG = 1
                                                                                                                              • Pretty verbose

                                                                                                                              member DEFAULT

                                                                                                                              DEFAULT = 0
                                                                                                                              • Not verbose at all

                                                                                                                              member TRACE

                                                                                                                              TRACE = 2
                                                                                                                              • Extremely verbose

                                                                                                                              type LoggerFunction

                                                                                                                              type LoggerFunction = (fmt: string, ...args: unknown[]) => void;

                                                                                                                                Package Files (13)

                                                                                                                                Dependencies (0)

                                                                                                                                No dependencies.

                                                                                                                                Dev Dependencies (97)

                                                                                                                                Peer Dependencies (0)

                                                                                                                                No peer dependencies.

                                                                                                                                Badge

                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/aws-cdk.

                                                                                                                                • Markdown
                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/aws-cdk)
                                                                                                                                • HTML
                                                                                                                                  <a href="https://www.jsdocs.io/package/aws-cdk"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>