agent-claw: automated task changes
This commit is contained in:
96
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/eventbridge/put-events.d.ts
generated
vendored
Normal file
96
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/eventbridge/put-events.d.ts
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type * as events from '../../../aws-events';
|
||||
import * as iam from '../../../aws-iam';
|
||||
import * as sfn from '../../../aws-stepfunctions';
|
||||
/**
|
||||
* An entry to be sent to EventBridge
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html
|
||||
*/
|
||||
export interface EventBridgePutEventsEntry {
|
||||
/**
|
||||
* The event body
|
||||
*
|
||||
* Can either be provided as an object or as a JSON-serialized string
|
||||
* @example
|
||||
*
|
||||
* sfn.TaskInput.fromText('{"instance-id": "i-1234567890abcdef0", "state": "terminated"}');
|
||||
* sfn.TaskInput.fromObject({ Message: 'Hello from Step Functions' });
|
||||
* sfn.TaskInput.fromJsonPathAt('$.EventDetail');
|
||||
*/
|
||||
readonly detail: sfn.TaskInput;
|
||||
/**
|
||||
* Used along with the source field to help identify the fields and values expected in the detail field
|
||||
*
|
||||
* For example, events by CloudTrail have detail type "AWS API Call via CloudTrail"
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
|
||||
*/
|
||||
readonly detailType: string;
|
||||
/**
|
||||
* The event bus the entry will be sent to.
|
||||
*
|
||||
* @default - event is sent to account's default event bus
|
||||
*/
|
||||
readonly eventBus?: events.IEventBusRef;
|
||||
/**
|
||||
* The service or application that caused this event to be generated
|
||||
*
|
||||
* Example value: `com.example.service`
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
|
||||
*/
|
||||
readonly source: string;
|
||||
}
|
||||
interface EventBridgePutEventsOptions {
|
||||
/**
|
||||
* The entries that will be sent. Minimum number of entries is 1 and maximum is 10,
|
||||
* unless [PutEvents API limit](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html#API_PutEvents_RequestSyntax) has changed.
|
||||
*/
|
||||
readonly entries: EventBridgePutEventsEntry[];
|
||||
}
|
||||
/**
|
||||
* Properties for sending events with PutEvents using JSONPath
|
||||
*/
|
||||
export interface EventBridgePutEventsJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EventBridgePutEventsOptions {
|
||||
}
|
||||
/**
|
||||
* Properties for sending events with PutEvents using JSONata
|
||||
*/
|
||||
export interface EventBridgePutEventsJsonataProps extends sfn.TaskStateJsonataBaseProps, EventBridgePutEventsOptions {
|
||||
}
|
||||
/**
|
||||
* Properties for sending events with PutEvents
|
||||
*/
|
||||
export interface EventBridgePutEventsProps extends sfn.TaskStateBaseProps, EventBridgePutEventsOptions {
|
||||
}
|
||||
/**
|
||||
* A StepFunctions Task to send events to an EventBridge event bus
|
||||
*/
|
||||
export declare class EventBridgePutEvents extends sfn.TaskStateBase {
|
||||
private readonly props;
|
||||
/**
|
||||
* A StepFunctions Task using JSONPath to send events to an EventBridge event bus
|
||||
*/
|
||||
static jsonPath(scope: Construct, id: string, props: EventBridgePutEventsJsonPathProps): EventBridgePutEvents;
|
||||
/**
|
||||
* A StepFunctions Task using JSONata to send events to an EventBridge event bus
|
||||
*/
|
||||
static jsonata(scope: Construct, id: string, props: EventBridgePutEventsJsonataProps): EventBridgePutEvents;
|
||||
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
|
||||
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
|
||||
protected readonly taskPolicies?: iam.PolicyStatement[];
|
||||
private readonly integrationPattern;
|
||||
constructor(scope: Construct, id: string, props: EventBridgePutEventsProps);
|
||||
/**
|
||||
* Returns an array of EventBusArn strings based on this.props.entries
|
||||
*/
|
||||
private get eventBusArns();
|
||||
/**
|
||||
* Provides the EventBridge put events service integration task configuration
|
||||
* @internal
|
||||
*/
|
||||
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
|
||||
private renderEntries;
|
||||
private validateEntries;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/eventbridge/put-events.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/eventbridge/put-events.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventBridgePutEvents=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EventBridgePutEvents extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EventBridgePutEvents",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EventBridgePutEvents(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EventBridgePutEvents(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EventBridgePutEvents),error}if(this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EventBridgePutEvents.SUPPORTED_INTEGRATION_PATTERNS),this.integrationPattern===sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN&&!sfn().FieldUtils.containsTaskToken(props.entries.map(entry=>entry.detail)))throw new(cdk()).ValidationError((0,literal_string_1().lit)`TaskTokenRequired`,"Task Token is required in `entries`. Use JsonPath.taskToken to set the token.",this);this.validateEntries(),this.taskPolicies=[new(iam()).PolicyStatement({actions:["events:PutEvents"],resources:this.eventBusArns})]}get eventBusArns(){return this.props.entries.map(entry=>entry.eventBus?entry.eventBus.eventBusRef.eventBusArn:cdk().Stack.of(this).formatArn({resource:"event-bus",resourceName:"default",arnFormat:cdk().ArnFormat.SLASH_RESOURCE_NAME,service:"events"}))}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("events","putEvents",this.integrationPattern),...this._renderParametersOrArguments({Entries:this.renderEntries()},queryLanguage)}}renderEntries(){return this.props.entries.map(entry=>({Detail:entry.detail?.value,DetailType:entry.detailType,EventBusName:entry.eventBus?.eventBusRef.eventBusArn,Source:entry.source}))}validateEntries(){if(this.props.entries.length<=0)throw new(cdk()).ValidationError((0,literal_string_1().lit)`EntriesMustBeNonEmptyArray`,"Value for property `entries` must be a non-empty array.",this);if(this.props.entries.some(e=>e.source.startsWith("aws.")))throw new(cdk()).ValidationError((0,literal_string_1().lit)`EventSourceCannotStartWithAws`,'Event source cannot start with "aws."',this)}}exports.EventBridgePutEvents=EventBridgePutEvents;
|
||||
Reference in New Issue
Block a user