interface ObjectType
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.S3.Events.BucketEvents.ObjectCreated.ObjectType |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awss3/events#BucketEvents_ObjectCreated_ObjectType |
Java | software.amazon.awscdk.mixins.preview.services.s3.events.BucketEvents.ObjectCreated.ObjectType |
Python | aws_cdk.mixins_preview.aws_s3.events.BucketEvents.ObjectCreated.ObjectType |
TypeScript | @aws-cdk/mixins-preview ยป aws_s3 ยป events ยป BucketEvents ยป ObjectCreated ยป ObjectType |
Type definition for Object.
Example
import { BucketEvents } from '@aws-cdk/mixins-preview/aws-s3/events';
import * as events from 'aws-cdk-lib/aws-events';
import * as targets from 'aws-cdk-lib/aws-events-targets';
// Works with L2 constructs
const bucket = new s3.Bucket(scope, 'Bucket');
const bucketEvents = BucketEvents.fromBucket(bucket);
declare const fn: lambda.Function;
new events.Rule(scope, 'Rule', {
eventPattern: bucketEvents.objectCreatedPattern({
object: { key: events.Match.wildcard('uploads/*') },
}),
targets: [new targets.LambdaFunction(fn)]
});
// Also works with L1 constructs
const cfnBucket = new s3.CfnBucket(scope, 'CfnBucket');
const cfnBucketEvents = BucketEvents.fromBucket(cfnBucket);
new events.CfnRule(scope, 'CfnRule', {
state: 'ENABLED',
eventPattern: cfnBucketEvents.objectCreatedPattern({
object: { key: events.Match.wildcard('uploads/*') },
}),
targets: [{ arn: fn.functionArn, id: 'L1' }]
});
Properties
| Name | Type | Description |
|---|---|---|
| etag? | string[] | etag property. |
| key? | string[] | key property. |
| sequencer? | string[] | sequencer property. |
| size? | string[] | size property. |
| version | string[] | version-id property. |
etag?
Type:
string[]
(optional, default: Do not filter on this field)
etag property.
Specify an array of string values to match this event if the actual value of etag is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.
key?
Type:
string[]
(optional, default: Do not filter on this field)
key property.
Specify an array of string values to match this event if the actual value of key is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.
sequencer?
Type:
string[]
(optional, default: Do not filter on this field)
sequencer property.
Specify an array of string values to match this event if the actual value of sequencer is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.
size?
Type:
string[]
(optional, default: Do not filter on this field)
size property.
Specify an array of string values to match this event if the actual value of size is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.
versionId?
Type:
string[]
(optional, default: Do not filter on this field)
version-id property.
Specify an array of string values to match this event if the actual value of version-id is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.

.NET
Go
Java
Python
TypeScript