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
Namespaces
legacy
- Account
- aliases
- availableInitTemplates()
- cached()
- CI
- cli()
- CloudExecutable
- command
- Command
- Configuration
- ContextProviderPlugin
- data()
- debug()
- describe
- enableTracing()
- error()
- exec()
- execProgram()
- formatAsBanner()
- highlight()
- increaseVerbosity()
- LoggerFunction
- logLevel
- LogLevel
- prefix()
- print()
- rootDir()
- SdkProvider
- setCI()
- setLogLevel()
- success()
- trace()
- versionNumber()
- warning()
- withCorkedLogging()
Functions
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
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,}
type LoggerFunction
type LoggerFunction = (fmt: string, ...args: unknown[]) => void;
Package Files (13)
- lib/cli/cli.d.ts
- lib/cli/root-dir.d.ts
- lib/cli/user-configuration.d.ts
- lib/cli/util/console-formatters.d.ts
- lib/cli/version.d.ts
- lib/commands/docs.d.ts
- lib/commands/init/init.d.ts
- lib/cxapp/cloud-executable.d.ts
- lib/cxapp/exec.d.ts
- lib/index.d.ts
- lib/legacy-aws-auth.d.ts
- lib/legacy-exports-source.d.ts
- lib/legacy-logging-source.d.ts
Dependencies (0)
No dependencies.
Dev Dependencies (97)
- @aws-cdk/cli-plugin-contract
- @aws-cdk/cloud-assembly-schema
- @aws-cdk/cloudformation-diff
- @aws-cdk/cx-api
- @aws-cdk/node-bundle
- @aws-cdk/toolkit-lib
- @aws-cdk/user-input-gen
- @aws-sdk/client-appsync
- @aws-sdk/client-cloudcontrol
- @aws-sdk/client-cloudformation
- @aws-sdk/client-cloudwatch-logs
- @aws-sdk/client-codebuild
- @aws-sdk/client-ec2
- @aws-sdk/client-ecr
- @aws-sdk/client-ecs
- @aws-sdk/client-elastic-load-balancing-v2
- @aws-sdk/client-iam
- @aws-sdk/client-kms
- @aws-sdk/client-lambda
- @aws-sdk/client-route-53
- @aws-sdk/client-s3
- @aws-sdk/client-secrets-manager
- @aws-sdk/client-sfn
- @aws-sdk/client-ssm
- @aws-sdk/client-sts
- @aws-sdk/credential-providers
- @aws-sdk/ec2-metadata-service
- @aws-sdk/lib-storage
- @aws-sdk/middleware-endpoint
- @aws-sdk/util-retry
- @aws-sdk/util-waiter
- @cdklabs/eslint-plugin
- @octokit/rest
- @smithy/middleware-endpoint
- @smithy/property-provider
- @smithy/shared-ini-file-loader
- @smithy/types
- @smithy/util-retry
- @smithy/util-waiter
- @stylistic/eslint-plugin
- @types/archiver
- @types/fs-extra
- @types/jest
- @types/mockery
- @types/node
- @types/promptly
- @types/semver
- @types/sinon
- @types/yargs
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- archiver
- aws-cdk-lib
- aws-sdk-client-mock
- aws-sdk-client-mock-jest
- axios
- camelcase
- cdk-assets
- cdk-from-cfn
- chalk
- chokidar
- commit-and-tag-version
- constructs
- decamelize
- eslint
- eslint-config-prettier
- eslint-import-resolver-typescript
- eslint-plugin-import
- eslint-plugin-jest
- eslint-plugin-jsdoc
- eslint-plugin-prettier
- fast-check
- fs-extra
- glob
- jest
- jest-environment-node
- jest-junit
- jest-mock
- license-checker
- madge
- minimatch
- nock
- p-limit
- prettier
- promptly
- proxy-agent
- semver
- sinon
- strip-ansi
- ts-jest
- ts-mock-imports
- typescript
- uuid
- wrap-ansi
- xml-js
- yaml
- yargs
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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[](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>
- Updated .
Package analyzed in 5732 ms. - Missing or incorrect documentation? Open an issue for this package.