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,64 @@
import type { AmazonLinuxImageSsmParameterCommonOptions } from './common';
import { AmazonLinuxImageSsmParameterBase } from './common';
/**
* Amazon Linux 2022 kernel versions
*/
export declare class AmazonLinux2022Kernel {
private readonly version;
/**
* The latest kernel version currently available in a published AMI.
*
* When a new kernel version is available for an al2022 AMI this will be
* updated to contain the latest kernel version and will cause your instances
* to be replaced. Do not store stateful information on the instance if you are
* using this version.
*/
static readonly CDK_LATEST: AmazonLinux2022Kernel;
/**
* The default kernel version for Amazon Linux 2022 is 5.15 and
* the SSM parameter does not include it in the name
* (i.e. /aws/service/ami-amazon-linux-latest/amzn2022-ami-kernel-default-x86_64)
*/
static readonly DEFAULT: AmazonLinux2022Kernel;
/**
* Kernel version 5.15
*/
static readonly KERNEL_5_15: AmazonLinux2022Kernel;
constructor(version: string);
/**
* Generate a string representation of the kernel
*/
toString(): string;
}
/**
* Properties specific to al2022 images
*/
export interface AmazonLinux2022ImageSsmParameterProps extends AmazonLinuxImageSsmParameterCommonOptions {
/**
* What kernel version of Amazon Linux to use
*
* @default AmazonLinux2022Kernel.DEFAULT
*/
readonly kernel?: AmazonLinux2022Kernel;
}
/**
* A SSM Parameter that contains the AMI ID for Amazon Linux 2023
*/
export declare class AmazonLinux2022ImageSsmParameter extends AmazonLinuxImageSsmParameterBase {
/**
* Generates a SSM Parameter name for a specific amazon linux 2022 AMI
*
* Example values:
*
* "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.15-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-default-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.15-arm64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.15-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.15-arm64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-default-arm64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-default-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-default-arm64",
*/
static ssmParameterName(props: AmazonLinux2022ImageSsmParameterProps): string;
constructor(props: AmazonLinux2022ImageSsmParameterProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AmazonLinux2022ImageSsmParameter=exports.AmazonLinux2022Kernel=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var common_1=()=>{var tmp=require("./common");return common_1=()=>tmp,tmp};class AmazonLinux2022Kernel{version;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2022Kernel",version:"2.252.0"};static CDK_LATEST=new AmazonLinux2022Kernel("5.15");static DEFAULT=new AmazonLinux2022Kernel("default");static KERNEL_5_15=new AmazonLinux2022Kernel("5.15");constructor(version){this.version=version}toString(){return`kernel-${this.version}`}}exports.AmazonLinux2022Kernel=AmazonLinux2022Kernel;class AmazonLinux2022ImageSsmParameter extends common_1().AmazonLinuxImageSsmParameterBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2022ImageSsmParameter",version:"2.252.0"};static ssmParameterName(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2022ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.ssmParameterName),error}const edition=props&&props.edition||common_1().AmazonLinuxEdition.STANDARD;return"/aws/service/ami-amazon-linux-latest/"+[common_1().AmazonLinuxGeneration.AMAZON_LINUX_2022,"ami",edition!==common_1().AmazonLinuxEdition.STANDARD?edition:void 0,props.kernel?.toString(),props.cpuType??common_1().AmazonLinuxCpuType.X86_64].filter(x=>!!x).join("-")}constructor(props){super({parameterName:AmazonLinux2022ImageSsmParameter.ssmParameterName(props),cachedInContext:props.cachedInContext,additionalCacheKey:props.additionalCacheKey,userData:props.userData});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2022ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AmazonLinux2022ImageSsmParameter),error}}}exports.AmazonLinux2022ImageSsmParameter=AmazonLinux2022ImageSsmParameter;

View File

