Class S3EventNotificationRecord
- java.lang.Object
-
- software.amazon.awssdk.eventnotifications.s3.model.S3EventNotificationRecord
-
public class S3EventNotificationRecord extends Object
A record representing a notification for a single event. The Event message structure page of S3 user guide contains additional information about the different fields of the notification record.
-
-
Constructor Summary
Constructors Constructor Description S3EventNotificationRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAwsRegion()
String
getEventName()
The name of the event type for this notification.String
getEventSource()
The service from which this event was generated, usually"aws:s3"
.Instant
getEventTime()
String
getEventVersion()
The eventVersion key value contains a major and minor version in the form<major>.<minor>
.GlacierEventData
getGlacierEventData()
The GlacierEventData is only visible for s3:ObjectRestore:Completed events.IntelligentTieringEventData
getIntelligentTieringEventData()
The IntelligentTieringEventData key is only visible for S3 Intelligent-Tiering related events.LifecycleEventData
getLifecycleEventData()
The LifecycleEventData is only visible for S3 Lifecycle transition related events.ReplicationEventData
getReplicationEventData()
The ReplicationEventData is only visible for replication related events.RequestParameters
getRequestParameters()
Request Parameters contains thesourceIPAddress
field, which is the ip address where request came from.ResponseElements
getResponseElements()
The responseElements key value is useful if you want to trace a request by following up with AWS Support.S3
getS3()
Contains information about the bucket and object involved in the event.UserIdentity
getUserIdentity()
The user identity contains theprincipalId
field, which has the Amazon customer ID of the user who caused the event.int
hashCode()
void
setAwsRegion(String awsRegion)
void
setEventName(String eventName)
void
setEventSource(String eventSource)
void
setEventTime(Instant eventTime)
void
setEventVersion(String eventVersion)
void
setGlacierEventData(GlacierEventData glacierEventData)
void
setIntelligentTieringEventData(IntelligentTieringEventData intelligentTieringEventData)
void
setLifecycleEventData(LifecycleEventData lifecycleEventData)
void
setReplicationEventData(ReplicationEventData replicationEventData)
void
setRequestParameters(RequestParameters requestParameters)
void
setResponseElements(ResponseElements responseElements)
void
setS3(S3 s3)
void
setUserIdentity(UserIdentity userIdentity)
String
toString()
-
-
-
Method Detail
-
getAwsRegion
public String getAwsRegion()
-
getEventName
public String getEventName()
The name of the event type for this notification. For more information about the various event type, visit the Event notification types and destinations page of S3 user guide. It references the list of event notification types but doesn't contain the s3: prefix.- Returns:
- the event name.
-
getEventSource
public String getEventSource()
The service from which this event was generated, usually"aws:s3"
.- Returns:
- the event source.
-
getEventTime
public Instant getEventTime()
- Returns:
- The time, in ISO-8601 format, for example, 1970-01-01T00:00:00.000Z, when Amazon S3 finished processing the request.
-
getEventVersion
public String getEventVersion()
The eventVersion key value contains a major and minor version in the form<major>.<minor>
.- Returns:
- the event version.
-
getRequestParameters
public RequestParameters getRequestParameters()
Request Parameters contains thesourceIPAddress
field, which is the ip address where request came from.- Returns:
- the request parameter containing the source IP address.
-
getResponseElements
public ResponseElements getResponseElements()
The responseElements key value is useful if you want to trace a request by following up with AWS Support. Both x-amz-request-id and x-amz-id-2 help Amazon S3 trace an individual request. These values are the same as those that Amazon S3 returns in the response to the request that initiates the events. This is so they can be used to match the event to the request.- Returns:
- The response element containing the trace information.
-
getS3
public S3 getS3()
Contains information about the bucket and object involved in the event. The object key name value is URL encoded. For example, "red flower.jpg" becomes "red+flower.jpg" (Amazon S3 returns "application/x-www-form-urlencoded" as the content type in the response).- Returns:
- the instance of
S3
containing object information.
-
getUserIdentity
public UserIdentity getUserIdentity()
The user identity contains theprincipalId
field, which has the Amazon customer ID of the user who caused the event.- Returns:
- the user identity containing the
principalId
.
-
getGlacierEventData
public GlacierEventData getGlacierEventData()
The GlacierEventData is only visible for s3:ObjectRestore:Completed events. Contains information related to restoring an archived object. For more information about archive and storage classes, see Restoring an archived object- Returns:
- the glacier event data.
-
getLifecycleEventData
public LifecycleEventData getLifecycleEventData()
The LifecycleEventData is only visible for S3 Lifecycle transition related events.- Returns:
- the lifecycle event data.
-
getIntelligentTieringEventData
public IntelligentTieringEventData getIntelligentTieringEventData()
The IntelligentTieringEventData key is only visible for S3 Intelligent-Tiering related events.- Returns:
- the intelligent tiering event data.
-
getReplicationEventData
public ReplicationEventData getReplicationEventData()
The ReplicationEventData is only visible for replication related events.- Returns:
-
setAwsRegion
public void setAwsRegion(String awsRegion)
-
setEventName
public void setEventName(String eventName)
-
setEventSource
public void setEventSource(String eventSource)
-
setEventVersion
public void setEventVersion(String eventVersion)
-
setRequestParameters
public void setRequestParameters(RequestParameters requestParameters)
-
setResponseElements
public void setResponseElements(ResponseElements responseElements)
-
setS3
public void setS3(S3 s3)
-
setUserIdentity
public void setUserIdentity(UserIdentity userIdentity)
-
setGlacierEventData
public void setGlacierEventData(GlacierEventData glacierEventData)
-
setLifecycleEventData
public void setLifecycleEventData(LifecycleEventData lifecycleEventData)
-
setIntelligentTieringEventData
public void setIntelligentTieringEventData(IntelligentTieringEventData intelligentTieringEventData)
-
setReplicationEventData
public void setReplicationEventData(ReplicationEventData replicationEventData)
-
setEventTime
public void setEventTime(Instant eventTime)
-
-