Interface ObjectCreated.ObjectCreatedProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ObjectCreated.ObjectCreatedProps.Jsii$Proxy
Enclosing class:
ObjectCreated

@Stability(Experimental) public static interface ObjectCreated.ObjectCreatedProps extends software.amazon.jsii.JsiiSerializable
(experimental) Props type for aws.s3@ObjectCreated event.

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 myBucket = new Bucket(scope, "Bucket");
 BucketEvents bucketEvents = BucketEvents.fromBucket(myBucket);
 Rule.Builder.create(scope, "Rule")
         .eventPattern(bucketEvents.objectCreatedPattern(ObjectCreatedProps.builder()
                 .object(ObjectType.builder().key(Match.wildcard("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(Match.wildcard("uploads/*")).build())
                 .build()))
         .targets(List.of(TargetProperty.builder().arn(fn.getFunctionArn()).id("L1").build()))
         .build();
 
  • Method Details

    • getBucket

      @Stability(Experimental) @Nullable default ObjectCreated.Bucket 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getEventMetadata

      @Stability(Experimental) @Nullable default AWSEventMetadataProps getEventMetadata()
      (experimental) EventBridge event metadata.

      Default: - -

    • getObject

      @Stability(Experimental) @Nullable default ObjectCreated.ObjectType 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getReason

      @Stability(Experimental) @Nullable default List<String> 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getRequester

      @Stability(Experimental) @Nullable default List<String> 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getRequestId

      @Stability(Experimental) @Nullable default List<String> 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getSourceIpAddress

      @Stability(Experimental) @Nullable default List<String> 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • getVersion

      @Stability(Experimental) @Nullable default List<String> 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.Match for more advanced matching options.

      Default: - Do not filter on this field

    • builder

      @Stability(Experimental) static ObjectCreated.ObjectCreatedProps.Builder builder()
      Returns:
      a ObjectCreated.ObjectCreatedProps.Builder of ObjectCreated.ObjectCreatedProps