@@ -0,0 +1,64 @@
import type { AmazonLinuxImageSsmParameterCommonOptions } from './common';
import { AmazonLinuxImageSsmParameterBase } from './common';
/**
* Amazon Linux 2023 kernel versions
*/
export declare class AmazonLinux2023Kernel {
private readonly version;
/**
* The latest kernel version currently available in a published AMI.
*
* When a new kernel version is available for an al2023 AMI this will be
* updated to contain the latest kernel version and will cause your instances
* to be replaced. Do not store stateful information on the instance if you are
* using this version.
*/
static readonly CDK_LATEST: AmazonLinux2023Kernel;
/**
* The default kernel version for Amazon Linux 2023 is 6.1 and
* the SSM parameter does not include it in the name
* (i.e. /aws/service/ami-amazon-linux-latest/amzn2023-ami-kernel-default-x86_64)
*/
static readonly DEFAULT: AmazonLinux2023Kernel;
/**
* Kernel version 6.1
*/
static readonly KERNEL_6_1: AmazonLinux2023Kernel;
constructor(version: string);
/**
* Generate a string representation of the kernel
*/
toString(): string;
}
/**
* Properties specific to al2023 images
*/
export interface AmazonLinux2023ImageSsmParameterProps extends AmazonLinuxImageSsmParameterCommonOptions {
/**
* What kernel version of Amazon Linux to use
*
* @default AmazonLinux2023Kernel.DEFAULT
*/
readonly kernel?: AmazonLinux2023Kernel;
}
/**
* A SSM Parameter that contains the AMI ID for Amazon Linux 2023
*/
export declare class AmazonLinux2023ImageSsmParameter extends AmazonLinuxImageSsmParameterBase {
/**
* Generates a SSM Parameter name for a specific amazon linux 2023 AMI
*
* Example values:
*
* "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-arm64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-arm64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64",
* "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64",
*/
static ssmParameterName(props: AmazonLinux2023ImageSsmParameterProps): string;
constructor(props?: AmazonLinux2023ImageSsmParameterProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AmazonLinux2023ImageSsmParameter=exports.AmazonLinux2023Kernel=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var common_1=()=>{var tmp=require("./common");return common_1=()=>tmp,tmp};class AmazonLinux2023Kernel{version;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2023Kernel",version:"2.252.0"};static CDK_LATEST=new AmazonLinux2023Kernel("6.1");static DEFAULT=new AmazonLinux2023Kernel("default");static KERNEL_6_1=new AmazonLinux2023Kernel("6.1");constructor(version){this.version=version}toString(){return`kernel-${this.version}`}}exports.AmazonLinux2023Kernel=AmazonLinux2023Kernel;class AmazonLinux2023ImageSsmParameter extends common_1().AmazonLinuxImageSsmParameterBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2023ImageSsmParameter",version:"2.252.0"};static ssmParameterName(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2023ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.ssmParameterName),error}const edition=props&&props.edition||common_1().AmazonLinuxEdition.STANDARD;return"/aws/service/ami-amazon-linux-latest/"+[common_1().AmazonLinuxGeneration.AMAZON_LINUX_2023,"ami",edition!==common_1().AmazonLinuxEdition.STANDARD?edition:void 0,(props.kernel??AmazonLinux2023Kernel.DEFAULT)?.toString(),props.cpuType??common_1().AmazonLinuxCpuType.X86_64].filter(x=>!!x).join("-")}constructor(props={}){super({parameterName:AmazonLinux2023ImageSsmParameter.ssmParameterName(props),cachedInContext:props.cachedInContext,additionalCacheKey:props.additionalCacheKey,userData:props.userData});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2023ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AmazonLinux2023ImageSsmParameter),error}}}exports.AmazonLinux2023ImageSsmParameter=AmazonLinux2023ImageSsmParameter;

View File

