Interface BucketEvents.ObjectCreated.ObjectCreatedProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BucketEvents.ObjectCreated.ObjectCreatedProps.Jsii$Proxy
- Enclosing class:
BucketEvents.ObjectCreated
Example:
import software.amazon.awscdk.mixins.preview.services.s3.events.BucketEvents;
import software.amazon.awscdk.services.events.*;
import software.amazon.awscdk.services.events.targets.*;
Function fn;
// Works with L2 constructs
Bucket bucket = new Bucket(scope, "Bucket");
BucketEvents bucketEvents = BucketEvents.fromBucket(bucket);
Rule.Builder.create(scope, "Rule")
.eventPattern(bucketEvents.objectCreatedPattern(ObjectCreatedProps.builder()
.object(ObjectType.builder().key(List.of("uploads/*")).build())
.build()))
.targets(List.of(new LambdaFunction(fn)))
.build();
// Also works with L1 constructs
CfnBucket cfnBucket = new CfnBucket(scope, "CfnBucket");
BucketEvents cfnBucketEvents = BucketEvents.fromBucket(cfnBucket);
CfnRule.Builder.create(scope, "CfnRule")
.state("ENABLED")
.eventPattern(cfnBucketEvents.objectCreatedPattern(ObjectCreatedProps.builder()
.object(ObjectType.builder().key(List.of("uploads/*")).build())
.build()))
.targets(List.of(TargetProperty.builder().arn(fn.getFunctionArn()).id("L1").build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBucketEvents.ObjectCreated.ObjectCreatedPropsstatic final classAn implementation forBucketEvents.ObjectCreated.ObjectCreatedProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()(experimental) bucket property.default AWSEventMetadataProps(experimental) EventBridge event metadata.(experimental) object property.(experimental) reason property.(experimental) requester property.(experimental) request-id property.(experimental) source-ip-address property.(experimental) version property.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBucket
(experimental) bucket property.Specify an array of string values to match this event if the actual value of bucket is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getEventMetadata
(experimental) EventBridge event metadata.Default: - -
-
getObject
(experimental) object property.Specify an array of string values to match this event if the actual value of object is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getReason
(experimental) reason property.Specify an array of string values to match this event if the actual value of reason is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getRequester
(experimental) requester property.Specify an array of string values to match this event if the actual value of requester is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getRequestId
(experimental) request-id property.Specify an array of string values to match this event if the actual value of request-id is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getSourceIpAddress
(experimental) source-ip-address property.Specify an array of string values to match this event if the actual value of source-ip-address is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
getVersion
(experimental) version property.Specify an array of string values to match this event if the actual value of version is one of the values in the array. Use one of the constructors on the
aws_events.Matchfor more advanced matching options.Default: - Do not filter on this field
-
builder
-