agent-claw: automated task changes
This commit is contained in:
13
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/.jsiirc.json
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/.jsiirc.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"targets": {
|
||||
"java": {
|
||||
"package": "software.amazon.awscdk.services.s3.notifications"
|
||||
},
|
||||
"dotnet": {
|
||||
"namespace": "Amazon.CDK.AWS.S3.Notifications"
|
||||
},
|
||||
"python": {
|
||||
"module": "aws_cdk.aws_s3_notifications"
|
||||
}
|
||||
}
|
||||
}
|
||||
46
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/README.md
generated
vendored
Normal file
46
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/README.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# S3 Bucket Notifications Destinations
|
||||
|
||||
|
||||
This module includes integration classes for using Topics, Queues or Lambdas
|
||||
as S3 Notification Destinations.
|
||||
|
||||
## Examples
|
||||
|
||||
The following example shows how to send a notification to an SNS
|
||||
topic when an object is created in an S3 bucket:
|
||||
|
||||
```ts
|
||||
import * as sns from 'aws-cdk-lib/aws-sns';
|
||||
|
||||
const bucket = new s3.Bucket(this, 'Bucket');
|
||||
const topic = new sns.Topic(this, 'Topic');
|
||||
|
||||
bucket.addEventNotification(s3.EventType.OBJECT_CREATED_PUT, new s3n.SnsDestination(topic));
|
||||
```
|
||||
|
||||
The following example shows how to send a notification to an SQS queue
|
||||
when an object is created in an S3 bucket:
|
||||
|
||||
```ts
|
||||
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
||||
|
||||
const bucket = new s3.Bucket(this, 'Bucket');
|
||||
const queue = new sqs.Queue(this, 'Queue');
|
||||
|
||||
bucket.addEventNotification(s3.EventType.OBJECT_CREATED_PUT, new s3n.SqsDestination(queue));
|
||||
```
|
||||
|
||||
The following example shows how to send a notification to a Lambda function when an object is created in an S3 bucket:
|
||||
|
||||
```ts
|
||||
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
||||
|
||||
const bucket = new s3.Bucket(this, 'Bucket');
|
||||
const fn = new lambda.Function(this, 'MyFunction', {
|
||||
runtime: lambda.Runtime.NODEJS_LATEST,
|
||||
handler: 'index.handler',
|
||||
code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
|
||||
});
|
||||
|
||||
bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(fn));
|
||||
```
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/index.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.SqsDestination=void 0,Object.defineProperty(exports,_noFold="SqsDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").SqsDestination;return Object.defineProperty(exports,_noFold="SqsDestination",{enumerable:!0,configurable:!0,value}),value}}),exports.SnsDestination=void 0,Object.defineProperty(exports,_noFold="SnsDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").SnsDestination;return Object.defineProperty(exports,_noFold="SnsDestination",{enumerable:!0,configurable:!0,value}),value}}),exports.LambdaDestination=void 0,Object.defineProperty(exports,_noFold="LambdaDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").LambdaDestination;return Object.defineProperty(exports,_noFold="LambdaDestination",{enumerable:!0,configurable:!0,value}),value}});
|
||||
3
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/index.d.ts
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './sqs';
|
||||
export * from './sns';
|
||||
export * from './lambda';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.SqsDestination=void 0,Object.defineProperty(exports,_noFold="SqsDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./sqs").SqsDestination;return Object.defineProperty(exports,_noFold="SqsDestination",{enumerable:!0,configurable:!0,value}),value}}),exports.SnsDestination=void 0,Object.defineProperty(exports,_noFold="SnsDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./sns").SnsDestination;return Object.defineProperty(exports,_noFold="SnsDestination",{enumerable:!0,configurable:!0,value}),value}}),exports.LambdaDestination=void 0,Object.defineProperty(exports,_noFold="LambdaDestination",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").LambdaDestination;return Object.defineProperty(exports,_noFold="LambdaDestination",{enumerable:!0,configurable:!0,value}),value}});
|
||||
11
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/lambda.d.ts
generated
vendored
Normal file
11
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type * as lambda from '../../aws-lambda';
|
||||
import * as s3 from '../../aws-s3';
|
||||
/**
|
||||
* Use a Lambda function as a bucket notification destination
|
||||
*/
|
||||
export declare class LambdaDestination implements s3.IBucketNotificationDestination {
|
||||
private readonly fn;
|
||||
constructor(fn: lambda.IFunction);
|
||||
bind(scope: Construct, bucket: s3.IBucketRef): s3.BucketNotificationDestinationConfig;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/lambda.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/lambda.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaDestination=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},s3=()=>{var tmp=require("../../aws-s3");return s3=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class LambdaDestination{fn;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3_notifications.LambdaDestination",version:"2.252.0"};constructor(fn){this.fn=fn;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(fn)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LambdaDestination),error}}bind(scope,bucket){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3_IBucketRef(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const permissionId=`AllowBucketNotificationsTo${core_1().Names.nodeUniqueId(this.fn.permissionsNode)}`;if(!(bucket instanceof constructs_1().Construct))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`LambdaDestinationFunction`,`LambdaDestination for function ${core_1().Names.nodeUniqueId(this.fn.permissionsNode)} can only be configured on a
|
||||
bucket construct (Bucket ${bucket.bucketRef.bucketName})`,scope);bucket.node.tryFindChild(permissionId)===void 0&&this.fn.addPermission(permissionId,{sourceAccount:core_1().Stack.of(bucket).account,principal:new(iam()).ServicePrincipal("s3.amazonaws.com"),sourceArn:bucket.bucketRef.bucketArn,scope:bucket});const permission=bucket.node.tryFindChild(permissionId);return{type:s3().BucketNotificationDestinationType.LAMBDA,arn:this.fn.functionArn,dependencies:permission?[permission]:void 0}}}exports.LambdaDestination=LambdaDestination;
|
||||
11
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sns.d.ts
generated
vendored
Normal file
11
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sns.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import * as s3 from '../../aws-s3';
|
||||
import type * as sns from '../../aws-sns';
|
||||
/**
|
||||
* Use an SNS topic as a bucket notification destination
|
||||
*/
|
||||
export declare class SnsDestination implements s3.IBucketNotificationDestination {
|
||||
private readonly topic;
|
||||
constructor(topic: sns.ITopic);
|
||||
bind(scope: Construct, bucket: s3.IBucketRef): s3.BucketNotificationDestinationConfig;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sns.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sns.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnsDestination=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},s3=()=>{var tmp=require("../../aws-s3");return s3=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};class SnsDestination{topic;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3_notifications.SnsDestination",version:"2.252.0"};constructor(topic){this.topic=topic;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sns_ITopic(topic)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SnsDestination),error}}bind(scope,bucket){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3_IBucketRef(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.topic.addToResourcePolicy(new(iam()).PolicyStatement({principals:[new(iam()).ServicePrincipal("s3.amazonaws.com")],actions:["sns:Publish"],resources:[this.topic.topicArn],conditions:{ArnLike:{"aws:SourceArn":bucket.bucketRef.bucketArn}}})),core_1().FeatureFlags.of(scope).isEnabled(cxapi().S3_TRUST_KEY_POLICY_FOR_SNS_SUBSCRIPTIONS)&&this.topic.masterKey){const statement=new(iam()).PolicyStatement({principals:[new(iam()).ServicePrincipal("s3.amazonaws.com")],actions:["kms:GenerateDataKey","kms:Decrypt"],resources:["*"]});this.topic.masterKey.addToResourcePolicy(statement,!0).statementAdded||core_1().Annotations.of(this.topic.masterKey).addWarningV2("@aws-cdk/aws-s3-notifications:snsKMSPermissionsNotAdded",`Can not change key policy of imported kms key. Ensure that your key policy contains the following permissions:
|
||||
${JSON.stringify(statement.toJSON(),null,2)}`)}return{arn:this.topic.topicArn,type:s3().BucketNotificationDestinationType.TOPIC,dependencies:[this.topic]}}}exports.SnsDestination=SnsDestination;
|
||||
15
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sqs.d.ts
generated
vendored
Normal file
15
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sqs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import * as s3 from '../../aws-s3';
|
||||
import type * as sqs from '../../aws-sqs';
|
||||
/**
|
||||
* Use an SQS queue as a bucket notification destination
|
||||
*/
|
||||
export declare class SqsDestination implements s3.IBucketNotificationDestination {
|
||||
private readonly queue;
|
||||
constructor(queue: sqs.IQueue);
|
||||
/**
|
||||
* Allows using SQS queues as destinations for bucket notifications.
|
||||
* Use `bucket.onEvent(event, queue)` to subscribe.
|
||||
*/
|
||||
bind(_scope: Construct, bucket: s3.IBucketRef): s3.BucketNotificationDestinationConfig;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sqs.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-s3-notifications/lib/sqs.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SqsDestination=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},s3=()=>{var tmp=require("../../aws-s3");return s3=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class SqsDestination{queue;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3_notifications.SqsDestination",version:"2.252.0"};constructor(queue){this.queue=queue;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sqs_IQueue(queue)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SqsDestination),error}}bind(_scope,bucket){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3_IBucketRef(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.queue.grantSendMessages(new(iam()).ServicePrincipal("s3.amazonaws.com",{conditions:{ArnLike:{"aws:SourceArn":bucket.bucketRef.bucketArn}}})),this.queue.encryptionMasterKey){const statement=new(iam()).PolicyStatement({principals:[new(iam()).ServicePrincipal("s3.amazonaws.com")],actions:["kms:GenerateDataKey*","kms:Decrypt"],resources:["*"]});this.queue.encryptionMasterKey.addToResourcePolicy(statement,!0).statementAdded||core_1().Annotations.of(this.queue.encryptionMasterKey).addWarningV2("@aws-cdk/aws-s3-notifications:sqsKMSPermissionsNotAdded",`Can not change key policy of imported kms key. Ensure that your key policy contains the following permissions:
|
||||
${JSON.stringify(statement.toJSON(),null,2)}`)}return{arn:this.queue.queueArn,type:s3().BucketNotificationDestinationType.QUEUE,dependencies:[this.queue]}}}exports.SqsDestination=SqsDestination;
|
||||
Reference in New Issue
Block a user