@@ -0,0 +1,77 @@
import type { AmazonLinuxImageSsmParameterCommonOptions } from './common';
import { AmazonLinuxImageSsmParameterBase, AmazonLinuxStorage, AmazonLinuxVirt } from './common';
/**
* Amazon Linux 2 kernel versions
*/
export declare class AmazonLinux2Kernel {
private readonly version;
/**
* The latest kernel version currently available in a published AMI.
*
* When a new kernel version is available for an amzn2 AMI this will be
* updated to contain the latest kernel version and will cause your instances
* to be replaced. Do not store stateful information on the instance if you are
* using this version.
*/
static readonly CDK_LATEST: AmazonLinux2Kernel;
/**
* The default kernel version for Amazon Linux 2 is 4.14 and
* Linux 4.14.311-233.529.amzn2.x86_64
* the SSM parameter does not include it in the name
* (i.e. /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2)
*/
static readonly DEFAULT: AmazonLinux2Kernel;
/**
* Kernel version 5.10
*/
static readonly KERNEL_5_10: AmazonLinux2Kernel;
constructor(version: string);
/**
* Generate a string representation of the kernel
*/
toString(): string | undefined;
}
/**
* Properties specific to amzn2 images
*/
export interface AmazonLinux2ImageSsmParameterProps extends AmazonLinuxImageSsmParameterCommonOptions {
/**
* What storage backed image to use
*
* @default GeneralPurpose
*/
readonly storage?: AmazonLinuxStorage;
/**
* What kernel version of Amazon Linux to use
*
* @default -
*/
readonly kernel?: AmazonLinux2Kernel;
/**
* Virtualization type
*
* @default HVM
*/
readonly virtualization?: AmazonLinuxVirt;
}
/**
* A SSM Parameter that contains the AMI ID for Amazon Linux 2
*/
export declare class AmazonLinux2ImageSsmParameter extends AmazonLinuxImageSsmParameterBase {
/**
* Generates a SSM Parameter name for a specific amazon linux 2 AMI
*
* Example values:
*
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2",
* "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs"
*/
static ssmParameterName(props: AmazonLinux2ImageSsmParameterProps): string;
constructor(props: AmazonLinux2ImageSsmParameterProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AmazonLinux2ImageSsmParameter=exports.AmazonLinux2Kernel=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var common_1=()=>{var tmp=require("./common");return common_1=()=>tmp,tmp};class AmazonLinux2Kernel{version;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2Kernel",version:"2.252.0"};static CDK_LATEST=new AmazonLinux2Kernel("5.10");static DEFAULT=new AmazonLinux2Kernel("default");static KERNEL_5_10=new AmazonLinux2Kernel("5.10");constructor(version){this.version=version}toString(){return this.version==="default"?void 0:`kernel-${this.version}`}}exports.AmazonLinux2Kernel=AmazonLinux2Kernel;class AmazonLinux2ImageSsmParameter extends common_1().AmazonLinuxImageSsmParameterBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinux2ImageSsmParameter",version:"2.252.0"};static ssmParameterName(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.ssmParameterName),error}const edition=props&&props.edition||common_1().AmazonLinuxEdition.STANDARD;return"/aws/service/ami-amazon-linux-latest/"+[common_1().AmazonLinuxGeneration.AMAZON_LINUX_2,"ami",edition!==common_1().AmazonLinuxEdition.STANDARD?edition:void 0,props.kernel?.toString(),props.virtualization??common_1().AmazonLinuxVirt.HVM,props.cpuType??common_1().AmazonLinuxCpuType.X86_64,props.storage??common_1().AmazonLinuxStorage.GENERAL_PURPOSE].filter(x=>!!x).join("-")}constructor(props){super({parameterName:AmazonLinux2ImageSsmParameter.ssmParameterName(props),cachedInContext:props.cachedInContext,additionalCacheKey:props.additionalCacheKey,userData:props.userData});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinux2ImageSsmParameterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AmazonLinux2ImageSsmParameter),error}}}exports.AmazonLinux2ImageSsmParameter=AmazonLinux2ImageSsmParameter;

View File

