Skip to content

S3EventNotificationRecord to have an S3Event enum as well as eventName #2080

@juanitosvq

Description

@juanitosvq

The class S3EventNotificationRecord contains a property called eventName of the type String. In my application, I need to have different logic depending on the type of event. I am going to have to hard code the different values this event can have, but I could use the enum in S3Event for this. Something like the following:

public static class S3EventNotificationRecord {

        private final String awsRegion;
        private final String eventName;
        private final S3Event eventType;

Another solution would be to have a fromString method in the S3Event, so at least I could convert the incoming value in the record into the enum. However, the incoming values don't match exactly the values in the enum: ObjectRestore:Completed vs s3:ObjectRestore:Completed so the first solution would be preferred. This would be something like:

S3Event s3Event = S3Event.fromString("s3:ObjectRestore:Completed");

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.help wantedWe are asking the community to submit a PR to resolve this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions