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,66 @@
import type { Construct } from 'constructs';
import type { IResource } from '../../../core';
import { Resource } from '../../../core';
import type { ApplicationReference, IApplicationRef } from '../../../interfaces/generated/aws-codedeploy-interfaces.generated';
/**
* Represents a reference to a CodeDeploy Application deploying to Amazon ECS.
*
* If you're managing the Application alongside the rest of your CDK resources,
* use the `EcsApplication` class.
*
* If you want to reference an already existing Application,
* or one defined in a different CDK Stack,
* use the `EcsApplication#fromEcsApplicationName` method.
*/
export interface IEcsApplication extends IResource, IApplicationRef {
/** @attribute */
readonly applicationArn: string;
/** @attribute */
readonly applicationName: string;
}
/**
* Construction properties for `EcsApplication`.
*/
export interface EcsApplicationProps {
/**
* The physical, human-readable name of the CodeDeploy Application.
*
* @default an auto-generated name will be used
*/
readonly applicationName?: string;
}
/**
* A CodeDeploy Application that deploys to an Amazon ECS service.
*
* @resource AWS::CodeDeploy::Application
*/
export declare class EcsApplication extends Resource implements IEcsApplication {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Import an Application defined either outside the CDK, or in a different CDK Stack.
*
* The Application's account and region are assumed to be the same as the stack it is being imported
* into. If not, use `fromEcsApplicationArn`.
*
* @param scope the parent Construct for this new Construct
* @param id the logical ID of this new Construct
* @param ecsApplicationName the name of the application to import
* @returns a Construct representing a reference to an existing Application
*/
static fromEcsApplicationName(scope: Construct, id: string, ecsApplicationName: string): IEcsApplication;
/**
* Import an Application defined either outside the CDK, or in a different CDK Stack, by ARN.
*
* @param scope the parent Construct for this new Construct
* @param id the logical ID of this new Construct
* @param ecsApplicationArn the ARN of the application to import
* @returns a Construct representing a reference to an existing Application
*/
static fromEcsApplicationArn(scope: Construct, id: string, ecsApplicationArn: string): IEcsApplication;
private readonly resource;
get applicationArn(): string;
get applicationName(): string;
get applicationRef(): ApplicationReference;
constructor(scope: Construct, id: string, props?: EcsApplicationProps);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,60 @@
import type { Construct } from 'constructs';
import type { BaseDeploymentConfigOptions, IBaseDeploymentConfig } from '../base-deployment-config';
import { BaseDeploymentConfig } from '../base-deployment-config';
import { TrafficRouting } from '../traffic-routing-config';
/**
* The Deployment Configuration of an ECS Deployment Group.
*
* If you're managing the Deployment Configuration alongside the rest of your CDK resources,
* use the `EcsDeploymentConfig` class.
*
* If you want to reference an already existing deployment configuration,
* or one defined in a different CDK Stack,
* use the `EcsDeploymentConfig#fromEcsDeploymentConfigName` method.
*
* The default, pre-defined Configurations are available as constants on the `EcsDeploymentConfig` class
* (for example, `EcsDeploymentConfig.AllAtOnce`).
*/
export interface IEcsDeploymentConfig extends IBaseDeploymentConfig {
}
/**
* Construction properties of `EcsDeploymentConfig`.
*/
export interface EcsDeploymentConfigProps extends BaseDeploymentConfigOptions {
/**
* The configuration that specifies how traffic is shifted from the 'blue'
* target group to the 'green' target group during a deployment.
* @default AllAtOnce
*/
readonly trafficRouting?: TrafficRouting;
}
/**
* A custom Deployment Configuration for an ECS Deployment Group.
*
* @resource AWS::CodeDeploy::DeploymentConfig
*/
export declare class EcsDeploymentConfig extends BaseDeploymentConfig implements IEcsDeploymentConfig {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/** CodeDeploy predefined deployment configuration that shifts all traffic to the updated ECS task set at once. */
static readonly ALL_AT_ONCE: IEcsDeploymentConfig;
/** CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every minute until all traffic is shifted. */
static readonly LINEAR_10PERCENT_EVERY_1MINUTES: IEcsDeploymentConfig;
/** CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every three minutes until all traffic is shifted. */
static readonly LINEAR_10PERCENT_EVERY_3MINUTES: IEcsDeploymentConfig;
/** CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed five minutes later. */
static readonly CANARY_10PERCENT_5MINUTES: IEcsDeploymentConfig;
/** CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 15 minutes later. */
static readonly CANARY_10PERCENT_15MINUTES: IEcsDeploymentConfig;
/**
* Import a custom Deployment Configuration for an ECS Deployment Group defined outside the CDK.
*
* @param scope the parent Construct for this new Construct
* @param id the logical ID of this new Construct
* @param ecsDeploymentConfigName the name of the referenced custom Deployment Configuration
* @returns a Construct representing a reference to an existing custom Deployment Configuration
*/
static fromEcsDeploymentConfigName(scope: Construct, id: string, ecsDeploymentConfigName: string): IEcsDeploymentConfig;
private static deploymentConfig;
constructor(scope: Construct, id: string, props?: EcsDeploymentConfigProps);
}

View File

@@ -0,0 +1 @@
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EcsDeploymentConfig=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var metadata_resource_1=()=>{var tmp=require("../../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp},base_deployment_config_1=()=>{var tmp=require("../base-deployment-config");return base_deployment_config_1=()=>tmp,tmp},utils_1=()=>{var tmp=require("../private/utils");return utils_1=()=>tmp,tmp},traffic_routing_config_1=()=>{var tmp=require("../traffic-routing-config");return traffic_routing_config_1=()=>tmp,tmp};let EcsDeploymentConfig=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=base_deployment_config_1().BaseDeploymentConfig;var EcsDeploymentConfig2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),EcsDeploymentConfig2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codedeploy.EcsDeploymentConfig",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-codedeploy.EcsDeploymentConfig";static ALL_AT_ONCE=EcsDeploymentConfig2.deploymentConfig("CodeDeployDefault.ECSAllAtOnce");static LINEAR_10PERCENT_EVERY_1MINUTES=EcsDeploymentConfig2.deploymentConfig("CodeDeployDefault.ECSLinear10PercentEvery1Minutes");static LINEAR_10PERCENT_EVERY_3MINUTES=EcsDeploymentConfig2.deploymentConfig("CodeDeployDefault.ECSLinear10PercentEvery3Minutes");static CANARY_10PERCENT_5MINUTES=EcsDeploymentConfig2.deploymentConfig("CodeDeployDefault.ECSCanary10Percent5Minutes");static CANARY_10PERCENT_15MINUTES=EcsDeploymentConfig2.deploymentConfig("CodeDeployDefault.ECSCanary10Percent15Minutes");static fromEcsDeploymentConfigName(scope,id,ecsDeploymentConfigName){return this.fromDeploymentConfigName(scope,id,ecsDeploymentConfigName)}static deploymentConfig(name){return(0,utils_1().deploymentConfig)(name)}constructor(scope,id,props){super(scope,id,{...props,computePlatform:base_deployment_config_1().ComputePlatform.ECS,trafficRouting:props?.trafficRouting??traffic_routing_config_1().TrafficRouting.allAtOnce()});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_EcsDeploymentConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EcsDeploymentConfig2),error}(0,metadata_resource_1().addConstructMetadata)(this,props)}static{__runInitializers(_classThis,_classExtraInitializers)}};return EcsDeploymentConfig2=_classThis})();exports.EcsDeploymentConfig=EcsDeploymentConfig;

View File

@@ -0,0 +1,226 @@
import { Construct } from 'constructs';
import type { IEcsApplication } from './application';
import type { IEcsDeploymentConfig } from './deployment-config';
import * as ecs from '../../../aws-ecs';
import type * as elbv2 from '../../../aws-elasticloadbalancingv2';
import * as iam from '../../../aws-iam';
import * as cdk from '../../../core';
import type { IAlarmRef } from '../../../interfaces/generated/aws-cloudwatch-interfaces.generated';
import type { IDeploymentGroupRef, IApplicationRef, IDeploymentConfigRef } from '../../../interfaces/generated/aws-codedeploy-interfaces.generated';
import { DeploymentGroupBase } from '../private/base-deployment-group';
import type { AutoRollbackConfig } from '../rollback-config';
/**
* Interface for an ECS deployment group.
*/
export interface IEcsDeploymentGroup extends cdk.IResource, IDeploymentGroupRef {
/**
* The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
*/
readonly application: IEcsApplication;
/**
* The physical name of the CodeDeploy Deployment Group.
* @attribute
*/
readonly deploymentGroupName: string;
/**
* The ARN of this Deployment Group.
* @attribute
*/
readonly deploymentGroupArn: string;
/**
* The Deployment Configuration this Group uses.
*/
readonly deploymentConfig: IEcsDeploymentConfig;
}
/**
* Specify how the deployment behaves and how traffic is routed to the ECS service during a blue-green ECS deployment.
*
* @see https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-steps-ecs.html#deployment-steps-what-happens
* @see https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs
*/
export interface EcsBlueGreenDeploymentConfig {
/**
* The target group that will be associated with the 'blue' ECS task set during a blue-green deployment.
*/
readonly blueTargetGroup: elbv2.ITargetGroup;
/**
* The target group that will be associated with the 'green' ECS task set during a blue-green deployment.
*/
readonly greenTargetGroup: elbv2.ITargetGroup;
/**
* The load balancer listener used to serve production traffic and to shift production traffic from the
* 'blue' ECS task set to the 'green' ECS task set during a blue-green deployment.
*/
readonly listener: elbv2.IListenerRef;
/**
* The load balancer listener used to route test traffic to the 'green' ECS task set during a blue-green deployment.
*
* During a blue-green deployment, validation can occur after test traffic has been re-routed and before production
* traffic has been re-routed to the 'green' ECS task set. You can specify one or more Lambda functions in the
* deployment's AppSpec file that run during the AfterAllowTestTraffic hook. The functions can run validation tests.
* If a validation test fails, a deployment rollback is triggered. If the validation tests succeed, the next hook in
* the deployment lifecycle, BeforeAllowTraffic, is triggered.
*
* If a test listener is not specified, the deployment will proceed to routing the production listener to the 'green' ECS task set
* and will skip the AfterAllowTestTraffic hook.
*
* @default No test listener will be added
*/
readonly testListener?: elbv2.IListenerRef;
/**
* Specify how long CodeDeploy waits for approval to continue a blue-green deployment before it stops the deployment.
*
* After provisioning the 'green' ECS task set and re-routing test traffic, CodeDeploy can wait for approval before
* continuing the deployment and re-routing production traffic. During this wait time, validation such as manual
* testing or running integration tests can occur using the test traffic port, prior to exposing the new 'green' task
* set to production traffic. To approve the deployment, validation steps use the CodeDeploy
* [ContinueDeployment API(https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ContinueDeployment.html).
* If the ContinueDeployment API is not called within the wait time period, CodeDeploy will stop the deployment.
*
* By default, CodeDeploy will not wait for deployment approval. After re-routing test traffic to the 'green' ECS task set
* and running any 'AfterAllowTestTraffic' and 'BeforeAllowTraffic' lifecycle hooks, the deployment will immediately
* re-route production traffic to the 'green' ECS task set.
*
* @default 0
*/
readonly deploymentApprovalWaitTime?: cdk.Duration;
/**
* Specify how long CodeDeploy waits before it terminates the original 'blue' ECS task set when a blue-green deployment is complete.
*
* During this wait time, CodeDeploy will continue to monitor any CloudWatch alarms specified for the deployment group,
* and the deployment group can be configured to automatically roll back if those alarms fire. Once CodeDeploy begins to
* terminate the 'blue' ECS task set, the deployment can no longer be rolled back, manually or automatically.
*
* By default, the deployment will immediately terminate the 'blue' ECS task set after production traffic is successfully
* routed to the 'green' ECS task set.
*
* @default 0
*/
readonly terminationWaitTime?: cdk.Duration;
}
/**
* Construction properties for `EcsDeploymentGroup`.
*/
export interface EcsDeploymentGroupProps {
/**
* The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
*
* @default One will be created for you.
*/
readonly application?: IApplicationRef;
/**
* The physical, human-readable name of the CodeDeploy Deployment Group.
*
* @default An auto-generated name will be used.
*/
readonly deploymentGroupName?: string;
/**
* The Deployment Configuration this Deployment Group uses.
*
* @default EcsDeploymentConfig.ALL_AT_ONCE
*/
readonly deploymentConfig?: IDeploymentConfigRef;
/**
* The CloudWatch alarms associated with this Deployment Group.
* CodeDeploy will stop (and optionally roll back)
* a deployment if during it any of the alarms trigger.
*
* Alarms can also be added after the Deployment Group is created using the `#addAlarm` method.
*
* @default []
* @see https://docs.aws.amazon.com/codedeploy/latest/userguide/monitoring-create-alarms.html
*/
readonly alarms?: IAlarmRef[];
/**
* The service Role of this Deployment Group.
*
* @default - A new Role will be created.
*/
readonly role?: iam.IRole;
/**
* The ECS service to deploy with this Deployment Group.
*/
readonly service: ecs.IBaseService;
/**
* The configuration options for blue-green ECS deployments
*/
readonly blueGreenDeploymentConfig: EcsBlueGreenDeploymentConfig;
/**
* Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.
*
* @default false
*/
readonly ignorePollAlarmsFailure?: boolean;
/**
* The auto-rollback configuration for this Deployment Group.
*
* @default - default AutoRollbackConfig.
*/
readonly autoRollback?: AutoRollbackConfig;
/**
* Whether to skip the step of checking CloudWatch alarms during the deployment process
*
* @default - false
*/
readonly ignoreAlarmConfiguration?: boolean;
}
/**
* A CodeDeploy deployment group that orchestrates ECS blue-green deployments.
* @resource AWS::CodeDeploy::DeploymentGroup
*/
export declare class EcsDeploymentGroup extends DeploymentGroupBase implements IEcsDeploymentGroup {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Reference an ECS Deployment Group defined outside the CDK app.
*
* Account and region for the DeploymentGroup are taken from the application.
*
* @param scope the parent Construct for this new Construct
* @param id the logical ID of this new Construct
* @param attrs the properties of the referenced Deployment Group
* @returns a Construct representing a reference to an existing Deployment Group
*/
static fromEcsDeploymentGroupAttributes(scope: Construct, id: string, attrs: EcsDeploymentGroupAttributes): IEcsDeploymentGroup;
private readonly _application;
private readonly _deploymentConfig;
/**
* The service Role of this Deployment Group.
*/
readonly role: iam.IRole;
private readonly alarms;
constructor(scope: Construct, id: string, props: EcsDeploymentGroupProps);
get application(): IEcsApplication;
get deploymentConfig(): IEcsDeploymentConfig;
/**
* Associates an additional alarm with this Deployment Group.
*
* @param alarm the alarm to associate with this Deployment Group
*/
addAlarm(alarm: IAlarmRef): void;
private renderBlueGreenDeploymentConfiguration;
private renderLoadBalancerInfo;
}
/**
* Properties of a reference to a CodeDeploy ECS Deployment Group.
*
* @see EcsDeploymentGroup#fromEcsDeploymentGroupAttributes
*/
export interface EcsDeploymentGroupAttributes {
/**
* The reference to the CodeDeploy ECS Application
* that this Deployment Group belongs to.
*/
readonly application: IApplicationRef;
/**
* The physical, human-readable name of the CodeDeploy ECS Deployment Group
* that we are referencing.
*/
readonly deploymentGroupName: string;
/**
* The Deployment Configuration this Deployment Group uses.
*
* @default EcsDeploymentConfig.ALL_AT_ONCE
*/
readonly deploymentConfig?: IDeploymentConfigRef;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
export * from './application';
export * from './deployment-config';
export * from './deployment-group';

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});var _noFold;exports.EcsApplication=void 0,Object.defineProperty(exports,_noFold="EcsApplication",{enumerable:!0,configurable:!0,get:()=>{var value=require("./application").EcsApplication;return Object.defineProperty(exports,_noFold="EcsApplication",{enumerable:!0,configurable:!0,value}),value}}),exports.EcsDeploymentConfig=void 0,Object.defineProperty(exports,_noFold="EcsDeploymentConfig",{enumerable:!0,configurable:!0,get:()=>{var value=require("./deployment-config").EcsDeploymentConfig;return Object.defineProperty(exports,_noFold="EcsDeploymentConfig",{enumerable:!0,configurable:!0,value}),value}}),exports.EcsDeploymentGroup=void 0,Object.defineProperty(exports,_noFold="EcsDeploymentGroup",{enumerable:!0,configurable:!0,get:()=>{var value=require("./deployment-group").EcsDeploymentGroup;return Object.defineProperty(exports,_noFold="EcsDeploymentGroup",{enumerable:!0,configurable:!0,value}),value}});