@@ -0,0 +1,187 @@
import type { Construct } from 'constructs';
import { UserData } from '../user-data';
/**
* Common options across all generations.
*/
export interface AmazonLinuxImageSsmParameterCommonOptions extends AmazonLinuxImageSsmParameterBaseOptions {
/**
* What edition of Amazon Linux to use
*
* @default AmazonLinuxEdition.Standard
*/
readonly edition?: AmazonLinuxEdition;
/**
* CPU Type
*
* @default AmazonLinuxCpuType.X86_64
*/
readonly cpuType?: AmazonLinuxCpuType;
}
/**
* Base options for amazon linux ssm parameters
*/
export interface AmazonLinuxImageSsmParameterBaseOptions {
/**
* Whether the AMI ID is cached to be stable between deployments
*
* By default, the newest image is used on each deployment. This will cause
* instances to be replaced whenever a new version is released, and may cause
* downtime if there aren't enough running instances in the AutoScalingGroup
* to reschedule the tasks on.
*
* If set to true, the AMI ID will be cached in `cdk.context.json` and the
* same value will be used on future runs. Your instances will not be replaced
* but your AMI version will grow old over time. To refresh the AMI lookup,
* you will have to evict the value from the cache using the `cdk context`
* command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
* more information.
*
* Can not be set to `true` in environment-agnostic stacks.
*
* @default false
*/
readonly cachedInContext?: boolean;
/**
* Adds an additional discriminator to the `cdk.context.json` cache key.
*
* @default - no additional cache key
*/
readonly additionalCacheKey?: string;
/**
* Initial user data
*
* @default - Empty UserData for Linux machines
*/
readonly userData?: UserData;
}
/**
* Base properties for an Amazon Linux SSM Parameter
*/
export interface AmazonLinuxImageSsmParameterBaseProps extends AmazonLinuxImageSsmParameterBaseOptions {
/**
* The name of the SSM parameter that contains the AMI value
*/
readonly parameterName: string;
}
export declare abstract class AmazonLinuxImageSsmParameterBase implements IMachineImage {
private readonly props;
private readonly cachedInContext;
constructor(props: AmazonLinuxImageSsmParameterBaseProps);
getImage(scope: Construct): MachineImageConfig;
}
/**
* What generation of Amazon Linux to use
*/
export declare enum AmazonLinuxGeneration {
/**
* Amazon Linux
*/
AMAZON_LINUX = "amzn",
/**
* Amazon Linux 2
*/
AMAZON_LINUX_2 = "amzn2",
/**
* Amazon Linux 2022
*/
AMAZON_LINUX_2022 = "al2022",
/**
* Amazon Linux 2023
*/
AMAZON_LINUX_2023 = "al2023"
}
/**
* Interface for classes that can select an appropriate machine image to use
*/
export interface IMachineImage {
/**
* Return the image to use in the given context
*/
getImage(scope: Construct): MachineImageConfig;
}
/**
* Configuration for a machine image
*/
export interface MachineImageConfig {
/**
* The AMI ID of the image to use
*/
readonly imageId: string;
/**
* Operating system type for this image
*/
readonly osType: OperatingSystemType;
/**
* Initial UserData for this image
*/
readonly userData: UserData;
}
/**
* The OS type of a particular image
*/
export declare enum OperatingSystemType {
LINUX = 0,
WINDOWS = 1,
/**
* Used when the type of the operating system is not known
* (for example, for imported Auto-Scaling Groups).
*/
UNKNOWN = 2
}
/**
* CPU type
*/
export declare enum AmazonLinuxCpuType {
/**
* arm64 CPU type
*/
ARM_64 = "arm64",
/**
* x86_64 CPU type
*/
X86_64 = "x86_64"
}
/**
* Amazon Linux edition
*/
export declare enum AmazonLinuxEdition {
/**
* Standard edition
*/
STANDARD = "standard",
/**
* Minimal edition
*/
MINIMAL = "minimal"
}
/**
* Virtualization type for Amazon Linux
*/
export declare enum AmazonLinuxVirt {
/**
* HVM virtualization (recommended)
*/
HVM = "hvm",
/**
* PV virtualization
*/
PV = "pv"
}
/**
* Available storage options for Amazon Linux images
* Only applies to Amazon Linux & Amazon Linux 2
*/
export declare enum AmazonLinuxStorage {
/**
* EBS-backed storage
*/
EBS = "ebs",
/**
* S3-backed storage
*/
S3 = "s3",
/**
* General Purpose-based storage (recommended)
*/
GENERAL_PURPOSE = "gp2"
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AmazonLinuxStorage=exports.AmazonLinuxVirt=exports.AmazonLinuxEdition=exports.AmazonLinuxCpuType=exports.OperatingSystemType=exports.AmazonLinuxGeneration=exports.AmazonLinuxImageSsmParameterBase=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./utils");return utils_1=()=>tmp,tmp},user_data_1=()=>{var tmp=require("../user-data");return user_data_1=()=>tmp,tmp};class AmazonLinuxImageSsmParameterBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.AmazonLinuxImageSsmParameterBase",version:"2.252.0"};cachedInContext;constructor(props){this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_AmazonLinuxImageSsmParameterBaseProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AmazonLinuxImageSsmParameterBase),error}this.cachedInContext=this.props.cachedInContext??!0}getImage(scope){const imageId=(0,utils_1().lookupImage)(scope,this.cachedInContext,this.props.parameterName,this.props.additionalCacheKey),osType=OperatingSystemType.LINUX;return{imageId,osType,userData:this.props.userData??user_data_1().UserData.forLinux()}}}exports.AmazonLinuxImageSsmParameterBase=AmazonLinuxImageSsmParameterBase;var AmazonLinuxGeneration;(function(AmazonLinuxGeneration2){AmazonLinuxGeneration2.AMAZON_LINUX="amzn",AmazonLinuxGeneration2.AMAZON_LINUX_2="amzn2",AmazonLinuxGeneration2.AMAZON_LINUX_2022="al2022",AmazonLinuxGeneration2.AMAZON_LINUX_2023="al2023"})(AmazonLinuxGeneration||(exports.AmazonLinuxGeneration=AmazonLinuxGeneration={}));var OperatingSystemType;(function(OperatingSystemType2){OperatingSystemType2[OperatingSystemType2.LINUX=0]="LINUX",OperatingSystemType2[OperatingSystemType2.WINDOWS=1]="WINDOWS",OperatingSystemType2[OperatingSystemType2.UNKNOWN=2]="UNKNOWN"})(OperatingSystemType||(exports.OperatingSystemType=OperatingSystemType={}));var AmazonLinuxCpuType;(function(AmazonLinuxCpuType2){AmazonLinuxCpuType2.ARM_64="arm64",AmazonLinuxCpuType2.X86_64="x86_64"})(AmazonLinuxCpuType||(exports.AmazonLinuxCpuType=AmazonLinuxCpuType={}));var AmazonLinuxEdition;(function(AmazonLinuxEdition2){AmazonLinuxEdition2.STANDARD="standard",AmazonLinuxEdition2.MINIMAL="minimal"})(AmazonLinuxEdition||(exports.AmazonLinuxEdition=AmazonLinuxEdition={}));var AmazonLinuxVirt;(function(AmazonLinuxVirt2){AmazonLinuxVirt2.HVM="hvm",AmazonLinuxVirt2.PV="pv"})(AmazonLinuxVirt||(exports.AmazonLinuxVirt=AmazonLinuxVirt={}));var AmazonLinuxStorage;(function(AmazonLinuxStorage2){AmazonLinuxStorage2.EBS="ebs",AmazonLinuxStorage2.S3="s3",AmazonLinuxStorage2.GENERAL_PURPOSE="gp2"})(AmazonLinuxStorage||(exports.AmazonLinuxStorage=AmazonLinuxStorage={}));

