agent-claw: automated task changes
This commit is contained in:
64
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-destination.d.ts
generated
vendored
Normal file
64
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-destination.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Customize the EventBridge Api Destinations Target
|
||||
*/
|
||||
export interface ApiDestinationProps extends TargetBaseProps {
|
||||
/**
|
||||
* The event to send
|
||||
*
|
||||
* @default - the entire EventBridge event
|
||||
*/
|
||||
readonly event?: events.RuleTargetInput;
|
||||
/**
|
||||
* The role to assume before invoking the target
|
||||
*
|
||||
* @default - a new role will be created
|
||||
*/
|
||||
readonly eventRole?: iam.IRole;
|
||||
/**
|
||||
* Additional headers sent to the API Destination
|
||||
*
|
||||
* These are merged with headers specified on the Connection, with
|
||||
* the headers on the Connection taking precedence.
|
||||
*
|
||||
* You can only specify secret values on the Connection.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly headerParameters?: Record<string, string>;
|
||||
/**
|
||||
* Path parameters to insert in place of path wildcards (`*`).
|
||||
*
|
||||
* If the API destination has a wilcard in the path, these path parts
|
||||
* will be inserted in that place.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly pathParameterValues?: string[];
|
||||
/**
|
||||
* Additional query string parameters sent to the API Destination
|
||||
*
|
||||
* These are merged with headers specified on the Connection, with
|
||||
* the headers on the Connection taking precedence.
|
||||
*
|
||||
* You can only specify secret values on the Connection.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly queryStringParameters?: Record<string, string>;
|
||||
}
|
||||
/**
|
||||
* Use an API Destination rule target.
|
||||
*/
|
||||
export declare class ApiDestination implements events.IRuleTarget {
|
||||
private readonly apiDestination;
|
||||
private readonly props;
|
||||
constructor(apiDestination: events.IApiDestination, props?: ApiDestinationProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger API destinations
|
||||
* from an EventBridge event.
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-destination.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-destination.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiDestination=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class ApiDestination{apiDestination;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.ApiDestination",version:"2.252.0"};constructor(apiDestination,props={}){this.apiDestination=apiDestination,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_IApiDestination(apiDestination),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_ApiDestinationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiDestination),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const httpParameters=this.props.headerParameters??this.props.pathParameterValues??this.props.queryStringParameters?{headerParameters:this.props.headerParameters,pathParameterValues:this.props.pathParameterValues,queryStringParameters:this.props.queryStringParameters}:void 0;this.props?.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue);const role=this.props?.eventRole??(0,util_1().singletonEventRole)(this.apiDestination);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({resources:[this.apiDestination.apiDestinationArn],actions:["events:InvokeApiDestination"]})),{...this.props?(0,util_1().bindBaseTargetConfig)(this.props):{},arn:this.apiDestination.apiDestinationArn,role,input:this.props.event,targetResource:this.apiDestination,httpParameters}}}exports.ApiDestination=ApiDestination;
|
||||
92
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gateway.d.ts
generated
vendored
Normal file
92
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gateway.d.ts
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import * as api from '../../aws-apigateway';
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Customize the API Gateway Event Target
|
||||
*/
|
||||
export interface ApiGatewayProps extends TargetBaseProps {
|
||||
/**
|
||||
* The method for api resource invoked by the rule.
|
||||
*
|
||||
* @default '*' that treated as ANY
|
||||
*/
|
||||
readonly method?: string;
|
||||
/**
|
||||
* The api resource invoked by the rule.
|
||||
* We can use wildcards('*') to specify the path. In that case,
|
||||
* an equal number of real values must be specified for pathParameterValues.
|
||||
*
|
||||
* @default '/'
|
||||
*/
|
||||
readonly path?: string;
|
||||
/**
|
||||
* The deploy stage of api gateway invoked by the rule.
|
||||
*
|
||||
* @default the value of deploymentStage.stageName of target api gateway.
|
||||
*/
|
||||
readonly stage?: string;
|
||||
/**
|
||||
* The headers to be set when requesting API
|
||||
*
|
||||
* @default no header parameters
|
||||
*/
|
||||
readonly headerParameters?: {
|
||||
[key: string]: (string);
|
||||
};
|
||||
/**
|
||||
* The path parameter values to be used to
|
||||
* populate to wildcards("*") of requesting api path
|
||||
*
|
||||
* @default no path parameters
|
||||
*/
|
||||
readonly pathParameterValues?: string[];
|
||||
/**
|
||||
* The query parameters to be set when requesting API.
|
||||
*
|
||||
* @default no querystring parameters
|
||||
*/
|
||||
readonly queryStringParameters?: {
|
||||
[key: string]: (string);
|
||||
};
|
||||
/**
|
||||
* This will be the post request body send to the API.
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly postBody?: events.RuleTargetInput;
|
||||
/**
|
||||
* The role to assume before invoking the target
|
||||
* (i.e., the pipeline) when the given rule is triggered.
|
||||
*
|
||||
* @default - a new role will be created
|
||||
*/
|
||||
readonly eventRole?: iam.IRole;
|
||||
}
|
||||
/**
|
||||
* Use an API Gateway REST APIs as a target for Amazon EventBridge rules.
|
||||
*/
|
||||
export declare class ApiGateway implements events.IRuleTarget {
|
||||
private readonly props?;
|
||||
private readonly _restApi;
|
||||
/**
|
||||
* @param restApi - IRestApi implementation to use as event target
|
||||
* @param props - Properties to configure the APIGateway target
|
||||
*/
|
||||
constructor(restApi: api.IRestApi, props?: ApiGatewayProps | undefined);
|
||||
/**
|
||||
* @deprecated Use the `iRestApi` getter instead
|
||||
*/
|
||||
get restApi(): api.RestApi;
|
||||
/**
|
||||
* Returns the target IRestApi
|
||||
*/
|
||||
get iRestApi(): api.IRestApi;
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this API Gateway REST APIs
|
||||
* as a result from an EventBridge event.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/resource-based-policies-eventbridge.html#sqs-permissions
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gateway.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gateway.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiGateway=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},api=()=>{var tmp=require("../../aws-apigateway");return api=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class ApiGateway{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.ApiGateway",version:"2.252.0"};_restApi;constructor(restApi,props){this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_IRestApi(restApi),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_ApiGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiGateway),error}this._restApi=restApi}get restApi(){try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_events_targets.ApiGateway#restApi","Use the `iRestApi` getter instead")}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,jsiiDeprecationWarnings().getPropertyDescriptor(this,"restApi").get),error}if(!api().RestApi.isRestApi(this._restApi))throw new(core_1()).ValidationError((0,literal_string_1().lit)`RestApiIsNotRestApiConstruct`,"The iRestApi is not a RestApi construct, and cannot be retrieved this way.",this._restApi);return this._restApi}get iRestApi(){return this._restApi}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props?.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),(this.props?.path?.match(/\*/g)?.length??0)!==(this.props?.pathParameterValues||[]).length)throw new(core_1()).ValidationError((0,literal_string_1().lit)`NumberOfWildcardsInPathDoesNotMatchPathParameterValuesApiGateway`,"The number of wildcards in the path does not match the number of path pathParameterValues.",rule);const restApiArn=this._restApi.arnForExecuteApi(this.props?.method,this.props?.path||"/",this.props?.stage||this._restApi.deploymentStage.stageName),role=this.props?.eventRole||(0,util_1().singletonEventRole)(this._restApi);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({resources:[restApiArn],actions:["execute-api:Invoke","execute-api:ManageConnections"]})),{...this.props?(0,util_1().bindBaseTargetConfig)(this.props):{},arn:restApiArn,role,deadLetterConfig:this.props?.deadLetterQueue&&{arn:this.props.deadLetterQueue?.queueArn},input:this.props?.postBody,targetResource:this._restApi,httpParameters:{headerParameters:this.props?.headerParameters,queryStringParameters:this.props?.queryStringParameters,pathParameterValues:this.props?.pathParameterValues}}}}exports.ApiGateway=ApiGateway;
|
||||
26
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gatewayv2.d.ts
generated
vendored
Normal file
26
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gatewayv2.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { ApiGatewayProps } from './api-gateway';
|
||||
import * as apigwv2 from '../../aws-apigatewayv2';
|
||||
import type * as events from '../../aws-events';
|
||||
/**
|
||||
* Use an API Gateway V2 HTTP APIs as a target for Amazon EventBridge rules.
|
||||
*/
|
||||
export declare class ApiGatewayV2 implements events.IRuleTarget {
|
||||
private readonly props?;
|
||||
private readonly _httpApi;
|
||||
/**
|
||||
* @param httpApi - IHttpApi implementation to use as event target
|
||||
* @param props - Properties to configure the APIGateway target
|
||||
*/
|
||||
constructor(httpApi: apigwv2.IHttpApi, props?: ApiGatewayProps | undefined);
|
||||
/**
|
||||
* Returns the target IHttpApi
|
||||
*/
|
||||
get iHttpApi(): apigwv2.IHttpApi;
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this API Gateway HTTP APIs
|
||||
* as a result from an EventBridge event.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-use-resource-based.html#eb-api-gateway-permissions
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gatewayv2.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/api-gatewayv2.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiGatewayV2=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},apigwv2=()=>{var tmp=require("../../aws-apigatewayv2");return apigwv2=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class ApiGatewayV2{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.ApiGatewayV2",version:"2.252.0"};_httpApi;constructor(httpApi,props){this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_IHttpApi(httpApi),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_ApiGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiGatewayV2),error}this._httpApi=httpApi}get iHttpApi(){return apigwv2().toIHttpApi(this._httpApi)}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props?.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),(this.props?.path?.match(/\*/g)?.length??0)!==(this.props?.pathParameterValues||[]).length)throw new(core_1()).ValidationError((0,literal_string_1().lit)`NumberOfWildcardsInPathDoesNotMatchPathParameterValues`,"The number of wildcards in the path does not match the number of path pathParameterValues.",rule);const httpApiArn=this._httpApi.arnForExecuteApi(this.props?.method,this.props?.path||"/",this.props?.stage||this._httpApi.defaultStage?.stageName),role=this.props?.eventRole||(0,util_1().singletonEventRole)(this._httpApi);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({resources:[httpApiArn],actions:["execute-api:Invoke","execute-api:ManageConnections"]})),{...this.props?(0,util_1().bindBaseTargetConfig)(this.props):{},arn:httpApiArn,role,deadLetterConfig:this.props?.deadLetterQueue&&{arn:this.props.deadLetterQueue?.queueArn},input:this.props?.postBody,targetResource:this._httpApi,httpParameters:{headerParameters:this.props?.headerParameters,queryStringParameters:this.props?.queryStringParameters,pathParameterValues:this.props?.pathParameterValues}}}}exports.ApiGatewayV2=ApiGatewayV2;
|
||||
40
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/appsync.d.ts
generated
vendored
Normal file
40
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/appsync.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import * as appsync from '../../aws-appsync';
|
||||
import type * as events from '../../aws-events';
|
||||
import type * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Customize the AppSync GraphQL API target
|
||||
*/
|
||||
export interface AppSyncGraphQLApiProps extends TargetBaseProps {
|
||||
/**
|
||||
* The GraphQL operation; that is, the query, mutation, or subscription
|
||||
* to be parsed and executed by the GraphQL service.
|
||||
*/
|
||||
readonly graphQLOperation: string;
|
||||
/**
|
||||
* The variables that are include in the GraphQL operation.
|
||||
*
|
||||
* @default - The entire event is used
|
||||
*/
|
||||
readonly variables?: events.RuleTargetInput;
|
||||
/**
|
||||
* The role to assume before invoking the target
|
||||
* (i.e., the pipeline) when the given rule is triggered.
|
||||
*
|
||||
* @default - a new role with permissions to access mutations will be created
|
||||
*/
|
||||
readonly eventRole?: iam.IRole;
|
||||
}
|
||||
/**
|
||||
* Use an AppSync GraphQL API as a target for Amazon EventBridge rules.
|
||||
*/
|
||||
export declare class AppSync implements events.IRuleTarget {
|
||||
private readonly appsyncApi;
|
||||
private readonly props;
|
||||
constructor(appsyncApi: appsync.IGraphqlApi, props: AppSyncGraphQLApiProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this AppSync GraphQL API
|
||||
* as a result from an EventBridge event.
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/appsync.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/appsync.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppSync=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},appsync=()=>{var tmp=require("../../aws-appsync");return appsync=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class AppSync{appsyncApi;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.AppSync",version:"2.252.0"};constructor(appsyncApi,props){this.appsyncApi=appsyncApi,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_appsync_IGraphqlApi(appsyncApi),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_AppSyncGraphQLApiProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AppSync),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),!this.appsyncApi.modes.includes(appsync().AuthorizationType.IAM))throw new(core_1()).ValidationError((0,literal_string_1().lit)`AwsIamAuthorizationModeMustBeEnabled`,"You must have AWS_IAM authorization mode enabled on your API to configure an AppSync target",rule);if(this.appsyncApi.visibility!==appsync().Visibility.GLOBAL)throw new(core_1()).ValidationError((0,literal_string_1().lit)`ApiVisibilityMustBeGlobal`,'Your API visibility must be "GLOBAL"',rule);if(this.appsyncApi.graphQLEndpointArn==="")throw new(core_1()).ValidationError((0,literal_string_1().lit)`ValidGraphQlEndpointArnRequired`,"You must have a valid `graphQLEndpointArn` set",rule);const role=this.props.eventRole||(0,util_1().singletonEventRole)(this.appsyncApi);return this.props.eventRole||this.appsyncApi.grantMutation(role),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.appsyncApi.graphQLEndpointArn,role,deadLetterConfig:this.props.deadLetterQueue&&{arn:this.props.deadLetterQueue?.queueArn},input:this.props.variables,targetResource:this.appsyncApi,appSyncParameters:{graphQlOperation:this.props.graphQLOperation}}}}exports.AppSync=AppSync;
|
||||
75
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/aws-api.d.ts
generated
vendored
Normal file
75
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/aws-api.d.ts
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
import * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
type AwsSdkMetadataItem = {
|
||||
iamPrefix: string;
|
||||
};
|
||||
/**
|
||||
* AWS SDK service metadata.
|
||||
*/
|
||||
export type AwsSdkMetadata = {
|
||||
[key: string]: AwsSdkMetadataItem | {};
|
||||
};
|
||||
/**
|
||||
* Rule target input for an AwsApi target.
|
||||
*/
|
||||
export interface AwsApiInput {
|
||||
/**
|
||||
* The service to call
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
|
||||
*/
|
||||
readonly service: string;
|
||||
/**
|
||||
* The service action to call
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
|
||||
*/
|
||||
readonly action: string;
|
||||
/**
|
||||
* The parameters for the service action
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
|
||||
*
|
||||
* @default - no parameters
|
||||
*/
|
||||
readonly parameters?: any;
|
||||
/**
|
||||
* The regex pattern to use to catch API errors. The `code` property of the
|
||||
* `Error` object will be tested against this pattern. If there is a match an
|
||||
* error will not be thrown.
|
||||
*
|
||||
* @default - do not catch errors
|
||||
*/
|
||||
readonly catchErrorPattern?: string;
|
||||
/**
|
||||
* API version to use for the service
|
||||
*
|
||||
* @deprecated the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymore
|
||||
*/
|
||||
readonly apiVersion?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for an AwsApi target.
|
||||
*/
|
||||
export interface AwsApiProps extends AwsApiInput {
|
||||
/**
|
||||
* The IAM policy statement to allow the API call. Use only if
|
||||
* resource restriction is needed.
|
||||
*
|
||||
* @default - extract the permission from the API call
|
||||
*/
|
||||
readonly policyStatement?: iam.PolicyStatement;
|
||||
}
|
||||
/**
|
||||
* Use an AWS Lambda function that makes API calls as an event rule target.
|
||||
*/
|
||||
export declare class AwsApi implements events.IRuleTarget {
|
||||
private readonly props;
|
||||
constructor(props: AwsApiProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this AwsApi as a
|
||||
* result from an EventBridge event.
|
||||
*/
|
||||
bind(rule: events.IRuleRef, id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/aws-api.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/aws-api.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AwsApi=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},events=()=>{var tmp=require("../../aws-events");return events=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},aws_api_provider_generated_1=()=>{var tmp=require("../../custom-resource-handlers/dist/aws-events-targets/aws-api-provider.generated");return aws_api_provider_generated_1=()=>tmp,tmp},metadata=()=>{var tmp=require("../../custom-resources/lib/helpers-internal/sdk-v3-metadata.json");return metadata=()=>tmp,tmp};const awsSdkMetadata=metadata();class AwsApi{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.AwsApi",version:"2.252.0"};constructor(props){this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_AwsApiProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AwsApi),error}}bind(rule,id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const handler=new(aws_api_provider_generated_1()).AwsApiSingletonFunction(rule,`${rule.node.id}${id}Handler`,{timeout:core_1().Duration.seconds(60),memorySize:256,uuid:"b4cf1abd-4e4f-4bc6-9944-1af7ccd9ec37",lambdaPurpose:"AWS"});checkServiceExists(this.props.service,handler),this.props.policyStatement?handler.addToRolePolicy(this.props.policyStatement):handler.addToRolePolicy(new(iam()).PolicyStatement({actions:[awsSdkToIamAction(this.props.service,this.props.action)],resources:["*"]})),(0,util_1().addLambdaPermission)(rule,handler);const input={service:this.props.service,action:this.props.action,parameters:this.props.parameters,catchErrorPattern:this.props.catchErrorPattern,apiVersion:this.props.apiVersion};return{arn:handler.functionArn,input:events().RuleTargetInput.fromObject(input),targetResource:handler}}}exports.AwsApi=AwsApi;function checkServiceExists(service,handler){awsSdkMetadata[service.toLowerCase()]||core_1().Annotations.of(handler).addWarningV2(`@aws-cdk/aws-events-targets:${service}DoesNotExist`,`Service ${service} does not exist in the AWS SDK. Check the list of available services and actions from https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html`)}function awsSdkToIamAction(service,action){const srv=service.toLowerCase(),iamService=awsSdkMetadata[srv].iamPrefix||srv,iamAction=action.charAt(0).toUpperCase()+action.slice(1);return`${iamService}:${iamAction}`}
|
||||
85
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/batch.d.ts
generated
vendored
Normal file
85
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/batch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { IConstruct } from 'constructs';
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
/**
|
||||
* Customize the Batch Job Event Target
|
||||
*/
|
||||
export interface BatchJobProps extends TargetBaseProps {
|
||||
/**
|
||||
* The event to send to the Lambda
|
||||
*
|
||||
* This will be the payload sent to the Lambda Function.
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly event?: events.RuleTargetInput;
|
||||
/**
|
||||
* The size of the array, if this is an array batch job.
|
||||
*
|
||||
* Valid values are integers between 2 and 10,000.
|
||||
*
|
||||
* @default no arrayProperties are set
|
||||
*/
|
||||
readonly size?: number;
|
||||
/**
|
||||
* The number of times to attempt to retry, if the job fails. Valid values are 1–10.
|
||||
*
|
||||
* @default no retryStrategy is set
|
||||
*/
|
||||
readonly attempts?: number;
|
||||
/**
|
||||
* The name of the submitted job
|
||||
*
|
||||
* @default - Automatically generated
|
||||
*/
|
||||
readonly jobName?: string;
|
||||
}
|
||||
/**
|
||||
* Use an AWS Batch Job / Queue as an event rule target.
|
||||
* Most likely the code will look something like this:
|
||||
* `new BatchJob(jobQueue.jobQueueArn, jobQueue, jobDefinition.jobDefinitionArn, jobDefinition)`
|
||||
*
|
||||
* In the future this API will be improved to be fully typed
|
||||
*/
|
||||
export declare class BatchJob implements events.IRuleTarget {
|
||||
/**
|
||||
* The JobQueue arn
|
||||
*/
|
||||
private readonly jobQueueArn;
|
||||
/**
|
||||
* The JobQueue Resource
|
||||
*/
|
||||
private readonly jobQueueScope;
|
||||
/**
|
||||
* The jobDefinition arn
|
||||
*/
|
||||
private readonly jobDefinitionArn;
|
||||
/**
|
||||
* The JobQueue Resource
|
||||
*/
|
||||
private readonly jobDefinitionScope;
|
||||
private readonly props;
|
||||
constructor(
|
||||
/**
|
||||
* The JobQueue arn
|
||||
*/
|
||||
jobQueueArn: string,
|
||||
/**
|
||||
* The JobQueue Resource
|
||||
*/
|
||||
jobQueueScope: IConstruct,
|
||||
/**
|
||||
* The jobDefinition arn
|
||||
*/
|
||||
jobDefinitionArn: string,
|
||||
/**
|
||||
* The JobQueue Resource
|
||||
*/
|
||||
jobDefinitionScope: IConstruct, props?: BatchJobProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger queue this batch job as a
|
||||
* result from an EventBridge event.
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
private validateJobName;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/batch.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/batch.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BatchJob=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class BatchJob{jobQueueArn;jobQueueScope;jobDefinitionArn;jobDefinitionScope;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.BatchJob",version:"2.252.0"};constructor(jobQueueArn,jobQueueScope,jobDefinitionArn,jobDefinitionScope,props={}){this.jobQueueArn=jobQueueArn,this.jobQueueScope=jobQueueScope,this.jobDefinitionArn=jobDefinitionArn,this.jobDefinitionScope=jobDefinitionScope,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_BatchJobProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,BatchJob),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}this.validateJobName(rule,this.props.jobName);const jobName=this.props.jobName??core_1().Names.uniqueResourceName(rule,{maxLength:128}),batchParameters={jobDefinition:this.jobDefinitionArn,jobName,arrayProperties:this.props.size?{size:this.props.size}:void 0,retryStrategy:this.props.attempts?{attempts:this.props.attempts}:void 0};this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue);const role=(0,util_1().singletonEventRole)(this.jobDefinitionScope);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["batch:SubmitJob"],resources:[this.jobDefinitionArn,this.jobQueueArn]})),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.jobQueueArn,role,input:this.props.event,targetResource:this.jobQueueScope,batchParameters}}validateJobName(rule,name){if(!core_1().Token.isUnresolved(name)&&name!==void 0&&(name.length<1||name.length>128))throw new(core_1()).ValidationError((0,literal_string_1().lit)`InvalidJobNameValue`,`Invalid jobName value ${name}, must have length between 1 and 128, got: ${name.length}`,rule)}}exports.BatchJob=BatchJob;
|
||||
36
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codebuild.d.ts
generated
vendored
Normal file
36
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codebuild.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as codebuild from '../../aws-codebuild';
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Customize the CodeBuild Event Target
|
||||
*/
|
||||
export interface CodeBuildProjectProps extends TargetBaseProps {
|
||||
/**
|
||||
* The role to assume before invoking the target
|
||||
* (i.e., the codebuild) when the given rule is triggered.
|
||||
*
|
||||
* @default - a new role will be created
|
||||
*/
|
||||
readonly eventRole?: iam.IRole;
|
||||
/**
|
||||
* The event to send to CodeBuild
|
||||
*
|
||||
* This will be the payload for the StartBuild API.
|
||||
*
|
||||
* @default - the entire EventBridge event
|
||||
*/
|
||||
readonly event?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Start a CodeBuild build when an Amazon EventBridge rule is triggered.
|
||||
*/
|
||||
export declare class CodeBuildProject implements events.IRuleTarget {
|
||||
private readonly project;
|
||||
private readonly props;
|
||||
constructor(project: codebuild.IProjectRef, props?: CodeBuildProjectProps);
|
||||
/**
|
||||
* Allows using build projects as event rule targets.
|
||||
*/
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codebuild.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codebuild.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeBuildProject=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class CodeBuildProject{project;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.CodeBuildProject",version:"2.252.0"};constructor(project,props={}){this.project=project,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_codebuild_IProjectRef(project),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_CodeBuildProjectProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CodeBuildProject),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(_rule,this.props.deadLetterQueue);const role=this.props.eventRole||(0,util_1().singletonEventRole)(this.project);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["codebuild:StartBuild"],resources:[this.project.projectRef.projectArn]})),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.project.projectRef.projectArn,role,input:this.props.event,targetResource:this.project}}}exports.CodeBuildProject=CodeBuildProject;
|
||||
25
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codepipeline.d.ts
generated
vendored
Normal file
25
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codepipeline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type { IPipelineRef } from '../../interfaces/generated/aws-codepipeline-interfaces.generated';
|
||||
/**
|
||||
* Customization options when creating a `CodePipeline` event target.
|
||||
*/
|
||||
export interface CodePipelineTargetOptions extends TargetBaseProps {
|
||||
/**
|
||||
* The role to assume before invoking the target
|
||||
* (i.e., the pipeline) when the given rule is triggered.
|
||||
*
|
||||
* @default - a new role will be created
|
||||
*/
|
||||
readonly eventRole?: iam.IRole;
|
||||
}
|
||||
/**
|
||||
* Allows the pipeline to be used as an EventBridge rule target.
|
||||
*/
|
||||
export declare class CodePipeline implements events.IRuleTarget {
|
||||
private readonly pipeline;
|
||||
private readonly options;
|
||||
constructor(pipeline: IPipelineRef, options?: CodePipelineTargetOptions);
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codepipeline.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/codepipeline.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodePipeline=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},codepipeline_generated_1=()=>{var tmp=require("../../aws-codepipeline/lib/codepipeline.generated");return codepipeline_generated_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class CodePipeline{pipeline;options;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.CodePipeline",version:"2.252.0"};constructor(pipeline,options={}){this.pipeline=pipeline,this.options=options;try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_codepipeline_IPipelineRef(pipeline),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_CodePipelineTargetOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CodePipeline),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=this.options.eventRole||(0,util_1().singletonEventRole)(this.pipeline),pipelineArn=codepipeline_generated_1().CfnPipeline.arnForPipeline(this.pipeline);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({resources:[pipelineArn],actions:["codepipeline:StartPipelineExecution"]})),{...(0,util_1().bindBaseTargetConfig)(this.options),id:"",arn:pipelineArn,role,targetResource:this.pipeline}}}exports.CodePipeline=CodePipeline;
|
||||
76
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.d.ts
generated
vendored
Normal file
76
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
export interface ContainerOverride {
|
||||
/**
|
||||
* Name of the container inside the task definition
|
||||
*/
|
||||
readonly containerName: string;
|
||||
/**
|
||||
* Command to run inside the container
|
||||
*
|
||||
* @default Default command
|
||||
*/
|
||||
readonly command?: string[];
|
||||
/**
|
||||
* Variables to set in the container's environment
|
||||
*/
|
||||
readonly environment?: TaskEnvironmentVariable[];
|
||||
/**
|
||||
* The number of cpu units reserved for the container
|
||||
*
|
||||
* @default The default value from the task definition.
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* Hard memory limit on the container
|
||||
*
|
||||
* @default The default value from the task definition.
|
||||
*/
|
||||
readonly memoryLimit?: number;
|
||||
/**
|
||||
* Soft memory limit on the container
|
||||
*
|
||||
* @default The default value from the task definition.
|
||||
*/
|
||||
readonly memoryReservation?: number;
|
||||
}
|
||||
/**
|
||||
* An environment variable to be set in the container run as a task
|
||||
*/
|
||||
export interface TaskEnvironmentVariable {
|
||||
/**
|
||||
* Name for the environment variable
|
||||
*
|
||||
* Exactly one of `name` and `namePath` must be specified.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Value of the environment variable
|
||||
*
|
||||
* Exactly one of `value` and `valuePath` must be specified.
|
||||
*/
|
||||
readonly value: string;
|
||||
}
|
||||
/**
|
||||
* Override ephemeral storage for the task.
|
||||
*/
|
||||
export interface EphemeralStorageOverride {
|
||||
/**
|
||||
* The total amount, in GiB, of ephemeral storage to set for the task.
|
||||
*
|
||||
* The minimum supported value is 20 GiB and the maximum supported value is 200 GiB.
|
||||
*/
|
||||
readonly sizeInGiB: number;
|
||||
}
|
||||
/**
|
||||
* Override inference accelerators for the task.
|
||||
*/
|
||||
export interface InferenceAcceleratorOverride {
|
||||
/**
|
||||
* The Elastic Inference accelerator device name to override for the task.
|
||||
* This parameter must match a `deviceName` specified in the task definition.
|
||||
*/
|
||||
readonly deviceName: string;
|
||||
/**
|
||||
* The Elastic Inference accelerator type to use.
|
||||
*/
|
||||
readonly deviceType: string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
181
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task.d.ts
generated
vendored
Normal file
181
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task.d.ts
generated
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
import type { ContainerOverride, EphemeralStorageOverride, InferenceAcceleratorOverride } from './ecs-task-properties';
|
||||
import type { TargetBaseProps } from './util';
|
||||
import * as ec2 from '../../aws-ec2';
|
||||
import * as ecs from '../../aws-ecs';
|
||||
import * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Metadata that you apply to a resource to help categorize and organize the resource. Each tag consists of a key and an optional value, both of which you define.
|
||||
*/
|
||||
export interface Tag {
|
||||
/**
|
||||
* Key is the name of the tag
|
||||
*/
|
||||
readonly key: string;
|
||||
/**
|
||||
* Value is the metadata contents of the tag
|
||||
*/
|
||||
readonly value: string;
|
||||
}
|
||||
/**
|
||||
* Properties to define an ECS Event Task
|
||||
*/
|
||||
export interface EcsTaskProps extends TargetBaseProps {
|
||||
/**
|
||||
* Cluster where service will be deployed
|
||||
*/
|
||||
readonly cluster: ecs.ICluster;
|
||||
/**
|
||||
* Task Definition of the task that should be started
|
||||
*/
|
||||
readonly taskDefinition: ecs.ITaskDefinition;
|
||||
/**
|
||||
* How many tasks should be started when this event is triggered
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly taskCount?: number;
|
||||
/**
|
||||
* Container setting overrides
|
||||
*
|
||||
* Key is the name of the container to override, value is the
|
||||
* values you want to override.
|
||||
*/
|
||||
readonly containerOverrides?: ContainerOverride[];
|
||||
/**
|
||||
* The CPU override for the task.
|
||||
*
|
||||
* @default - The task definition's CPU value
|
||||
*/
|
||||
readonly cpu?: string;
|
||||
/**
|
||||
* The ephemeral storage setting override for the task.
|
||||
*
|
||||
* NOTE: This parameter is only supported for tasks hosted on Fargate that use the following platform versions:
|
||||
* - Linux platform version 1.4.0 or later.
|
||||
* - Windows platform version 1.0.0 or later.
|
||||
*
|
||||
* @default - The task definition's ephemeral storage value
|
||||
*/
|
||||
readonly ephemeralStorage?: EphemeralStorageOverride;
|
||||
/**
|
||||
* The execution role for the task.
|
||||
*
|
||||
* The Amazon Resource Name (ARN) of the task execution role override for the task.
|
||||
*
|
||||
* @default - The task definition's execution role
|
||||
*/
|
||||
readonly executionRole?: iam.IRole;
|
||||
/**
|
||||
* The Elastic Inference accelerator override for the task.
|
||||
*
|
||||
* @default - The task definition's inference accelerator overrides
|
||||
*/
|
||||
readonly inferenceAcceleratorOverrides?: InferenceAcceleratorOverride[];
|
||||
/**
|
||||
* The memory override for the task.
|
||||
*
|
||||
* @default - The task definition's memory value
|
||||
*/
|
||||
readonly memory?: string;
|
||||
/**
|
||||
* The IAM role for the task.
|
||||
*
|
||||
* @default - The task definition's task role
|
||||
*/
|
||||
readonly taskRole?: iam.IRole;
|
||||
/**
|
||||
* In what subnets to place the task's ENIs
|
||||
*
|
||||
* (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
|
||||
*
|
||||
* @default Private subnets
|
||||
*/
|
||||
readonly subnetSelection?: ec2.SubnetSelection;
|
||||
/**
|
||||
* Existing security groups to use for the task's ENIs
|
||||
*
|
||||
* (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
|
||||
*
|
||||
* @default A new security group is created
|
||||
*/
|
||||
readonly securityGroups?: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* Existing IAM role to run the ECS task
|
||||
*
|
||||
* @default A new IAM role is created
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* The platform version on which to run your task
|
||||
*
|
||||
* Unless you have specific compatibility requirements, you don't need to specify this.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html
|
||||
*
|
||||
* @default - ECS will set the Fargate platform version to 'LATEST'
|
||||
*/
|
||||
readonly platformVersion?: ecs.FargatePlatformVersion;
|
||||
/**
|
||||
* Specifies whether the task's elastic network interface receives a public IP address.
|
||||
* You can specify true only when LaunchType is set to FARGATE.
|
||||
*
|
||||
* @default - true if the subnet type is PUBLIC, otherwise false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
/**
|
||||
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated.
|
||||
*
|
||||
* @default - Tags will not be propagated
|
||||
*/
|
||||
readonly propagateTags?: ecs.PropagatedTagSource;
|
||||
/**
|
||||
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
|
||||
*
|
||||
* @default - No additional tags are applied to the task
|
||||
*/
|
||||
readonly tags?: Tag[];
|
||||
/**
|
||||
* Whether or not to enable the execute command functionality for the containers in this task.
|
||||
* If true, this enables execute command functionality on all containers in the task.
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
/**
|
||||
* Specifies the launch type on which your task is running. The launch type that you specify here
|
||||
* must match one of the launch type (compatibilities) of the target task.
|
||||
*
|
||||
* @default - 'EC2' if `isEc2Compatible` for the `taskDefinition` is true, otherwise 'FARGATE'
|
||||
*/
|
||||
readonly launchType?: ecs.LaunchType;
|
||||
}
|
||||
/**
|
||||
* Start a task on an ECS cluster
|
||||
*/
|
||||
export declare class EcsTask implements events.IRuleTarget {
|
||||
private readonly props;
|
||||
/**
|
||||
* The security groups associated with the task. Only applicable with awsvpc network mode.
|
||||
*
|
||||
* @default - A new security group is created.
|
||||
*/
|
||||
readonly securityGroups?: ec2.ISecurityGroup[];
|
||||
private readonly cluster;
|
||||
private readonly taskDefinition;
|
||||
private readonly taskCount;
|
||||
private readonly role;
|
||||
private readonly platformVersion?;
|
||||
private readonly assignPublicIp?;
|
||||
private readonly propagateTags?;
|
||||
private readonly tags?;
|
||||
private readonly enableExecuteCommand?;
|
||||
private readonly launchType?;
|
||||
constructor(props: EcsTaskProps);
|
||||
/**
|
||||
* Allows using tasks as target of EventBridge events
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
private createInput;
|
||||
private createEventRolePolicyStatements;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/ecs-task.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
37
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/event-bus.d.ts
generated
vendored
Normal file
37
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/event-bus.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as sqs from '../../aws-sqs';
|
||||
/**
|
||||
* Configuration properties of an Event Bus event
|
||||
*
|
||||
* Cannot extend TargetBaseProps. Retry policy is not supported for Event bus targets.
|
||||
*/
|
||||
export interface EventBusProps {
|
||||
/**
|
||||
* Role to be used to publish the event
|
||||
*
|
||||
* @default a new role is created.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* The SQS queue to be used as deadLetterQueue.
|
||||
* Check out the [considerations for using a dead-letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html#dlq-considerations).
|
||||
*
|
||||
* The events not successfully delivered are automatically retried for a specified period of time,
|
||||
* depending on the retry policy of the target.
|
||||
* If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
|
||||
*
|
||||
* @default - no dead-letter queue
|
||||
*/
|
||||
readonly deadLetterQueue?: sqs.IQueue;
|
||||
}
|
||||
/**
|
||||
* Notify an existing Event Bus of an event
|
||||
*/
|
||||
export declare class EventBus implements events.IRuleTarget {
|
||||
private readonly eventBus;
|
||||
private readonly props;
|
||||
constructor(eventBus: events.IEventBus, props?: EventBusProps);
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
private putEventStatement;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/event-bus.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/event-bus.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventBus=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class EventBus{eventBus;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.EventBus",version:"2.252.0"};constructor(eventBus,props={}){this.eventBus=eventBus,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_IEventBus(eventBus),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_EventBusProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EventBus),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=this.props.role??(0,util_1().singletonEventRole)(rule);return role.addToPrincipalPolicy(this.putEventStatement()),this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),{arn:this.eventBus.eventBusArn,deadLetterConfig:this.props.deadLetterQueue?{arn:this.props.deadLetterQueue?.queueArn}:void 0,role}}putEventStatement(){return new(iam()).PolicyStatement({actions:["events:PutEvents"],resources:[this.eventBus.eventBusArn]})}}exports.EventBus=EventBus;
|
||||
94
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/firehose.d.ts
generated
vendored
Normal file
94
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/firehose.d.ts
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
import type * as events from '../../aws-events';
|
||||
import type * as firehose from '../../aws-kinesisfirehose';
|
||||
import type { IResource } from '../../core';
|
||||
/**
|
||||
* Customize the Amazon Data Firehose Stream Event Target
|
||||
*
|
||||
* @deprecated Use FirehoseDeliveryStreamProps
|
||||
*/
|
||||
export interface KinesisFirehoseStreamProps {
|
||||
/**
|
||||
* The message to send to the stream.
|
||||
*
|
||||
* Must be a valid JSON text passed to the target stream.
|
||||
*
|
||||
* @default - the entire Event Bridge event
|
||||
*/
|
||||
readonly message?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Customize the Amazon Data Firehose Stream Event Target
|
||||
*/
|
||||
export interface FirehoseDeliveryStreamProps {
|
||||
/**
|
||||
* The message to send to the stream.
|
||||
*
|
||||
* Must be a valid JSON text passed to the target stream.
|
||||
*
|
||||
* @default - the entire Event Bridge event
|
||||
*/
|
||||
readonly message?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Customize the Amazon Data Firehose Stream Event Target
|
||||
*
|
||||
* @deprecated Use FirehoseDeliveryStream
|
||||
*/
|
||||
export declare class KinesisFirehoseStream implements events.IRuleTarget {
|
||||
private readonly stream;
|
||||
private readonly props;
|
||||
constructor(stream: firehose.CfnDeliveryStream, props?: KinesisFirehoseStreamProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this Firehose Stream as a
|
||||
* result from a Event Bridge event.
|
||||
*/
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
/**
|
||||
* Represents an Amazon Data Firehose delivery stream.
|
||||
*
|
||||
* @deprecated Use aws_kinesisfirehose.IDeliveryStream
|
||||
*/
|
||||
export interface IDeliveryStream extends IResource {
|
||||
/**
|
||||
* The ARN of the delivery stream.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly deliveryStreamArn: string;
|
||||
/**
|
||||
* The name of the delivery stream.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly deliveryStreamName: string;
|
||||
}
|
||||
/**
|
||||
* Customize the Amazon Data Firehose Stream Event Target V2 to support L2 Amazon Data Firehose Delivery Stream
|
||||
* instead of L1 Cfn Firehose Delivery Stream.
|
||||
*
|
||||
* @deprecated Use FirehoseDeliveryStream
|
||||
*/
|
||||
export declare class KinesisFirehoseStreamV2 implements events.IRuleTarget {
|
||||
private readonly stream;
|
||||
private readonly props;
|
||||
constructor(stream: IDeliveryStream, props?: KinesisFirehoseStreamProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this Firehose Stream as a
|
||||
* result from a Event Bridge event.
|
||||
*/
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
/**
|
||||
* Customize the Amazon Data Firehose Stream Event Target.
|
||||
*/
|
||||
export declare class FirehoseDeliveryStream implements events.IRuleTarget {
|
||||
private readonly deliveryStream;
|
||||
private readonly props;
|
||||
constructor(deliveryStream: firehose.IDeliveryStream, props?: FirehoseDeliveryStreamProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this Firehose Stream as a
|
||||
* result from a Event Bridge event.
|
||||
*/
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/firehose.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/firehose.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FirehoseDeliveryStream=exports.KinesisFirehoseStreamV2=exports.KinesisFirehoseStream=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class KinesisFirehoseStream{stream;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.KinesisFirehoseStream",version:"2.252.0"};constructor(stream,props={}){this.stream=stream,this.props=props;try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_events_targets.KinesisFirehoseStream","Use FirehoseDeliveryStream"),jsiiDeprecationWarnings().aws_cdk_lib_aws_kinesisfirehose_CfnDeliveryStream(stream),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_KinesisFirehoseStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,KinesisFirehoseStream),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_events_targets.KinesisFirehoseStream#bind","Use FirehoseDeliveryStream"),jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=(0,util_1().singletonEventRole)(this.stream);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["firehose:PutRecord","firehose:PutRecordBatch"],resources:[this.stream.attrArn]})),{arn:this.stream.attrArn,role,input:this.props.message,targetResource:this.stream}}}exports.KinesisFirehoseStream=KinesisFirehoseStream;class KinesisFirehoseStreamV2{stream;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.KinesisFirehoseStreamV2",version:"2.252.0"};constructor(stream,props={}){this.stream=stream,this.props=props;try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_events_targets.KinesisFirehoseStreamV2","Use FirehoseDeliveryStream"),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_IDeliveryStream(stream),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_KinesisFirehoseStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,KinesisFirehoseStreamV2),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_events_targets.KinesisFirehoseStreamV2#bind","Use FirehoseDeliveryStream"),jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=(0,util_1().singletonEventRole)(this.stream);return role.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["firehose:PutRecord","firehose:PutRecordBatch"],resources:[this.stream.deliveryStreamArn]})),{arn:this.stream.deliveryStreamArn,role,input:this.props.message,targetResource:this.stream}}}exports.KinesisFirehoseStreamV2=KinesisFirehoseStreamV2;class FirehoseDeliveryStream{deliveryStream;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.FirehoseDeliveryStream",version:"2.252.0"};constructor(deliveryStream,props={}){this.deliveryStream=deliveryStream,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_kinesisfirehose_IDeliveryStream(deliveryStream),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_FirehoseDeliveryStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FirehoseDeliveryStream),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=(0,util_1().singletonEventRole)(this.deliveryStream);return this.deliveryStream.grantPutRecords(role),{arn:this.deliveryStream.deliveryStreamArn,role,input:this.props.message,targetResource:this.deliveryStream}}}exports.FirehoseDeliveryStream=FirehoseDeliveryStream;
|
||||
20
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/index.d.ts
generated
vendored
Normal file
20
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export * from './batch';
|
||||
export * from './codepipeline';
|
||||
export * from './sns';
|
||||
export * from './sqs';
|
||||
export * from './codebuild';
|
||||
export * from './aws-api';
|
||||
export * from './lambda';
|
||||
export * from './ecs-task-properties';
|
||||
export * from './ecs-task';
|
||||
export * from './event-bus';
|
||||
export * from './state-machine';
|
||||
export * from './kinesis-stream';
|
||||
export * from './log-group';
|
||||
export * from './firehose';
|
||||
export * from './api-gateway';
|
||||
export * from './api-gatewayv2';
|
||||
export * from './api-destination';
|
||||
export * from './appsync';
|
||||
export * from './util';
|
||||
export * from './redshift-query';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
42
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/kinesis-stream.d.ts
generated
vendored
Normal file
42
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/kinesis-stream.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import type * as kinesis from '../../aws-kinesis';
|
||||
/**
|
||||
* Customize the Kinesis Stream Event Target
|
||||
*/
|
||||
export interface KinesisStreamProps extends TargetBaseProps {
|
||||
/**
|
||||
* Partition Key Path for records sent to this stream
|
||||
*
|
||||
* @default - eventId as the partition key
|
||||
*/
|
||||
readonly partitionKeyPath?: string;
|
||||
/**
|
||||
* The message to send to the stream.
|
||||
*
|
||||
* Must be a valid JSON text passed to the target stream.
|
||||
*
|
||||
* @default - the entire CloudWatch event
|
||||
*/
|
||||
readonly message?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Use a Kinesis Stream as a target for AWS CloudWatch event rules.
|
||||
*
|
||||
* @example
|
||||
* /// fixture=withRepoAndKinesisStream
|
||||
* // put to a Kinesis stream every time code is committed
|
||||
* // to a CodeCommit repository
|
||||
* repository.onCommit('onCommit', { target: new targets.KinesisStream(stream) });
|
||||
*
|
||||
*/
|
||||
export declare class KinesisStream implements events.IRuleTarget {
|
||||
private readonly stream;
|
||||
private readonly props;
|
||||
constructor(stream: kinesis.IStream, props?: KinesisStreamProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this Kinesis Stream as a
|
||||
* result from a CloudWatch event.
|
||||
*/
|
||||
bind(_rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/kinesis-stream.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/kinesis-stream.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.KinesisStream=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class KinesisStream{stream;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.KinesisStream",version:"2.252.0"};constructor(stream,props={}){this.stream=stream,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_kinesis_IStream(stream),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_KinesisStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,KinesisStream),error}}bind(_rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=(0,util_1().singletonEventRole)(this.stream);return this.stream.grantWrite(role),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.stream.streamArn,role,input:this.props.message,targetResource:this.stream,kinesisParameters:this.props.partitionKeyPath?{partitionKeyPath:this.props.partitionKeyPath}:void 0}}}exports.KinesisStream=KinesisStream;
|
||||
29
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/lambda.d.ts
generated
vendored
Normal file
29
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import type * as lambda from '../../aws-lambda';
|
||||
/**
|
||||
* Customize the Lambda Event Target
|
||||
*/
|
||||
export interface LambdaFunctionProps extends TargetBaseProps {
|
||||
/**
|
||||
* The event to send to the Lambda
|
||||
*
|
||||
* This will be the payload sent to the Lambda Function.
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly event?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Use an AWS Lambda function as an event rule target.
|
||||
*/
|
||||
export declare class LambdaFunction implements events.IRuleTarget {
|
||||
private readonly handler;
|
||||
private readonly props;
|
||||
constructor(handler: lambda.IFunction, props?: LambdaFunctionProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this Lambda as a
|
||||
* result from an EventBridge event.
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/lambda.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/lambda.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaFunction=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class LambdaFunction{handler;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.LambdaFunction",version:"2.252.0"};constructor(handler,props={}){this.handler=handler,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_LambdaFunctionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LambdaFunction),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return(0,util_1().addLambdaPermission)(rule,this.handler),this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.handler.functionArn,input:this.props.event,targetResource:this.handler}}}exports.LambdaFunction=LambdaFunction;
|
||||
28
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group-resource-policy.d.ts
generated
vendored
Normal file
28
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group-resource-policy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import * as iam from '../../aws-iam';
|
||||
import * as cr from '../../custom-resources';
|
||||
/**
|
||||
* Properties to configure a log group resource policy
|
||||
*/
|
||||
export interface LogGroupResourcePolicyProps {
|
||||
/**
|
||||
* The log group resource policy name
|
||||
*/
|
||||
readonly policyName?: string;
|
||||
/**
|
||||
* The policy statements for the log group resource logs
|
||||
*/
|
||||
readonly policyStatements: [iam.PolicyStatement];
|
||||
/**
|
||||
* Whether to install latest AWS SDK for the custom resource
|
||||
*
|
||||
* @default - install latest AWS SDK
|
||||
*/
|
||||
readonly installLatestAwsSdk?: boolean;
|
||||
}
|
||||
/**
|
||||
* Creates LogGroup resource policies.
|
||||
*/
|
||||
export declare class LogGroupResourcePolicy extends cr.AwsCustomResource {
|
||||
constructor(scope: Construct, id: string, props: LogGroupResourcePolicyProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group-resource-policy.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group-resource-policy.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LogGroupResourcePolicy=void 0;var iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},cdk=()=>{var tmp=require("../../core");return cdk=()=>tmp,tmp},cr=()=>{var tmp=require("../../custom-resources");return cr=()=>tmp,tmp};class LogGroupResourcePolicy extends cr().AwsCustomResource{constructor(scope,id,props){const policyDocument=new(iam()).PolicyDocument({statements:props.policyStatements});let policyName=props.policyName||cdk().Lazy.string({produce:()=>cdk().Names.uniqueId(this)});super(scope,id,{resourceType:"Custom::CloudwatchLogResourcePolicy",onUpdate:{service:"CloudWatchLogs",action:"putResourcePolicy",parameters:{policyName,policyDocument:JSON.stringify(policyDocument)},physicalResourceId:cr().PhysicalResourceId.of(id)},installLatestAwsSdk:props.installLatestAwsSdk,onDelete:{service:"CloudWatchLogs",action:"deleteResourcePolicy",parameters:{policyName},ignoreErrorCodesMatching:"ResourceNotFoundException"},policy:cr().AwsCustomResourcePolicy.fromSdkCalls({resources:cr().AwsCustomResourcePolicy.ANY_RESOURCE})})}}exports.LogGroupResourcePolicy=LogGroupResourcePolicy;
|
||||
100
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group.d.ts
generated
vendored
Normal file
100
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import * as events from '../../aws-events';
|
||||
import { RuleTargetInput } from '../../aws-events';
|
||||
import type * as logs from '../../aws-logs';
|
||||
/**
|
||||
* Options used when creating a target input template
|
||||
*/
|
||||
export interface LogGroupTargetInputOptions {
|
||||
/**
|
||||
* The timestamp that will appear in the CloudWatch Logs record
|
||||
*
|
||||
* @default EventField.time
|
||||
*/
|
||||
readonly timestamp?: any;
|
||||
/**
|
||||
* The value provided here will be used in the Log "message" field.
|
||||
*
|
||||
* This field must be a string. If an object is passed (e.g. JSON data)
|
||||
* it will not throw an error, but the message that makes it to
|
||||
* CloudWatch logs will be incorrect. This is a likely scenario if
|
||||
* doing something like: EventField.fromPath('$.detail') since in most cases
|
||||
* the `detail` field contains JSON data.
|
||||
*
|
||||
* @default EventField.detailType
|
||||
*/
|
||||
readonly message?: any;
|
||||
}
|
||||
/**
|
||||
* The input to send to the CloudWatch LogGroup target
|
||||
*/
|
||||
export declare abstract class LogGroupTargetInput extends RuleTargetInput {
|
||||
/**
|
||||
* Pass a JSON object to the log group event target
|
||||
*
|
||||
* May contain strings returned by `EventField.from()` to substitute in parts of the
|
||||
* matched event.
|
||||
*
|
||||
* @deprecated use fromObjectV2
|
||||
*/
|
||||
static fromObject(options: any): RuleTargetInput;
|
||||
/**
|
||||
* Pass a JSON object to the log group event target
|
||||
*
|
||||
* May contain strings returned by `EventField.from()` to substitute in parts of the
|
||||
* matched event.
|
||||
*/
|
||||
static fromObjectV2(options?: LogGroupTargetInputOptions): LogGroupTargetInput;
|
||||
}
|
||||
/**
|
||||
* Customize the CloudWatch LogGroup Event Target
|
||||
*/
|
||||
export interface LogGroupProps extends TargetBaseProps {
|
||||
/**
|
||||
* The event to send to the CloudWatch LogGroup
|
||||
*
|
||||
* This will be the event logged into the CloudWatch LogGroup
|
||||
*
|
||||
* @default - the entire EventBridge event
|
||||
* @deprecated use logEvent instead
|
||||
*/
|
||||
readonly event?: events.RuleTargetInput;
|
||||
/**
|
||||
* The event to send to the CloudWatch LogGroup
|
||||
*
|
||||
* This will be the event logged into the CloudWatch LogGroup
|
||||
*
|
||||
* @default - the entire EventBridge event
|
||||
*/
|
||||
readonly logEvent?: LogGroupTargetInput;
|
||||
/**
|
||||
* Whether the custom resource created wll default to
|
||||
* install latest AWS SDK
|
||||
*
|
||||
* @default - install latest AWS SDK
|
||||
*/
|
||||
readonly installLatestAwsSdk?: boolean;
|
||||
}
|
||||
/**
|
||||
* Use an AWS CloudWatch LogGroup as an event rule target.
|
||||
*/
|
||||
export declare class CloudWatchLogGroup implements events.IRuleTarget {
|
||||
private readonly logGroup;
|
||||
private readonly props;
|
||||
private target?;
|
||||
constructor(logGroup: logs.ILogGroupRef, props?: LogGroupProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
/**
|
||||
* Validate that the target event input template has the correct format.
|
||||
* The CloudWatchLogs target only supports a template with the format of:
|
||||
* {"timestamp": <time>, "message": <message>}
|
||||
*
|
||||
* This is only needed if the deprecated `event` property is used.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html
|
||||
*/
|
||||
private validateInputTemplate;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/log-group.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
92
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/redshift-query.d.ts
generated
vendored
Normal file
92
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/redshift-query.d.ts
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as secretsmanager from '../../aws-secretsmanager';
|
||||
import type * as sqs from '../../aws-sqs';
|
||||
/**
|
||||
* Configuration properties of an Amazon Redshift Query event.
|
||||
*/
|
||||
export interface RedshiftQueryProps {
|
||||
/**
|
||||
* The Amazon Redshift database to run the query against.
|
||||
*/
|
||||
readonly database: string;
|
||||
/**
|
||||
* The Amazon Redshift database user to run the query as. This is required when authenticating via temporary credentials.
|
||||
*
|
||||
* @default - No Database user is specified
|
||||
*/
|
||||
readonly dbUser?: string;
|
||||
/**
|
||||
* The secret containing the password for the database user. This is required when authenticating via Secrets Manager.
|
||||
* If the full secret ARN is not specified, this will instead use the secret name.
|
||||
*
|
||||
* @default - No secret is specified
|
||||
*/
|
||||
readonly secret?: secretsmanager.ISecret;
|
||||
/**
|
||||
* The SQL queries to be executed. Each query is run sequentially within a single transaction; the next query in the array will only execute after the previous one has successfully completed.
|
||||
*
|
||||
* - When multiple sql queries are included, this will use the `batchExecuteStatement` API. Therefore, if any statement fails, the entire transaction is rolled back.
|
||||
* - If a single SQL statement is to be executed, this will use the `executeStatement` API.
|
||||
*
|
||||
* @default - No SQL query is specified
|
||||
*/
|
||||
readonly sql: string[];
|
||||
/**
|
||||
* The name of the SQL statement. You can name the SQL statement for identitfication purposes. If you would like Amazon Redshift to identify the Event Bridge rule, and present it in the Amazon Redshift console, append a `QS2-` prefix to the statement name.
|
||||
*
|
||||
* @default - No statement name is specified
|
||||
*/
|
||||
readonly statementName?: string;
|
||||
/**
|
||||
* Should an event be sent back to Event Bridge when the SQL statement is executed.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly sendEventBridgeEvent?: boolean;
|
||||
/**
|
||||
* The queue to be used as dead letter queue.
|
||||
*
|
||||
* @default - No dead letter queue is specified
|
||||
*/
|
||||
readonly deadLetterQueue?: sqs.IQueue;
|
||||
/**
|
||||
* The IAM role to be used to execute the SQL statement.
|
||||
*
|
||||
* @default - a new role will be created.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* The input to the state machine execution
|
||||
*
|
||||
* @default - the entire EventBridge event
|
||||
*/
|
||||
readonly input?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Schedule an Amazon Redshift Query to be run, using the Redshift Data API.
|
||||
*
|
||||
* If you would like Amazon Redshift to identify the Event Bridge rule, and present it in the Amazon Redshift console, append a `QS2-` prefix to both `statementName` and `ruleName`.
|
||||
*/
|
||||
export declare class RedshiftQuery implements events.IRuleTarget {
|
||||
/**
|
||||
* The ARN of the Amazon Redshift cluster
|
||||
*/
|
||||
private readonly clusterArn;
|
||||
/**
|
||||
* The properties of the Redshift Query event
|
||||
*/
|
||||
private readonly props;
|
||||
constructor(
|
||||
/**
|
||||
* The ARN of the Amazon Redshift cluster
|
||||
*/
|
||||
clusterArn: string,
|
||||
/**
|
||||
* The properties of the Redshift Query event
|
||||
*/
|
||||
props: RedshiftQueryProps);
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
private putEventStatement;
|
||||
private putBatchEventStatement;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/redshift-query.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/redshift-query.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RedshiftQuery=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class RedshiftQuery{clusterArn;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.RedshiftQuery",version:"2.252.0"};constructor(clusterArn,props){this.clusterArn=clusterArn,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_RedshiftQueryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,RedshiftQuery),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=this.props.role??(0,util_1().singletonEventRole)(rule);if(this.props.sql.length<1)throw new(core_1()).ValidationError((0,literal_string_1().lit)`AtLeastOneSqlStatementMustBeSpecified`,"At least one SQL statement must be specified.",rule);return this.props.sql.length===1&&role.addToPrincipalPolicy(this.putEventStatement()),this.props.sql.length>1&&role.addToPrincipalPolicy(this.putBatchEventStatement()),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.clusterArn,role,input:this.props.input,redshiftDataParameters:{database:this.props.database,dbUser:this.props.dbUser,secretManagerArn:this.props.secret?.secretFullArn??this.props.secret?.secretName,sql:this.props.sql.length===1?this.props.sql[0]:void 0,sqls:this.props.sql.length>1?this.props.sql:void 0,statementName:this.props.statementName,withEvent:this.props.sendEventBridgeEvent}}}putEventStatement(){return new(iam()).PolicyStatement({actions:["redshift-data:ExecuteStatement"],resources:[this.clusterArn]})}putBatchEventStatement(){return new(iam()).PolicyStatement({actions:["redshift-data:BatchExecuteStatement"],resources:[this.clusterArn]})}}exports.RedshiftQuery=RedshiftQuery;
|
||||
50
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sns.d.ts
generated
vendored
Normal file
50
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sns.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as sns from '../../aws-sns';
|
||||
/**
|
||||
* Customize the SNS Topic Event Target
|
||||
*/
|
||||
export interface SnsTopicProps extends TargetBaseProps {
|
||||
/**
|
||||
* The message to send to the topic
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly message?: events.RuleTargetInput;
|
||||
/**
|
||||
* Specifies whether an IAM role should be used to publish to the topic
|
||||
*
|
||||
* @default - true if `role` is provided, false otherwise
|
||||
*/
|
||||
readonly authorizeUsingRole?: boolean;
|
||||
/**
|
||||
* The IAM role to be used to publish to the topic
|
||||
*
|
||||
* @default - a new role will be created if `authorizeUsingRole` is true
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
}
|
||||
/**
|
||||
* Use an SNS topic as a target for Amazon EventBridge rules.
|
||||
* If the topic is imported the required permissions to publish to that topic need to be set manually.
|
||||
*
|
||||
* @example
|
||||
* /// fixture=withRepoAndTopic
|
||||
* // publish to an SNS topic every time code is committed
|
||||
* // to a CodeCommit repository
|
||||
* repository.onCommit('onCommit', { target: new targets.SnsTopic(topic) });
|
||||
*
|
||||
*/
|
||||
export declare class SnsTopic implements events.IRuleTarget {
|
||||
readonly topic: sns.ITopic;
|
||||
private readonly props;
|
||||
constructor(topic: sns.ITopic, props?: SnsTopicProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this SNS topic as a
|
||||
* result from an EventBridge event.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/resource-based-policies-eventbridge.html#sns-permissions
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sns.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sns.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnsTopic=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class SnsTopic{topic;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.SnsTopic",version:"2.252.0"};constructor(topic,props={}){this.topic=topic,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sns_ITopic(topic),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_SnsTopicProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SnsTopic),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}let role;if(this.props.authorizeUsingRole??this.props.role)role=this.props.role??(0,util_1().singletonEventRole)(rule),this.topic.grantPublish(role);else{if(this.props.role)throw new(core_1()).ValidationError((0,literal_string_1().lit)`CannotProvideRoleWhenAuthorizeUsingRoleIsFalse`,"Cannot provide a role when authorizeUsingRole is false",rule);this.topic.grantPublish(new(iam()).ServicePrincipal("events.amazonaws.com"))}return this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.topic.topicArn,input:this.props.message,targetResource:this.topic,role}}}exports.SnsTopic=SnsTopic;
|
||||
47
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sqs.d.ts
generated
vendored
Normal file
47
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sqs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import * as events from '../../aws-events';
|
||||
import type * as sqs from '../../aws-sqs';
|
||||
/**
|
||||
* Customize the SQS Queue Event Target
|
||||
*/
|
||||
export interface SqsQueueProps extends TargetBaseProps {
|
||||
/**
|
||||
* Message Group ID for messages sent to this queue
|
||||
*
|
||||
* Required for FIFO queues. For standard queues, this parameter is optional
|
||||
* and can be used for SQS fair queue feature and deduplication.
|
||||
*
|
||||
* @default - no message group ID
|
||||
*/
|
||||
readonly messageGroupId?: string;
|
||||
/**
|
||||
* The message to send to the queue.
|
||||
*
|
||||
* Must be a valid JSON text passed to the target queue.
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly message?: events.RuleTargetInput;
|
||||
}
|
||||
/**
|
||||
* Use an SQS Queue as a target for Amazon EventBridge rules.
|
||||
*
|
||||
* @example
|
||||
* /// fixture=withRepoAndSqsQueue
|
||||
* // publish to an SQS queue every time code is committed
|
||||
* // to a CodeCommit repository
|
||||
* repository.onCommit('onCommit', { target: new targets.SqsQueue(queue) });
|
||||
*
|
||||
*/
|
||||
export declare class SqsQueue implements events.IRuleTarget {
|
||||
readonly queue: sqs.IQueue;
|
||||
private readonly props;
|
||||
constructor(queue: sqs.IQueue, props?: SqsQueueProps);
|
||||
/**
|
||||
* Returns a RuleTarget that can be used to trigger this SQS queue as a
|
||||
* result from an EventBridge event.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/resource-based-policies-eventbridge.html#sqs-permissions
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sqs.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/sqs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SqsQueue=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},events=()=>{var tmp=require("../../aws-events");return events=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};class SqsQueue{queue;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.SqsQueue",version:"2.252.0"};constructor(queue,props={}){this.queue=queue,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sqs_IQueue(queue),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_SqsQueueProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SqsQueue),error}}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const restrictToSameAccount=core_1().FeatureFlags.of(rule).isEnabled(cxapi().EVENTS_TARGET_QUEUE_SAME_ACCOUNT);let conditions={};return this.queue.encryptionMasterKey?restrictToSameAccount&&(conditions={StringEquals:{"aws:SourceAccount":rule.env.account}}):conditions={ArnEquals:{"aws:SourceArn":events().CfnRule.arnForRule(rule)}},this.queue.grantSendMessages(new(iam()).ServicePrincipal("events.amazonaws.com",{conditions})),this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.queue.queueArn,input:this.props.message,targetResource:this.queue,sqsParameters:this.props.messageGroupId?{messageGroupId:this.props.messageGroupId}:void 0}}}exports.SqsQueue=SqsQueue;
|
||||
36
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/state-machine.d.ts
generated
vendored
Normal file
36
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/state-machine.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { TargetBaseProps } from './util';
|
||||
import type * as events from '../../aws-events';
|
||||
import type * as iam from '../../aws-iam';
|
||||
import type * as sfn from '../../aws-stepfunctions';
|
||||
/**
|
||||
* Customize the Step Functions State Machine target
|
||||
*/
|
||||
export interface SfnStateMachineProps extends TargetBaseProps {
|
||||
/**
|
||||
* The input to the state machine execution
|
||||
*
|
||||
* @default the entire EventBridge event
|
||||
*/
|
||||
readonly input?: events.RuleTargetInput;
|
||||
/**
|
||||
* The IAM role to be assumed to execute the State Machine
|
||||
*
|
||||
* @default - a new role will be created
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
}
|
||||
/**
|
||||
* Use a StepFunctions state machine as a target for Amazon EventBridge rules.
|
||||
*/
|
||||
export declare class SfnStateMachine implements events.IRuleTarget {
|
||||
readonly machine: sfn.IStateMachine;
|
||||
private readonly props;
|
||||
private readonly role;
|
||||
constructor(machine: sfn.IStateMachine, props?: SfnStateMachineProps);
|
||||
/**
|
||||
* Returns a properties that are used in an Rule to trigger this State Machine
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/resource-based-policies-eventbridge.html#sns-permissions
|
||||
*/
|
||||
bind(rule: events.IRuleRef, _id?: string): events.RuleTargetConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/state-machine.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/state-machine.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SfnStateMachine=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class SfnStateMachine{machine;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_events_targets.SfnStateMachine",version:"2.252.0"};role;constructor(machine,props={}){this.machine=machine,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_IStateMachine(machine),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_SfnStateMachineProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SfnStateMachine),error}this.role=props.role??(0,util_1().singletonEventRole)(machine),machine.grantStartExecution(this.role)}bind(rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_events_IRuleRef(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(rule,this.props.deadLetterQueue),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.machine.stateMachineArn,role:this.role,input:this.props.input,targetResource:this.machine}}}exports.SfnStateMachine=SfnStateMachine;
|
||||
72
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/util.d.ts
generated
vendored
Normal file
72
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import type { IConstruct } from 'constructs';
|
||||
import * as events from '../../aws-events';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as lambda from '../../aws-lambda';
|
||||
import type * as sqs from '../../aws-sqs';
|
||||
import type { Duration } from '../../core';
|
||||
/**
|
||||
* The generic properties for an RuleTarget
|
||||
*/
|
||||
export interface TargetBaseProps {
|
||||
/**
|
||||
* The SQS queue to be used as deadLetterQueue.
|
||||
* Check out the [considerations for using a dead-letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html#dlq-considerations).
|
||||
*
|
||||
* The events not successfully delivered are automatically retried for a specified period of time,
|
||||
* depending on the retry policy of the target.
|
||||
* If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
|
||||
*
|
||||
* @default - no dead-letter queue
|
||||
*/
|
||||
readonly deadLetterQueue?: sqs.IQueue;
|
||||
/**
|
||||
* The maximum age of a request that Lambda sends to a function for
|
||||
* processing.
|
||||
*
|
||||
* Minimum value of 60.
|
||||
* Maximum value of 86400.
|
||||
*
|
||||
* @default Duration.hours(24)
|
||||
*/
|
||||
readonly maxEventAge?: Duration;
|
||||
/**
|
||||
* The maximum number of times to retry when the function returns an error.
|
||||
*
|
||||
* Minimum value of 0.
|
||||
* Maximum value of 185.
|
||||
*
|
||||
* @default 185
|
||||
*/
|
||||
readonly retryAttempts?: number;
|
||||
}
|
||||
/**
|
||||
* Bind props to base rule target config.
|
||||
* @internal
|
||||
*/
|
||||
export declare function bindBaseTargetConfig(props: TargetBaseProps): {
|
||||
deadLetterConfig: {
|
||||
arn: string;
|
||||
} | undefined;
|
||||
retryPolicy: {
|
||||
maximumRetryAttempts: number | undefined;
|
||||
maximumEventAgeInSeconds: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
/**
|
||||
* Obtain the Role for the EventBridge event
|
||||
*
|
||||
* If a role already exists, it will be returned. This ensures that if multiple
|
||||
* events have the same target, they will share a role.
|
||||
* @internal
|
||||
*/
|
||||
export declare function singletonEventRole(scope: IConstruct): iam.IRole;
|
||||
/**
|
||||
* Allows a Lambda function to be called from a rule
|
||||
* @internal
|
||||
*/
|
||||
export declare function addLambdaPermission(rule: events.IRuleRef, handler: lambda.IFunction): void;
|
||||
/**
|
||||
* Allow a rule to send events with failed invocation to an Amazon SQS queue.
|
||||
* @internal
|
||||
*/
|
||||
export declare function addToDeadLetterQueueResourcePolicy(rule: events.IRuleRef, queue: sqs.IQueue): void;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/util.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bindBaseTargetConfig=bindBaseTargetConfig,exports.singletonEventRole=singletonEventRole,exports.addLambdaPermission=addLambdaPermission,exports.addToDeadLetterQueueResourcePolicy=addToDeadLetterQueueResourcePolicy;var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},events=()=>{var tmp=require("../../aws-events");return events=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function bindBaseTargetConfig(props){let{deadLetterQueue,retryAttempts,maxEventAge}=props;return{deadLetterConfig:deadLetterQueue?{arn:deadLetterQueue?.queueArn}:void 0,retryPolicy:retryAttempts!==void 0&&retryAttempts>=0||maxEventAge?{maximumRetryAttempts:retryAttempts,maximumEventAgeInSeconds:maxEventAge?.toSeconds({integral:!0})}:void 0}}function singletonEventRole(scope){const id="EventsRole",existing=scope.node.tryFindChild(id);return existing||new(iam()).Role(scope,id,{roleName:core_1().PhysicalName.GENERATE_IF_NEEDED,assumedBy:new(iam()).ServicePrincipal("events.amazonaws.com")})}function addLambdaPermission(rule,handler){let scope,node=handler.permissionsNode,permissionId=`AllowEventRule${core_1().Names.nodeUniqueId(rule.node)}`;rule instanceof constructs_1().Construct&&(scope=rule,node=rule.node,permissionId=`AllowEventRule${core_1().Names.nodeUniqueId(handler.node)}`),node.tryFindChild(permissionId)||handler.addPermission(permissionId,{scope,action:"lambda:InvokeFunction",principal:new(iam()).ServicePrincipal("events.amazonaws.com"),sourceArn:events().CfnRule.arnForRule(rule)})}function addToDeadLetterQueueResourcePolicy(rule,queue){if(!sameEnvDimension(rule.env.region,queue.env.region))throw new(core_1()).ValidationError((0,literal_string_1().lit)`CannotAssignDeadLetterQueueInDifferentRegion`,`Cannot assign Dead Letter Queue in region ${queue.env.region} to the rule ${core_1().Names.nodeUniqueId(rule.node)} in region ${rule.env.region}. Both the queue and the rule must be in the same region.`,rule);if(sameEnvDimension(rule.env.account,queue.env.account)){const policyStatementId=`AllowEventRule${core_1().Names.nodeUniqueId(rule.node)}`;queue.addToResourcePolicy(new(iam()).PolicyStatement({sid:policyStatementId,principals:[new(iam()).ServicePrincipal("events.amazonaws.com")],effect:iam().Effect.ALLOW,actions:["sqs:SendMessage"],resources:[queue.queueArn],conditions:{ArnEquals:{"aws:SourceArn":events().CfnRule.arnForRule(rule)}}}))}else core_1().Annotations.of(rule).addWarningV2("@aws-cdk/aws-events-targets:manuallyAddDLQResourcePolicy",`Cannot add a resource policy to your dead letter queue associated with rule ${rule.ruleRef.ruleArn} because the queue is in a different account. You must add the resource policy manually to the dead letter queue in account ${queue.env.account}.`)}function sameEnvDimension(dim1,dim2){return[core_1().TokenComparison.SAME,core_1().TokenComparison.ONE_UNRESOLVED,core_1().TokenComparison.BOTH_UNRESOLVED].includes(core_1().Token.compareStrings(dim1,dim2))}
|
||||
23
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/withRepoAndKinesisStream.ts-fixture
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-events-targets/lib/withRepoAndKinesisStream.ts-fixture
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// Fixture with packages imported, but nothing else
|
||||
import { Duration, RemovalPolicy, Stack } from 'aws-cdk-lib';
|
||||
import { Construct } from 'constructs';
|
||||
|
||||
import * as targets from 'aws-cdk-lib/aws-events-targets';
|
||||
import * as events from 'aws-cdk-lib/aws-events';
|
||||
import * as kinesis from 'aws-cdk-lib/aws-kinesis';
|
||||
import * as codecommit from 'aws-cdk-lib/aws-codecommit';
|
||||
import * as cdk from 'aws-cdk-lib';
|
||||
|
||||
class Fixture extends Stack {
|
||||
constructor(scope: Construct, id: string) {
|
||||
super(scope, id);
|
||||
|
||||
const repository = new codecommit.Repository(this, 'MyRepo', {
|
||||
repositoryName: 'aws-cdk-events',
|
||||
});
|
||||
|
||||
const stream = new kinesis.Stream(stack, 'MyStream');
|
||||
|
||||
/// here
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user