agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
export declare const AWS_CDK_CONSTRUCTOR_PROPS: {
[key: string]: any;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
export declare const AWS_CDK_ENUMS: {
[key: string]: any;
};

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

141
cdk/node_modules/aws-cdk-lib/core/lib/annotations.d.ts generated vendored Normal file
View File

@@ -0,0 +1,141 @@
import type { IConstruct } from 'constructs';
import { type LiteralString } from './private/literal-string';
/**
* Includes API for attaching annotations such as warning messages to constructs.
*/
export declare class Annotations {
private readonly scope;
/**
* Returns the annotations API for a construct scope.
* @param scope The scope
*/
static of(scope: IConstruct): Annotations;
private readonly stackTraces;
private constructor();
/**
* Acknowledge a warning. When a warning is acknowledged for a scope
* all warnings that match the id will be ignored.
*
* The acknowledgement will apply to all child scopes
*
* @example
* declare const myConstruct: Construct;
* Annotations.of(myConstruct).acknowledgeWarning('SomeWarningId', 'This warning can be ignored because...');
*
* @param id - the id of the warning message to acknowledge
* @param message optional message to explain the reason for acknowledgement
*/
acknowledgeWarning(id: string, message?: string): void;
/**
* Adds an acknowledgeable warning metadata entry to this construct.
*
* The CLI will display the warning when an app is synthesized, or fail if run
* in `--strict` mode.
*
* If the warning is acknowledged using `acknowledgeWarning()`, it will not be shown by
* the CLI, and will not cause `--strict` mode to fail synthesis.
*
* Prefer using `Validations.of(scope).addWarning()` instead.
*
* @example
* declare const myConstruct: Construct;
* Annotations.of(myConstruct).addWarningV2('my-library:Construct.someWarning', 'Some message explaining the warning');
*
* @param id the unique identifier for the warning. This can be used to acknowledge the warning
* @param message The warning message.
*/
addWarningV2(id: string, message: string): void;
/**
* Adds a warning metadata entry to this construct. Prefer using `Validations.of(scope).addWarning()`.
*
* The CLI will display the warning when an app is synthesized, or fail if run
* in `--strict` mode.
*
* Warnings added by this call cannot be acknowledged. This will block users from
* running in `--strict` mode until the deal with the warning, which makes it
* effectively not very different from `addError`. Prefer using `addWarningV2` instead.
*
* @param message The warning message.
*/
addWarning(message: string): void;
/**
* Acknowledge a info. When a info is acknowledged for a scope
* all infos that match the id will be ignored.
*
* The acknowledgement will apply to all child scopes
*
* @example
* declare const myConstruct: Construct;
* Annotations.of(myConstruct).acknowledgeInfo('SomeInfoId', 'This info can be ignored because...');
*
* @param id - the id of the info message to acknowledge
* @param message optional message to explain the reason for acknowledgement
*/
acknowledgeInfo(id: string, message?: string): void;
/**
* Adds an acknowledgeable info metadata entry to this construct.
*
* The CLI will display the info when an app is synthesized.
*
* If the info is acknowledged using `acknowledgeInfo()`, it will not be shown by the CLI.
*
* @example
* declare const myConstruct: Construct;
* Annotations.of(myConstruct).addInfoV2('my-library:Construct.someInfo', 'Some message explaining the info');
*
* @param id the unique identifier for the info. This can be used to acknowledge the info
* @param message The info message.
*/
addInfoV2(id: string, message: string): void;
/**
* Adds an info metadata entry to this construct.
*
* The CLI will display the info message when apps are synthesized.
*
* @param message The info message.
*/
addInfo(message: string): void;
/**
* Adds an { "error": <message> } metadata entry to this construct.
* The toolkit will fail deployment of any stack that has errors reported against it.
* Prefer using `Validations.of(scope).addError()` instead.
* @param message The error message.
*/
addError(message: string): void;
/**
* Add an error annotation to this construct, along with a tracking ID
*
* The toolkit will fail deployment of any stack that has errors reported against it.
*
* The error code will be tracked by telemetry; this method should only be used
* by CDK source code.
*
* @param id The error ID.
* @param message The error message.
* @internal
*/
_addTrackableError(id: LiteralString, message: string): void;
/**
* Adds a deprecation warning for a specific API.
*
* Deprecations will be added only once per construct as a warning and will be
* deduplicated based on the `api`.
*
* If the environment variable `CDK_BLOCK_DEPRECATIONS` is set, this method
* will throw an error instead with the deprecation message.
*
* @param api The API being deprecated in the format `module.Class.property`
* (e.g. `@aws-cdk/core.Construct.node`).
* @param message The deprecation message to display, with information about
* alternatives.
*/
addDeprecation(api: string, message: string): void;
/**
* Adds a message metadata entry to the construct node, to be displayed by the CDK CLI.
*
* Records the message once per construct.
* @param level The message level
* @param message The message itself
*/
private addMessage;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/annotations.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Annotations=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var app_1=()=>{var tmp=require("./app");return app_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},cxschema=()=>{var tmp=require("../../cloud-assembly-schema");return cxschema=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp};class Annotations{scope;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.Annotations",version:"2.252.0"};static of(scope){return new Annotations(scope)}stackTraces;constructor(scope){this.scope=scope;const disableTrace=scope.node.tryGetContext(cxapi().DISABLE_METADATA_STACK_TRACE)||process.env.CDK_DISABLE_STACK_TRACE;this.stackTraces=!disableTrace}acknowledgeWarning(id,message){Acknowledgements.of(this.scope).add(this.scope,id),removeWarningDeep(this.scope,id)}addWarningV2(id,message){Acknowledgements.of(this.scope).has(this.scope,id)||this.addMessage(cxschema().ArtifactMetadataEntryType.WARN,`${message} ${ackTag(id)}`)}addWarning(message){this.addMessage(cxschema().ArtifactMetadataEntryType.WARN,message)}acknowledgeInfo(id,message){Acknowledgements.of(this.scope).add(this.scope,id),removeInfoDeep(this.scope,id)}addInfoV2(id,message){Acknowledgements.of(this.scope).has(this.scope,id)||this.addMessage(cxschema().ArtifactMetadataEntryType.INFO,`${message} ${ackTag(id)}`)}addInfo(message){this.addMessage(cxschema().ArtifactMetadataEntryType.INFO,message)}addError(message){this.addMessage(cxschema().ArtifactMetadataEntryType.ERROR,message)}_addTrackableError(id,message){this.addError(message);const type="aws:cdk:error-code";!this.scope.node.metadata.find(x=>x.type===type&&x.data===id)&&this.scope.node.addMetadata(type,id)}addDeprecation(api,message){const text=`The API ${api} is deprecated: ${message}. This API will be removed in the next major release`;if(process.env.CDK_BLOCK_DEPRECATIONS)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`ValidationError`,`${this.scope.node.path}: ${text}`);this.addWarningV2(`Deprecated:${api}`,text)}addMessage(level,message){if(!this.scope.node.metadata.find(x=>x.data===message)){let normalizedMessage=typeof message=="string"?message:JSON.stringify(message);this.scope.node.addMetadata(level,normalizedMessage,{stackTrace:this.stackTraces})}}}exports.Annotations=Annotations;class Acknowledgements{static of(scope){const app=app_1().App.of(scope);if(!app)return new Acknowledgements;const existing=app[Acknowledgements.ACKNOWLEDGEMENTS_SYM];if(existing)return existing;const fresh=new Acknowledgements;return app[Acknowledgements.ACKNOWLEDGEMENTS_SYM]=fresh,fresh}static ACKNOWLEDGEMENTS_SYM=Symbol.for("@aws-cdk/core.Acknowledgements");acks=new Map;constructor(){}add(node,ack){const nodePath=this.nodePath(node);let arr=this.acks.get(nodePath);arr||(arr=new Set,this.acks.set(nodePath,arr)),arr.add(ack)}has(node,ack){for(const candidate of this.searchPaths(this.nodePath(node)))if(this.acks.get(candidate)?.has(ack))return!0;return!1}nodePath(node){return(typeof node=="string"?node:node.node.path).replace(/^\//,"")}searchPaths(path){const ret=new Array;let start=0;for(;start<path.length;){let i=path.indexOf("/",start);i!==-1?(ret.push(path.substring(0,i)),start=i+1):start=path.length}return ret.reverse()}}function removeWarningDeep(construct,id){const stack=[construct];for(;stack.length>0;){const next=stack.pop();removeWarning(next,id),stack.push(...next.node.children)}}function removeWarning(construct,id){const meta=construct.node._metadata;if(!meta)return;let i=0;for(;i<meta.length;){const m=meta[i];m.type===cxschema().ArtifactMetadataEntryType.WARN&&m.data.includes(ackTag(id))?meta.splice(i,1):i+=1}}function removeInfoDeep(construct,id){const stack=[construct];for(;stack.length>0;){const next=stack.pop();removeInfo(next,id),stack.push(...next.node.children)}}function removeInfo(construct,id){const meta=construct.node._metadata;if(!meta)return;let i=0;for(;i<meta.length;){const m=meta[i];m.type===cxschema().ArtifactMetadataEntryType.INFO&&m.data.includes(ackTag(id))?meta.splice(i,1):i+=1}}function ackTag(id){return`[ack: ${id}]`}

171
cdk/node_modules/aws-cdk-lib/core/lib/app.d.ts generated vendored Normal file
View File

@@ -0,0 +1,171 @@
import type { Construct, IConstruct } from 'constructs';
import type { ICustomSynthesis } from './private/synthesis';
import type { IPropertyInjector } from './prop-injectors';
import type { IReusableStackSynthesizer } from './stack-synthesizers';
import { Stage } from './stage';
import type { IPolicyValidationPluginBeta1 } from './validation/validation';
/**
* Initialization props for apps.
*/
export interface AppProps {
/**
* Automatically call `synth()` before the program exits.
*
* If you set this, you don't have to call `synth()` explicitly. Note that
* this feature is only available for certain programming languages, and
* calling `synth()` is still recommended.
*
* @default true if running via CDK CLI (`CDK_OUTDIR` is set), `false`
* otherwise
*/
readonly autoSynth?: boolean;
/**
* The output directory into which to emit synthesized artifacts.
*
* You should never need to set this value. By default, the value you pass to
* the CLI's `--output` flag will be used, and if you change it to a different
* directory the CLI will fail to pick up the generated Cloud Assembly.
*
* This property is intended for internal and testing use.
*
* @default - If this value is _not_ set, considers the environment variable `CDK_OUTDIR`.
* If `CDK_OUTDIR` is not defined, uses a temp directory.
*/
readonly outdir?: string;
/**
* Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs.
* @default true stack traces are included unless `aws:cdk:disable-stack-trace` is set in the context.
*/
readonly stackTraces?: boolean;
/**
* Include runtime versioning information in the Stacks of this app
*
* @default Value of 'aws:cdk:version-reporting' context key
*/
readonly analyticsReporting?: boolean;
/**
* Additional context values for the application.
*
* Context set by the CLI or the `context` key in `cdk.json` has precedence.
*
* Context can be read from any construct using `node.getContext(key)`.
*
* @default - no additional context
*/
readonly context?: {
[key: string]: any;
};
/**
* Additional context values for the application.
*
* Context provided here has precedence over context set by:
*
* - The CLI via --context
* - The `context` key in `cdk.json`
* - The `AppProps.context` property
*
* This property is recommended over the `AppProps.context` property since you
* can make final decision over which context value to take in your app.
*
* Context can be read from any construct using `node.getContext(key)`.
*
* @example
* // context from the CLI and from `cdk.json` are stored in the
* // CDK_CONTEXT env variable
* const cliContext = JSON.parse(process.env.CDK_CONTEXT!);
*
* // determine whether to take the context passed in the CLI or not
* const determineValue = process.env.PROD ? cliContext.SOMEKEY : 'my-prod-value';
* new App({
* postCliContext: {
* SOMEKEY: determineValue,
* },
* });
*
* @default - no additional context
*/
readonly postCliContext?: {
[key: string]: any;
};
/**
* Include construct tree metadata as part of the Cloud Assembly.
*
* @default true
*/
readonly treeMetadata?: boolean;
/**
* The stack synthesizer to use by default for all Stacks in the App
*
* The Stack Synthesizer controls aspects of synthesis and deployment,
* like how assets are referenced and what IAM roles to use. For more
* information, see the README of the main CDK package.
*
* @default - A `DefaultStackSynthesizer` with default settings
*/
readonly defaultStackSynthesizer?: IReusableStackSynthesizer;
/**
* Validation plugins to run after synthesis
*
* @default - no validation plugins
* @deprecated Use `Validations.of(app).addPlugins()` instead.
*/
readonly policyValidationBeta1?: IPolicyValidationPluginBeta1[];
/**
* A list of IPropertyInjector attached to this App.
* @default - no PropertyInjectors
*/
readonly propertyInjectors?: IPropertyInjector[];
}
/**
* A construct which represents an entire CDK app. This construct is normally
* the root of the construct tree.
*
* You would normally define an `App` instance in your program's entrypoint,
* then define constructs where the app is used as the parent scope.
*
* After all the child constructs are defined within the app, you should call
* `app.synth()` which will emit a "cloud assembly" from this app into the
* directory specified by `outdir`. Cloud assemblies includes artifacts such as
* CloudFormation templates and assets that are needed to deploy this app into
* the AWS cloud.
*
* @see https://docs.aws.amazon.com/cdk/latest/guide/apps.html
*/
export declare class App extends Stage {
/**
* Return the app that is the root of the construct tree, if available.
*
*/
static of(construct: IConstruct): Stage | undefined;
/**
* Checks if an object is an instance of the `App` class.
* @returns `true` if `obj` is an `App`.
* @param obj The object to evaluate
*/
static isApp(obj: any): obj is App;
/**
* Include construct tree metadata as part of the Cloud Assembly.
*
* @internal
*/
readonly _treeMetadata: boolean;
/**
* Initializes a CDK application.
* @param props initialization properties
*/
constructor(props?: AppProps);
private loadContext;
private readContextFromTempFile;
private readContextFromEnvironment;
}
/**
* Add a custom synthesis for the given construct
*
* When the construct is being synthesized, this allows it to add additional items
* into the Cloud Assembly output.
*
* This feature is intended for use by official AWS CDK libraries only; 3rd party
* library authors and CDK users should not use this function. That's why it's not
* exposed via jsii.
*/
export declare function attachCustomSynthesis(construct: Construct, synthesis: ICustomSynthesis): void;

1
cdk/node_modules/aws-cdk-lib/core/lib/app.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.App=void 0,exports.attachCustomSynthesis=attachCustomSynthesis;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var fs=()=>{var tmp=require("fs-extra");return fs=()=>tmp,tmp},private_context_1=()=>{var tmp=require("./private/private-context");return private_context_1=()=>tmp,tmp},synthesis_1=()=>{var tmp=require("./private/synthesis");return synthesis_1=()=>tmp,tmp},prop_injectors_1=()=>{var tmp=require("./prop-injectors");return prop_injectors_1=()=>tmp,tmp},stage_1=()=>{var tmp=require("./stage");return stage_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};const APP_SYMBOL=Symbol.for("@aws-cdk/core.App");class App extends stage_1().Stage{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.App",version:"2.252.0"};static of(construct){const root=construct.node.root;return App.isApp(root)?root:void 0}static isApp(obj){return APP_SYMBOL in obj}_treeMetadata;constructor(props={}){super(void 0,"",{outdir:props.outdir??process.env[cxapi().OUTDIR_ENV]});try{jsiiDeprecationWarnings().aws_cdk_lib_AppProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,App),error}props.propertyInjectors&&prop_injectors_1().PropertyInjectors.of(this).add(...props.propertyInjectors),props.policyValidationBeta1&&this._addValidationPlugins(...props.policyValidationBeta1),Object.defineProperty(this,APP_SYMBOL,{value:!0}),this.loadContext(props.context,props.postCliContext),props.stackTraces===!1&&this.node.setContext(cxapi().DISABLE_METADATA_STACK_TRACE,!0),props.defaultStackSynthesizer&&this.node.setContext(private_context_1().PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER,props.defaultStackSynthesizer);const analyticsReporting=props.analyticsReporting??props.runtimeInfo;analyticsReporting!==void 0&&this.node.setContext(cxapi().ANALYTICS_REPORTING_ENABLED_CONTEXT,analyticsReporting),(props.autoSynth??cxapi().OUTDIR_ENV in process.env)&&process.once("beforeExit",()=>this.synth({errorOnDuplicateSynth:!1})),this._treeMetadata=props.treeMetadata??!0}loadContext(defaults={},final={}){for(const[k,v]of Object.entries(defaults))this.node.setContext(k,v);const context={...this.readContextFromEnvironment(),...this.readContextFromTempFile()};for(const[k,v]of Object.entries(context))this.node.setContext(k,v);for(const[k,v]of Object.entries(final))this.node.setContext(k,v)}readContextFromTempFile(){const location=process.env[cxapi().CONTEXT_OVERFLOW_LOCATION_ENV];return location?fs().readJSONSync(location):{}}readContextFromEnvironment(){const contextJson=process.env[cxapi().CONTEXT_ENV];return contextJson?JSON.parse(contextJson):{}}}exports.App=App;function attachCustomSynthesis(construct,synthesis){(0,synthesis_1().addCustomSynthesis)(construct,synthesis)}

137
cdk/node_modules/aws-cdk-lib/core/lib/arn.d.ts generated vendored Normal file
View File

@@ -0,0 +1,137 @@
import type { Stack } from './stack';
/**
* An enum representing the various ARN formats that different services use.
*/
export declare enum ArnFormat {
/**
* This represents a format where there is no 'resourceName' part.
* This format is used for S3 resources,
* like 'arn:aws:s3:::bucket'.
* Everything after the last colon is considered the 'resource',
* even if it contains slashes,
* like in 'arn:aws:s3:::bucket/object.zip'.
*/
NO_RESOURCE_NAME = "arn:aws:service:region:account:resource",
/**
* This represents a format where the 'resource' and 'resourceName'
* parts are separated with a colon.
* Like in: 'arn:aws:service:region:account:resource:resourceName'.
* Everything after the last colon is considered the 'resourceName',
* even if it contains slashes,
* like in 'arn:aws:apigateway:region:account:resource:/test/mydemoresource/*'.
*/
COLON_RESOURCE_NAME = "arn:aws:service:region:account:resource:resourceName",
/**
* This represents a format where the 'resource' and 'resourceName'
* parts are separated with a slash.
* Like in: 'arn:aws:service:region:account:resource/resourceName'.
* Everything after the separating slash is considered the 'resourceName',
* even if it contains colons,
* like in 'arn:aws:cognito-sync:region:account:identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla'.
*/
SLASH_RESOURCE_NAME = "arn:aws:service:region:account:resource/resourceName",
/**
* This represents a format where the 'resource' and 'resourceName'
* parts are separated with a slash,
* but there is also an additional slash after the colon separating 'account' from 'resource'.
* Like in: 'arn:aws:service:region:account:/resource/resourceName'.
* Note that the leading slash is _not_ included in the parsed 'resource' part.
*/
SLASH_RESOURCE_SLASH_RESOURCE_NAME = "arn:aws:service:region:account:/resource/resourceName"
}
export interface ArnComponents {
/**
* The partition that the resource is in. For standard AWS regions, the
* partition is aws. If you have resources in other partitions, the
* partition is aws-partitionname. For example, the partition for resources
* in the China (Beijing) region is aws-cn.
*
* @default The AWS partition the stack is deployed to.
*/
readonly partition?: string;
/**
* The service namespace that identifies the AWS product (for example,
* 's3', 'iam', 'codepipeline').
*/
readonly service: string;
/**
* The region the resource resides in. Note that the ARNs for some resources
* do not require a region, so this component might be omitted.
*
* @default The region the stack is deployed to.
*/
readonly region?: string;
/**
* The ID of the AWS account that owns the resource, without the hyphens.
* For example, 123456789012. Note that the ARNs for some resources don't
* require an account number, so this component might be omitted.
*
* @default The account the stack is deployed to.
*/
readonly account?: string;
/**
* Resource type (e.g. "table", "autoScalingGroup", "certificate").
* For some resource types, e.g. S3 buckets, this field defines the bucket name.
*/
readonly resource: string;
/**
* Resource name or path within the resource (i.e. S3 bucket object key) or
* a wildcard such as ``"*"``. This is service-dependent.
*/
readonly resourceName?: string;
/**
* The specific ARN format to use for this ARN value.
*
* @default - uses value of `sep` as the separator for formatting,
* `ArnFormat.SLASH_RESOURCE_NAME` if that property was also not provided
*/
readonly arnFormat?: ArnFormat;
}
export declare class Arn {
/**
* Creates an ARN from components.
*
* If `partition`, `region` or `account` are not specified, the stack's
* partition, region and account will be used.
*
* If any component is the empty string, an empty string will be inserted
* into the generated ARN at the location that component corresponds to.
*
* The ARN will be formatted as follows:
*
* arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}
*
* The required ARN pieces that are omitted will be taken from the stack that
* the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope
* can be 'undefined'.
*/
static format(components: ArnComponents, stack?: Stack): string;
/**
* Splits the provided ARN into its components.
* Works both if 'arn' is a string like 'arn:aws:s3:::bucket',
* and a Token representing a dynamic CloudFormation expression
* (in which case the returned components will also be dynamic CloudFormation expressions,
* encoded as Tokens).
*
* @param arn the ARN to split into its components
* @param arnFormat the expected format of 'arn' - depends on what format the service 'arn' represents uses
*/
static split(arn: string, arnFormat: ArnFormat): ArnComponents;
/**
* Extract the full resource name from an ARN
*
* Necessary for resource names (paths) that may contain the separator, like
* `arn:aws:iam::111111111111:role/path/to/role/name`.
*
* Only works if we statically know the expected `resourceType` beforehand, since we're going
* to use that to split the string on ':<resourceType>/' (and take the right-hand side).
*
* We can't extract the 'resourceType' from the ARN at hand, because CloudFormation Expressions
* only allow literals in the 'separator' argument to `{ Fn::Split }`, and so it can't be
* `{ Fn::Select: [5, { Fn::Split: [':', ARN] }}`.
*
* Only necessary for ARN formats for which the type-name separator is `/`.
*/
static extractResourceName(arn: string, resourceType: string): string;
private constructor();
}

1
cdk/node_modules/aws-cdk-lib/core/lib/arn.js generated vendored Normal file

File diff suppressed because one or more lines are too long

114
cdk/node_modules/aws-cdk-lib/core/lib/aspect.d.ts generated vendored Normal file
View File

@@ -0,0 +1,114 @@
import type { IConstruct } from 'constructs';
/**
* Represents an Aspect
*/
export interface IAspect {
/**
* All aspects can visit an IConstruct
*/
visit(node: IConstruct): void;
}
/**
* Default Priority values for Aspects.
*/
export declare class AspectPriority {
/**
* Suggested priority for Aspects that mutate the construct tree.
*/
static readonly MUTATING: number;
/**
* Suggested priority for Aspects that only read the construct tree.
*/
static readonly READONLY: number;
/**
* Default priority for Aspects that are applied without a priority.
*/
static readonly DEFAULT: number;
}
/**
* Options when Applying an Aspect.
*/
export interface AspectOptions {
/**
* The priority value to apply on an Aspect.
* Priority must be a non-negative integer.
*
* Aspects that have same priority value are not guaranteed to be
* executed in a consistent order.
*
* @default AspectPriority.DEFAULT
*/
readonly priority?: number;
}
/**
* Aspects can be applied to CDK tree scopes and can operate on the tree before
* synthesis.
*/
export declare class Aspects {
/**
* Returns the `Aspects` object associated with a construct scope.
* @param scope The scope for which these aspects will apply.
*/
static of(scope: IConstruct): Aspects;
private readonly _scope;
private readonly _appliedAspects;
private constructor();
/**
* Adds an aspect to apply this scope before synthesis.
* @param aspect The aspect to add.
* @param options Options to apply on this aspect.
*/
add(aspect: IAspect, options?: AspectOptions): void;
/**
* The list of aspects which were directly applied on this scope.
*/
get all(): IAspect[];
/**
* The list of aspects with priority which were directly applied on this scope.
*
* Also returns inherited Aspects of this node.
*/
get applied(): AspectApplication[];
}
/**
* Return the aspect revision of the tree that the given construct is part of
*
* The revision number is changed every time an aspect is added to the tree.
*
* Instead of returning the version, returns a function that returns the
* version: we can cache the root lookup inside the function; this saves
* crawling the tree on every read, which is frequent.
*
* @internal
*/
export declare function _aspectTreeRevisionReader(construct: IConstruct): () => number;
/**
* Object respresenting an Aspect application. Stores the Aspect, the pointer to the construct it was applied
* to, and the priority value of that Aspect.
*/
export declare class AspectApplication {
/**
* The construct that the Aspect was applied to.
*/
readonly construct: IConstruct;
/**
* The Aspect that was applied.
*/
readonly aspect: IAspect;
/**
* The priority value of this Aspect. Must be non-negative integer.
*/
private _priority;
/**
* Initializes AspectApplication object
*/
constructor(construct: IConstruct, aspect: IAspect, priority: number);
/**
* Gets the priority value.
*/
get priority(): number;
/**
* Sets the priority value.
*/
set priority(priority: number);
}

1
cdk/node_modules/aws-cdk-lib/core/lib/aspect.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AspectApplication=exports.Aspects=exports.AspectPriority=void 0,exports._aspectTreeRevisionReader=_aspectTreeRevisionReader;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp};const ASPECTS_SYMBOL=Symbol.for("cdk-aspects");class AspectPriority{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.AspectPriority",version:"2.252.0"};static MUTATING=200;static READONLY=1e3;static DEFAULT=500}exports.AspectPriority=AspectPriority;class Aspects{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.Aspects",version:"2.252.0"};static of(scope){let aspects=scope[ASPECTS_SYMBOL];return aspects||(aspects=new Aspects(scope),Object.defineProperty(scope,ASPECTS_SYMBOL,{value:aspects,configurable:!1,enumerable:!1})),aspects}_scope;_appliedAspects;constructor(scope){this._appliedAspects=[],this._scope=scope}add(aspect,options){try{jsiiDeprecationWarnings().aws_cdk_lib_IAspect(aspect),jsiiDeprecationWarnings().aws_cdk_lib_AspectOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.add),error}const newApplication=new AspectApplication(this._scope,aspect,options?.priority??AspectPriority.DEFAULT);this._appliedAspects.some(a=>a.aspect===newApplication.aspect&&a.priority===newApplication.priority)||(this._appliedAspects.push(newApplication),bumpAspectTreeRevision(this._scope))}get all(){return this._appliedAspects.map(application=>application.aspect)}get applied(){return[...this._appliedAspects]}}exports.Aspects=Aspects;function bumpAspectTreeRevision(construct){const root=construct.node.root,rev=root[TREE_REVISION_SYM]??0;root[TREE_REVISION_SYM]=rev+1}function _aspectTreeRevisionReader(construct){const root=construct.node.root;return()=>root[TREE_REVISION_SYM]??0}class AspectApplication{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.AspectApplication",version:"2.252.0"};construct;aspect;_priority;constructor(construct,aspect,priority){try{jsiiDeprecationWarnings().aws_cdk_lib_IAspect(aspect)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AspectApplication),error}this.construct=construct,this.aspect=aspect,this._priority=priority}get priority(){return this._priority}set priority(priority){if(priority<0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`PriorityNonNegativeNumber`,"Priority must be a non-negative number",this.construct);this._priority=priority,bumpAspectTreeRevision(this.construct)}}exports.AspectApplication=AspectApplication;const TREE_REVISION_SYM=Symbol.for("@aws-cdk/core.Aspects.treeRevision");

View File

@@ -0,0 +1,160 @@
import { Construct } from 'constructs';
import type { AssetOptions } from './assets';
import { FileAssetPackaging } from './assets';
import type { FingerprintOptions } from './fs';
import { Stack } from './stack';
/**
* Initialization properties for `AssetStaging`.
*/
export interface AssetStagingProps extends FingerprintOptions, AssetOptions {
/**
* The source file or directory to copy from.
*/
readonly sourcePath: string;
}
/**
* Stages a file or directory from a location on the file system into a staging
* directory.
*
* This is controlled by the context key 'aws:cdk:asset-staging' and enabled
* by the CLI by default in order to ensure that when the CDK app exists, all
* assets are available for deployment. Otherwise, if an app references assets
* in temporary locations, those will not be available when it exists (see
* https://github.com/aws/aws-cdk/issues/1716).
*
* The `stagedPath` property is a stringified token that represents the location
* of the file or directory after staging. It will be resolved only during the
* "prepare" stage and may be either the original path or the staged path
* depending on the context setting.
*
* The file/directory are staged based on their content hash (fingerprint). This
* means that only if content was changed, copy will happen.
*/
export declare class AssetStaging extends Construct {
/**
* The directory inside the bundling container into which the asset sources will be mounted.
*/
static readonly BUNDLING_INPUT_DIR = "/asset-input";
/**
* The directory inside the bundling container into which the bundled output should be written.
*/
static readonly BUNDLING_OUTPUT_DIR = "/asset-output";
/**
* Clears the asset hash cache
*/
static clearAssetHashCache(): void;
/**
* Cache of asset hashes based on asset configuration to avoid repeated file
* system and bundling operations.
*/
private static assetCache;
/**
* Absolute path to the asset data.
*
* If asset staging is disabled, this will just be the source path or
* a temporary directory used for bundling.
*
* If asset staging is enabled it will be the staged path.
*
* IMPORTANT: If you are going to call `addFileAsset()`, use
* `relativeStagedPath()` instead.
*/
readonly absoluteStagedPath: string;
/**
* The absolute path of the asset as it was referenced by the user.
*/
readonly sourcePath: string;
/**
* A cryptographic hash of the asset.
*/
readonly assetHash: string;
/**
* How this asset should be packaged.
*/
readonly packaging: FileAssetPackaging;
/**
* Whether this asset is an archive (zip or jar).
*/
readonly isArchive: boolean;
private readonly fingerprintOptions;
private readonly hashType;
private readonly assetOutdir;
/**
* A custom source fingerprint given by the user
*
* Will not be used literally, always hashed later on.
*/
private customSourceFingerprint?;
private readonly cacheKey;
private readonly _sourceStats?;
constructor(scope: Construct, id: string, props: AssetStagingProps);
private get sourceStats();
/**
* Return the path to the staged asset, relative to the Cloud Assembly (manifest) directory of the given stack
*
* Only returns a relative path if the asset was staged, returns an absolute path if
* it was not staged.
*
* A bundled asset might end up in the outDir and still not count as
* "staged"; if asset staging is disabled we're technically expected to
* reference source directories, but we don't have a source directory for the
* bundled outputs (as the bundle output is written to a temporary
* directory). Nevertheless, we will still return an absolute path.
*
* A non-obvious directory layout may look like this:
*
* ```
* CLOUD ASSEMBLY ROOT
* +-- asset.12345abcdef/
* +-- assembly-Stage
* +-- MyStack.template.json
* +-- MyStack.assets.json <- will contain { "path": "../asset.12345abcdef" }
* ```
*/
relativeStagedPath(stack: Stack): string;
/**
* Stage the source to the target by copying
*
* Optionally skip if staging is disabled, in which case we pretend we did something but we don't really.
*/
private stageByCopying;
/**
* Stage the source to the target by bundling
*
* Optionally skip, in which case we pretend we did something but we don't really.
*/
private stageByBundling;
/**
* Whether staging has been disabled
*/
private get stagingDisabled();
/**
* Copies or moves the files from sourcePath to targetPath.
*
* Moving implies the source directory is temporary and can be trashed.
*
* Will not do anything if source and target are the same.
*/
private stageAsset;
/**
* Determine the directory where we're going to write the bundling output
*
* This is the target directory where we're going to write the staged output
* files if we can (if the hash is fully known), or a temporary directory
* otherwise.
*/
private determineBundleDir;
/**
* Bundles an asset to the given directory
*
* If the given directory already exists, assume that everything's already
* in order and don't do anything.
*
* @param options Bundling options
* @param bundleDir Where to create the bundle directory
* @returns The fully resolved bundle output directory.
*/
private bundle;
private calculateHash;
private renderStagedPath;
}

File diff suppressed because one or more lines are too long

401
cdk/node_modules/aws-cdk-lib/core/lib/assets.d.ts generated vendored Normal file
View File

@@ -0,0 +1,401 @@
import type { BundlingOptions } from './bundling';
/**
* Common interface for all assets.
*/
export interface IAsset {
/**
* A hash of this asset, which is available at construction time. As this is a plain string, it
* can be used in construct IDs in order to enforce creation of a new resource when the content
* hash has changed.
*/
readonly assetHash: string;
}
/**
* Asset hash options
*/
export interface AssetOptions {
/**
* Specify a custom hash for this asset. If `assetHashType` is set it must
* be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
* be SHA256 hashed and encoded as hex. The resulting hash will be the asset
* hash.
*
* NOTE: the hash is used in order to identify a specific revision of the asset, and
* used for optimizing and caching deployment activities related to this asset such as
* packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
* need to make sure it is updated every time the asset changes, or otherwise it is
* possible that some deployments will not be invalidated.
*
* @default - based on `assetHashType`
*/
readonly assetHash?: string;
/**
* Specifies the type of hash to calculate for this asset.
*
* If `assetHash` is configured, this option must be `undefined` or
* `AssetHashType.CUSTOM`.
*
* @default - the default is `AssetHashType.SOURCE`, but if `assetHash` is
* explicitly specified this value defaults to `AssetHashType.CUSTOM`.
*/
readonly assetHashType?: AssetHashType;
/**
* Bundle the asset by executing a command in a Docker container or a custom bundling provider.
*
* The asset path will be mounted at `/asset-input`. The Docker
* container is responsible for putting content at `/asset-output`.
* The content at `/asset-output` will be zipped and used as the
* final asset.
*
* @default - uploaded as-is to S3 if the asset is a regular file or a .zip file,
* archived into a .zip file and uploaded to S3 otherwise
*/
readonly bundling?: BundlingOptions;
}
/**
* The type of asset hash
*
* NOTE: the hash is used in order to identify a specific revision of the asset, and
* used for optimizing and caching deployment activities related to this asset such as
* packaging, uploading to Amazon S3, etc.
*/
export declare enum AssetHashType {
/**
* Based on the content of the source path
*
* When bundling, use `SOURCE` when the content of the bundling output is not
* stable across repeated bundling operations.
*/
SOURCE = "source",
/**
* Based on the content of the bundling output
*
* Use `OUTPUT` when the source of the asset is a top level folder containing
* code and/or dependencies that are not directly linked to the asset.
*/
OUTPUT = "output",
/**
* Use a custom hash
*/
CUSTOM = "custom"
}
/**
* Represents the source for a file asset.
*/
export interface FileAssetSource {
/**
* A hash on the content source. This hash is used to uniquely identify this
* asset throughout the system. If this value doesn't change, the asset will
* not be rebuilt or republished.
*/
readonly sourceHash: string;
/**
* An external command that will produce the packaged asset.
*
* The command should produce the location of a ZIP file on `stdout`.
*
* @default - Exactly one of `fileName` and `executable` is required
*/
readonly executable?: string[];
/**
* The path, relative to the root of the cloud assembly, in which this asset
* source resides. This can be a path to a file or a directory, depending on the
* packaging type.
*
* @default - Exactly one of `fileName` and `executable` is required
*/
readonly fileName?: string;
/**
* Which type of packaging to perform.
*
* @default - Required if `fileName` is specified.
*/
readonly packaging?: FileAssetPackaging;
/**
* Whether or not the asset needs to exist beyond deployment time; i.e.
* are copied over to a different location and not needed afterwards.
* Setting this property to true has an impact on the lifecycle of the asset,
* because we will assume that it is safe to delete after the CloudFormation
* deployment succeeds.
*
* For example, Lambda Function assets are copied over to Lambda during
* deployment. Therefore, it is not necessary to store the asset in S3, so
* we consider those deployTime assets.
*
* @default false
*/
readonly deployTime?: boolean;
/**
* A display name for this asset
*
* If supplied, the display name will be used in locations where the asset
* identifier is printed, like in the CLI progress information.
*
* @default - The asset hash is used to display the asset
*/
readonly displayName?: string;
}
export interface DockerImageAssetSource {
/**
* The hash of the contents of the docker build context. This hash is used
* throughout the system to identify this image and avoid duplicate work
* in case the source did not change.
*
* NOTE: this means that if you wish to update your docker image, you
* must make a modification to the source (e.g. add some metadata to your Dockerfile).
*/
readonly sourceHash: string;
/**
* An external command that will produce the packaged asset.
*
* The command should produce the name of a local Docker image on `stdout`.
*
* @default - Exactly one of `directoryName` and `executable` is required
*/
readonly executable?: string[];
/**
* The directory where the Dockerfile is stored, must be relative
* to the cloud assembly root.
*
* @default - Exactly one of `directoryName` and `executable` is required
*/
readonly directoryName?: string;
/**
* Build args to pass to the `docker build` command.
*
* Since Docker build arguments are resolved before deployment, keys and
* values cannot refer to unresolved tokens (such as `lambda.functionArn` or
* `queue.queueUrl`).
*
* Only allowed when `directoryName` is specified.
*
* @default - no build args are passed
*/
readonly dockerBuildArgs?: {
[key: string]: string;
};
/**
* Build contexts to pass to the `docker build` command.
*
* Build contexts can be used to specify additional directories or images
* to use during the build. Each entry specifies a named build context
* and its source (a directory path, a URL, or a docker image).
*
* Only allowed when `directoryName` is specified.
*
* @see https://docs.docker.com/build/building/context/#additional-build-contexts
*
* @default - no additional build contexts
*/
readonly dockerBuildContexts?: {
[key: string]: string;
};
/**
* Build secrets to pass to the `docker build` command.
*
* Since Docker build secrets are resolved before deployment, keys and
* values cannot refer to unresolved tokens (such as `lambda.functionArn` or
* `queue.queueUrl`).
*
* Only allowed when `directoryName` is specified.
*
* @default - no build secrets are passed
*/
readonly dockerBuildSecrets?: {
[key: string]: string;
};
/**
* SSH agent socket or keys to pass to the `docker buildx` command.
*
*
* @default - no ssh arg is passed
*/
readonly dockerBuildSsh?: string;
/**
* Docker target to build to
*
* Only allowed when `directoryName` is specified.
*
* @default - no target
*/
readonly dockerBuildTarget?: string;
/**
* Path to the Dockerfile (relative to the directory).
*
* Only allowed when `directoryName` is specified.
*
* @default - no file
*/
readonly dockerFile?: string;
/**
* Networking mode for the RUN commands during build. _Requires Docker Engine API v1.25+_.
*
* Specify this property to build images on a specific networking mode.
*
* @default - no networking mode specified
*/
readonly networkMode?: string;
/**
* Platform to build for. _Requires Docker Buildx_.
*
* Specify this property to build images on a specific platform.
*
* @default - no platform specified (the current machine architecture will be used)
*/
readonly platform?: string;
/**
* Outputs to pass to the `docker build` command.
*
* @default - no build args are passed
*/
readonly dockerOutputs?: string[];
/**
* Unique identifier of the docker image asset and its potential revisions.
* Required if using AppScopedStagingSynthesizer.
*
* @default - no asset name
*/
readonly assetName?: string;
/**
* Cache from options to pass to the `docker build` command.
*
* @default - no cache from args are passed
*/
readonly dockerCacheFrom?: DockerCacheOption[];
/**
* Cache to options to pass to the `docker build` command.
*
* @default - no cache to args are passed
*/
readonly dockerCacheTo?: DockerCacheOption;
/**
* Disable the cache and pass `--no-cache` to the `docker build` command.
*
* @default - cache is used
*/
readonly dockerCacheDisabled?: boolean;
/**
* A display name for this asset
*
* If supplied, the display name will be used in locations where the asset
* identifier is printed, like in the CLI progress information.
*
* @default - The asset hash is used to display the asset
*/
readonly displayName?: string;
}
/**
* Packaging modes for file assets.
*/
export declare enum FileAssetPackaging {
/**
* The asset source path points to a directory, which should be archived using
* zip and and then uploaded to Amazon S3.
*/
ZIP_DIRECTORY = "zip",
/**
* The asset source path points to a single file, which should be uploaded
* to Amazon S3.
*/
FILE = "file"
}
/**
* The location of the published file asset. This is where the asset
* can be consumed at runtime.
*/
export interface FileAssetLocation {
/**
* The name of the Amazon S3 bucket.
*/
readonly bucketName: string;
/**
* The Amazon S3 object key.
*/
readonly objectKey: string;
/**
* The HTTP URL of this asset on Amazon S3.
*
* This value suitable for inclusion in a CloudFormation template, and
* may be an encoded token.
*
* Example value: `https://s3-us-east-1.amazonaws.com/mybucket/myobject`
*/
readonly httpUrl: string;
/**
* The S3 URL of this asset on Amazon S3.
*
* This value suitable for inclusion in a CloudFormation template, and
* may be an encoded token.
*
* Example value: `s3://mybucket/myobject`
*/
readonly s3ObjectUrl: string;
/**
* The ARN of the KMS key used to encrypt the file asset bucket, if any.
*
* The CDK bootstrap stack comes with a key policy that does not require
* setting this property, so you only need to set this property if you
* have customized the bootstrap stack to require it.
*
* @default - Asset bucket is not encrypted, or decryption permissions are
* defined by a Key Policy.
*/
readonly kmsKeyArn?: string;
/**
* Like `s3ObjectUrl`, but not suitable for CloudFormation consumption
*
* If there are placeholders in the S3 URL, they will be returned un-replaced
* and un-evaluated.
*
* @default - This feature cannot be used
*/
readonly s3ObjectUrlWithPlaceholders?: string;
}
/**
* The location of the published docker image. This is where the image can be
* consumed at runtime.
*/
export interface DockerImageAssetLocation {
/**
* The URI of the image in Amazon ECR (including a tag).
*/
readonly imageUri: string;
/**
* The name of the ECR repository.
*/
readonly repositoryName: string;
/**
* The tag of the image in Amazon ECR.
* @default - the hash of the asset, or the `dockerTagPrefix` concatenated with the asset hash if a `dockerTagPrefix` is specified in the stack synthesizer
*/
readonly imageTag?: string;
}
/**
* Options for configuring the Docker cache backend
*/
export interface DockerCacheOption {
/**
* The type of cache to use.
* Refer to https://docs.docker.com/build/cache/backends/ for full list of backends.
* @default - unspecified
*
* @example 'registry'
*/
readonly type: string;
/**
* Any parameters to pass into the docker cache backend configuration.
* Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration.
* @default {} No options provided
*
* @example
* declare const branch: string;
*
* const params = {
* ref: `12345678.dkr.ecr.us-west-2.amazonaws.com/cache:${branch}`,
* mode: "max",
* };
*/
readonly params?: {
[key: string]: string;
};
}

1
cdk/node_modules/aws-cdk-lib/core/lib/assets.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileAssetPackaging=exports.AssetHashType=void 0;var AssetHashType;(function(AssetHashType2){AssetHashType2.SOURCE="source",AssetHashType2.BUNDLE="bundle",AssetHashType2.OUTPUT="output",AssetHashType2.CUSTOM="custom"})(AssetHashType||(exports.AssetHashType=AssetHashType={}));var FileAssetPackaging;(function(FileAssetPackaging2){FileAssetPackaging2.ZIP_DIRECTORY="zip",FileAssetPackaging2.FILE="file"})(FileAssetPackaging||(exports.FileAssetPackaging=FileAssetPackaging={}));

63
cdk/node_modules/aws-cdk-lib/core/lib/bitrate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,63 @@
/**
* Represents a bitrate value.
*
* The amount can be specified either as a literal value (e.g: `10`) which
* cannot be negative, or as an unresolved number token.
*
* When the amount is passed as a token, unit conversion is not possible.
*/
export declare class Bitrate {
/**
* Create a Bitrate representing an amount of bits per second.
*
* @param amount the amount of bits per second
*/
static bps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of kilobits per second.
*
* @param amount the amount of kilobits per second
*/
static kbps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of megabits per second.
*
* @param amount the amount of megabits per second
*/
static mbps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of gigabits per second.
*
* @param amount the amount of gigabits per second
*/
static gbps(amount: number): Bitrate;
/**
* The amount of bitrate.
*/
private readonly amount;
/**
* The unit of bitrate.
*/
private readonly unit;
private constructor();
/**
* Return the total number of bits per second.
*/
toBps(): number;
/**
* Return the total number of kilobits per second.
*/
toKbps(): number;
/**
* Return the total number of megabits per second.
*/
toMbps(): number;
/**
* Return the total number of gigabits per second.
*/
toGbps(): number;
/**
* Checks if bitrate is a token or a resolvable object
*/
isUnresolved(): boolean;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/bitrate.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Bitrate=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp};class Bitrate{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.Bitrate",version:"2.252.0"};static bps(amount){return new Bitrate(amount,BitrateUnit.Bps)}static kbps(amount){return new Bitrate(amount,BitrateUnit.Kbps)}static mbps(amount){return new Bitrate(amount,BitrateUnit.Mbps)}static gbps(amount){return new Bitrate(amount,BitrateUnit.Gbps)}amount;unit;constructor(amount,unit){if(!token_1().Token.isUnresolved(amount)&&amount<0)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`BitrateAmountsCannotBeNegative`,`Bitrate amounts cannot be negative. Received: ${amount}`);this.amount=amount,this.unit=unit}toBps(){return convert(this.amount,this.unit,BitrateUnit.Bps)}toKbps(){return convert(this.amount,this.unit,BitrateUnit.Kbps)}toMbps(){return convert(this.amount,this.unit,BitrateUnit.Mbps)}toGbps(){return convert(this.amount,this.unit,BitrateUnit.Gbps)}isUnresolved(){return token_1().Token.isUnresolved(this.amount)}}exports.Bitrate=Bitrate;class BitrateUnit{label;inBps;static Bps=new BitrateUnit("bps",1);static Kbps=new BitrateUnit("kbps",1e3);static Mbps=new BitrateUnit("mbps",1e6);static Gbps=new BitrateUnit("gbps",1e9);constructor(label,inBps){this.label=label,this.inBps=inBps}toString(){return this.label}}function convert(amount,fromUnit,toUnit){if(fromUnit.inBps===toUnit.inBps)return amount;if(token_1().Token.isUnresolved(amount))throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeBitrateSpecifiedBitrate`,`Bitrate must be specified as 'Bitrate.${toUnit}()' here since its value comes from a token and cannot be converted (got Bitrate.${fromUnit})`);return amount*fromUnit.inBps/toUnit.inBps}

408
cdk/node_modules/aws-cdk-lib/core/lib/bundling.d.ts generated vendored Normal file
View File

@@ -0,0 +1,408 @@
import type { DockerCacheOption } from './assets';
/**
* Methods to build Docker CLI arguments for builds using secrets.
*
* Docker BuildKit must be enabled to use build secrets.
*
* @see https://docs.docker.com/build/buildkit/
*/
export declare class DockerBuildSecret {
/**
* A Docker build secret from a file source
* @param src The path to the source file, relative to the build directory.
* @returns The latter half required for `--secret`
*/
static fromSrc(src: string): string;
}
/**
* Bundling options
*
*/
export interface BundlingOptions {
/**
* The Docker image where the command will run.
*/
readonly image: DockerImage;
/**
* The entrypoint to run in the Docker container.
*
* Example value: `['/bin/sh', '-c']`
*
* @see https://docs.docker.com/engine/reference/builder/#entrypoint
*
* @default - run the entrypoint defined in the image
*/
readonly entrypoint?: string[];
/**
* The command to run in the Docker container.
*
* Example value: `['npm', 'install']`
*
* @see https://docs.docker.com/engine/reference/run/
*
* @default - run the command defined in the image
*/
readonly command?: string[];
/**
* Additional Docker volumes to mount.
*
* @default - no additional volumes are mounted
*/
readonly volumes?: DockerVolume[];
/**
* Where to mount the specified volumes from
* @see https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from
* @default - no containers are specified to mount volumes from
*/
readonly volumesFrom?: string[];
/**
* The environment variables to pass to the Docker container.
*
* @default - no environment variables.
*/
readonly environment?: {
[key: string]: string;
};
/**
* Working directory inside the Docker container.
*
* @default /asset-input
*/
readonly workingDirectory?: string;
/**
* The user to use when running the Docker container.
*
* user | user:group | uid | uid:gid | user:gid | uid:group
*
* @see https://docs.docker.com/engine/reference/run/#user
*
* @default - uid:gid of the current user or 1000:1000 on Windows
*/
readonly user?: string;
/**
* Local bundling provider.
*
* The provider implements a method `tryBundle()` which should return `true`
* if local bundling was performed. If `false` is returned, docker bundling
* will be done.
*
* @default - bundling will only be performed in a Docker container
*
*/
readonly local?: ILocalBundling;
/**
* The type of output that this bundling operation is producing.
*
* @default BundlingOutput.AUTO_DISCOVER
*
*/
readonly outputType?: BundlingOutput;
/**
* [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration)
* when running the docker container.
*
* @default - no security options
*/
readonly securityOpt?: string;
/**
* Docker [Networking options](https://docs.docker.com/engine/reference/commandline/run/#connect-a-container-to-a-network---network)
*
* @default - no networking options
*/
readonly network?: string;
/**
* The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.
* @default - BundlingFileAccess.BIND_MOUNT
*/
readonly bundlingFileAccess?: BundlingFileAccess;
/**
* Platform to build for. _Requires Docker Buildx_.
*
* Specify this property to build images on a specific platform.
*
* @default - no platform specified (the current machine architecture will be used)
*/
readonly platform?: string;
}
/**
* The type of output that a bundling operation is producing.
*
*/
export declare enum BundlingOutput {
/**
* The bundling output directory includes a single .zip or .jar file which
* will be used as the final bundle. If the output directory does not
* include exactly a single archive, bundling will fail.
*/
ARCHIVED = "archived",
/**
* The bundling output directory contains one or more files which will be
* archived and uploaded as a .zip file to S3.
*/
NOT_ARCHIVED = "not-archived",
/**
* If the bundling output directory contains a single archive file (zip or jar)
* it will be used as the bundle output as-is. Otherwise, all the files in the bundling output directory will be zipped.
*/
AUTO_DISCOVER = "auto-discover",
/**
* The bundling output directory includes a single file which
* will be used as the final bundle. If the output directory does not
* include exactly a single file, bundling will fail.
*
* Similar to ARCHIVED but for non-archive files
*/
SINGLE_FILE = "single-file"
}
/**
* Local bundling
*
*/
export interface ILocalBundling {
/**
* This method is called before attempting docker bundling to allow the
* bundler to be executed locally. If the local bundler exists, and bundling
* was performed locally, return `true`. Otherwise, return `false`.
*
* @param outputDir the directory where the bundled asset should be output
* @param options bundling options for this asset
*/
tryBundle(outputDir: string, options: BundlingOptions): boolean;
}
/**
* The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host
*/
export declare enum BundlingFileAccess {
/**
* Creates temporary volumes and containers to copy files from the host to the bundling container and back.
* This is slower, but works also in more complex situations with remote or shared docker sockets.
*/
VOLUME_COPY = "VOLUME_COPY",
/**
* The source and output folders will be mounted as bind mount from the host system
* This is faster and simpler, but less portable than `VOLUME_COPY`.
*/
BIND_MOUNT = "BIND_MOUNT"
}
/**
* A Docker image
*/
export declare class DockerImage {
/**
* Builds a Docker image
*
* @param path The path to the directory containing the Docker file
* @param options Docker build options
*/
static fromBuild(path: string, options?: DockerBuildOptions): DockerImage;
/**
* Reference an image on DockerHub or another online registry.
*
* @param image the image name
*/
static fromRegistry(image: string): DockerImage;
private static cacheOptionToFlag;
/** The Docker image */
readonly image: string;
constructor(image: string, _imageHash?: string);
/**
* Provides a stable representation of this image for JSON serialization.
*
* @return The overridden image name if set or image hash name in that order
*/
toJSON(): string;
/**
* Runs a Docker image
*/
run(options?: DockerRunOptions): void;
/**
* Copies a file or directory out of the Docker image to the local filesystem.
*
* If `outputPath` is omitted the destination path is a temporary directory.
*
* @param imagePath the path in the Docker image
* @param outputPath the destination path for the copy operation
* @returns the destination path
*/
cp(imagePath: string, outputPath?: string): string;
}
/**
* A Docker volume
*/
export interface DockerVolume {
/**
* The path to the file or directory on the host machine
*/
readonly hostPath: string;
/**
* The path where the file or directory is mounted in the container
*/
readonly containerPath: string;
/**
* Mount consistency. Only applicable for macOS
*
* @default DockerConsistency.DELEGATED
* @see https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos
*/
readonly consistency?: DockerVolumeConsistency;
}
/**
* Supported Docker volume consistency types. Only valid on macOS due to the way file storage works on Mac
*/
export declare enum DockerVolumeConsistency {
/**
* Read/write operations inside the Docker container are applied immediately on the mounted host machine volumes
*/
CONSISTENT = "consistent",
/**
* Read/write operations on mounted Docker volumes are first written inside the container and then synchronized to the host machine
*/
DELEGATED = "delegated",
/**
* Read/write operations on mounted Docker volumes are first applied on the host machine and then synchronized to the container
*/
CACHED = "cached"
}
/**
* Docker run options
*/
export interface DockerRunOptions {
/**
* The entrypoint to run in the container.
*
* @default - run the entrypoint defined in the image
*/
readonly entrypoint?: string[];
/**
* The command to run in the container.
*
* @default - run the command defined in the image
*/
readonly command?: string[];
/**
* Docker volumes to mount.
*
* @default - no volumes are mounted
*/
readonly volumes?: DockerVolume[];
/**
* Where to mount the specified volumes from
* @see https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from
* @default - no containers are specified to mount volumes from
*/
readonly volumesFrom?: string[];
/**
* The environment variables to pass to the container.
*
* @default - no environment variables.
*/
readonly environment?: {
[key: string]: string;
};
/**
* Working directory inside the container.
*
* @default - image default
*/
readonly workingDirectory?: string;
/**
* The user to use when running the container.
*
* @default - root or image default
*/
readonly user?: string;
/**
* [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration)
* when running the docker container.
*
* @default - no security options
*/
readonly securityOpt?: string;
/**
* Docker [Networking options](https://docs.docker.com/engine/reference/commandline/run/#connect-a-container-to-a-network---network)
*
* @default - no networking options
*/
readonly network?: string;
/**
* Set platform if server is multi-platform capable. _Requires Docker Engine API v1.38+_.
*
* Example value: `linux/amd64`
*
* @default - no platform specified
*/
readonly platform?: string;
}
/**
* Docker build options
*/
export interface DockerBuildOptions {
/**
* Build args
*
* @default - no build args
*/
readonly buildArgs?: {
[key: string]: string;
};
/**
* Build contexts to pass to the `docker build` command.
*
* Build contexts can be used to specify additional directories or images
* to use during the build. Each entry specifies a named build context
* and its source (a directory path, a URL, or a docker image).
*
* @see https://docs.docker.com/build/building/context/#additional-build-contexts
*
* @default - no additional build contexts
*/
readonly buildContexts?: {
[key: string]: string;
};
/**
* Name of the Dockerfile, must relative to the docker build path.
*
* @default `Dockerfile`
*/
readonly file?: string;
/**
* Docker [Networking options](https://docs.docker.com/reference/cli/docker/buildx/build/#network)
*
* @default - no networking options
*/
readonly network?: string;
/**
* Set platform if server is multi-platform capable. _Requires Docker Engine API v1.38+_.
*
* Example value: `linux/amd64`
*
* @default - no platform specified
*/
readonly platform?: string;
/**
* Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.
*
* Example value: `build-env`
*
* @default - Build all stages defined in the Dockerfile
*/
readonly targetStage?: string;
/**
* Cache from options to pass to the `docker build` command.
*
* @default - no cache from args are passed
*/
readonly cacheFrom?: DockerCacheOption[];
/**
* Cache to options to pass to the `docker build` command.
*
* @default - no cache to args are passed
*/
readonly cacheTo?: DockerCacheOption;
/**
* Disable the cache and pass `--no-cache` to the `docker build` command.
*
* @default - cache is used
*/
readonly cacheDisabled?: boolean;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/bundling.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
/**
* Capabilities that affect whether CloudFormation is allowed to change IAM resources
*/
export declare enum CfnCapabilities {
/**
* No IAM Capabilities
*
* Pass this capability if you wish to block the creation IAM resources.
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
*/
NONE = "",
/**
* Capability to create anonymous IAM resources
*
* Pass this capability if you're only creating anonymous resources.
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
*/
ANONYMOUS_IAM = "CAPABILITY_IAM",
/**
* Capability to create named IAM resources.
*
* Pass this capability if you're creating IAM resources that have physical
* names.
*
* `CloudFormationCapabilities.NamedIAM` implies `CloudFormationCapabilities.IAM`; you don't have to pass both.
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
*/
NAMED_IAM = "CAPABILITY_NAMED_IAM",
/**
* Capability to run CloudFormation macros
*
* Pass this capability if your template includes macros, for example AWS::Include or AWS::Serverless.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
*/
AUTO_EXPAND = "CAPABILITY_AUTO_EXPAND"
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnCapabilities=void 0;var CfnCapabilities;(function(CfnCapabilities2){CfnCapabilities2.NONE="",CfnCapabilities2.ANONYMOUS_IAM="CAPABILITY_IAM",CfnCapabilities2.NAMED_IAM="CAPABILITY_NAMED_IAM",CfnCapabilities2.AUTO_EXPAND="CAPABILITY_AUTO_EXPAND"})(CfnCapabilities||(exports.CfnCapabilities=CfnCapabilities={}));

View File

@@ -0,0 +1,317 @@
import type { Construct } from 'constructs';
import { CfnHook } from './cfn-hook';
import type { FromCloudFormationOptions } from './helpers-internal';
/**
* The possible types of traffic shifting for the blue-green deployment configuration.
* The type of the `CfnTrafficRoutingConfig.type` property.
*/
export declare enum CfnTrafficRoutingType {
/**
* Switch from blue to green at once.
*/
ALL_AT_ONCE = "AllAtOnce",
/**
* Specifies a configuration that shifts traffic from blue to green in two increments.
*/
TIME_BASED_CANARY = "TimeBasedCanary",
/**
* Specifies a configuration that shifts traffic from blue to green in equal increments,
* with an equal number of minutes between each increment.
*/
TIME_BASED_LINEAR = "TimeBasedLinear"
}
/**
* The traffic routing configuration if `CfnTrafficRoutingConfig.type`
* is `CfnTrafficRoutingType.TIME_BASED_CANARY`.
*/
export interface CfnTrafficRoutingTimeBasedCanary {
/**
* The percentage of traffic to shift in the first increment of a time-based canary deployment.
* The step percentage must be 14% or greater.
*
* @default 15
*/
readonly stepPercentage?: number;
/**
* The number of minutes between the first and second traffic shifts of a time-based canary deployment.
*
* @default 5
*/
readonly bakeTimeMins?: number;
}
/**
* The traffic routing configuration if `CfnTrafficRoutingConfig.type`
* is `CfnTrafficRoutingType.TIME_BASED_LINEAR`.
*/
export interface CfnTrafficRoutingTimeBasedLinear {
/**
* The percentage of traffic that is shifted at the start of each increment of a time-based linear deployment.
* The step percentage must be 14% or greater.
*
* @default 15
*/
readonly stepPercentage?: number;
/**
* The number of minutes between the first and second traffic shifts of a time-based linear deployment.
*
* @default 5
*/
readonly bakeTimeMins?: number;
}
/**
* Traffic routing configuration settings.
* The type of the `CfnCodeDeployBlueGreenHookProps.trafficRoutingConfig` property.
*/
export interface CfnTrafficRoutingConfig {
/**
* The type of traffic shifting used by the blue-green deployment configuration.
*/
readonly type: CfnTrafficRoutingType;
/**
* The configuration for traffic routing when `type` is
* `CfnTrafficRoutingType.TIME_BASED_CANARY`.
*
* @default - none
*/
readonly timeBasedCanary?: CfnTrafficRoutingTimeBasedCanary;
/**
* The configuration for traffic routing when `type` is
* `CfnTrafficRoutingType.TIME_BASED_LINEAR`.
*
* @default - none
*/
readonly timeBasedLinear?: CfnTrafficRoutingTimeBasedLinear;
}
/**
* Additional options for the blue/green deployment.
* The type of the `CfnCodeDeployBlueGreenHookProps.additionalOptions` property.
*/
export interface CfnCodeDeployBlueGreenAdditionalOptions {
/**
* Specifies time to wait, in minutes, before terminating the blue resources.
*
* @default - 5 minutes
*/
readonly terminationWaitTimeInMinutes?: number;
}
/**
* Lifecycle events for blue-green deployments.
* The type of the `CfnCodeDeployBlueGreenHookProps.lifecycleEventHooks` property.
*/
export interface CfnCodeDeployBlueGreenLifecycleEventHooks {
/**
* Function to use to run tasks before the replacement task set is created.
*
* @default - none
*/
readonly beforeInstall?: string;
/**
* Function to use to run tasks after the replacement task set is created and one of the target groups is associated with it.
*
* @default - none
*/
readonly afterInstall?: string;
/**
* Function to use to run tasks after the test listener serves traffic to the replacement task set.
*
* @default - none
*/
readonly afterAllowTestTraffic?: string;
/**
* Function to use to run tasks after the second target group is associated with the replacement task set,
* but before traffic is shifted to the replacement task set.
*
* @default - none
*/
readonly beforeAllowTraffic?: string;
/**
* Function to use to run tasks after the second target group serves traffic to the replacement task set.
*
* @default - none
*/
readonly afterAllowTraffic?: string;
}
/**
* Type of the `CfnCodeDeployBlueGreenApplication.target` property.
*/
export interface CfnCodeDeployBlueGreenApplicationTarget {
/**
* The resource type of the target being deployed.
* Right now, the only allowed value is 'AWS::ECS::Service'.
*/
readonly type: string;
/**
* The logical id of the target resource.
*/
readonly logicalId: string;
}
/**
* A traffic route,
* representing where the traffic is being directed to.
*/
export interface CfnTrafficRoute {
/**
* The resource type of the route.
* Today, the only allowed value is 'AWS::ElasticLoadBalancingV2::Listener'.
*/
readonly type: string;
/**
* The logical id of the target resource.
*/
readonly logicalId: string;
}
/**
* Type of the `CfnCodeDeployBlueGreenEcsAttributes.trafficRouting` property.
*/
export interface CfnTrafficRouting {
/**
* The listener to be used by your load balancer to direct traffic to your target groups.
*/
readonly prodTrafficRoute: CfnTrafficRoute;
/**
* The listener to be used by your load balancer to direct traffic to your target groups.
*/
readonly testTrafficRoute: CfnTrafficRoute;
/**
* The logical IDs of the blue and green, respectively,
* AWS::ElasticLoadBalancingV2::TargetGroup target groups.
*/
readonly targetGroups: string[];
}
/**
* The attributes of the ECS Service being deployed.
* Type of the `CfnCodeDeployBlueGreenApplication.ecsAttributes` property.
*/
export interface CfnCodeDeployBlueGreenEcsAttributes {
/**
* The logical IDs of the blue and green, respectively,
* AWS::ECS::TaskDefinition task definitions.
*/
readonly taskDefinitions: string[];
/**
* The logical IDs of the blue and green, respectively,
* AWS::ECS::TaskSet task sets.
*/
readonly taskSets: string[];
/**
* The traffic routing configuration.
*/
readonly trafficRouting: CfnTrafficRouting;
}
/**
* The application actually being deployed.
* Type of the `CfnCodeDeployBlueGreenHookProps.applications` property.
*/
export interface CfnCodeDeployBlueGreenApplication {
/**
* The target that is being deployed.
*/
readonly target: CfnCodeDeployBlueGreenApplicationTarget;
/**
* The detailed attributes of the deployed target.
*/
readonly ecsAttributes: CfnCodeDeployBlueGreenEcsAttributes;
}
/**
* Construction properties of `CfnCodeDeployBlueGreenHook`.
*/
export interface CfnCodeDeployBlueGreenHookProps {
/**
* The IAM Role for CloudFormation to use to perform blue-green deployments.
*/
readonly serviceRole: string;
/**
* Properties of the Amazon ECS applications being deployed.
*/
readonly applications: CfnCodeDeployBlueGreenApplication[];
/**
* Traffic routing configuration settings.
*
* @default - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
*/
readonly trafficRoutingConfig?: CfnTrafficRoutingConfig;
/**
* Additional options for the blue/green deployment.
*
* @default - no additional options
*/
readonly additionalOptions?: CfnCodeDeployBlueGreenAdditionalOptions;
/**
* Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
* You can use the same function or a different one for deployment lifecycle events.
* Following completion of the validation tests,
* the Lambda `CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic`
* function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
*
* @default - no lifecycle event hooks
*/
readonly lifecycleEventHooks?: CfnCodeDeployBlueGreenLifecycleEventHooks;
}
/**
* A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html#blue-green-template-reference
*/
export declare class CfnCodeDeployBlueGreenHook extends CfnHook {
/**
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: Construct, id: string, hookAttributes: any, options: FromCloudFormationOptions): CfnCodeDeployBlueGreenHook;
private _serviceRole;
private _applications;
private _trafficRoutingConfig?;
private _additionalOptions?;
private _lifecycleEventHooks?;
/**
* Creates a new CodeDeploy blue-green ECS Hook.
*
* @param scope the scope to create the hook in (usually the containing Stack object)
* @param id the identifier of the construct - will be used to generate the logical ID of the Hook
* @param props the properties of the Hook
*/
constructor(scope: Construct, id: string, props: CfnCodeDeployBlueGreenHookProps);
/**
* The IAM Role for CloudFormation to use to perform blue-green deployments.
*/
get serviceRole(): string;
set serviceRole(serviceRole: string);
/**
* Properties of the Amazon ECS applications being deployed.
*/
get applications(): CfnCodeDeployBlueGreenApplication[];
set applications(value: CfnCodeDeployBlueGreenApplication[]);
/**
* Traffic routing configuration settings.
*
* @default - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
*/
get trafficRoutingConfig(): CfnTrafficRoutingConfig | undefined;
set trafficRoutingConfig(value: CfnTrafficRoutingConfig | undefined);
/**
* Additional options for the blue/green deployment.
*
* @default - no additional options
*/
get additionalOptions(): CfnCodeDeployBlueGreenAdditionalOptions | undefined;
set additionalOptions(value: CfnCodeDeployBlueGreenAdditionalOptions | undefined);
/**
* Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
* You can use the same function or a different one for deployment lifecycle events.
* Following completion of the validation tests,
* the Lambda `CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic`
* function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
*
* @default - no lifecycle event hooks
*/
get lifecycleEventHooks(): CfnCodeDeployBlueGreenLifecycleEventHooks | undefined;
set lifecycleEventHooks(value: CfnCodeDeployBlueGreenLifecycleEventHooks | undefined);
protected renderProperties(_props?: {
[p: string]: any;
}): {
[p: string]: any;
} | undefined;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,80 @@
import type { Construct } from 'constructs';
import { CfnElement } from './cfn-element';
import type { IResolvable, IResolveContext } from './resolvable';
export interface CfnConditionProps {
/**
* The expression that the condition will evaluate.
*
* @default - None.
*/
readonly expression?: ICfnConditionExpression;
}
/**
* Represents a CloudFormation condition, for resources which must be conditionally created and
* the determination must be made at deploy time.
*/
export declare class CfnCondition extends CfnElement implements ICfnConditionExpression, IResolvable {
/**
* The condition statement.
*/
expression?: ICfnConditionExpression;
/**
* Build a new condition. The condition must be constructed with a condition token,
* that the condition is based on.
*/
constructor(scope: Construct, id: string, props?: CfnConditionProps);
/**
* @internal
*/
_toCloudFormation(): object;
/**
* Synthesizes the condition.
*/
resolve(_context: IResolveContext): any;
}
/**
* Represents a CloudFormation element that can be used within a Condition.
*
* You can use intrinsic functions, such as ``Fn.conditionIf``,
* ``Fn.conditionEquals``, and ``Fn.conditionNot``, to conditionally create
* stack resources. These conditions are evaluated based on input parameters
* that you declare when you create or update a stack. After you define all your
* conditions, you can associate them with resources or resource properties in
* the Resources and Outputs sections of a template.
*
* You define all conditions in the Conditions section of a template except for
* ``Fn.conditionIf`` conditions. You can use the ``Fn.conditionIf`` condition
* in the metadata attribute, update policy attribute, and property values in
* the Resources section and Outputs sections of a template.
*
* You might use conditions when you want to reuse a template that can create
* resources in different contexts, such as a test environment versus a
* production environment. In your template, you can add an EnvironmentType
* input parameter, which accepts either prod or test as inputs. For the
* production environment, you might include Amazon EC2 instances with certain
* capabilities; however, for the test environment, you want to use less
* capabilities to save costs. With conditions, you can define which resources
* are created and how they're configured for each environment type.
*
* You can use `toString` when you wish to embed a condition expression
* in a property value that accepts a `string`. For example:
*
* ```ts
* new sqs.Queue(this, 'MyQueue', {
* queueName: Fn.conditionIf('Condition', 'Hello', 'World').toString()
* });
* ```
*/
export interface ICfnConditionExpression extends IResolvable {
}
/**
* Interface to specify certain functions as Service Catalog rule-specific.
* These functions can only be used in ``Rules`` section of template.
*/
export interface ICfnRuleConditionExpression extends ICfnConditionExpression {
/**
* This field is only needed to defeat TypeScript's structural typing.
* It is never used.
*/
readonly disambiguator: boolean;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnCondition=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp};class CfnCondition extends cfn_element_1().CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnCondition",version:"2.252.0"};expression;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnConditionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCondition),error}this.expression=props&&props.expression}_toCloudFormation(){return this.expression?{Conditions:{[this.logicalId]:this.expression}}:{}}resolve(_context){try{jsiiDeprecationWarnings().aws_cdk_lib_IResolveContext(_context)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.resolve),error}return{Condition:this.logicalId}}}exports.CfnCondition=CfnCondition;

View File

@@ -0,0 +1,42 @@
import { Intrinsic } from './private/intrinsic';
/**
* Properties for a Dynamic Reference
*/
export interface CfnDynamicReferenceProps {
/**
* The service to retrieve the dynamic reference from
*/
readonly service: CfnDynamicReferenceService;
/**
* The reference key of the dynamic reference
*/
readonly referenceKey: string;
}
/**
* References a dynamically retrieved value
*
* This is a Construct so that subclasses will (eventually) be able to attach
* metadata to themselves without having to change call signatures.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html
*/
export declare class CfnDynamicReference extends Intrinsic {
constructor(service: CfnDynamicReferenceService, key: string);
}
/**
* The service to retrieve the dynamic reference from
*/
export declare enum CfnDynamicReferenceService {
/**
* Plaintext value stored in AWS Systems Manager Parameter Store
*/
SSM = "ssm",
/**
* Secure string stored in AWS Systems Manager Parameter Store
*/
SSM_SECURE = "ssm-secure",
/**
* Secret stored in AWS Secrets Manager
*/
SECRETS_MANAGER = "secretsmanager"
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnDynamicReferenceService=exports.CfnDynamicReference=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var intrinsic_1=()=>{var tmp=require("./private/intrinsic");return intrinsic_1=()=>tmp,tmp};class CfnDynamicReference extends intrinsic_1().Intrinsic{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnDynamicReference",version:"2.252.0"};constructor(service,key){super("{{resolve:"+service+":"+key+"}}");try{jsiiDeprecationWarnings().aws_cdk_lib_CfnDynamicReferenceService(service)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnDynamicReference),error}}}exports.CfnDynamicReference=CfnDynamicReference;var CfnDynamicReferenceService;(function(CfnDynamicReferenceService2){CfnDynamicReferenceService2.SSM="ssm",CfnDynamicReferenceService2.SSM_SECURE="ssm-secure",CfnDynamicReferenceService2.SECRETS_MANAGER="secretsmanager"})(CfnDynamicReferenceService||(exports.CfnDynamicReferenceService=CfnDynamicReferenceService={}));

129
cdk/node_modules/aws-cdk-lib/core/lib/cfn-element.d.ts generated vendored Normal file
View File

@@ -0,0 +1,129 @@
import { Construct } from 'constructs';
/**
* An element of a CloudFormation stack.
*/
export declare abstract class CfnElement extends Construct {
/**
* Returns `true` if a construct is a stack element (i.e. part of the
* synthesized cloudformation template).
*
* Uses duck-typing instead of `instanceof` to allow stack elements from different
* versions of this library to be included in the same stack.
*
* @returns The construct as a stack element or undefined if it is not a stack element.
*/
static isCfnElement(x: any): x is CfnElement;
/**
* The logical ID for this CloudFormation stack element. The logical ID of the element
* is calculated from the path of the resource node in the construct tree.
*
* To override this value, use `overrideLogicalId(newLogicalId)`.
*
* @returns the logical ID as a stringified token. This value will only get
* resolved during synthesis.
*/
readonly logicalId: string;
/**
* The stack in which this element is defined. CfnElements must be defined within a stack scope (directly or indirectly).
*/
readonly stack: Stack;
/**
* An explicit logical ID provided by `overrideLogicalId`.
*/
private _logicalIdOverride?;
/**
* If the logicalId is locked then it can no longer be overridden.
* This is needed for cases where the logicalId is consumed prior to synthesis
* (i.e. Stack.exportValue).
*/
private _logicalIdLocked?;
/**
* Creates an entity and binds it to a tree.
* Note that the root of the tree must be a Stack object (not just any Root).
*
* @param scope The parent construct
* @param props Construct properties
*/
constructor(scope: Construct, id: string);
with(...mixins: IMixin[]): IConstruct;
/**
* Overrides the auto-generated logical ID with a specific ID.
* @param newLogicalId The new logical ID to use for this stack element.
*/
overrideLogicalId(newLogicalId: string): void;
/**
* Lock the logicalId of the element and do not allow
* any updates (e.g. via overrideLogicalId)
*
* This is needed in cases where you are consuming the LogicalID
* of an element prior to synthesis and you need to not allow future
* changes to the id since doing so would cause the value you just
* consumed to differ from the synth time value of the logicalId.
*
* For example:
*
* const bucket = new Bucket(stack, 'Bucket');
* stack.exportValue(bucket.bucketArn) <--- consuming the logicalId
* bucket.overrideLogicalId('NewLogicalId') <--- updating logicalId
*
* You should most likely never need to use this method, and if
* you are implementing a feature that requires this, make sure
* you actually require it.
*
* @internal
*/
_lockLogicalId(): void;
/**
* @returns the stack trace of the point where this Resource was created from, sourced
* from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
* node +internal+ entries filtered.
*/
get creationStack(): string[];
/**
* Returns the CloudFormation 'snippet' for this entity. The snippet will only be merged
* at the root level to ensure there are no identity conflicts.
*
* For example, a Resource class will return something like:
* {
* Resources: {
* [this.logicalId]: {
* Type: this.resourceType,
* Properties: this.props,
* Condition: this.condition
* }
* }
* }
*
* @internal
*/
abstract _toCloudFormation(): object;
/**
* Called during synthesize to render the logical ID of this element. If
* `overrideLogicalId` was it will be used, otherwise, we will allocate the
* logical ID through the stack.
*
* @internal
*/
protected _synthesizeLogicalId(): string;
}
/**
* Base class for referenceable CloudFormation constructs which are not Resources
*
* These constructs are things like Conditions and Parameters, can be
* referenced by taking the `.ref` attribute.
*
* Resource constructs do not inherit from CfnRefElement because they have their
* own, more specific types returned from the .ref attribute. Also, some
* resources aren't referenceable at all (such as BucketPolicies or GatewayAttachments).
*/
export declare abstract class CfnRefElement extends CfnElement {
/**
* Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
*
* If, by any chance, the intrinsic reference of a resource is not a string, you could
* coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
*/
get ref(): string;
}
import { Stack } from './stack';
import type { IConstruct, IMixin } from 'constructs';

2
cdk/node_modules/aws-cdk-lib/core/lib/cfn-element.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRefElement=exports.CfnElement=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},lazy_1=()=>{var tmp=require("./lazy");return lazy_1=()=>tmp,tmp},cxschema=()=>{var tmp=require("../../cloud-assembly-schema");return cxschema=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};const CFN_ELEMENT_SYMBOL=Symbol.for("@aws-cdk/core.CfnElement");class CfnElement extends constructs_1().Construct{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnElement",version:"2.252.0"};static isCfnElement(x){return CFN_ELEMENT_SYMBOL in x}logicalId;stack;_logicalIdOverride;_logicalIdLocked;constructor(scope,id){super(scope,id),Object.defineProperty(this,CFN_ELEMENT_SYMBOL,{value:!0}),this.stack=stack_1().Stack.of(this),this.logicalId=lazy_1().Lazy.uncachedString({produce:()=>this._synthesizeLogicalId()},{displayHint:`${notTooLong(constructs_1().Node.of(this).path)}.LogicalID`}),this.node.tryGetContext(cxapi().DISABLE_LOGICAL_ID_METADATA)||constructs_1().Node.of(this).addMetadata(cxschema().ArtifactMetadataEntryType.LOGICAL_ID,this.logicalId),(!this.node.tryGetContext(cxapi().DISABLE_CREATION_STACK_TRACES)||(0,debug_1().debugModeEnabled)())&&this.node.addMetadata(cxschema().ArtifactMetadataEntryType.CREATION_STACK,(0,stack_trace_1().captureStackTrace)(new.target))}with(...mixins){return(0,mixin_metadata_1().withMixins)(this,...mixins)}overrideLogicalId(newLogicalId){if(this._logicalIdLocked)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`LogicalIdLocked`,`The logicalId for resource at path ${constructs_1().Node.of(this).path} has been locked and cannot be overridden
Make sure you are calling "overrideLogicalId" before Stack.exportValue`,this);this._logicalIdOverride=newLogicalId}_lockLogicalId(){this._logicalIdLocked=!0}get creationStack(){return constructs_1().Node.of(this).metadata.find(md=>md.type===cxschema().ArtifactMetadataEntryType.CREATION_STACK)?.data??[]}_synthesizeLogicalId(){return this._logicalIdOverride?this._logicalIdOverride:this.stack.getLogicalId(this)}}exports.CfnElement=CfnElement;class CfnRefElement extends CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnRefElement",version:"2.252.0"};get ref(){return token_1().Token.asString(cfn_reference_1().CfnReference.for(this,"Ref"))}}exports.CfnRefElement=CfnRefElement;function notTooLong(x){return x.length<100?x:x.slice(0,47)+"..."+x.slice(-47)}var cfn_reference_1=()=>{var tmp=require("./private/cfn-reference");return cfn_reference_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},mixin_metadata_1=()=>{var tmp=require("./mixins/private/mixin-metadata");return mixin_metadata_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},stack_trace_1=()=>{var tmp=require("./stack-trace");return stack_trace_1=()=>tmp,tmp},debug_1=()=>{var tmp=require("./debug");return debug_1=()=>tmp,tmp};

324
cdk/node_modules/aws-cdk-lib/core/lib/cfn-fn.d.ts generated vendored Normal file
View File

@@ -0,0 +1,324 @@
import type { ICfnConditionExpression, ICfnRuleConditionExpression } from './cfn-condition';
import { Intrinsic } from './private/intrinsic';
import type { IResolvable } from './resolvable';
/**
* CloudFormation intrinsic functions.
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
*/
export declare class Fn {
/**
* The ``Ref`` intrinsic function returns the value of the specified parameter or resource.
* Note that it doesn't validate the logicalName, it mainly serves parameter/resource reference defined in a ``CfnInclude`` template.
* @param logicalName The logical name of a parameter/resource for which you want to retrieve its value.
*/
static ref(logicalName: string): string;
/**
* The ``Fn::GetAtt`` intrinsic function returns the value of an attribute
* from a resource in the template.
* @param logicalNameOfResource The logical name (also called logical ID) of
* the resource that contains the attribute that you want.
* @param attributeName The name of the resource-specific attribute whose
* value you want. See the resource's reference page for details about the
* attributes available for that resource type.
* @returns an IResolvable object
*/
static getAtt(logicalNameOfResource: string, attributeName: string): IResolvable;
/**
* The intrinsic function ``Fn::Join`` appends a set of values into a single
* value, separated by the specified delimiter. If a delimiter is the empty
* string, the set of values are concatenated with no delimiter.
* @param delimiter The value you want to occur between fragments. The
* delimiter will occur between fragments only. It will not terminate the
* final value.
* @param listOfValues The list of values you want combined.
* @returns a token represented as a string
*/
static join(delimiter: string, listOfValues: string[]): string;
/**
* Split a string token into a token list of string values.
*
* Specify the location of splits with a delimiter such as ',' (a comma).
* Renders to the `Fn::Split` intrinsic function.
*
* Lists with unknown lengths (default)
* -------------------------------------
*
* Since this function is used to work with deploy-time values, if `assumedLength`
* is not given the CDK cannot know the length of the resulting list at synthesis time.
* This brings the following restrictions:
*
* - You must use `Fn.select(i, list)` to pick elements out of the list (you must not use
* `list[i]`).
* - You cannot add elements to the list, remove elements from the list,
* combine two such lists together, or take a slice of the list.
* - You cannot pass the list to constructs that do any of the above.
*
* The only valid operation with such a tokenized list is to pass it unmodified to a
* CloudFormation Resource construct.
*
* Lists with assumed lengths
* --------------------------
*
* Pass `assumedLength` if you know the length of the list that will be
* produced by splitting. The actual list length at deploy time may be
* *longer* than the number you pass, but not *shorter*.
*
* The returned list will look like:
*
* ```
* [Fn.select(0, split), Fn.select(1, split), Fn.select(2, split), ...]
* ```
*
* The restrictions from the section "Lists with unknown lengths" will now be lifted,
* at the expense of having to know and fix the length of the list.
*
* @param delimiter A string value that determines where the source string is divided.
* @param source The string value that you want to split.
* @param assumedLength The length of the list that will be produced by splitting
* @returns a token represented as a string array
*/
static split(delimiter: string, source: string, assumedLength?: number): string[];
/**
* The intrinsic function ``Fn::Select`` returns a single object from a list of objects by index.
* @param index The index of the object to retrieve. This must be a value from zero to N-1, where N represents the number of elements in the array.
* @param array The list of objects to select from. This list must not be null, nor can it have null entries.
* @returns a token represented as a string
*/
static select(index: number, array: string[]): string;
/**
* The intrinsic function ``Fn::Sub`` substitutes variables in an input string
* with values that you specify. In your templates, you can use this function
* to construct commands or outputs that include values that aren't available
* until you create or update a stack.
* @param body A string with variables that AWS CloudFormation substitutes
* with their associated values at runtime. Write variables as ${MyVarName}.
* Variables can be template parameter names, resource logical IDs, resource
* attributes, or a variable in a key-value map. If you specify only template
* parameter names, resource logical IDs, and resource attributes, don't
* specify a key-value map.
* @param variables The name of a variable that you included in the String
* parameter. The value that AWS CloudFormation substitutes for the associated
* variable name at runtime.
* @returns a token represented as a string
*/
static sub(body: string, variables?: {
[key: string]: string;
}): string;
/**
* The intrinsic function ``Fn::Base64`` returns the Base64 representation of
* the input string. This function is typically used to pass encoded data to
* Amazon EC2 instances by way of the UserData property.
* @param data The string value you want to convert to Base64.
* @returns a token represented as a string
*/
static base64(data: string): string;
/**
* The intrinsic function ``Fn::Cidr`` returns the specified Cidr address block.
* @param ipBlock The user-specified default Cidr address block.
* @param count The number of subnets' Cidr block wanted. Count can be 1 to 256.
* @param sizeMask The digit covered in the subnet.
* @returns a token represented as a string
*/
static cidr(ipBlock: string, count: number, sizeMask?: string): string[];
/**
* Given an url, parse the domain name
* @param url the url to parse
*/
static parseDomainName(url: string): string;
/**
* The intrinsic function ``Fn::GetAZs`` returns an array that lists
* Availability Zones for a specified region. Because customers have access to
* different Availability Zones, the intrinsic function ``Fn::GetAZs`` enables
* template authors to write templates that adapt to the calling user's
* access. That way you don't have to hard-code a full list of Availability
* Zones for a specified region.
* @param region The name of the region for which you want to get the
* Availability Zones. You can use the AWS::Region pseudo parameter to specify
* the region in which the stack is created. Specifying an empty string is
* equivalent to specifying AWS::Region.
* @returns a token represented as a string array
*/
static getAzs(region?: string): string[];
/**
* The intrinsic function ``Fn::ImportValue`` returns the value of an output
* exported by another stack. You typically use this function to create
* cross-stack references. In the following example template snippets, Stack A
* exports VPC security group values and Stack B imports them.
* @param sharedValueToImport The stack output value that you want to import.
* @returns a token represented as a string
*/
static importValue(sharedValueToImport: string): string;
/**
* Like `Fn.importValue`, but import a list with a known length
*
* If you explicitly want a list with an unknown length, call `Fn.split(',',
* Fn.importValue(exportName))`. See the documentation of `Fn.split` to read
* more about the limitations of using lists of unknown length.
*
* `Fn.importListValue(exportName, assumedLength)` is the same as
* `Fn.split(',', Fn.importValue(exportName), assumedLength)`,
* but easier to read and impossible to forget to pass `assumedLength`.
*/
static importListValue(sharedValueToImport: string, assumedLength: number, delimiter?: string): string[];
/**
* The intrinsic function ``Fn::FindInMap`` returns the value corresponding to
* keys in a two-level map that is declared in the Mappings section.
* Warning: do not use with lazy mappings as this function will not guarantee a lazy mapping to render in the template.
* Prefer to use `CfnMapping.findInMap` in general.
* @returns a token represented as a string
*/
static findInMap(mapName: string, topLevelKey: string, secondLevelKey: string, defaultValue?: string): string;
/**
* An additional function used in CfnParser,
* as Fn::FindInMap does not always return a string.
*
* @internal
*/
static _findInMap(mapName: string, topLevelKey: string, secondLevelKey: string, defaultValue?: string): IResolvable;
/**
* Creates a token representing the ``Fn::Transform`` expression
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html
* @param macroName The name of the macro to perform the processing
* @param parameters The parameters to be passed to the macro
* @returns a token representing the transform expression
*/
static transform(macroName: string, parameters: {
[name: string]: any;
}): IResolvable;
/**
* Returns true if all the specified conditions evaluate to true, or returns
* false if any one of the conditions evaluates to false. ``Fn::And`` acts as
* an AND operator. The minimum number of conditions that you can include is
* 1.
* @param conditions conditions to AND
* @returns an FnCondition token
*/
static conditionAnd(...conditions: ICfnConditionExpression[]): ICfnRuleConditionExpression;
/**
* Compares if two values are equal. Returns true if the two values are equal
* or false if they aren't.
* @param lhs A value of any type that you want to compare.
* @param rhs A value of any type that you want to compare.
* @returns an FnCondition token
*/
static conditionEquals(lhs: any, rhs: any): ICfnRuleConditionExpression;
/**
* Returns one value if the specified condition evaluates to true and another
* value if the specified condition evaluates to false. Currently, AWS
* CloudFormation supports the ``Fn::If`` intrinsic function in the metadata
* attribute, update policy attribute, and property values in the Resources
* section and Outputs sections of a template. You can use the AWS::NoValue
* pseudo parameter as a return value to remove the corresponding property.
* @param conditionId A reference to a condition in the Conditions section. Use
* the condition's name to reference it.
* @param valueIfTrue A value to be returned if the specified condition
* evaluates to true.
* @param valueIfFalse A value to be returned if the specified condition
* evaluates to false.
* @returns an FnCondition token
*/
static conditionIf(conditionId: string, valueIfTrue: any, valueIfFalse: any): ICfnRuleConditionExpression;
/**
* Returns true for a condition that evaluates to false or returns false for a
* condition that evaluates to true. ``Fn::Not`` acts as a NOT operator.
* @param condition A condition such as ``Fn::Equals`` that evaluates to true
* or false.
* @returns an FnCondition token
*/
static conditionNot(condition: ICfnConditionExpression): ICfnRuleConditionExpression;
/**
* Returns true if any one of the specified conditions evaluate to true, or
* returns false if all of the conditions evaluates to false. ``Fn::Or`` acts
* as an OR operator. The minimum number of conditions that you can include is
* 1.
* @param conditions conditions that evaluates to true or false.
* @returns an FnCondition token
*/
static conditionOr(...conditions: ICfnConditionExpression[]): ICfnRuleConditionExpression;
/**
* Returns true if a specified string matches at least one value in a list of
* strings.
* @param listOfStrings A list of strings, such as "A", "B", "C".
* @param value A string, such as "A", that you want to compare against a list of strings.
* @returns an FnCondition token
*/
static conditionContains(listOfStrings: string[], value: string): ICfnRuleConditionExpression;
/**
* Returns true if a specified string matches all values in a list.
* @param listOfStrings A list of strings, such as "A", "B", "C".
* @param value A string, such as "A", that you want to compare against a list
* of strings.
* @returns an FnCondition token
*/
static conditionEachMemberEquals(listOfStrings: string[], value: string): ICfnRuleConditionExpression;
/**
* Returns true if each member in a list of strings matches at least one value
* in a second list of strings.
* @param stringsToCheck A list of strings, such as "A", "B", "C". AWS
* CloudFormation checks whether each member in the strings_to_check parameter
* is in the strings_to_match parameter.
* @param stringsToMatch A list of strings, such as "A", "B", "C". Each member
* in the strings_to_match parameter is compared against the members of the
* strings_to_check parameter.
* @returns an FnCondition token
*/
static conditionEachMemberIn(stringsToCheck: string[], stringsToMatch: string[]): ICfnRuleConditionExpression;
/**
* Returns all values for a specified parameter type.
* @param parameterType An AWS-specific parameter type, such as
* AWS::EC2::SecurityGroup::Id or AWS::EC2::VPC::Id. For more information, see
* Parameters in the AWS CloudFormation User Guide.
* @returns a token represented as a string array
*/
static refAll(parameterType: string): string[];
/**
* Returns an attribute value or list of values for a specific parameter and
* attribute.
* @param parameterOrLogicalId The name of a parameter for which you want to
* retrieve attribute values. The parameter must be declared in the Parameters
* section of the template.
* @param attribute The name of an attribute from which you want to retrieve a
* value.
* @returns a token represented as a string
*/
static valueOf(parameterOrLogicalId: string, attribute: string): string;
/**
* Returns a list of all attribute values for a given parameter type and
* attribute.
* @param parameterType An AWS-specific parameter type, such as
* AWS::EC2::SecurityGroup::Id or AWS::EC2::VPC::Id. For more information, see
* Parameters in the AWS CloudFormation User Guide.
* @param attribute The name of an attribute from which you want to retrieve a
* value. For more information about attributes, see Supported Attributes.
* @returns a token represented as a string array
*/
static valueOfAll(parameterType: string, attribute: string): string[];
/**
* The `Fn::ToJsonString` intrinsic function converts an object or array to its
* corresponding JSON string.
*
* @param object The object or array to stringify
*/
static toJsonString(object: any): string;
/**
* The intrinsic function `Fn::Length` returns the number of elements within an array
* or an intrinsic function that returns an array.
*
* @param array The array you want to return the number of elements from
*/
static len(array: any): number;
/**
* Test whether the given object extends FnBase class.
*
* @internal
*/
static _isFnBase(x: any): x is FnBase;
private constructor();
}
/**
* Base class for tokens that represent CloudFormation intrinsic functions.
*/
declare class FnBase extends Intrinsic {
constructor(name: string, value: any);
}
export {};

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-fn.js generated vendored Normal file

File diff suppressed because one or more lines are too long

42
cdk/node_modules/aws-cdk-lib/core/lib/cfn-hook.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import type { Construct } from 'constructs';
import { CfnElement } from './cfn-element';
/**
* Construction properties of `CfnHook`.
*/
export interface CfnHookProps {
/**
* The type of the hook
* (for example, "AWS::CodeDeploy::BlueGreen").
*/
readonly type: string;
/**
* The properties of the hook.
*
* @default - no properties
*/
readonly properties?: {
[name: string]: any;
};
}
/**
* Represents a CloudFormation resource.
*/
export declare class CfnHook extends CfnElement {
/**
* The type of the hook
* (for example, "AWS::CodeDeploy::BlueGreen").
*/
readonly type: string;
private readonly _cfnHookProperties?;
/**
* Creates a new Hook object.
*/
constructor(scope: Construct, id: string, props: CfnHookProps);
/** @internal */
_toCloudFormation(): object;
protected renderProperties(props?: {
[key: string]: any;
}): {
[key: string]: any;
} | undefined;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-hook.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnHook=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp},util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class CfnHook extends cfn_element_1().CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnHook",version:"2.252.0"};type;_cfnHookProperties;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnHookProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnHook),error}this.type=props.type,this._cfnHookProperties=props.properties}_toCloudFormation(){return{Hooks:{[this.logicalId]:{Type:this.type,Properties:(0,util_1().ignoreEmpty)(this.renderProperties(this._cfnHookProperties))}}}}renderProperties(props){return props}}exports.CfnHook=CfnHook;

View File

@@ -0,0 +1,2 @@
import type { Construct } from 'constructs';
import { CfnElement } from './cfn-element';

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-include.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnInclude=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp};class CfnInclude extends cfn_element_1().CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnInclude",version:"2.252.0"};template;constructor(scope,id,props){super(scope,id),this.template=props.template}_toCloudFormation(){return this.template}}exports.CfnInclude=CfnInclude;

43
cdk/node_modules/aws-cdk-lib/core/lib/cfn-json.d.ts generated vendored Normal file
View File

@@ -0,0 +1,43 @@
import { Construct } from 'constructs';
import type { Reference } from './reference';
import type { IResolvable, IResolveContext } from './resolvable';
export interface CfnJsonProps {
/**
* The value to resolve. Can be any JavaScript object, including tokens and
* references in keys or values.
*/
readonly value: any;
}
/**
* Captures a synthesis-time JSON object a CloudFormation reference which
* resolves during deployment to the resolved values of the JSON object.
*
* The main use case for this is to overcome a limitation in CloudFormation that
* does not allow using intrinsic functions as dictionary keys (because
* dictionary keys in JSON must be strings). Specifically this is common in IAM
* conditions such as `StringEquals: { lhs: "rhs" }` where you want "lhs" to be
* a reference.
*
* This object is resolvable, so it can be used as a value.
*
* This construct is backed by a custom resource.
*/
export declare class CfnJson extends Construct implements IResolvable {
readonly creationStack: string[];
/**
* An Fn::GetAtt to the JSON object passed through `value` and resolved during
* synthesis.
*
* Normally there is no need to use this property since `CfnJson` is an
* IResolvable, so it can be simply used as a value.
*/
readonly value: Reference;
private readonly jsonString;
constructor(scope: Construct, id: string, props: CfnJsonProps);
/**
* This is required in case someone JSON.stringifys an object which references
* this object. Otherwise, we'll get a cyclic JSON reference.
*/
toJSON(): string;
resolve(_context: IResolveContext): any;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-json.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnJson=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},custom_resource_1=()=>{var tmp=require("./custom-resource");return custom_resource_1=()=>tmp,tmp},cfn_utils_provider_1=()=>{var tmp=require("./private/cfn-utils-provider");return cfn_utils_provider_1=()=>tmp,tmp},consts_1=()=>{var tmp=require("./private/cfn-utils-provider/consts");return consts_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp};class CfnJson extends constructs_1().Construct{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnJson",version:"2.252.0"};creationStack=["Token stack traces are no longer captured"];value;jsonString;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnJsonProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnJson),error}this.jsonString=stack_1().Stack.of(this).toJsonString(props.value);const resource=new(custom_resource_1()).CustomResource(this,"Resource",{serviceToken:cfn_utils_provider_1().CfnUtilsProvider.getOrCreate(this),resourceType:consts_1().CfnUtilsResourceType.CFN_JSON,properties:{Value:this.jsonString}});this.value=resource.getAtt("Value")}toJSON(){return this.jsonString}resolve(_context){try{jsiiDeprecationWarnings().aws_cdk_lib_IResolveContext(_context)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.resolve),error}return this.value}}exports.CfnJson=CfnJson;

48
cdk/node_modules/aws-cdk-lib/core/lib/cfn-mapping.d.ts generated vendored Normal file
View File

@@ -0,0 +1,48 @@
import type { Construct } from 'constructs';
import { CfnRefElement } from './cfn-element';
type Mapping = {
[k1: string]: {
[k2: string]: any;
};
};
export interface CfnMappingProps {
/**
* Mapping of key to a set of corresponding set of named values.
* The key identifies a map of name-value pairs and must be unique within the mapping.
*
* For example, if you want to set values based on a region, you can create a mapping
* that uses the region name as a key and contains the values you want to specify for
* each specific region.
*
* @default - No mapping.
*/
readonly mapping?: Mapping;
readonly lazy?: boolean;
}
/**
* Represents a CloudFormation mapping.
*/
export declare class CfnMapping extends CfnRefElement {
private mapping;
private readonly lazy?;
private lazyRender;
private lazyInformed;
constructor(scope: Construct, id: string, props?: CfnMappingProps);
/**
* Sets a value in the map based on the two keys.
*/
setValue(key1: string, key2: string, value: any): void;
/**
* @returns A reference to a value in the map based on the two keys.
* If mapping is lazy, the value from the map or default value is returned instead of the reference and the mapping is not rendered in the template.
*/
findInMap(key1: string, key2: string, defaultValue?: string): string;
/**
* @internal
*/
_toCloudFormation(): object;
private informLazyUse;
private validateMapping;
private validateAlphanumeric;
}
export {};

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-mapping.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnMapping=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var annotations_1=()=>{var tmp=require("./annotations");return annotations_1=()=>tmp,tmp},cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp},cfn_fn_1=()=>{var tmp=require("./cfn-fn");return cfn_fn_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp};class CfnMapping extends cfn_element_1().CfnRefElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnMapping",version:"2.252.0"};mapping;lazy;lazyRender=!1;lazyInformed=!1;constructor(scope,id,props={}){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnMappingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnMapping),error}this.mapping=props.mapping?this.validateMapping(props.mapping):{},this.lazy=props.lazy}setValue(key1,key2,value){if([key1,key2].some(k=>["__proto__","constructor"].includes(k)))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`CannotProtoConstructorKeys`,"Cannot use '__proto__' or 'constructor' as keys",this);this.validateAlphanumeric(key2),key1 in this.mapping||(this.mapping[key1]={}),this.mapping[key1][key2]=value}findInMap(key1,key2,defaultValue){let fullyResolved=!1,notInMap=!1;if(!token_1().Token.isUnresolved(key1))if(key1 in this.mapping){if(!token_1().Token.isUnresolved(key2)){if(!(key2 in this.mapping[key1])){if(defaultValue===void 0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MappingDoesnTContainSecondLevel`,`Mapping doesn't contain second-level key '${key2}'`,this);notInMap=!0}fullyResolved=!0}}else{if(defaultValue===void 0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MappingDoesnTContainTopLevel`,`Mapping doesn't contain top-level key '${key1}'`,this);notInMap=!0}if(this.lazy){if(notInMap&&defaultValue!==void 0)return defaultValue;if(fullyResolved)return this.mapping[key1][key2]}return this.lazyRender=!fullyResolved,new CfnMappingEmbedder(this,this.mapping,key1,key2,defaultValue).toString()}_toCloudFormation(){return this.lazy===void 0&&!this.lazyRender&&this.informLazyUse(),!this.lazy||this.lazy&&this.lazyRender?{Mappings:{[this.logicalId]:this.mapping}}:{}}informLazyUse(){this.lazyInformed||annotations_1().Annotations.of(this).addInfo("Consider making this CfnMapping a lazy mapping by providing `lazy: true`: either no findInMap was called or every findInMap could be immediately resolved without using Fn::FindInMap"),this.lazyInformed=!0}validateMapping(mapping){return Object.keys(mapping).forEach(m=>Object.keys(mapping[m]).forEach(this.validateAlphanumeric)),mapping}validateAlphanumeric(value){if(value.match(/[^a-zA-Z0-9]/g))throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`AttributeNameContainOnly`,`Attribute name '${value}' must contain only alphanumeric characters.`)}}exports.CfnMapping=CfnMapping;class CfnMappingEmbedder{cfnMapping;mapping;key1;key2;defaultValue;creationStack=["Token stack traces are no longer captured"];constructor(cfnMapping,mapping,key1,key2,defaultValue){this.cfnMapping=cfnMapping,this.mapping=mapping,this.key1=key1,this.key2=key2,this.defaultValue=defaultValue}resolve(context){const consumingStack=stack_1().Stack.of(context.scope);if(consumingStack===stack_1().Stack.of(this.cfnMapping))return cfn_fn_1().Fn.findInMap(this.cfnMapping.logicalId,this.key1,this.key2,this.defaultValue);const constructScope=consumingStack,constructId=`MappingCopy-${this.cfnMapping.node.id}-${this.cfnMapping.node.addr}`;let mappingCopy=constructScope.node.tryFindChild(constructId);return mappingCopy||(mappingCopy=new CfnMapping(constructScope,constructId,{mapping:this.mapping})),cfn_fn_1().Fn.findInMap(mappingCopy.logicalId,this.key1,this.key2,this.defaultValue)}toString(){return token_1().Token.asString(this)}}

105
cdk/node_modules/aws-cdk-lib/core/lib/cfn-output.d.ts generated vendored Normal file
View File

@@ -0,0 +1,105 @@
import type { Construct } from 'constructs';
import { CfnElement } from './cfn-element';
export interface CfnOutputProps {
/**
* A String type that describes the output value.
* The description can be a maximum of 4 K in length.
*
* @default - No description.
*/
readonly description?: string;
/**
* The key of the property returned by aws cloudformation describe-stacks command.
*/
readonly key?: string;
/**
* The value of the property returned by the aws cloudformation describe-stacks command.
* The value of an output can include literals, parameter references, pseudo-parameters,
* a mapping value, or intrinsic functions.
*/
readonly value: string;
/**
* The name used to export the value of this output across stacks.
*
* To import the value from another stack, use `Fn.importValue(exportName)`.
*
* @default - the output is not exported
*/
readonly exportName?: string;
/**
* A condition to associate with this output value. If the condition evaluates
* to `false`, this output value will not be included in the stack.
*
* @default - No condition is associated with the output.
*/
readonly condition?: CfnCondition;
}
export declare class CfnOutput extends CfnElement {
private _description?;
private _condition?;
private _key?;
private _value?;
private _exportName?;
/**
* Creates a CfnOutput value for this stack.
* @param scope The parent construct.
* @param props CfnOutput properties.
*/
constructor(scope: Construct, id: string, props: CfnOutputProps);
/**
* A String type that describes the output value.
* The description can be a maximum of 4 K in length.
*
* @default - No description.
*/
get description(): string | undefined;
set description(description: string | undefined);
/**
* The value of the property returned by the aws cloudformation describe-stacks command.
* The value of an output can include literals, parameter references, pseudo-parameters,
* a mapping value, or intrinsic functions.
*/
get value(): any;
set value(value: any);
/**
* A condition to associate with this output value. If the condition evaluates
* to `false`, this output value will not be included in the stack.
*
* @default - No condition is associated with the output.
*/
get condition(): CfnCondition | undefined;
set condition(condition: CfnCondition | undefined);
/**
* The name used to export the value of this output across stacks.
*
* To use the value in another stack, pass the value of
* `output.importValue` to it.
*
* @default - the output is not exported
*/
get exportName(): string | undefined;
set exportName(exportName: string | undefined);
/**
* Return the `Fn.importValue` expression to import this value into another stack
*
* The returned value should not be used in the same stack, but in a
* different one. It must be deployed to the same environment, as
* CloudFormation exports can only be imported in the same Region and
* account.
*
* The is no automatic registration of dependencies between stacks when using
* this mechanism, so you should make sure to deploy them in the right order
* yourself.
*
* You can use this mechanism to share values across Stacks in different
* Stages. If you intend to share the value to another Stack inside the same
* Stage, the automatic cross-stack referencing mechanism is more convenient.
*/
get importValue(): string;
/**
* @internal
*/
_toCloudFormation(): object;
private validateOutput;
}
import type { CfnCondition } from './cfn-condition';

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-output.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnOutput=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp};class CfnOutput extends cfn_element_1().CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnOutput",version:"2.252.0"};_description;_condition;_key;_value;_exportName;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnOutputProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnOutput),error}if(props.value===void 0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MissingValueCloudFormationOutput`,`Missing value for CloudFormation output at path "${this.node.path}"`,this);if(Array.isArray(props.value))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`CloudformationOutputGivenString`,`CloudFormation output was given a string list instead of a string at path "${this.node.path}"`,this);this._description=props.description,this._key=props.key,this._value=props.value,this._condition=props.condition,this._exportName=props.exportName,this.node.addValidation({validate:()=>this.validateOutput()})}get description(){return this._description}set description(description){this._description=description}get value(){return this._value}set value(value){this._value=value}get condition(){return this._condition}set condition(condition){this._condition=condition}get exportName(){return this._exportName}set exportName(exportName){this._exportName=exportName}get importValue(){return cfn_fn_1().Fn.importValue(lazy_1().Lazy.uncachedString({produce:ctx=>{if(stack_1().Stack.of(ctx.scope)===this.stack)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ImportvaluePropertyShouldOnly`,`'importValue' property of '${this.node.path}' should only be used in a different Stack`,this);if(!this._exportName)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ExportnameCfnoutputOrderOutput`,`Add an exportName to the CfnOutput at '${this.node.path}' in order to use 'output.importValue'`,this);return this._exportName}}))}_toCloudFormation(){return{Outputs:{[this._key??this.logicalId]:{Description:this._description,Value:this._value,Export:this._exportName!=null?{Name:this._exportName}:void 0,Condition:this._condition?this._condition.logicalId:void 0}}}}validateOutput(){const errors=[];return this._exportName!==void 0&&!token_1().Token.isUnresolved(this._exportName)&&(this._exportName.length===0&&errors.push("Export name cannot be empty"),this._exportName.length>255&&errors.push(`Export name cannot exceed 255 characters (got ${this._exportName.length} characters)`),/^[A-Za-z0-9-:]*$/.test(this._exportName)||errors.push(`Export name must only include alphanumeric characters, colons, or hyphens (got '${this._exportName}')`)),errors}}exports.CfnOutput=CfnOutput;var cfn_fn_1=()=>{var tmp=require("./cfn-fn");return cfn_fn_1=()=>tmp,tmp},lazy_1=()=>{var tmp=require("./lazy");return lazy_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp};

View File

@@ -0,0 +1,208 @@
import type { Construct } from 'constructs';
import { CfnElement } from './cfn-element';
import type { IResolvable, IResolveContext } from './resolvable';
export interface CfnParameterProps {
/**
* The data type for the parameter (DataType).
*
* @default String
*/
readonly type?: string;
/**
* A value of the appropriate type for the template to use if no value is specified
* when a stack is created. If you define constraints for the parameter, you must specify
* a value that adheres to those constraints.
*
* @default - No default value for parameter.
*/
readonly default?: any;
/**
* A regular expression that represents the patterns to allow for String types.
*
* @default - No constraints on patterns allowed for parameter.
*/
readonly allowedPattern?: string;
/**
* An array containing the list of values allowed for the parameter.
*
* @default - No constraints on values allowed for parameter.
*/
readonly allowedValues?: string[];
/**
* A string that explains a constraint when the constraint is violated.
* For example, without a constraint description, a parameter that has an allowed
* pattern of [A-Za-z0-9]+ displays the following error message when the user specifies
* an invalid value:
*
* @default - No description with customized error message when user specifies invalid values.
*/
readonly constraintDescription?: string;
/**
* A string of up to 4000 characters that describes the parameter.
*
* @default - No description for the parameter.
*/
readonly description?: string;
/**
* An integer value that determines the largest number of characters you want to allow for String types.
*
* @default - None.
*/
readonly maxLength?: number;
/**
* A numeric value that determines the largest numeric value you want to allow for Number types.
*
* @default - None.
*/
readonly maxValue?: number;
/**
* An integer value that determines the smallest number of characters you want to allow for String types.
*
* @default - None.
*/
readonly minLength?: number;
/**
* A numeric value that determines the smallest numeric value you want to allow for Number types.
*
* @default - None.
*/
readonly minValue?: number;
/**
* Whether to mask the parameter value when anyone makes a call that describes the stack.
* If you set the value to ``true``, the parameter value is masked with asterisks (``*****``).
*
* @default - Parameter values are not masked.
*/
readonly noEcho?: boolean;
}
/**
* A CloudFormation parameter.
*
* Use the optional Parameters section to customize your templates.
* Parameters enable you to input custom values to your template each time you create or
* update a stack.
*/
export declare class CfnParameter extends CfnElement {
private _type;
private _default?;
private _allowedPattern?;
private _allowedValues?;
private _constraintDescription?;
private _description?;
private _maxLength?;
private _maxValue?;
private _minLength?;
private _minValue?;
private _noEcho?;
private typeHint;
/**
* Creates a parameter construct.
* Note that the name (logical ID) of the parameter will derive from it's `coname` and location
* within the stack. Therefore, it is recommended that parameters are defined at the stack level.
*
* @param scope The parent construct.
* @param props The parameter properties.
*/
constructor(scope: Construct, id: string, props?: CfnParameterProps);
/**
* The data type for the parameter (DataType).
*
* @default String
*/
get type(): string;
set type(type: string);
/**
* A value of the appropriate type for the template to use if no value is specified
* when a stack is created. If you define constraints for the parameter, you must specify
* a value that adheres to those constraints.
*
* @default - No default value for parameter.
*/
get default(): any;
set default(value: any);
/**
* A regular expression that represents the patterns to allow for String types.
*
* @default - No constraints on patterns allowed for parameter.
*/
get allowedPattern(): string | undefined;
set allowedPattern(pattern: string | undefined);
/**
* An array containing the list of values allowed for the parameter.
*
* @default - No constraints on values allowed for parameter.
*/
get allowedValues(): string[] | undefined;
set allowedValues(values: string[] | undefined);
/**
* A string that explains a constraint when the constraint is violated.
* For example, without a constraint description, a parameter that has an allowed
* pattern of [A-Za-z0-9]+ displays the following error message when the user specifies
* an invalid value:
*
* @default - No description with customized error message when user specifies invalid values.
*/
get constraintDescription(): string | undefined;
set constraintDescription(desc: string | undefined);
/**
* A string of up to 4000 characters that describes the parameter.
*
* @default - No description for the parameter.
*/
get description(): string | undefined;
set description(desc: string | undefined);
/**
* An integer value that determines the largest number of characters you want to allow for String types.
*
* @default - None.
*/
get maxLength(): number | undefined;
set maxLength(len: number | undefined);
/**
* An integer value that determines the smallest number of characters you want to allow for String types.
*
* @default - None.
*/
get minLength(): number | undefined;
set minLength(len: number | undefined);
/**
* A numeric value that determines the largest numeric value you want to allow for Number types.
*
* @default - None.
*/
get maxValue(): number | undefined;
set maxValue(len: number | undefined);
/**
* A numeric value that determines the smallest numeric value you want to allow for Number types.
*
* @default - None.
*/
get minValue(): number | undefined;
set minValue(len: number | undefined);
/**
* Indicates if this parameter is configured with "NoEcho" enabled.
*/
get noEcho(): boolean;
set noEcho(echo: boolean);
/**
* The parameter value as a Token
*/
get value(): IResolvable;
/**
* The parameter value, if it represents a string.
*/
get valueAsString(): string;
/**
* The parameter value, if it represents a string list.
*/
get valueAsList(): string[];
/**
* The parameter value, if it represents a number.
*/
get valueAsNumber(): number;
/**
* @internal
*/
_toCloudFormation(): object;
resolve(_context: IResolveContext): any;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnParameter=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},cfn_reference_1=()=>{var tmp=require("./private/cfn-reference");return cfn_reference_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp},type_hints_1=()=>{var tmp=require("./type-hints");return type_hints_1=()=>tmp,tmp};class CfnParameter extends cfn_element_1().CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnParameter",version:"2.252.0"};_type;_default;_allowedPattern;_allowedValues;_constraintDescription;_description;_maxLength;_maxValue;_minLength;_minValue;_noEcho;typeHint;constructor(scope,id,props={}){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnParameter),error}this._type=props.type||"String",this._default=props.default,this._allowedPattern=props.allowedPattern,this._allowedValues=props.allowedValues,this._constraintDescription=props.constraintDescription,this._description=props.description,this._maxLength=props.maxLength,this._maxValue=props.maxValue,this._minLength=props.minLength,this._minValue=props.minValue,this._noEcho=props.noEcho,this.typeHint=typeToTypeHint(this._type)}get type(){return this._type}set type(type){this._type=type,this.typeHint=typeToTypeHint(this._type)}get default(){return this._default}set default(value){this._default=value}get allowedPattern(){return this._allowedPattern}set allowedPattern(pattern){this._allowedPattern=pattern}get allowedValues(){return this._allowedValues}set allowedValues(values){this._allowedValues=values}get constraintDescription(){return this._constraintDescription}set constraintDescription(desc){this._constraintDescription=desc}get description(){return this._description}set description(desc){this._description=desc}get maxLength(){return this._maxLength}set maxLength(len){this._maxLength=len}get minLength(){return this._minLength}set minLength(len){this._minLength=len}get maxValue(){return this._maxValue}set maxValue(len){this._maxValue=len}get minValue(){return this._minValue}set minValue(len){this._minValue=len}get noEcho(){return!!this._noEcho}set noEcho(echo){this._noEcho=echo}get value(){return cfn_reference_1().CfnReference.for(this,"Ref",void 0,this.typeHint)}get valueAsString(){if(!isStringType(this.type)&&!isNumberType(this.type))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ParameterType`,`Parameter type (${this.type}) is not a string or number type`,this);return token_1().Token.asString(this.value)}get valueAsList(){if(!isListType(this.type))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ParameterType`,`Parameter type (${this.type}) is not a string list type`,this);return token_1().Token.asList(this.value)}get valueAsNumber(){if(!isNumberType(this.type))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ParameterType`,`Parameter type (${this.type}) is not a number type`,this);return token_1().Token.asNumber(this.value)}_toCloudFormation(){return{Parameters:{[this.logicalId]:{Type:this.type,Default:this.default,AllowedPattern:this.allowedPattern,AllowedValues:this.allowedValues,ConstraintDescription:this.constraintDescription,Description:this.description,MaxLength:this.maxLength,MaxValue:this.maxValue,MinLength:this.minLength,MinValue:this.minValue,NoEcho:this._noEcho}}}}resolve(_context){try{jsiiDeprecationWarnings().aws_cdk_lib_IResolveContext(_context)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.resolve),error}return this.value}}exports.CfnParameter=CfnParameter;function isListType(type){return type.indexOf("List<")>=0||type.indexOf("CommaDelimitedList")>=0}function isNumberType(type){return type==="Number"}function isStringType(type){return!isListType(type)&&!isNumberType(type)}function typeToTypeHint(type){return isListType(type)?type_hints_1().ResolutionTypeHint.STRING_LIST:isNumberType(type)?type_hints_1().ResolutionTypeHint.NUMBER:type_hints_1().ResolutionTypeHint.STRING}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-parse.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from './helpers-internal';

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-parse.js generated vendored Normal file

File diff suppressed because one or more lines are too long

37
cdk/node_modules/aws-cdk-lib/core/lib/cfn-pseudo.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import type { Construct } from 'constructs';
/**
* Accessor for pseudo parameters
*
* Since pseudo parameters need to be anchored to a stack somewhere in the
* construct tree, this class takes an scope parameter; the pseudo parameter
* values can be obtained as properties from an scoped object.
*/
export declare class Aws {
static readonly ACCOUNT_ID: string;
static readonly URL_SUFFIX: string;
static readonly NOTIFICATION_ARNS: string[];
static readonly PARTITION: string;
static readonly REGION: string;
static readonly STACK_ID: string;
static readonly STACK_NAME: string;
static readonly NO_VALUE: string;
private constructor();
}
/**
* Accessor for scoped pseudo parameters
*
* These pseudo parameters are anchored to a stack somewhere in the construct
* tree, and their values will be exported automatically.
*/
export declare class ScopedAws {
private readonly scope;
constructor(scope: Construct);
get accountId(): string;
get urlSuffix(): string;
get notificationArns(): string[];
get partition(): string;
get region(): string;
get stackId(): string;
get stackName(): string;
private asString;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-pseudo.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScopedAws=exports.Aws=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_reference_1=()=>{var tmp=require("./private/cfn-reference");return cfn_reference_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp};const AWS_ACCOUNTID="AWS::AccountId",AWS_URLSUFFIX="AWS::URLSuffix",AWS_NOTIFICATIONARNS="AWS::NotificationARNs",AWS_PARTITION="AWS::Partition",AWS_REGION="AWS::Region",AWS_STACKID="AWS::StackId",AWS_STACKNAME="AWS::StackName",AWS_NOVALUE="AWS::NoValue";class Aws{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.Aws",version:"2.252.0"};static ACCOUNT_ID=pseudoString(AWS_ACCOUNTID);static URL_SUFFIX=pseudoString(AWS_URLSUFFIX);static NOTIFICATION_ARNS=token_1().Token.asList({Ref:AWS_NOTIFICATIONARNS},{displayHint:AWS_NOTIFICATIONARNS});static PARTITION=pseudoString(AWS_PARTITION);static REGION=pseudoString(AWS_REGION);static STACK_ID=pseudoString(AWS_STACKID);static STACK_NAME=pseudoString(AWS_STACKNAME);static NO_VALUE=pseudoString(AWS_NOVALUE);constructor(){}}exports.Aws=Aws;class ScopedAws{scope;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.ScopedAws",version:"2.252.0"};constructor(scope){this.scope=scope}get accountId(){return this.asString(AWS_ACCOUNTID)}get urlSuffix(){return this.asString(AWS_URLSUFFIX)}get notificationArns(){return token_1().Token.asList(cfn_reference_1().CfnReference.forPseudo(AWS_NOTIFICATIONARNS,this.scope),{displayHint:AWS_NOTIFICATIONARNS})}get partition(){return this.asString(AWS_PARTITION)}get region(){return this.asString(AWS_REGION)}get stackId(){return this.asString(AWS_STACKID)}get stackName(){return this.asString(AWS_STACKNAME)}asString(name){return token_1().Token.asString(cfn_reference_1().CfnReference.forPseudo(name,this.scope),{displayHint:name})}}exports.ScopedAws=ScopedAws;function pseudoString(name){return token_1().Token.asString({Ref:name},{displayHint:name.replace("::",".")})}

View File

@@ -0,0 +1,258 @@
/**
* Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until
* AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded. To signal a
* resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals
* to the stack events so that you track the number of signals sent.
*
* The creation policy is invoked only when AWS CloudFormation creates the associated resource. Currently, the only
* AWS CloudFormation resources that support creation policies are AWS::AutoScaling::AutoScalingGroup, AWS::EC2::Instance,
* AWS::CloudFormation::WaitCondition and AWS::AppStream::Fleet.
*
* Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds.
* For example, if you install and configure software applications on an EC2 instance, you might want those applications to
* be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success
* signal to the instance after the applications are installed and configured. For a detailed example, see Deploying Applications
* on Amazon EC2 with AWS CloudFormation.
*/
export interface CfnCreationPolicy {
/**
* For an Auto Scaling group replacement update, specifies how many instances must signal success for the
* update to succeed.
*/
readonly autoScalingCreationPolicy?: CfnResourceAutoScalingCreationPolicy;
/**
* When AWS CloudFormation creates the associated resource, configures the number of required success signals and
* the length of time that AWS CloudFormation waits for those signals.
*/
readonly resourceSignal?: CfnResourceSignal;
/**
* For an AppStream Fleet creation, specifies that the fleet is started after creation.
*/
readonly startFleet?: boolean;
}
/**
* For an Auto Scaling group replacement update, specifies how many instances must signal success for the
* update to succeed.
*/
export interface CfnResourceAutoScalingCreationPolicy {
/**
* Specifies the percentage of instances in an Auto Scaling replacement update that must signal success for the
* update to succeed. You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent.
* For example, if you update five instances with a minimum successful percentage of 50, three instances must signal success.
* If an instance doesn't send a signal within the time specified by the Timeout property, AWS CloudFormation assumes that the
* instance wasn't created.
*/
readonly minSuccessfulInstancesPercent?: number;
}
/**
* When AWS CloudFormation creates the associated resource, configures the number of required success signals and
* the length of time that AWS CloudFormation waits for those signals.
*/
export interface CfnResourceSignal {
/**
* The number of success signals AWS CloudFormation must receive before it sets the resource status as CREATE_COMPLETE.
* If the resource receives a failure signal or doesn't receive the specified number of signals before the timeout period
* expires, the resource creation fails and AWS CloudFormation rolls the stack back.
*/
readonly count?: number;
/**
* The length of time that AWS CloudFormation waits for the number of signals that was specified in the Count property.
* The timeout period starts after AWS CloudFormation starts creating the resource, and the timeout expires no sooner
* than the time you specify but can occur shortly thereafter. The maximum time that you can specify is 12 hours.
*/
readonly timeout?: string;
}
/**
* With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.
* You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy
* attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations
* that lead to resources being removed.
*/
export declare enum CfnDeletionPolicy {
/**
* AWS CloudFormation deletes the resource and all its content if applicable during stack deletion. You can add this
* deletion policy to any resource type. By default, if you don't specify a DeletionPolicy, AWS CloudFormation deletes
* your resources. However, be aware of the following considerations:
*/
DELETE = "Delete",
/**
* AWS CloudFormation keeps the resource without deleting the resource or its contents when its stack is deleted.
* You can add this deletion policy to any resource type. Note that when AWS CloudFormation completes the stack deletion,
* the stack will be in Delete_Complete state; however, resources that are retained continue to exist and continue to incur
* applicable charges until you delete those resources.
*/
RETAIN = "Retain",
/**
* RetainExceptOnCreate behaves like Retain for stack operations, except for the stack operation that initially created the resource.
* If the stack operation that created the resource is rolled back, CloudFormation deletes the resource. For all other stack operations,
* such as stack deletion, CloudFormation retains the resource and its contents. The result is that new, empty, and unused resources are deleted,
* while in-use resources and their data are retained.
*/
RETAIN_EXCEPT_ON_CREATE = "RetainExceptOnCreate",
/**
* For resources that support snapshots (AWS::EC2::Volume, AWS::ElastiCache::CacheCluster, AWS::ElastiCache::ReplicationGroup,
* AWS::RDS::DBInstance, AWS::RDS::DBCluster, and AWS::Redshift::Cluster), AWS CloudFormation creates a snapshot for the
* resource before deleting it. Note that when AWS CloudFormation completes the stack deletion, the stack will be in the
* Delete_Complete state; however, the snapshots that are created with this policy continue to exist and continue to
* incur applicable charges until you delete those snapshots.
*/
SNAPSHOT = "Snapshot"
}
/**
* Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup
* resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a
* scheduled action is associated with the Auto Scaling group.
*/
export interface CfnUpdatePolicy {
/**
* Specifies whether an Auto Scaling group and the instances it contains are replaced during an update. During replacement,
* AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation
* can roll back to the old Auto Scaling group and delete the new Auto Scaling group.
*/
readonly autoScalingReplacingUpdate?: CfnAutoScalingReplacingUpdate;
/**
* To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate
* policy. Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling
* group in batches or all at once.
*/
readonly autoScalingRollingUpdate?: CfnAutoScalingRollingUpdate;
/**
* To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when
* the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction
* policy.
*/
readonly autoScalingScheduledAction?: CfnAutoScalingScheduledAction;
/**
* To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource,
* use the CodeDeployLambdaAliasUpdate update policy.
*/
readonly codeDeployLambdaAliasUpdate?: CfnCodeDeployLambdaAliasUpdate;
/**
* To modify a replication group's shards by adding or removing shards, rather than replacing the entire
* AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
*/
readonly useOnlineResharding?: boolean;
/**
* To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire
* AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.
*/
readonly enableVersionUpgrade?: boolean;
}
/**
* To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate
* policy. Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling
* group in batches or all at once.
*/
export interface CfnAutoScalingRollingUpdate {
/**
* Specifies the maximum number of instances that AWS CloudFormation updates.
*/
readonly maxBatchSize?: number;
/**
* Specifies the minimum number of instances that must be in service within the Auto Scaling group while AWS
* CloudFormation updates old instances.
*/
readonly minInstancesInService?: number;
/**
* Specifies the percentage of instances in an Auto Scaling rolling update that must signal success for an update to succeed.
* You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent. For example, if you
* update five instances with a minimum successful percentage of 50, three instances must signal success.
*
* If an instance doesn't send a signal within the time specified in the PauseTime property, AWS CloudFormation assumes
* that the instance wasn't updated.
*
* If you specify this property, you must also enable the WaitOnResourceSignals and PauseTime properties.
*/
readonly minSuccessfulInstancesPercent?: number;
/**
* Specifies the percentage of instances in an Auto Scaling group that must remain in service while AWS CloudFormation
* updates old instances. You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent.
* For example, if you update five instances with a minimum active percentage of 50, three instances must remain in service.
*/
readonly minActiveInstancesPercent?: number;
/**
* The amount of time that AWS CloudFormation pauses after making a change to a batch of instances to give those instances
* time to start software applications. For example, you might need to specify PauseTime when scaling up the number of
* instances in an Auto Scaling group.
*
* If you enable the WaitOnResourceSignals property, PauseTime is the amount of time that AWS CloudFormation should wait
* for the Auto Scaling group to receive the required number of valid signals from added or replaced instances. If the
* PauseTime is exceeded before the Auto Scaling group receives the required number of signals, the update fails. For best
* results, specify a time period that gives your applications sufficient time to get started. If the update needs to be
* rolled back, a short PauseTime can cause the rollback to fail.
*
* Specify PauseTime in the ISO8601 duration format (in the format PT#H#M#S, where each # is the number of hours, minutes,
* and seconds, respectively). The maximum PauseTime is one hour (PT1H).
*/
readonly pauseTime?: string;
/**
* Specifies the Auto Scaling processes to suspend during a stack update. Suspending processes prevents Auto Scaling from
* interfering with a stack update. For example, you can suspend alarming so that Auto Scaling doesn't execute scaling
* policies associated with an alarm. For valid values, see the ScalingProcesses.member.N parameter for the SuspendProcesses
* action in the Auto Scaling API Reference.
*/
readonly suspendProcesses?: string[];
/**
* Specifies whether the Auto Scaling group waits on signals from new instances during an update. Use this property to
* ensure that instances have completed installing and configuring applications before the Auto Scaling group update proceeds.
* AWS CloudFormation suspends the update of an Auto Scaling group after new EC2 instances are launched into the group.
* AWS CloudFormation must receive a signal from each new instance within the specified PauseTime before continuing the update.
* To signal the Auto Scaling group, use the cfn-signal helper script or SignalResource API.
*
* To have instances wait for an Elastic Load Balancing health check before they signal success, add a health-check
* verification by using the cfn-init helper script. For an example, see the verify_instance_health command in the Auto Scaling
* rolling updates sample template.
*/
readonly waitOnResourceSignals?: boolean;
}
/**
* Specifies whether an Auto Scaling group and the instances it contains are replaced during an update. During replacement,
* AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation
* can roll back to the old Auto Scaling group and delete the new Auto Scaling group.
*
* While AWS CloudFormation creates the new group, it doesn't detach or attach any instances. After successfully creating
* the new Auto Scaling group, AWS CloudFormation deletes the old Auto Scaling group during the cleanup process.
*
* When you set the WillReplace parameter, remember to specify a matching CreationPolicy. If the minimum number of
* instances (specified by the MinSuccessfulInstancesPercent property) don't signal success within the Timeout period
* (specified in the CreationPolicy policy), the replacement update fails and AWS CloudFormation rolls back to the old
* Auto Scaling group.
*/
export interface CfnAutoScalingReplacingUpdate {
readonly willReplace?: boolean;
}
/**
* With scheduled actions, the group size properties of an Auto Scaling group can change at any time. When you update a
* stack with an Auto Scaling group and scheduled action, AWS CloudFormation always sets the group size property values of
* your Auto Scaling group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup resource of your template,
* even if a scheduled action is in effect.
*
* If you do not want AWS CloudFormation to change any of the group size property values when you have a scheduled action in
* effect, use the AutoScalingScheduledAction update policy to prevent AWS CloudFormation from changing the MinSize, MaxSize,
* or DesiredCapacity properties unless you have modified these values in your template.\
*/
export interface CfnAutoScalingScheduledAction {
readonly ignoreUnmodifiedGroupSizeProperties?: boolean;
}
/**
* To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource,
* use the CodeDeployLambdaAliasUpdate update policy.
*/
export interface CfnCodeDeployLambdaAliasUpdate {
/**
* The name of the AWS CodeDeploy application.
*/
readonly applicationName: string;
/**
* The name of the AWS CodeDeploy deployment group. This is where the traffic-shifting policy is set.
*/
readonly deploymentGroupName: string;
/**
* The name of the Lambda function to run before traffic routing starts.
*/
readonly beforeAllowTrafficHook?: string;
/**
* The name of the Lambda function to run after traffic routing completes.
*/
readonly afterAllowTrafficHook?: string;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnDeletionPolicy=void 0;var CfnDeletionPolicy;(function(CfnDeletionPolicy2){CfnDeletionPolicy2.DELETE="Delete",CfnDeletionPolicy2.RETAIN="Retain",CfnDeletionPolicy2.RETAIN_EXCEPT_ON_CREATE="RetainExceptOnCreate",CfnDeletionPolicy2.SNAPSHOT="Snapshot"})(CfnDeletionPolicy||(exports.CfnDeletionPolicy=CfnDeletionPolicy={}));

342
cdk/node_modules/aws-cdk-lib/core/lib/cfn-resource.d.ts generated vendored Normal file
View File

@@ -0,0 +1,342 @@
import type { CfnCondition } from './cfn-condition';
import { CfnRefElement } from './cfn-element';
import type { CfnCreationPolicy, CfnUpdatePolicy } from './cfn-resource-policy';
import { CfnDeletionPolicy } from './cfn-resource-policy';
import type { Construct } from 'constructs';
import type { Reference } from './reference';
import type { RemovalPolicyOptions } from './removal-policy';
import { RemovalPolicy } from './removal-policy';
import type { ResolutionTypeHint } from './type-hints';
import type { ResourceEnvironment } from './environment';
export interface CfnResourceProps {
/**
* CloudFormation resource type (e.g. `AWS::S3::Bucket`).
*/
readonly type: string;
/**
* Resource properties.
*
* @default - No resource properties.
*/
readonly properties?: {
[name: string]: any;
};
}
/**
* Represents a CloudFormation resource.
*/
export declare class CfnResource extends CfnRefElement {
/**
* Check whether the given object is a CfnResource
*/
static isCfnResource(this: void, x: any): x is CfnResource;
/**
* Options for this resource, such as condition, update policy etc.
*/
readonly cfnOptions: ICfnResourceOptions;
/**
* AWS resource type.
*/
readonly cfnResourceType: string;
/**
* AWS CloudFormation resource properties.
*
* This object is returned via cfnProperties
* @internal
*/
protected readonly _cfnProperties: any;
/**
* An object to be merged on top of the entire resource definition.
*/
private readonly rawOverrides;
/**
* Logical IDs of dependencies.
*
* Is filled during prepare().
*/
private dependsOn;
protected readonly cfnPropertyNames: Record<string, string>;
/**
* Creates a resource construct.
* @param cfnResourceType The CloudFormation type of this resource (e.g. AWS::DynamoDB::Table)
*/
constructor(scope: Construct, id: string, props: CfnResourceProps);
get env(): ResourceEnvironment;
/**
* Sets the deletion policy of the resource based on the removal policy specified.
*
* The Removal Policy controls what happens to this resource when it stops
* being managed by CloudFormation, either because you've removed it from the
* CDK application or because you've made a change that requires the resource
* to be replaced.
*
* The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
* account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
* cases, a snapshot can be taken of the resource prior to deletion
* (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
* can be found in the following link:
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
*/
applyRemovalPolicy(policy: RemovalPolicy | undefined, options?: RemovalPolicyOptions): void;
/**
* Returns a token for an runtime attribute of this resource.
* Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
* in case there is no generated attribute.
* @param attributeName The name of the attribute.
*/
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference;
/**
* Adds an override to the synthesized CloudFormation resource. To add a
* property override, either use `addPropertyOverride` or prefix `path` with
* "Properties." (i.e. `Properties.TopicName`).
*
* If the override is nested, separate each nested level using a dot (.) in the path parameter.
* If there is an array as part of the nesting, specify the index in the path.
*
* To include a literal `.` in the property name, prefix with a `\`. In most
* programming languages you will need to write this as `"\\."` because the
* `\` itself will need to be escaped.
*
* For example,
* ```typescript
* cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
* cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
* ```
* would add the overrides
* ```json
* "Properties": {
* "GlobalSecondaryIndexes": [
* {
* "Projection": {
* "NonKeyAttributes": [ "myattribute" ]
* ...
* }
* ...
* },
* {
* "ProjectionType": "INCLUDE"
* ...
* },
* ]
* ...
* }
* ```
*
* The `value` argument to `addOverride` will not be processed or translated
* in any way. Pass raw JSON values in here with the correct capitalization
* for CloudFormation. If you pass CDK classes or structs, they will be
* rendered with lowercased key names, and CloudFormation will reject the
* template.
*
* @param path - The path of the property, you can use dot notation to
* override values in complex types. Any intermediate keys
* will be created as needed.
* @param value - The value. Could be primitive or complex.
*/
addOverride(path: string, value: any): void;
/**
* Syntactic sugar for `addOverride(path, undefined)`.
* @param path The path of the value to delete
*/
addDeletionOverride(path: string): void;
/**
* Adds an override to a resource property.
*
* Syntactic sugar for `addOverride("Properties.<...>", value)`.
*
* @param propertyPath The path of the property
* @param value The value
*/
addPropertyOverride(propertyPath: string, value: any): void;
/**
* Adds an override that deletes the value of a property from the resource definition.
* @param propertyPath The path to the property.
*/
addPropertyDeletionOverride(propertyPath: string): void;
cfnPropertyName(cdkPropertyName: string): string | undefined;
/**
* Indicates that this resource depends on another resource and cannot be
* provisioned unless the other resource has been successfully provisioned.
*
* @deprecated use addDependency
*/
addDependsOn(target: CfnResource): void;
/**
* Indicates that this resource depends on another resource and cannot be
* provisioned unless the other resource has been successfully provisioned.
*
* This can be used for resources across stacks (or nested stack) boundaries
* and the dependency will automatically be transferred to the relevant scope.
*/
addDependency(target: CfnResource): void;
/**
* Indicates that this resource no longer depends on another resource.
*
* This can be used for resources across stacks (including nested stacks)
* and the dependency will automatically be removed from the relevant scope.
*/
removeDependency(target: CfnResource): void;
/**
* Retrieves an array of resources this resource depends on.
*
* This assembles dependencies on resources across stacks (including nested stacks)
* automatically.
*/
obtainDependencies(): import("./deps").Element[];
/**
* Replaces one dependency with another.
* @param target The dependency to replace
* @param newTarget The new dependency to add
*/
replaceDependency(target: CfnResource, newTarget: CfnResource): void;
/**
* Add a value to the CloudFormation Resource Metadata
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
*
* Note that this is a different set of metadata from CDK node metadata; this
* metadata ends up in the stack template under the resource, whereas CDK
* node metadata ends up in the Cloud Assembly.
*/
addMetadata(key: string, value: any): void;
/**
* Retrieve a value value from the CloudFormation Resource Metadata
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
*
* Note that this is a different set of metadata from CDK node metadata; this
* metadata ends up in the stack template under the resource, whereas CDK
* node metadata ends up in the Cloud Assembly.
*/
getMetadata(key: string): any;
/**
* @returns a string representation of this resource
*/
toString(): string;
/**
* Called by the `addDependency` helper function in order to realize a direct
* dependency between two resources that are directly defined in the same
* stacks.
*
* Use `resource.addDependency` to define the dependency between two resources,
* which also takes stack boundaries into account.
*
* @internal
*/
_addResourceDependency(target: CfnResource): void;
/**
* Get a shallow copy of dependencies between this resource and other resources
* in the same stack.
*/
obtainResourceDependencies(): CfnResource[];
/**
* Remove a dependency between this resource and other resources in the same
* stack.
*
* @internal
*/
_removeResourceDependency(target: CfnResource): void;
/**
* Emits CloudFormation for this resource.
* @internal
*/
_toCloudFormation(): object;
protected get cfnProperties(): {
[key: string]: any;
};
protected renderProperties(props: {
[key: string]: any;
}): {
[key: string]: any;
};
/**
* Deprecated
* @deprecated use `updatedProperties`
*
* Return properties modified after initiation
*
* Resources that expose mutable properties should override this function to
* collect and return the properties object for this resource.
*/
protected get updatedProperites(): {
[key: string]: any;
};
/**
* Return properties modified after initiation
*
* Resources that expose mutable properties should override this function to
* collect and return the properties object for this resource.
*/
protected get updatedProperties(): {
[key: string]: any;
};
protected validateProperties(_properties: any): void;
/**
* Can be overridden by subclasses to determine if this resource will be rendered
* into the cloudformation template.
*
* @returns `true` if the resource should be included or `false` is the resource
* should be omitted.
*/
protected shouldSynthesize(): boolean;
}
export declare enum TagType {
STANDARD = "StandardTag",
AUTOSCALING_GROUP = "AutoScalingGroupTag",
MAP = "StringToStringMap",
KEY_VALUE = "KeyValue",
NOT_TAGGABLE = "NotTaggable"
}
export interface ICfnResourceOptions {
/**
* A condition to associate with this resource. This means that only if the condition evaluates to 'true' when the stack
* is deployed, the resource will be included. This is provided to allow CDK projects to produce legacy templates, but normally
* there is no need to use it in CDK projects.
*/
condition?: CfnCondition;
/**
* Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until
* AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded. To signal a
* resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals
* to the stack events so that you track the number of signals sent.
*/
creationPolicy?: CfnCreationPolicy;
/**
* With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.
* You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy
* attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations
* that lead to resources being removed.
*/
deletionPolicy?: CfnDeletionPolicy;
/**
* Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup
* resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a
* scheduled action is associated with the Auto Scaling group.
*/
updatePolicy?: CfnUpdatePolicy;
/**
* Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource
* when it is replaced during a stack update operation.
*/
updateReplacePolicy?: CfnDeletionPolicy;
/**
* The version of this resource.
* Used only for custom CloudFormation resources.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html
*/
version?: string;
/**
* The description of this resource.
* Used for informational purposes only, is not processed in any way
* (and stays with the CloudFormation template, is not passed to the underlying resource,
* even if it does have a 'description' property).
*/
description?: string;
/**
* Metadata associated with the CloudFormation resource. This is not the same as the construct metadata which can be added
* using construct.addMetadata(), but would not appear in the CloudFormation template automatically.
*/
metadata?: {
[key: string]: any;
};
}

File diff suppressed because one or more lines are too long

87
cdk/node_modules/aws-cdk-lib/core/lib/cfn-rule.d.ts generated vendored Normal file
View File

@@ -0,0 +1,87 @@
import type { Construct } from 'constructs';
import type { ICfnConditionExpression } from './cfn-condition';
import { CfnRefElement } from './cfn-element';
/**
* A rule can include a RuleCondition property and must include an Assertions property.
* For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property.
* You define a rule condition and assertions by using rule-specific intrinsic functions.
*
* You can use the following rule-specific intrinsic functions to define rule conditions and assertions:
*
* Fn::And
* Fn::Contains
* Fn::EachMemberEquals
* Fn::EachMemberIn
* Fn::Equals
* Fn::If
* Fn::Not
* Fn::Or
* Fn::RefAll
* Fn::ValueOf
* Fn::ValueOfAll
*
* https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html
*/
export interface CfnRuleProps {
/**
* If the rule condition evaluates to false, the rule doesn't take effect.
* If the function in the rule condition evaluates to true, expressions in each assert are evaluated and applied.
*
* @default - Rule's assertions will always take effect.
*/
readonly ruleCondition?: ICfnConditionExpression;
/**
* Assertions which define the rule.
*
* @default - No assertions for the rule.
*/
readonly assertions?: CfnRuleAssertion[];
}
/**
* The Rules that define template constraints in an AWS Service Catalog portfolio describe when
* end users can use the template and which values they can specify for parameters that are declared
* in the AWS CloudFormation template used to create the product they are attempting to use. Rules
* are useful for preventing end users from inadvertently specifying an incorrect value.
* For example, you can add a rule to verify whether end users specified a valid subnet in a
* given VPC or used m1.small instance types for test environments. AWS CloudFormation uses
* rules to validate parameter values before it creates the resources for the product.
*
* A rule can include a RuleCondition property and must include an Assertions property.
* For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property.
* You define a rule condition and assertions by using rule-specific intrinsic functions.
*
* @link https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html
*/
export declare class CfnRule extends CfnRefElement {
private ruleCondition?;
private assertions?;
/**
* Creates and adds a rule.
* @param scope The parent construct.
* @param props The rule props.
*/
constructor(scope: Construct, id: string, props?: CfnRuleProps);
/**
* Adds an assertion to the rule.
* @param condition The expression to evaluation.
* @param description The description of the assertion.
*/
addAssertion(condition: ICfnConditionExpression, description: string): void;
/**
* @internal
*/
_toCloudFormation(): object;
}
/**
* A rule assertion.
*/
export interface CfnRuleAssertion {
/**
* The assertion.
*/
readonly assert: ICfnConditionExpression;
/**
* The assertion description.
*/
readonly assertDescription: string;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-rule.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRule=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cfn_element_1=()=>{var tmp=require("./cfn-element");return cfn_element_1=()=>tmp,tmp},util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class CfnRule extends cfn_element_1().CfnRefElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnRule",version:"2.252.0"};ruleCondition;assertions;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_CfnRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRule),error}this.ruleCondition=props&&props.ruleCondition,this.assertions=props&&props.assertions}addAssertion(condition,description){try{jsiiDeprecationWarnings().aws_cdk_lib_ICfnConditionExpression(condition)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addAssertion),error}this.assertions||(this.assertions=[]),this.assertions.push({assert:condition,assertDescription:description})}_toCloudFormation(){return{Rules:{[this.logicalId]:{RuleCondition:this.ruleCondition,Assertions:(0,util_1().capitalizePropertyNames)(this,this.assertions)}}}}}exports.CfnRule=CfnRule;

13
cdk/node_modules/aws-cdk-lib/core/lib/cfn-tag.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
*/
export interface CfnTag {
/**
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-key
*/
readonly key: string;
/**
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-value
*/
readonly value: string;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/cfn-tag.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

10
cdk/node_modules/aws-cdk-lib/core/lib/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* Resource symbol for re-usability.
*/
export declare const RESOURCE_SYMBOL: unique symbol;
/**
* Symbol for accessing jsii runtime information
*
* Introduced in jsii 1.19.0, cdk 1.90.0.
*/
export declare const JSII_RUNTIME_SYMBOL: unique symbol;

1
cdk/node_modules/aws-cdk-lib/core/lib/constants.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSII_RUNTIME_SYMBOL=exports.RESOURCE_SYMBOL=void 0,exports.RESOURCE_SYMBOL=Symbol.for("@aws-cdk/core.Resource"),exports.JSII_RUNTIME_SYMBOL=Symbol.for("jsii.rtti");

View File

@@ -0,0 +1,127 @@
import type { Construct } from 'constructs';
/**
*/
export interface GetContextKeyOptions {
/**
* The context provider to query.
*/
readonly provider: string;
/**
* Provider-specific properties.
*/
readonly props?: {
[key: string]: any;
};
/**
* Whether to include the stack's account and region automatically.
*
* @default true
*/
readonly includeEnvironment?: boolean;
/**
* Adds an additional discriminator to the `cdk.context.json` cache key.
*
* @default - no additional cache key
*/
readonly additionalCacheKey?: string;
}
/**
*/
export interface GetContextValueOptions extends GetContextKeyOptions {
/**
* The value to return if the lookup has not yet been performed.
*
* Upon first synthesis, the lookups has not yet been performed. The
* `getValue()` operation returns this value instead, so that synthesis can
* proceed. After synthesis completes the first time, the actual lookup will
* be performed and synthesis will run again with the *real* value.
*
* Dummy values should preferably have valid shapes so that downstream
* consumers of lookup values don't throw validation exceptions if they
* encounter a dummy value (or all possible downstream consumers need to
* effectively check for the well-known shape of the dummy value); throwing an
* exception would error out the synthesis operation and prevent the lookup
* and the second, real, synthesis from happening.
*
* ## Connection to mustExist
*
* `dummyValue` is also used as the official value to return if the lookup has
* failed and `mustExist == false`.
*/
readonly dummyValue: any;
/**
* Whether the resource must exist
*
* If this is set (the default), the query fails if the value or resource we
* tried to look up doesn't exist.
*
* If this is `false` and the value we tried to look up could not be found, the
* failure is suppressed and `dummyValue` is officially returned instead.
*
* When this happens, `dummyValue` is encoded into cached context and it will
* never be refreshed anymore until the user runs `cdk context --reset <key>`.
*
* Note that it is not possible for the CDK app code to make a distinction
* between "the lookup has not been performed yet" and "the lookup didn't
* find anything and we returned a default value instead".
*
* ## Context providers
*
* This feature must explicitly be supported by context providers. It is
* currently supported by:
*
* - KMS key provider
* - SSM parameter provider
*
* ## Note to implementors
*
* The dummy value should not be returned for all SDK lookup failures. For
* example, "no network" or "no credentials" or "malformed query" should
* not lead to the dummy value being returned. Only the case of "no such
* resource" should.
*
* @default true
*/
readonly mustExist?: boolean;
/**
* Ignore a lookup failure and return the `dummyValue` instead
*
* `mustExist` is the recommended alias for this deprecated
* property (note that its value is reversed).
*
* @default false
* @deprecated Use mustExist instead
*/
readonly ignoreErrorOnMissingContext?: boolean;
}
/**
*/
export interface GetContextKeyResult {
readonly key: string;
readonly props: {
[key: string]: any;
};
}
/**
*/
export interface GetContextValueResult {
readonly value?: any;
}
/**
* Base class for the model side of context providers
*
* Instances of this class communicate with context provider plugins in the 'cdk
* toolkit' via context variables (input), outputting specialized queries for
* more context variables (output).
*
* ContextProvider needs access to a Construct to hook into the context mechanism.
*
*/
export declare class ContextProvider {
/**
* @returns the context key or undefined if a key cannot be rendered (due to tokens used in any of the props)
*/
static getKey(scope: Construct, options: GetContextKeyOptions): GetContextKeyResult;
static getValue(scope: Construct, options: GetContextValueOptions): GetContextValueResult;
private constructor();
}

View File

@@ -0,0 +1,2 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContextProvider=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},annotations_1=()=>{var tmp=require("./annotations");return annotations_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp};class ContextProvider{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.ContextProvider",version:"2.252.0"};static getKey(scope,options){try{jsiiDeprecationWarnings().aws_cdk_lib_GetContextKeyOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.getKey),error}const stack=stack_1().Stack.of(scope),props={...options.includeEnvironment??!0?{account:stack.account,region:stack.region}:{},...options.additionalCacheKey?{additionalCacheKey:options.additionalCacheKey}:{},...options.props};if(Object.values(props).find(x=>token_1().Token.isUnresolved(x)))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ContextProviderPropsContainTokens`,`Cannot determine scope for context provider ${options.provider}.
This usually happens when one or more of the provider props have unresolved tokens`,scope);const propStrings=propsToArray(props);return{key:`${options.provider}:${propStrings.join(":")}`,props}}static getValue(scope,options){try{jsiiDeprecationWarnings().aws_cdk_lib_GetContextValueOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.getValue),error}if(options.mustExist!==void 0&&options.ignoreErrorOnMissingContext!==void 0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ConflictingMustExistOptions`,"Only supply one of 'mustExist' and 'ignoreErrorOnMissingContext'",scope);const stack=stack_1().Stack.of(scope);if(token_1().Token.isUnresolved(stack.account)||token_1().Token.isUnresolved(stack.region))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`StackAccountRegionNotSpecified`,`Cannot retrieve value from context provider ${options.provider} since account/region are not specified at the stack level. Configure "env" with an account and region when you define your stack.See https://docs.aws.amazon.com/cdk/latest/guide/environments.html for more details.`,scope);const{key,props}=this.getKey(scope,options),value=constructs_1().Node.of(scope).tryGetContext(key),providerError=extractProviderError(value);if(value===void 0||providerError!==void 0){const ignoreErrorOnMissingContext=options.mustExist!==void 0||options.ignoreErrorOnMissingContext!==void 0?options.mustExist!==void 0?!options.mustExist:options.ignoreErrorOnMissingContext:void 0,extendedProps={dummyValue:options.dummyValue,ignoreErrorOnMissingContext,...options.additionalCacheKey?{additionalCacheKey:options.additionalCacheKey}:{},...props};return stack.reportMissingContextKey({key,provider:options.provider,props:extendedProps}),providerError!==void 0&&annotations_1().Annotations.of(scope)._addTrackableError((0,literal_string_1().lit)`ContextProviderError`,providerError),{value:options.dummyValue}}return{value}}constructor(){}}exports.ContextProvider=ContextProvider;function extractProviderError(value){if(typeof value=="object"&&value!==null)return value[cxapi().PROVIDER_ERROR_KEY]}function colonQuote(xs){return xs.replace(/\$/g,"$$").replace(/:/g,"$:")}function propsToArray(props,keyPrefix=""){const ret=[];for(const key of Object.keys(props))if(props[key]!==void 0)switch(typeof props[key]){case"object":{ret.push(...propsToArray(props[key],`${keyPrefix}${key}.`));break}case"string":{ret.push(`${keyPrefix}${key}=${colonQuote(props[key])}`);break}default:{ret.push(`${keyPrefix}${key}=${JSON.stringify(props[key])}`);break}}return ret.sort(),ret}

View File

@@ -0,0 +1,34 @@
import { Construct } from 'constructs';
import { CfnResource } from '../../cfn-resource';
import type { Intrinsic } from '../../private/intrinsic';
/**
* Properties for an ExportReader
*/
export interface ExportReaderProps {
}
/**
* Creates a custom resource that will return a list of stack imports from a given
* The export can then be referenced by the export name.
*
* @internal - this is intentionally not exported from core
*/
export declare class ExportReader extends Construct {
static getOrCreate(scope: Construct, uniqueId: string, _props?: ExportReaderProps): ExportReader;
private readonly importParameters;
private readonly customResource;
constructor(scope: Construct, id: string, _props?: ExportReaderProps);
/**
* This is the only way to add a dependency on a custom resource currently
*/
addDependency(resource: CfnResource): void;
/**
* Register a reference with the writer and returns a CloudFormation Stack export by name
*
* The value will be "exported" via the ExportWriter. It will perform
* the export by creating an SSM parameter in the region that the consuming
* stack is created.
*
* @param exports map of unique name associated with the export to SSM Dynamic reference
*/
importValue(name: string, value: Intrinsic): Intrinsic;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportReader=void 0;const constructs_1=require("constructs"),types_1=require("./types"),cfn_resource_1=require("../../cfn-resource"),custom_resource_1=require("../../custom-resource"),cross_region_ssm_reader_provider_generated_1=require("../../dist/core/cross-region-ssm-reader-provider.generated"),lazy_1=require("../../lazy"),stack_1=require("../../stack");class ExportReader extends constructs_1.Construct{static getOrCreate(scope,uniqueId,_props={}){const stack=stack_1.Stack.of(scope),existing=stack.node.tryFindChild(uniqueId);return existing||new ExportReader(stack,uniqueId)}importParameters={};customResource;constructor(scope,id,_props={}){super(scope,id);const stack=stack_1.Stack.of(this),resourceType="Custom::CrossRegionExportReader",serviceToken=cross_region_ssm_reader_provider_generated_1.CrossRegionSsmReaderProvider.getOrCreate(this,resourceType,{policyStatements:[{Effect:"Allow",Resource:stack.formatArn({service:"ssm",resource:"parameter",resourceName:`${types_1.SSM_EXPORT_PATH_PREFIX}${stack.stackName}/*`}),Action:["ssm:AddTagsToResource","ssm:RemoveTagsFromResource","ssm:GetParameters"]}]}),properties={region:stack.region,prefix:stack.stackName,imports:lazy_1.Lazy.any({produce:()=>this.importParameters})};this.customResource=new custom_resource_1.CustomResource(this,"Resource",{resourceType,serviceToken,properties:{ReaderProps:properties}})}addDependency(resource){const customResource=this.customResource.node.tryFindChild("Default");customResource&&cfn_resource_1.CfnResource.isCfnResource(customResource)&&customResource.addDependsOn(resource)}importValue(name,value){return this.importParameters[name]=value.toString(),this.customResource.getAtt(name)}}exports.ExportReader=ExportReader;

View File

@@ -0,0 +1,65 @@
import { Construct } from 'constructs';
import type { Intrinsic } from '../../private/intrinsic';
import type { Reference } from '../../reference';
import { Stack } from '../../stack';
/**
* Properties for an ExportWriter
*/
export interface ExportWriterProps {
/**
* The AWS region to read Stack exports from
*
* @default - the stack region
*/
readonly region?: string;
}
/**
* Creates a custom resource that will return a list of stack exports from a given
* AWS region. The export can then be referenced by the export name.
*
*
* @example
* declare const app: App;
* const stack1 = new Stack(app, 'East1Stack', { env: { region: 'us-east-1' } });
* new CfnOutput(stack1, 'Output', { value: 'someValue', exportName: 'someName' });
*
* const stack2 = new Stack(app, 'East2Stack', { env: { region: 'us-east-2' } });
* const exportReader = new ExportReader(stack2, 'ExportReader', { region: 'us-east-1' });
* const anotherResource = new CfnResource(stack2, 'AnotherResource', {
* Parameters: {
* SomeParam: exportReader.importValue('someName'),
* },
* });
*
* @internal - this is intentionally not exported from core
*/
export declare class ExportWriter extends Construct {
static getOrCreate(scope: Construct, uniqueId: string, props: ExportWriterProps): ExportWriter;
private readonly _references;
private readonly provider;
constructor(scope: Construct, id: string, props: ExportWriterProps);
/**
* Register a reference with the writer and returns a CloudFormation Stack export by name
*
* The value will be "exported" via the ExportWriter. It will perform
* the export by creating an SSM parameter in the region that the consuming
* stack is created.
*
* @param exportName the unique name associated with the export
* @param reference the value that will be exported
* @returns a reference to the reader custom resource
*/
exportValue(exportName: string, reference: Reference, importStack: Stack): Intrinsic;
/**
* Add a resource arn for the consuming stack region
* Each writer could be writing to multiple regions and needs
* permissions to each region.
*
* If the region is not resolved then do not add anything.
*/
private addRegionToPolicy;
/**
* Add the export to the export reader which is created in the importing stack
*/
private addToExportReader;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportWriter=void 0;const constructs_1=require("constructs"),export_reader_provider_1=require("./export-reader-provider"),types_1=require("./types"),cfn_dynamic_reference_1=require("../../cfn-dynamic-reference"),custom_resource_1=require("../../custom-resource"),cross_region_ssm_writer_provider_generated_1=require("../../dist/core/cross-region-ssm-writer-provider.generated"),lazy_1=require("../../lazy"),uniqueid_1=require("../../private/uniqueid"),stack_1=require("../../stack"),token_1=require("../../token");class CRProvider extends cross_region_ssm_writer_provider_generated_1.CrossRegionSsmWriterProvider{static getOrCreateProvider(scope,uniqueid,props){const id=`${uniqueid}CustomResourceProvider`,stack=stack_1.Stack.of(scope);return stack.node.tryFindChild(id)??new CRProvider(stack,id,props)}resourceArns=new Set;constructor(scope,id,props){super(scope,id,props),this.addToRolePolicy({Effect:"Allow",Resource:lazy_1.Lazy.list({produce:()=>Array.from(this.resourceArns)}),Action:["ssm:DeleteParameters","ssm:ListTagsForResource","ssm:GetParameters","ssm:PutParameter"]})}addResourceArn(arn){this.resourceArns.add(arn)}}class ExportWriter extends constructs_1.Construct{static getOrCreate(scope,uniqueId,props){const stack=stack_1.Stack.of(scope),existing=stack.node.tryFindChild(uniqueId);return existing||new ExportWriter(stack,uniqueId,{region:props.region})}_references={};provider;constructor(scope,id,props){super(scope,id);const stack=stack_1.Stack.of(this),region=props.region??stack.region,resourceType="Custom::CrossRegionExportWriter";this.provider=CRProvider.getOrCreateProvider(this,resourceType),this.addRegionToPolicy(region);const properties={region,exports:lazy_1.Lazy.any({produce:()=>this._references})};new custom_resource_1.CustomResource(this,"Resource",{resourceType,serviceToken:this.provider.serviceToken,properties:{WriterProps:properties}})}exportValue(exportName,reference,importStack){const stack=stack_1.Stack.of(this),parameterName=`/${types_1.SSM_EXPORT_PATH_PREFIX}${exportName}`,ref=new cfn_dynamic_reference_1.CfnDynamicReference(cfn_dynamic_reference_1.CfnDynamicReferenceService.SSM,parameterName);return this._references[parameterName]=stack.resolve(reference.toString()),this.addToExportReader(parameterName,ref,importStack)}addRegionToPolicy(region){token_1.Token.isUnresolved(region)||this.provider.addResourceArn(stack_1.Stack.of(this).formatArn({service:"ssm",resource:"parameter",region,resourceName:`${types_1.SSM_EXPORT_PATH_PREFIX}*`}))}addToExportReader(exportName,exportValueRef,importStack){const readerConstructName=(0,uniqueid_1.makeUniqueId)(["ExportsReader"]),exportReader=export_reader_provider_1.ExportReader.getOrCreate(importStack.nestedStackParent??importStack,readerConstructName);return this.addRegionToPolicy(importStack.region),exportReader.importValue(exportName,exportValueRef)}}exports.ExportWriter=ExportWriter;

View File

@@ -0,0 +1,44 @@
import type { IResolvable } from '../../resolvable';
/**
* The SSM parameter prefix that will be used for
* all cross region exports
*/
export declare const SSM_EXPORT_PATH_PREFIX = "cdk/exports/";
/**
* Map of exportName to export value
*/
export type CrossRegionExports = {
[exportName: string]: string;
};
/**
* Properties for the CrossRegionExportReader Custom Resource
*/
export interface ExportReaderCRProps {
/**
* The region that this resource exists in
*/
readonly region: string;
/**
* An additional prefix to use. This will be appended
* to SSM_EXPORT_PATH_PREFIX.
*/
readonly prefix: string;
/**
* A list of imports used by this stack.
* Will be a list of parameter names
*/
readonly imports: CrossRegionExports | IResolvable;
}
/**
* Properties for the CrossRegionExportWriter custom resource
*/
export interface ExportWriterCRProps {
/**
* The region to export the value to
*/
readonly region: string;
/**
* A list of values to export to the target region
*/
readonly exports: CrossRegionExports | IResolvable;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SSM_EXPORT_PATH_PREFIX=void 0,exports.SSM_EXPORT_PATH_PREFIX="cdk/exports/";

View File

@@ -0,0 +1,72 @@
import { Construct } from 'constructs';
import type { CustomResourceProviderOptions } from './shared';
/**
* Initialization properties for `CustomResourceProviderBase`
*/
export interface CustomResourceProviderBaseProps extends CustomResourceProviderOptions {
/**
* A local file system directory with the provider's code. The code will be
* bundled into a zip asset and wired to the provider's AWS Lambda function.
*/
readonly codeDirectory: string;
/**
* The AWS Lambda runtime and version name to use for the provider.
*/
readonly runtimeName: string;
}
/**
* Base class for creating a custom resource provider
*/
export declare abstract class CustomResourceProviderBase extends Construct {
/**
* The hash of the lambda code backing this provider. Can be used to trigger updates
* on code changes, even when the properties of a custom resource remain unchanged.
*/
get codeHash(): string;
private _codeHash?;
private policyStatements?;
private role?;
private handler?;
/**
* The ARN of the provider's AWS Lambda function which should be used as the `serviceToken` when defining a custom
* resource.
*/
get serviceToken(): string;
private _roleArn;
protected constructor(scope: Construct, id: string, props: CustomResourceProviderBaseProps);
/**
* The ARN of the provider's AWS Lambda function role.
*/
get roleArn(): string;
/**
* Add an IAM policy statement to the inline policy of the
* provider's lambda function's role.
*
* **Please note**: this is a direct IAM JSON policy blob, *not* a `iam.PolicyStatement`
* object like you will see in the rest of the CDK.
*
*
* @example
* declare const myProvider: CustomResourceProvider;
*
* myProvider.addToRolePolicy({
* Effect: 'Allow',
* Action: 's3:GetObject',
* Resource: '*',
* });
*/
addToRolePolicy(statement: any): void;
private renderPolicies;
private renderEnvironmentVariables;
/**
* Returns the code property for the custom resource as well as any metadata.
* If the code is to be uploaded as an asset, the asset gets created in this function.
*/
private createCodePropAndMetadata;
}
export type Code = {
ZipFile: string;
} | {
S3Bucket: string;
S3Key: string;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,107 @@
import type { Construct } from 'constructs';
import { CustomResourceProviderBase } from './custom-resource-provider-base';
import type { CustomResourceProviderOptions } from './shared';
/**
* Initialization properties for `CustomResourceProvider`.
*
*/
export interface CustomResourceProviderProps extends CustomResourceProviderOptions {
/**
* A local file system directory with the provider's code. The code will be
* bundled into a zip asset and wired to the provider's AWS Lambda function.
*/
readonly codeDirectory: string;
/**
* The AWS Lambda runtime and version to use for the provider.
*/
readonly runtime: CustomResourceProviderRuntime;
}
/**
* The lambda runtime to use for the resource provider. This also indicates
* which language is used for the handler.
*/
export declare enum CustomResourceProviderRuntime {
/**
* Node.js 12.x
* @deprecated Use latest version
*/
NODEJS_12_X = "nodejs12.x",
/**
* Node.js 14.x
* @deprecated Use latest version
*/
NODEJS_14_X = "nodejs14.x",
/**
* Node.js 16.x
* @deprecated Use latest version
*/
NODEJS_16_X = "nodejs16.x",
/**
* Node.js 18.x
* @deprecated Use latest version
*/
NODEJS_18_X = "nodejs18.x",
/**
* Node.js 20.x
*/
NODEJS_20_X = "nodejs20.x",
/**
* Node.js 22.x
*/
NODEJS_22_X = "nodejs22.x"
}
/**
* An AWS-Lambda backed custom resource provider, for CDK Construct Library constructs
*
* This is a provider for `CustomResource` constructs, backed by an AWS Lambda
* Function. It only supports NodeJS runtimes.
*
* > **Application builders do not need to use this provider type**. This is not
* > a generic custom resource provider class. It is specifically
* > intended to be used only by constructs in the AWS CDK Construct Library, and
* > only exists here because of reverse dependency issues (for example, it cannot
* > use `iam.PolicyStatement` objects, since the `iam` library already depends on
* > the CDK `core` library and we cannot have cyclic dependencies).
*
* If you are not writing constructs for the AWS Construct Library, you should
* use the `Provider` class in the `custom-resources` module instead, which has
* a better API and supports all Lambda runtimes, not just Node.
*
* N.B.: When you are writing Custom Resource Providers, there are a number of
* lifecycle events you have to pay attention to. These are documented in the
* README of the `custom-resources` module. Be sure to give the documentation
* in that module a read, regardless of whether you end up using the Provider
* class in there or this one.
*/
export declare class CustomResourceProvider extends CustomResourceProviderBase {
/**
* Returns a stack-level singleton ARN (service token) for the custom resource
* provider.
*
* @param scope Construct scope
* @param uniqueid A globally unique id that will be used for the stack-level
* construct.
* @param props Provider properties which will only be applied when the
* provider is first created.
* @returns the service token of the custom resource provider, which should be
* used when defining a `CustomResource`.
*/
static getOrCreate(scope: Construct, uniqueid: string, props: CustomResourceProviderProps): string;
/**
* Returns a stack-level singleton for the custom resource provider.
*
* @param scope Construct scope
* @param uniqueid A globally unique id that will be used for the stack-level
* construct.
* @param props Provider properties which will only be applied when the
* provider is first created.
* @returns the service token of the custom resource provider, which should be
* used when defining a `CustomResource`.
*/
static getOrCreateProvider(scope: Construct, uniqueid: string, props: CustomResourceProviderProps): CustomResourceProvider;
protected constructor(scope: Construct, id: string, props: CustomResourceProviderProps);
}
/**
* The name of the latest Lambda node runtime available by AWS region.
*/
export declare function determineLatestNodeRuntimeName(scope: Construct): string;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomResourceProvider=exports.CustomResourceProviderRuntime=void 0,exports.determineLatestNodeRuntimeName=determineLatestNodeRuntimeName;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),custom_resource_provider_base_1=require("./custom-resource-provider-base"),region_info_1=require("../../../region-info"),stack_1=require("../stack");var CustomResourceProviderRuntime;(function(CustomResourceProviderRuntime2){CustomResourceProviderRuntime2.NODEJS_12_X="nodejs12.x",CustomResourceProviderRuntime2.NODEJS_12="deprecated_nodejs12.x",CustomResourceProviderRuntime2.NODEJS_14_X="nodejs14.x",CustomResourceProviderRuntime2.NODEJS_16_X="nodejs16.x",CustomResourceProviderRuntime2.NODEJS_18_X="nodejs18.x",CustomResourceProviderRuntime2.NODEJS_20_X="nodejs20.x",CustomResourceProviderRuntime2.NODEJS_22_X="nodejs22.x"})(CustomResourceProviderRuntime||(exports.CustomResourceProviderRuntime=CustomResourceProviderRuntime={}));class CustomResourceProvider extends custom_resource_provider_base_1.CustomResourceProviderBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CustomResourceProvider",version:"2.252.0"};static getOrCreate(scope,uniqueid,props){try{jsiiDeprecationWarnings.aws_cdk_lib_CustomResourceProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.getOrCreate),error}return this.getOrCreateProvider(scope,uniqueid,props).serviceToken}static getOrCreateProvider(scope,uniqueid,props){try{jsiiDeprecationWarnings.aws_cdk_lib_CustomResourceProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.getOrCreateProvider),error}const id=`${uniqueid}CustomResourceProvider`,stack=stack_1.Stack.of(scope);return stack.node.tryFindChild(id)??new CustomResourceProvider(stack,id,props)}constructor(scope,id,props){super(scope,id,{...props,runtimeName:customResourceProviderRuntimeToString(props.runtime)});try{jsiiDeprecationWarnings.aws_cdk_lib_CustomResourceProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CustomResourceProvider),error}}}exports.CustomResourceProvider=CustomResourceProvider;function customResourceProviderRuntimeToString(x){switch(x){case CustomResourceProviderRuntime.NODEJS_12:case CustomResourceProviderRuntime.NODEJS_12_X:return"nodejs12.x";case CustomResourceProviderRuntime.NODEJS_14_X:return"nodejs14.x";case CustomResourceProviderRuntime.NODEJS_16_X:return"nodejs16.x";case CustomResourceProviderRuntime.NODEJS_18_X:return"nodejs18.x";case CustomResourceProviderRuntime.NODEJS_20_X:return"nodejs20.x";case CustomResourceProviderRuntime.NODEJS_22_X:return"nodejs22.x"}}function determineLatestNodeRuntimeName(scope){return stack_1.Stack.of(scope).regionalFact(region_info_1.FactName.LATEST_NODE_RUNTIME,"nodejs22.x")}

View File

@@ -0,0 +1,3 @@
export * from './custom-resource-provider-base';
export * from './custom-resource-provider';
export * from './shared';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./custom-resource-provider-base"),exports),__exportStar(require("./custom-resource-provider"),exports),__exportStar(require("./shared"),exports);

View File

@@ -0,0 +1,67 @@
import type { Duration } from '../duration';
import type { Size } from '../size';
export declare const INLINE_CUSTOM_RESOURCE_CONTEXT = "@aws-cdk/core:inlineCustomResourceIfPossible";
/**
* Initialization options for custom resource providers
*/
export interface CustomResourceProviderOptions {
/**
* Whether or not the cloudformation response wrapper (`nodejs-entrypoint.ts`) is used.
* If set to `true`, `nodejs-entrypoint.js` is bundled in the same asset as the custom resource
* and set as the entrypoint. If set to `false`, the custom resource provided is the
* entrypoint.
*
* @default - `true` if `inlineCode: false` and `false` otherwise.
*/
readonly useCfnResponseWrapper?: boolean;
/**
* A set of IAM policy statements to include in the inline policy of the
* provider's lambda function.
*
* **Please note**: these are direct IAM JSON policy blobs, *not* `iam.PolicyStatement`
* objects like you will see in the rest of the CDK.
*
* @default - no additional inline policy
*
* @example
* const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
* codeDirectory: `${__dirname}/my-handler`,
* runtime: CustomResourceProviderRuntime.NODEJS_18_X,
* policyStatements: [
* {
* Effect: 'Allow',
* Action: 's3:PutObject*',
* Resource: '*',
* }
* ],
* });
*/
readonly policyStatements?: any[];
/**
* AWS Lambda timeout for the provider.
*
* @default Duration.minutes(15)
*/
readonly timeout?: Duration;
/**
* The amount of memory that your function has access to. Increasing the
* function's memory also increases its CPU allocation.
*
* @default Size.mebibytes(128)
*/
readonly memorySize?: Size;
/**
* Key-value pairs that are passed to Lambda as Environment
*
* @default - No environment variables.
*/
readonly environment?: {
[key: string]: string;
};
/**
* A description of the function.
*
* @default - No description.
*/
readonly description?: string;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.INLINE_CUSTOM_RESOURCE_CONTEXT=void 0,exports.INLINE_CUSTOM_RESOURCE_CONTEXT="@aws-cdk/core:inlineCustomResourceIfPossible";

View File

@@ -0,0 +1,177 @@
import type { Construct } from 'constructs';
import type { Duration } from './duration';
import { RemovalPolicy } from './removal-policy';
import { Resource } from './resource';
/**
* Properties to provide a Lambda-backed custom resource
*/
export interface CustomResourceProps {
/**
* The ARN of the provider which implements this custom resource type.
*
* You can implement a provider by listening to raw AWS CloudFormation events
* and specify the ARN of an SNS topic (`topic.topicArn`) or the ARN of an AWS
* Lambda function (`lambda.functionArn`) or use the CDK's custom [resource
* provider framework] which makes it easier to implement robust providers.
*
* [resource provider framework]:
* https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html
*
* Provider framework:
*
* ```ts
* // use the provider framework from aws-cdk/custom-resources:
* const provider = new customresources.Provider(this, 'ResourceProvider', {
* onEventHandler,
* isCompleteHandler, // optional
* });
*
* new CustomResource(this, 'MyResource', {
* serviceToken: provider.serviceToken,
* });
* ```
*
* AWS Lambda function (not recommended to use AWS Lambda Functions directly,
* see the module README):
*
* ```ts
* // invoke an AWS Lambda function when a lifecycle event occurs:
* new CustomResource(this, 'MyResource', {
* serviceToken: myFunction.functionArn,
* });
* ```
*
* SNS topic (not recommended to use AWS Lambda Functions directly, see the
* module README):
*
* ```ts
* // publish lifecycle events to an SNS topic:
* new CustomResource(this, 'MyResource', {
* serviceToken: myTopic.topicArn,
* });
* ```
*
* Maps to [ServiceToken](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#cfn-cloudformation-customresource-servicetoken) property for the `AWS::CloudFormation::CustomResource` resource
*/
readonly serviceToken: string;
/**
* The maximum time that can elapse before a custom resource operation times out.
*
* The value must be between 1 second and 3600 seconds.
*
* Maps to [ServiceTimeout](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#cfn-cloudformation-customresource-servicetimeout) property for the `AWS::CloudFormation::CustomResource` resource
*
* A token can be specified for this property, but it must be specified with `Duration.seconds()`.
*
* @example
* const stack = new Stack();
* const durToken = new CfnParameter(stack, 'MyParameter', {
* type: 'Number',
* default: 60,
* });
* new CustomResource(stack, 'MyCustomResource', {
* serviceToken: 'MyServiceToken',
* serviceTimeout: Duration.seconds(durToken.valueAsNumber),
* });
*
* @default Duration.seconds(3600)
*/
readonly serviceTimeout?: Duration;
/**
* Properties to pass to the Lambda
*
* Values in this `properties` dictionary can possibly overwrite other values in `CustomResourceProps`
* E.g. `ServiceToken` and `ServiceTimeout`
* It is recommended to avoid using same keys that exist in `CustomResourceProps`
*
* @default - No properties.
*/
readonly properties?: {
[key: string]: any;
};
/**
* For custom resources, you can specify AWS::CloudFormation::CustomResource
* (the default) as the resource type, or you can specify your own resource
* type name. For example, you can use "Custom::MyCustomResourceTypeName".
*
* Custom resource type names must begin with "Custom::" and can include
* alphanumeric characters and the following characters: _@-. You can specify
* a custom resource type name up to a maximum length of 60 characters. You
* cannot change the type during an update.
*
* Using your own resource type names helps you quickly differentiate the
* types of custom resources in your stack. For example, if you had two custom
* resources that conduct two different ping tests, you could name their type
* as Custom::PingTester to make them easily identifiable as ping testers
* (instead of using AWS::CloudFormation::CustomResource).
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html#aws-cfn-resource-type-name
*
* @default - AWS::CloudFormation::CustomResource
*/
readonly resourceType?: string;
/**
* The policy to apply when this resource is removed from the application.
*
* @default cdk.RemovalPolicy.Destroy
*/
readonly removalPolicy?: RemovalPolicy;
/**
* Convert all property keys to pascal case.
*
* @default false
*/
readonly pascalCaseProperties?: boolean;
}
/**
* Instantiation of a custom resource, whose implementation is provided a Provider
*
* This class is intended to be used by construct library authors. Application
* builder should not be able to tell whether or not a construct is backed by
* a custom resource, and so the use of this class should be invisible.
*
* Instead, construct library authors declare a custom construct that hides the
* choice of provider, and accepts a strongly-typed properties object with the
* properties your provider accepts.
*
* Your custom resource provider (identified by the `serviceToken` property)
* can be one of 4 constructs:
*
* - If you are authoring a construct library or application, we recommend you
* use the `Provider` class in the `custom-resources` module.
* - If you are authoring a construct for the CDK's AWS Construct Library,
* you should use the `CustomResourceProvider` construct in this package.
* - If you want full control over the provider, you can always directly use
* a Lambda Function or SNS Topic by passing the ARN into `serviceToken`.
*
* @resource AWS::CloudFormation::CustomResource
*/
export declare class CustomResource extends Resource {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
private readonly resource;
constructor(scope: Construct, id: string, props: CustomResourceProps);
/**
* The physical name of this custom resource.
*/
get ref(): string;
/**
* Returns the value of an attribute of the custom resource of an arbitrary
* type. Attributes are returned from the custom resource provider through the
* `Data` map where the key is the attribute name.
*
* @param attributeName the name of the attribute
* @returns a token for `Fn::GetAtt`. Use `Token.asXxx` to encode the returned `Reference` as a specific type or
* use the convenience `getAttString` for string attributes.
*/
getAtt(attributeName: string): import("./reference").Reference;
/**
* Returns the value of an attribute of the custom resource of type string.
* Attributes are returned from the custom resource provider through the
* `Data` map where the key is the attribute name.
*
* @param attributeName the name of the attribute
* @returns a token for `Fn::GetAtt` encoded as a string.
*/
getAttString(attributeName: string): string;
}

File diff suppressed because one or more lines are too long

2
cdk/node_modules/aws-cdk-lib/core/lib/debug.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare const CDK_DEBUG = "CDK_DEBUG";
export declare function debugModeEnabled(): boolean;

1
cdk/node_modules/aws-cdk-lib/core/lib/debug.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CDK_DEBUG=void 0,exports.debugModeEnabled=debugModeEnabled;var process_1=()=>{var tmp=require("process");return process_1=()=>tmp,tmp};exports.CDK_DEBUG="CDK_DEBUG";function debugModeEnabled(){return isTruthy(process_1().env[exports.CDK_DEBUG])}const TRUTHY_VALUES=new Set(["1","on","true"]);function isTruthy(value){return value?TRUTHY_VALUES.has(value.toLowerCase()):!1}

46
cdk/node_modules/aws-cdk-lib/core/lib/deps.d.ts generated vendored Normal file
View File

@@ -0,0 +1,46 @@
import { CfnResource } from './cfn-resource';
import { Stack } from './stack';
export type Element = CfnResource | Stack;
/**
* Adds a dependency between two resources or stacks, across stack and nested
* stack boundaries.
*
* The algorithm consists of:
* - Try to find the deepest common stack between the two elements
* - If there isn't a common stack, it means the elements belong to two
* disjoined stack-trees and therefore we apply the dependency at the
* assembly/app level between the two top-level stacks.
* - If we did find a common stack, we apply the dependency as a CloudFormation
* "DependsOn" between the resources that "represent" our source and target
* either directly or through the AWS::CloudFormation::Stack resources that
* "lead" to them.
*
* @param source The source resource/stack (the dependent)
* @param target The target resource/stack (the dependency)
*/
export declare function addDependency(source: Element, target: Element, reason?: string): void;
/**
* Removes a dependency between two resources or stacks, across stack and nested
* stack boundaries.
*
* The algorithm consists of:
* - Try to find the deepest common stack between the two elements
* - If there isn't a common stack, it means the elements belong to two
* disjoined stack-trees and therefore we applied the dependency at the
* assembly/app level between the two top-level stacks; remove it there.
* - If we did find a common stack, we applied the dependency as a CloudFormation
* "DependsOn" between the resources that "represent" our source and target
* either directly or through the AWS::CloudFormation::Stack resources that
* "lead" to them and must remove it there.
*
* @param source The source resource/stack (the dependent)
* @param target The target resource/stack (the dependency)
* @param reason Optional description to associate with the dependency for
* diagnostics
*/
export declare function removeDependency(source: Element, target: Element): void;
/**
* Get a list of all resource-to-resource dependencies assembled from this Element, Stack or assembly-dependencies
* @param source The source resource/stack (the dependent)
*/
export declare function obtainDependencies(source: Element): Element[];

1
cdk/node_modules/aws-cdk-lib/core/lib/deps.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDependency=addDependency,exports.removeDependency=removeDependency,exports.obtainDependencies=obtainDependencies;var cfn_resource_1=()=>{var tmp=require("./cfn-resource");return cfn_resource_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},stage_1=()=>{var tmp=require("./stage");return stage_1=()=>tmp,tmp},util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};function addDependency(source,target,reason){operateOnDependency(DependencyOperation.ADD,source,target,reason)}function removeDependency(source,target){operateOnDependency(DependencyOperation.REMOVE,source,target)}var DependencyOperation;(function(DependencyOperation2){DependencyOperation2[DependencyOperation2.ADD=0]="ADD",DependencyOperation2[DependencyOperation2.REMOVE=1]="REMOVE"})(DependencyOperation||(DependencyOperation={}));function operateOnDependency(operation,source,target,description){if(source===target)return;const sourceStack=stack_1().Stack.of(source),targetStack=stack_1().Stack.of(target),sourceStage=stage_1().Stage.of(sourceStack),targetStage=stage_1().Stage.of(targetStack);if(sourceStage!==targetStage)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`CannotDependency`,`You cannot have a dependency from '${source.node.path}' (in ${describeStage(sourceStage)}) to '${target.node.path}' (in ${describeStage(targetStage)}): dependency cannot cross stage boundaries`);const sourcePath=(0,util_1().pathToTopLevelStack)(sourceStack),targetPath=(0,util_1().pathToTopLevelStack)(targetStack),commonStack=(0,util_1().findLastCommonElement)(sourcePath,targetPath);if(!commonStack){const topLevelSource=sourcePath[0],topLevelTarget=targetPath[0],reason={source,target,description};switch(operation){case DependencyOperation.ADD:{topLevelSource._addAssemblyDependency(topLevelTarget,reason);break}case DependencyOperation.REMOVE:{topLevelSource._removeAssemblyDependency(topLevelTarget,reason);break}default:throw new(errors_1()).AssumptionError((0,literal_string_1().lit)`UnsupportedDependencyOperation`,`Unsupported dependency operation: ${operation}`)}return}if(commonStack===source)return;if(commonStack===target)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`NestedStackCannotDepend`,`Nested stack '${sourceStack.node.path}' cannot depend on a parent stack '${targetStack.node.path}'`);const sourceResource=resourceInCommonStackFor(source,commonStack),targetResource=resourceInCommonStackFor(target,commonStack);switch(operation){case DependencyOperation.ADD:{sourceResource._addResourceDependency(targetResource);break}case DependencyOperation.REMOVE:{sourceResource._removeResourceDependency(targetResource);break}default:throw new(errors_1()).AssumptionError((0,literal_string_1().lit)`UnsupportedDependencyOperation`,`Unsupported dependency operation: ${operation}`)}}function obtainDependencies(source){let dependencies=[];return source instanceof cfn_resource_1().CfnResource&&(dependencies=source.obtainResourceDependencies()),(0,util_1().pathToTopLevelStack)(stack_1().Stack.of(source)).forEach(stack=>{dependencies=[...dependencies,...stack._obtainAssemblyDependencies({source})]}),dependencies}function resourceInCommonStackFor(element,commonStack){const resource=stack_1().Stack.isStack(element)?element.nestedStackResource:element;if(!resource)throw new(errors_1()).AssumptionError((0,literal_string_1().lit)`UnexpectedValueResourceLooking`,`Unexpected value for resource when looking at ${element}!`);const resourceStack=stack_1().Stack.of(resource);return commonStack===resourceStack?resource:resourceInCommonStackFor(resourceStack,commonStack)}function describeStage(assembly){return assembly?assembly.parentStage?`Stage '${assembly.node.path}'`:"the App":"an unrooted construct tree"}

View File

@@ -0,0 +1,13 @@
import { Construct } from "constructs";
import { CustomResourceProviderBase, CustomResourceProviderOptions } from "../../custom-resource-provider";
export declare class CfnUtilsProvider extends CustomResourceProviderBase {
/**
* Returns a stack-level singleton ARN (service token) for the custom resource provider.
*/
static getOrCreate(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): string;
/**
* Returns a stack-level singleton for the custom resource provider.
*/
static getOrCreateProvider(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): CfnUtilsProvider;
private constructor();
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnUtilsProvider=void 0;var path=()=>{var tmp=require("path");return path=()=>tmp,tmp},stack_1=()=>{var tmp=require("../../stack");return stack_1=()=>tmp,tmp},custom_resource_provider_1=()=>{var tmp=require("../../custom-resource-provider");return custom_resource_provider_1=()=>tmp,tmp};class CfnUtilsProvider extends custom_resource_provider_1().CustomResourceProviderBase{static getOrCreate(scope,uniqueid,props){return this.getOrCreateProvider(scope,uniqueid,props).serviceToken}static getOrCreateProvider(scope,uniqueid,props){const id=`${uniqueid}CustomResourceProvider`,stack=stack_1().Stack.of(scope);return stack.node.tryFindChild(id)??new CfnUtilsProvider(stack,id,props)}constructor(scope,id,props){super(scope,id,{...props,codeDirectory:path().join(__dirname,"cfn-utils-provider"),runtimeName:(0,custom_resource_provider_1().determineLatestNodeRuntimeName)(scope)}),this.node.addMetadata("aws:cdk:is-custom-resource-handler-customResourceProvider",!0)}}exports.CfnUtilsProvider=CfnUtilsProvider;

View File

@@ -0,0 +1 @@
"use strict";var u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,C=(e,r)=>{for(var o in r)u(e,o,{get:r[o],enumerable:!0})},S=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of c(r))!i.call(e,n)&&n!==o&&u(e,n,{get:()=>r[n],enumerable:!(t=a(r,n))||t.enumerable});return e},f=e=>S(u({},"__esModule",{value:!0}),e),l={};C(l,{CfnUtilsResourceType:()=>s,handler:()=>m}),module.exports=f(l);var s=(o=>(o.CFN_JSON="Custom::AWSCDKCfnJson",o.CFN_JSON_STRINGIFY="Custom::AWSCDKCfnJsonStringify",o))(s||{});async function m(e){if(e.ResourceType==="Custom::AWSCDKCfnJson")return N(e);if(e.ResourceType==="Custom::AWSCDKCfnJsonStringify")return d(e);throw new Error(`unexpected resource type "${e.ResourceType}"`)}function N(e){return{Data:{Value:JSON.parse(e.ResourceProperties.Value)}}}function d(e){return{Data:{Value:JSON.stringify(e.ResourceProperties.Value)}}}

View File

@@ -0,0 +1 @@
"use strict";var p=Object.defineProperty,_=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,C=Object.prototype.hasOwnProperty,g=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),T=(r,e)=>{for(var t in e)p(r,t,{get:e[t],enumerable:!0})},v=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of b(e))!C.call(r,s)&&s!==t&&p(r,s,{get:()=>e[s],enumerable:!(o=_(e,s))||o.enumerable});return r},q=r=>v(p({},"__esModule",{value:!0}),r),y=g((j,h)=>{"use strict";var l=class{constructor(e){this.value=e,this.next=void 0}},d=class{constructor(){this.clear()}enqueue(e){let t=new l(e);this._head?(this._tail.next=t,this._tail=t):(this._head=t,this._tail=t),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};h.exports=d}),R=g(($,f)=>{"use strict";var k=y(),z=r=>{if(!((Number.isInteger(r)||r===1/0)&&r>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new k,t=0,o=()=>{t--,e.size>0&&e.dequeue()()},s=async(n,c,...a)=>{t++;let m=(async()=>n(...a))();c(m);try{await m}catch{}o()},i=(n,c,...a)=>{e.enqueue(s.bind(null,n,c,...a)),(async()=>(await Promise.resolve(),t<r&&e.size>0&&e.dequeue()()))()},u=(n,...c)=>new Promise(a=>{i(n,a,...c)});return Object.defineProperties(u,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),u};f.exports=z}),I={};T(I,{handler:()=>M}),module.exports=q(I);var E=require("@aws-sdk/client-ssm"),S=R();async function M(r){let e=r.ResourceProperties.ReaderProps,t=e.imports,o=Object.keys(t),s=`aws-cdk:strong-ref:${e.prefix}`,i=new E.SSM({region:e.region});try{switch(r.RequestType){case"Create":console.info("Tagging SSM Parameter imports"),await w(i,o,s);break;case"Update":let n=r.OldResourceProperties.ReaderProps.imports,c=P(o,Object.keys(n)),a=P(Object.keys(n),o);console.info("Releasing unused SSM Parameter imports"),Object.keys(a).length>0&&await x(i,a,s),console.info("Tagging new SSM Parameter imports"),await w(i,c,s);break;case"Delete":console.info("Releasing all SSM Parameter exports by removing tags"),await x(i,o,s);return}}catch(u){throw console.error("Error importing cross region stack exports: ",u),u}return{Data:t}}async function w(r,e,t){let o=S(10);await Promise.all(e.map(s=>o(async()=>{try{return await r.addTagsToResource({ResourceId:s,ResourceType:"Parameter",Tags:[{Key:t,Value:"true"}]})}catch(i){throw new Error(`Error importing ${s}: ${i}`)}})))}async function x(r,e,t){let o=S(10);await Promise.all(e.map(s=>o(async()=>{try{return await r.removeTagsFromResource({TagKeys:[t],ResourceType:"Parameter",ResourceId:s})}catch(i){if(i.name==="InvalidResourceId")return;throw new Error(`Error releasing import ${s}: ${i}`)}})))}function P(r,e){return r.filter(t=>!e.includes(t))}

View File

@@ -0,0 +1,13 @@
import { Construct } from "constructs";
import { CustomResourceProviderBase, CustomResourceProviderOptions } from "../../custom-resource-provider";
export declare class CrossRegionSsmReaderProvider extends CustomResourceProviderBase {
/**
* Returns a stack-level singleton ARN (service token) for the custom resource provider.
*/
static getOrCreate(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): string;
/**
* Returns a stack-level singleton for the custom resource provider.
*/
static getOrCreateProvider(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): CrossRegionSsmReaderProvider;
private constructor();
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CrossRegionSsmReaderProvider=void 0;var path=()=>{var tmp=require("path");return path=()=>tmp,tmp},stack_1=()=>{var tmp=require("../../stack");return stack_1=()=>tmp,tmp},custom_resource_provider_1=()=>{var tmp=require("../../custom-resource-provider");return custom_resource_provider_1=()=>tmp,tmp};class CrossRegionSsmReaderProvider extends custom_resource_provider_1().CustomResourceProviderBase{static getOrCreate(scope,uniqueid,props){return this.getOrCreateProvider(scope,uniqueid,props).serviceToken}static getOrCreateProvider(scope,uniqueid,props){const id=`${uniqueid}CustomResourceProvider`,stack=stack_1().Stack.of(scope);return stack.node.tryFindChild(id)??new CrossRegionSsmReaderProvider(stack,id,props)}constructor(scope,id,props){super(scope,id,{...props,codeDirectory:path().join(__dirname,"cross-region-ssm-reader-handler"),runtimeName:(0,custom_resource_provider_1().determineLatestNodeRuntimeName)(scope)}),this.node.addMetadata("aws:cdk:is-custom-resource-handler-customResourceProvider",!0)}}exports.CrossRegionSsmReaderProvider=CrossRegionSsmReaderProvider;

View File

@@ -0,0 +1,5 @@
"use strict";var a=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,S=Object.prototype.hasOwnProperty,y=(s,t)=>{for(var r in t)a(s,r,{get:t[r],enumerable:!0})},E=(s,t,r,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!S.call(s,o)&&o!==r&&a(s,o,{get:()=>t[o],enumerable:!(e=d(t,o))||e.enumerable});return s},R=s=>E(a({},"__esModule",{value:!0}),s),O={};y(O,{handler:()=>h}),module.exports=R(O);var l=require("@aws-sdk/client-ssm");async function h(s){let t=s.ResourceProperties.WriterProps,r=t.exports,e=new l.SSM({region:t.region});try{switch(s.RequestType){case"Create":console.info(`Creating new SSM Parameter exports in region ${t.region}`),await i(e,r),await u(e,r);return;case"Update":let n=s.OldResourceProperties.WriterProps.exports,c=x(r,n),p=C(n,r);if(p.length>0)throw new Error(`Some exports have changed!
`+p.join(`
`));let g=x(n,r);await i(e,g);let w=Object.keys(g);await m(e,w),await i(e,c),console.info(`Creating new SSM Parameter exports in region ${t.region}`),await u(e,c);return;case"Delete":await i(e,r),await m(e,Object.keys(r));return;default:return}}catch(o){throw console.error("Error processing event: ",o),o}}async function u(s,t){await Promise.all(Array.from(Object.entries(t),([r,e])=>s.putParameter({Name:r,Value:e,Type:"String"})))}async function m(s,t){t.sort();for(let e=0;e<t.length;e+=10){let o=t.slice(e,e+10);o.length>0&&await s.deleteParameters({Names:o})}}async function i(s,t){let r=new Map;if(await Promise.all(Object.keys(t).map(async e=>{let o=await P(s,e);o.size>0&&r.set(e,o)})),r.size>0){let e=Array.from(r.entries()).map(o=>`${o[0]} is in use by stack(s) ${Array.from(o[1]).join(" ")}`).join(`
`);throw new Error(`Exports cannot be updated:
${e}`)}}async function P(s,t){let r=new Set;try{(await s.listTagsForResource({ResourceId:t,ResourceType:"Parameter"})).TagList?.forEach(o=>{let n=o.Key?.split(":")??[];n[0]==="aws-cdk"&&n[1]==="strong-ref"&&r.add(n[2])})}catch(e){if(e.name==="InvalidResourceId")return new Set;throw e}return r}function x(s,t){return Object.keys(s).filter(r=>!t.hasOwnProperty(r)).reduce((r,e)=>(r[e]=s[e],r),{})}function C(s,t){return Object.keys(s).filter(r=>t.hasOwnProperty(r)&&s[r]!==t[r]).reduce((r,e)=>(r.push(e),r),[])}

View File

@@ -0,0 +1,13 @@
import { Construct } from "constructs";
import { CustomResourceProviderBase, CustomResourceProviderOptions } from "../../custom-resource-provider";
export declare class CrossRegionSsmWriterProvider extends CustomResourceProviderBase {
/**
* Returns a stack-level singleton ARN (service token) for the custom resource provider.
*/
static getOrCreate(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): string;
/**
* Returns a stack-level singleton for the custom resource provider.
*/
static getOrCreateProvider(scope: Construct, uniqueid: string, props?: CustomResourceProviderOptions): CrossRegionSsmWriterProvider;
constructor(scope: Construct, id: string, props?: CustomResourceProviderOptions);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CrossRegionSsmWriterProvider=void 0;var path=()=>{var tmp=require("path");return path=()=>tmp,tmp},stack_1=()=>{var tmp=require("../../stack");return stack_1=()=>tmp,tmp},custom_resource_provider_1=()=>{var tmp=require("../../custom-resource-provider");return custom_resource_provider_1=()=>tmp,tmp};class CrossRegionSsmWriterProvider extends custom_resource_provider_1().CustomResourceProviderBase{static getOrCreate(scope,uniqueid,props){return this.getOrCreateProvider(scope,uniqueid,props).serviceToken}static getOrCreateProvider(scope,uniqueid,props){const id=`${uniqueid}CustomResourceProvider`,stack=stack_1().Stack.of(scope);return stack.node.tryFindChild(id)??new CrossRegionSsmWriterProvider(stack,id,props)}constructor(scope,id,props){super(scope,id,{...props,codeDirectory:path().join(__dirname,"cross-region-ssm-writer-handler"),runtimeName:(0,custom_resource_provider_1().determineLatestNodeRuntimeName)(scope)}),this.node.addMetadata("aws:cdk:is-custom-resource-handler-customResourceProvider",!0)}}exports.CrossRegionSsmWriterProvider=CrossRegionSsmWriterProvider;

152
cdk/node_modules/aws-cdk-lib/core/lib/duration.d.ts generated vendored Normal file
View File

@@ -0,0 +1,152 @@
/**
* Represents a length of time.
*
* The amount can be specified either as a literal value (e.g: `10`) which
* cannot be negative, or as an unresolved number token.
*
* When the amount is passed as a token, unit conversion is not possible.
*/
export declare class Duration {
/**
* Create a Duration representing an amount of milliseconds
*
* @param amount the amount of Milliseconds the `Duration` will represent.
* @returns a new `Duration` representing `amount` ms.
*/
static millis(amount: number): Duration;
/**
* Create a Duration representing an amount of seconds
*
* @param amount the amount of Seconds the `Duration` will represent.
* @returns a new `Duration` representing `amount` Seconds.
*/
static seconds(amount: number): Duration;
/**
* Create a Duration representing an amount of minutes
*
* @param amount the amount of Minutes the `Duration` will represent.
* @returns a new `Duration` representing `amount` Minutes.
*/
static minutes(amount: number): Duration;
/**
* Create a Duration representing an amount of hours
*
* @param amount the amount of Hours the `Duration` will represent.
* @returns a new `Duration` representing `amount` Hours.
*/
static hours(amount: number): Duration;
/**
* Create a Duration representing an amount of days
*
* @param amount the amount of Days the `Duration` will represent.
* @returns a new `Duration` representing `amount` Days.
*/
static days(amount: number): Duration;
/**
* Parse a period formatted according to the ISO 8601 standard
*
* Days are the largest ISO duration supported, i.e.,
* weeks, months, and years are not supported.
*
* @example
* // This represents 1 day, 2 hours, 3 minutes, 4 seconds, and 567 milliseconds.
* 'P1DT2H3M4.567S'
*
* @see https://www.iso.org/standard/70907.html
* @param duration an ISO-formatted duration to be parsed.
* @returns the parsed `Duration`.
*/
static parse(duration: string): Duration;
private readonly amount;
private readonly unit;
private constructor();
/**
* Add two Durations together
*/
plus(rhs: Duration): Duration;
/**
* Substract two Durations together
*/
minus(rhs: Duration): Duration;
/**
* Return the total number of milliseconds in this Duration
*
* @returns the value of this `Duration` expressed in Milliseconds.
*/
toMilliseconds(opts?: TimeConversionOptions): number;
/**
* Return the total number of seconds in this Duration
*
* @returns the value of this `Duration` expressed in Seconds.
*/
toSeconds(opts?: TimeConversionOptions): number;
/**
* Return the total number of minutes in this Duration
*
* @returns the value of this `Duration` expressed in Minutes.
*/
toMinutes(opts?: TimeConversionOptions): number;
/**
* Return the total number of hours in this Duration
*
* @returns the value of this `Duration` expressed in Hours.
*/
toHours(opts?: TimeConversionOptions): number;
/**
* Return the total number of days in this Duration
*
* @returns the value of this `Duration` expressed in Days.
*/
toDays(opts?: TimeConversionOptions): number;
/**
* Return an ISO 8601 representation of this period
*
* @returns a string starting with 'P' describing the period
* @see https://www.iso.org/standard/70907.html
*/
toIsoString(): string;
/**
* Turn this duration into a human-readable string
*/
toHumanString(): string;
/**
* Returns a string representation of this `Duration`
*
* This is never the right function to use when you want to use the `Duration`
* object in a template. Use `toSeconds()`, `toMinutes()`, `toDays()`, etc. instead.
*/
toString(): string;
/**
* Return the duration in a set of whole numbered time components, ordered from largest to smallest
*
* Only components != 0 will be returned.
*
* Can combine millis and seconds together for the benefit of toIsoString,
* makes the logic in there simpler.
*/
private components;
/**
* Checks if duration is a token or a resolvable object
*/
isUnresolved(): boolean;
/**
* Returns unit of the duration
*/
unitLabel(): string;
/**
* Returns stringified number of duration
*/
formatTokenToNumber(): string;
}
/**
* Options for how to convert time to a different unit.
*/
export interface TimeConversionOptions {
/**
* If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an
* integer.
*
* @default true
*/
readonly integral?: boolean;
}

1
cdk/node_modules/aws-cdk-lib/core/lib/duration.js generated vendored Normal file

File diff suppressed because one or more lines are too long

33
cdk/node_modules/aws-cdk-lib/core/lib/environment.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
/**
* The deployment environment for a stack.
*/
export interface Environment {
/**
* The AWS account ID for this environment.
*
* This can be either a concrete value such as `585191031104` or `Aws.ACCOUNT_ID` which
* indicates that account ID will only be determined during deployment (it
* will resolve to the CloudFormation intrinsic `{"Ref":"AWS::AccountId"}`).
* Note that certain features, such as cross-stack references and
* environmental context providers require concrete region information and
* will cause this stack to emit synthesis errors.
*
* @default Aws.ACCOUNT_ID which means that the stack will be account-agnostic.
*/
readonly account?: string;
/**
* The AWS region for this environment.
*
* This can be either a concrete value such as `eu-west-2` or `Aws.REGION`
* which indicates that account ID will only be determined during deployment
* (it will resolve to the CloudFormation intrinsic `{"Ref":"AWS::Region"}`).
* Note that certain features, such as cross-stack references and
* environmental context providers require concrete region information and
* will cause this stack to emit synthesis errors.
*
* @default Aws.REGION which means that the stack will be region-agnostic.
*/
readonly region?: string;
}
import type { IEnvironmentAware, ResourceEnvironment } from '../../interfaces/environment-aware';
export type { IEnvironmentAware, ResourceEnvironment };

1
cdk/node_modules/aws-cdk-lib/core/lib/environment.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

130
cdk/node_modules/aws-cdk-lib/core/lib/errors.d.ts generated vendored Normal file
View File

@@ -0,0 +1,130 @@
import type { IConstruct } from 'constructs';
import type { LiteralString } from './private/literal-string';
import type { AssertionError } from '../../assertions/lib/private/error';
import type { CloudAssemblyError } from '../../cx-api/lib/private/error';
/**
* Helper to check if an error is of a certain type.
*/
export declare class Errors {
/**
* Test whether the given errors is a ConstructionError.
*
* A ConstructionError is a generic error that will be thrown during the App construction or synthesis.
* To check for more specific errors, use the respective methods.
*/
static isConstructError(x: any): x is ConstructError;
/**
* Test whether the given error is a ValidationError.
*
* A ValidationError is thrown when input props are failing to pass the rules of the construct.
* It usually means the underlying CloudFormation resource(s) would not deploy with a given configuration.
*/
static isValidationError(x: any): x is ValidationError;
/**
* Test whether the given error is a AssertionError.
*
* An AssertionError is thrown when an assertion fails.
*/
static isAssertionError(x: any): x is AssertionError;
/**
* Test whether the given error is a CloudAssemblyError.
*
* A CloudAssemblyError is thrown for unexpected problems with the synthesized assembly.
*/
static isCloudAssemblyError(x: any): x is CloudAssemblyError;
/**
* Test whether the given error is an ExecutionError.
*
* An ExecutionError is thrown if an externally executed script or code failed.
*/
static isExecutionError(x: any): x is ExecutionError;
/**
* Test whether the given error is an AssumptionError.
*
* An AssumptionError is thrown when a construct made an assumption somewhere that doesn't hold true.
* This error always indicates a bug in the construct.
*/
static isAssumptionError(x: any): x is AssumptionError;
}
interface ConstructInfo {
readonly fqn: string;
readonly version: string;
}
/**
* Generic, abstract error class used for errors thrown from the users app during construction or synth.
*/
declare abstract class ConstructError extends Error {
#private;
/**
* The time the error was thrown.
*/
get time(): string;
/**
* The level. Always `'error'`.
*/
get level(): 'error';
/**
* The type of the error.
*/
abstract get type(): string;
/**
* The path of the construct this error is thrown from, if available.
*/
get constructPath(): string | undefined;
/**
* Information on the construct this error is thrown from, if available.
*/
get constructInfo(): ConstructInfo | undefined;
constructor(msg: string, scope?: IConstruct, name?: LiteralString);
}
/**
* A ValidationError should be used when input props fail to pass the validation rules of a construct
* or class or late binding. The error indicates that the underlying CloudFormation resource(s) would
* not deploy with a given configuration, or that some other prerequisites are not met.
*
* A ValidationError is always attached to a Construct scope. To a user, the error will present with additional
* information on the construct that caused the validation to fail.
*
* @internal
*/
export declare class ValidationError extends ConstructError {
get type(): 'validation';
constructor(name: LiteralString, msg: string, scope: IConstruct);
}
/**
* An UnscopedValidationError is a ValidationError that is not attached to a specific construct.
* This can be used to report validation errors that are thrown when no construct scope is available.
* The common use case here are data classes that assert on props, but are not constructs itself.
*
* To a User, these errors still present themselves as a "ValidationError".
* However they do not contain any information about the location in the construct tree.
*
* @internal
*/
export declare class UnscopedValidationError extends ConstructError {
get type(): 'validation';
constructor(name: LiteralString, msg: string);
}
/**
* Some construct code made an assumption somewhere that doesn't hold true
*
* This error always indicates a bug in the construct.
*
* @internal
*/
export declare class AssumptionError extends ConstructError {
get type(): 'assumption';
constructor(name: LiteralString, msg: string);
}
/**
* A CDK app may execute external code or shell scripts. If such an execution fails, an ExecutionError is thrown.
* The output log and error message will provide more details on the actual failure.
*
* @internal
*/
export declare class ExecutionError extends ConstructError {
get type(): 'exec';
constructor(name: LiteralString, msg: string);
}
export declare function renderConstructRootPath(construct: IConstruct): string;
export {};

6
cdk/node_modules/aws-cdk-lib/core/lib/errors.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExecutionError=exports.AssumptionError=exports.UnscopedValidationError=exports.ValidationError=exports.Errors=void 0,exports.renderConstructRootPath=renderConstructRootPath;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var fs=()=>{var tmp=require("fs");return fs=()=>tmp,tmp},runtime_info_1=()=>{var tmp=require("./private/runtime-info");return runtime_info_1=()=>tmp,tmp},stack_trace_1=()=>{var tmp=require("./stack-trace");return stack_trace_1=()=>tmp,tmp},cx_api_1=()=>{var tmp=require("../../cx-api");return cx_api_1=()=>tmp,tmp};const CONSTRUCT_ERROR_SYMBOL=Symbol.for("@aws-cdk/core.SynthesisError"),VALIDATION_ERROR_SYMBOL=Symbol.for("@aws-cdk/core.ValidationError"),ASSERTION_ERROR_SYMBOL=Symbol.for("@aws-cdk/assertions.AssertionError"),ASSEMBLY_ERROR_SYMBOL=Symbol.for("@aws-cdk/cx-api.CloudAssemblyError"),ASSUMPTION_ERROR_SYMBOL=Symbol.for("@aws-cdk/core.AssumptionError"),EXECUTION_ERROR_SYMBOL=Symbol.for("@aws-cdk/core.ExecutionError");class Errors{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.Errors",version:"2.252.0"};static isConstructError(x){return x!==null&&typeof x=="object"&&CONSTRUCT_ERROR_SYMBOL in x}static isValidationError(x){return Errors.isConstructError(x)&&VALIDATION_ERROR_SYMBOL in x}static isAssertionError(x){return Errors.isConstructError(x)&&ASSERTION_ERROR_SYMBOL in x}static isCloudAssemblyError(x){return x!==null&&typeof x=="object"&&ASSEMBLY_ERROR_SYMBOL in x}static isExecutionError(x){return x!==null&&typeof x=="object"&&EXECUTION_ERROR_SYMBOL in x}static isAssumptionError(x){return x!==null&&typeof x=="object"&&ASSUMPTION_ERROR_SYMBOL in x}}exports.Errors=Errors;class ConstructError extends Error{#time;#constructPath;#constructInfo;get time(){return this.#time}get level(){return"error"}get constructPath(){return this.#constructPath}get constructInfo(){return this.#constructInfo}constructor(msg,scope,name){super(msg);const ctr=this.constructor;if(Object.setPrototypeOf(this,ConstructError.prototype),Object.defineProperty(this,CONSTRUCT_ERROR_SYMBOL,{value:!0}),this.name=name??ctr.name,this.#time=new Date().toISOString(),this.#constructPath=scope?.node.path,scope)try{this.#constructInfo=(0,runtime_info_1().constructInfoFromConstruct)(scope)}catch{}this.stack=`\xAB${this.name}\xBB ${msg}
${(0,stack_trace_1().renderCallStackJustMyCode)((0,stack_trace_1().captureCallStack)(ctr)).join(`
`)}`,scope&&(this.stack+=`
Relates to construct:
${renderConstructRootPath(scope)}`),maybeWriteErrorCode(this.name)}}class ValidationError extends ConstructError{get type(){return"validation"}constructor(name,msg,scope){super(msg,scope,name),Object.setPrototypeOf(this,ValidationError.prototype),Object.defineProperty(this,VALIDATION_ERROR_SYMBOL,{value:!0})}}exports.ValidationError=ValidationError;class UnscopedValidationError extends ConstructError{get type(){return"validation"}constructor(name,msg){super(msg,void 0,name),Object.setPrototypeOf(this,UnscopedValidationError.prototype),Object.defineProperty(this,VALIDATION_ERROR_SYMBOL,{value:!0})}}exports.UnscopedValidationError=UnscopedValidationError;class AssumptionError extends ConstructError{get type(){return"assumption"}constructor(name,msg){super(msg,void 0,name),Object.setPrototypeOf(this,AssumptionError.prototype),Object.defineProperty(this,ASSUMPTION_ERROR_SYMBOL,{value:!0})}}exports.AssumptionError=AssumptionError;class ExecutionError extends ConstructError{get type(){return"exec"}constructor(name,msg){super(msg,void 0,name),Object.setPrototypeOf(this,ExecutionError.prototype),Object.defineProperty(this,EXECUTION_ERROR_SYMBOL,{value:!0})}}exports.ExecutionError=ExecutionError;function renderConstructRootPath(construct){const rootPath=[];let cur=construct;for(;cur!==void 0;)rootPath.push(cur),cur=cur.node.scope;rootPath.reverse();const ret=new Array;for(let i=0;i<rootPath.length;i++){const constructId=rootPath[i].node.id||"<.>";let suffix="";try{suffix=` (${(0,runtime_info_1().constructInfoFromConstruct)(rootPath[i])?.fqn})`}catch{}const branch=" \u2514\u2500 ",indent=i>0?" ".repeat(branch.length*(i-1))+branch:"";ret.push(` ${indent}${constructId}${suffix}`)}return ret.join(`
`)}function maybeWriteErrorCode(errorCode){const file=process.env[cx_api_1().ERRORFILE_ENV];file&&fs().writeFileSync(file,errorCode,"utf-8")}

Some files were not shown because too many files have changed in this diff Show More