View File

@@ -0,0 +1,5 @@
export * from './common';
export * from './amazon-linux2';
export * from './machine-image';
export * from './amazon-linux-2022';
export * from './amazon-linux-2023';

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,473 @@
import type { Construct } from 'constructs';
import type { AmazonLinux2022ImageSsmParameterProps } from './amazon-linux-2022';
import type { AmazonLinux2023ImageSsmParameterProps } from './amazon-linux-2023';
import type { AmazonLinux2ImageSsmParameterProps } from './amazon-linux2';
import type { IMachineImage, MachineImageConfig } from './common';
import { AmazonLinuxCpuType, AmazonLinuxEdition, AmazonLinuxGeneration, AmazonLinuxStorage, AmazonLinuxVirt, OperatingSystemType } from './common';
import { UserData } from '../user-data';
import { WindowsVersion } from '../windows-versions';
/**
* Factory functions for standard Amazon Machine Image objects.
*/
export declare abstract class MachineImage {
/**
* A Windows image that is automatically kept up-to-date
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*/
static latestWindows(version: WindowsVersion, props?: WindowsImageProps): IMachineImage;
/**
* An Amazon Linux 2 image that is automatically kept up-to-date
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*/
static latestAmazonLinux2(props?: AmazonLinux2ImageSsmParameterProps): IMachineImage;
/**
* An Amazon Linux 2022 image that is automatically kept up-to-date
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*
* @deprecated - use latestAmazonLinux2023() instead
*/
static latestAmazonLinux2022(props?: AmazonLinux2022ImageSsmParameterProps): IMachineImage;
/**
* An Amazon Linux 2023 image that is automatically kept up-to-date
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*/
static latestAmazonLinux2023(props?: AmazonLinux2023ImageSsmParameterProps): IMachineImage;
/**
* An Amazon Linux image that is automatically kept up-to-date
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*
* N.B.: "latest" in the name of this function indicates that it always uses the most recent
* image of a particular generation of Amazon Linux, not that it uses the "latest generation".
* For backwards compatibility, this function uses Amazon Linux 1 if no generation
* is specified.
*
* Specify the desired generation using the `generation` property:
*
* ```ts
* ec2.MachineImage.latestAmazonLinux({
* // Use Amazon Linux 2
* generation: ec2.AmazonLinuxGeneration.AMAZON_LINUX_2,
* })
* ```
* @deprecated use MachineImage.latestAmazonLinux2 instead
*/
static latestAmazonLinux(props?: AmazonLinuxImageProps): IMachineImage;
/**
* A Linux image where you specify the AMI ID for every region
*
* @param amiMap For every region where you are deploying the stack,
* specify the AMI ID for that region.
* @param props Customize the image by supplying additional props
*/
static genericLinux(amiMap: Record<string, string>, props?: GenericLinuxImageProps): IMachineImage;
/**
* A Windows image where you specify the AMI ID for every region
*
* @param amiMap For every region where you are deploying the stack,
* specify the AMI ID for that region.
* @param props Customize the image by supplying additional props
*/
static genericWindows(amiMap: Record<string, string>, props?: GenericWindowsImageProps): IMachineImage;
/**
* An image specified in SSM parameter store
*
* By default, the SSM parameter is refreshed at every deployment,
* causing your instances to be replaced whenever a new version of the AMI
* is released.
*
* Pass `{ cachedInContext: true }` to keep the AMI ID stable. If you do, you
* will have to remember to periodically invalidate the context to refresh
* to the newest AMI ID.
*/
static fromSsmParameter(parameterName: string, options?: SsmParameterImageOptions): IMachineImage;
/**
* An image specified in SSM parameter store that will be resolved at instance launch time.
*
* The AMI ID will be resolved at instance launch time.
*
* @param parameterName The name of SSM parameter containing the AMI ID
* @param options The parameter image options
*
* @see https://docs.aws.amazon.com/autoscaling/ec2/userguide/using-systems-manager-parameters.html
*
*/
static resolveSsmParameterAtLaunch(parameterName: string, options?: SsmParameterImageOptions): IMachineImage;
/**
* Look up a shared Machine Image using DescribeImages
*
* The most recent, available, launchable image matching the given filter
* criteria will be used. Looking up AMIs may take a long time; specify
* as many filter criteria as possible to narrow down the search.
*
* The AMI selected will be cached in `cdk.context.json` and the same value
* will be used on future runs. To refresh the AMI lookup, you will have to
* evict the value from the cache using the `cdk context` command. See
* https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information.
*
* This function can not be used in environment-agnostic stacks.
*/
static lookup(props: LookupMachineImageProps): IMachineImage;
}
/**
* Select the image based on a given SSM parameter at deployment time of the CloudFormation Stack.
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*
* The AMI ID is selected using the values published to the SSM parameter store.
*/
export declare class GenericSSMParameterImage implements IMachineImage {
private readonly os;
private readonly userData?;
/**
* Name of the SSM parameter we're looking up
*/
readonly parameterName: string;
constructor(parameterName: string, os: OperatingSystemType, userData?: UserData | undefined);
/**
* Return the image to use in the given context
*/
getImage(scope: Construct): MachineImageConfig;
}
/**
* Select the image based on a given SSM parameter at instance launch time.
*
* This Machine Image comes with an imageId as `resolve:ssm:parameter-name` or `resolve:ssm:parameter-name:version` format
* as described in the document:
*
* @see https://docs.aws.amazon.com/autoscaling/ec2/userguide/using-systems-manager-parameters.html
*
* The AMI ID would be selected at instance launch time.
*/
export declare class ResolveSsmParameterAtLaunchImage implements IMachineImage {
private readonly props;
/**
* Name of the SSM parameter we're looking up
*/
readonly parameterName: string;
constructor(parameterName: string, props?: SsmParameterImageOptions);
/**
* Return the image to use in the given context
*/
getImage(_scope: Construct): MachineImageConfig;
}
/**
* Properties for GenericSsmParameterImage
*/
export interface SsmParameterImageOptions {
/**
* Operating system
*
* @default OperatingSystemType.LINUX
*/
readonly os?: OperatingSystemType;
/**
* Custom UserData
*
* @default - UserData appropriate for the OS
*/
readonly userData?: UserData;
/**
* Whether the AMI ID is cached to be stable between deployments
*
* By default, the newest image is used on each deployment. This will cause
* instances to be replaced whenever a new version is released, and may cause
* downtime if there aren't enough running instances in the AutoScalingGroup
* to reschedule the tasks on.
*
* If set to true, the AMI ID will be cached in `cdk.context.json` and the
* same value will be used on future runs. Your instances will not be replaced
* but your AMI version will grow old over time. To refresh the AMI lookup,
* you will have to evict the value from the cache using the `cdk context`
* command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
* more information.
*
* Can not be set to `true` in environment-agnostic stacks.
*
* @default false
*/
readonly cachedInContext?: boolean;
/**
* Adds an additional discriminator to the `cdk.context.json` cache key.
*
* @default - no additional cache key
*/
readonly additionalCacheKey?: string;
/**
* The version of the SSM parameter.
*
* @default no version specified.
*/
readonly parameterVersion?: string;
}
/**
* Configuration options for WindowsImage
*/
export interface WindowsImageProps {
/**
* Initial user data
*
* @default - Empty UserData for Windows machines
*/
readonly userData?: UserData;
}
/**
* Select the latest version of the indicated Windows version
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*
* The AMI ID is selected using the values published to the SSM parameter store.
*
* https://aws.amazon.com/blogs/mt/query-for-the-latest-windows-ami-using-systems-manager-parameter-store/
*/
export declare class WindowsImage extends GenericSSMParameterImage {
private static DEPRECATED_VERSION_NAME_MAP;
constructor(version: WindowsVersion, props?: WindowsImageProps);
}
/**
* Amazon Linux image properties
*/
export interface AmazonLinuxImageProps {
/**
* What generation of Amazon Linux to use
*
* @default AmazonLinux
*/
readonly generation?: AmazonLinuxGeneration;
/**
* What edition of Amazon Linux to use
*
* @default Standard
*/
readonly edition?: AmazonLinuxEdition;
/**
* What kernel version of Amazon Linux to use
*
* @default -
*/
readonly kernel?: AmazonLinuxKernel;
/**
* What storage backed image to use
*
* @default GeneralPurpose
*/
readonly storage?: AmazonLinuxStorage;
/**
* Initial user data
*
* @default - Empty UserData for Linux machines
*/
readonly userData?: UserData;
/**
* CPU Type
*
* @default X86_64
*/
readonly cpuType?: AmazonLinuxCpuType;
/**
* Virtualization type
*
* @default HVM
*/
readonly virtualization?: AmazonLinuxVirt;
/**
* Whether the AMI ID is cached to be stable between deployments
*
* By default, the newest image is used on each deployment. This will cause
* instances to be replaced whenever a new version is released, and may cause
* downtime if there aren't enough running instances in the AutoScalingGroup
* to reschedule the tasks on.
*
* If set to true, the AMI ID will be cached in `cdk.context.json` and the
* same value will be used on future runs. Your instances will not be replaced
* but your AMI version will grow old over time. To refresh the AMI lookup,
* you will have to evict the value from the cache using the `cdk context`
* command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
* more information.
*
* Can not be set to `true` in environment-agnostic stacks.
*
* @default false
*/
readonly cachedInContext?: boolean;
/**
* Adds an additional discriminator to the `cdk.context.json` cache key.
*
* @default - no additional cache key
*/
readonly additionalCacheKey?: string;
}
/**
* Selects the latest version of Amazon Linux
*
* This Machine Image automatically updates to the latest version on every
* deployment. Be aware this will cause your instances to be replaced when a
* new version of the image becomes available. Do not store stateful information
* on the instance if you are using this image.
*
* The AMI ID is selected using the values published to the SSM parameter store.
*/
export declare class AmazonLinuxImage extends GenericSSMParameterImage {
private readonly props;
/**
* Return the SSM parameter name that will contain the Amazon Linux image with the given attributes
*/
static ssmParameterName(props?: AmazonLinuxImageProps): string;
private readonly cachedInContext;
constructor(props?: AmazonLinuxImageProps);
/**
* Return the image to use in the given context
*/
getImage(scope: Construct): MachineImageConfig;
}
/**
* Amazon Linux Kernel
*/
export declare enum AmazonLinuxKernel {
/**
* Kernel version 5.10
*/
KERNEL5_X = "kernel-5.10",
/**
* Kernel version 6.1
*/
KERNEL6_1 = "kernel-6.1"
}
/**
* Configuration options for GenericLinuxImage
*/
export interface GenericLinuxImageProps {
/**
* Initial user data
*
* @default - Empty UserData for Linux machines
*/
readonly userData?: UserData;
}
/**
* Configuration options for GenericWindowsImage
*/
export interface GenericWindowsImageProps {
/**
* Initial user data
*
* @default - Empty UserData for Windows machines
*/
readonly userData?: UserData;
}
/**
* Construct a Linux machine image from an AMI map
*
* Linux images IDs are not published to SSM parameter store yet, so you'll have to
* manually specify an AMI map.
*/
export declare class GenericLinuxImage implements IMachineImage {
private readonly amiMap;
private readonly props;
constructor(amiMap: {
[region: string]: string;
}, props?: GenericLinuxImageProps);
getImage(scope: Construct): MachineImageConfig;
}
/**
* Construct a Windows machine image from an AMI map
*
* Allows you to create a generic Windows EC2 , manually specify an AMI map.
*/
export declare class GenericWindowsImage implements IMachineImage {
private readonly amiMap;
private readonly props;
constructor(amiMap: {
[region: string]: string;
}, props?: GenericWindowsImageProps);
getImage(scope: Construct): MachineImageConfig;
}
/**
* A machine image whose AMI ID will be searched using DescribeImages.
*
* The most recent, available, launchable image matching the given filter
* criteria will be used. Looking up AMIs may take a long time; specify
* as many filter criteria as possible to narrow down the search.
*
* The AMI selected will be cached in `cdk.context.json` and the same value
* will be used on future runs. To refresh the AMI lookup, you will have to
* evict the value from the cache using the `cdk context` command. See
* https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information.
* If `props.additionalCacheKey` is set, the context key uses that value as a discriminator
* rather than the cached value being global across all lookups.
*/
export declare class LookupMachineImage implements IMachineImage {
private readonly props;
constructor(props: LookupMachineImageProps);
/**
* Return the correct image
*/
getImage(scope: Construct): MachineImageConfig;
}
/**
* Properties for looking up an image
*/
export interface LookupMachineImageProps {
/**
* Name of the image (may contain wildcards)
*/
readonly name: string;
/**
* Owner account IDs or aliases
*
* @default - All owners
*/
readonly owners?: string[];
/**
* Additional filters on the AMI
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html
* @default - No additional filters
*/
readonly filters?: {
[key: string]: string[];
};
/**
* Look for Windows images
*
* @default false
*/
readonly windows?: boolean;
/**
* Custom userdata for this image
*
* @default - Empty user data appropriate for the platform type
*/
readonly userData?: UserData;
/**
* Adds an additional discriminator to the `cdk.context.json` cache key.
*
* @default - no additional cache key
*/
readonly additionalCacheKey?: string;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import type { Construct } from 'constructs';
export declare function lookupImage(scope: Construct, cachedInContext: boolean | undefined, parameterName: string, additionalCacheKey?: string): string;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lookupImage=lookupImage;var ssm=()=>{var tmp=require("../../../aws-ssm");return ssm=()=>tmp,tmp};function lookupImage(scope,cachedInContext,parameterName,additionalCacheKey){return cachedInContext?ssm().StringParameter.valueFromLookup(scope,parameterName,void 0,{additionalCacheKey}):ssm().StringParameter.valueForTypedStringParameterV2(scope,parameterName,ssm().ParameterValueType.AWS_EC2_IMAGE_ID)}