Amazon S3 Connector Guide > Amazon S3 Process Objects > Monitor Event Objects
  

Monitor Event Objects

When you use an S3 Monitor event source, each time a new object is added to the bucket, the connection generates an S3MonitorEvent event object similar to the example below.
Note: Remember that S3 objects are deleted from the bucket and, unless you specify a local folder in the event source properties, the local file information is not available.
The event includes all the available S3 object metadata. If metadata is not available, the field is empty:
<S3MonitorEvent>
<!-- local file information, may be empty if local backup copying is not used -->
<localFileInfo>
<lastModified> 2015-06-23T13:04:46.281Z </lastModified>
<dir> D:/s3_test/s3 monitor </dir>
<name> test1 </name>
<path> D:/s3test/s3 monitor/test1.txt </path>
<fullName> test1.txt </fullName>
<ext> txt </ext>
<size> 9 </size>
</localFileInfo>
<!--S3 object information -->
<s3ObjectInfo>
<lastModified> 2015-06-22T14:27:00Z </lastModified>
<contentControl/>
<s3VersionId/>
<s3Key> test1.txt </s3Key>
<contentType> text/plain </contentType>
<contentEncoding> UTF-8 </contentEncoding>
<contentDisposition/>
<contentLength> 9 </contentLength>
<bucketName> dvilaverde </bucketName>
<s3ETag> b3d5cf638ed2f6a94d6b3c628f946196 </s3ETag>
</s3ObjectInfo>
<!-- if Content Format is equal Ignore content of the object will be skipped -->
<!-- or if Content Format is equal PlainText content will be provided as a string field -->
<content>S3 object content string</content>
<!-- or if Content Format is equal Binary content will be provided as a Base64 encoded string field -->
<content>dGVzdCBzdHJpbmc=</content>
<!-- or if Content Format is equal XML or JSON content will be provided as a list of one or more process objects -->
<content>
<lastName>Smith</lastName>
<phone>111122-222</phone>
<firstName>Bob</firstName>
</content>
<content>
<lastName>Smith2</lastName>
<phone>111122-222</phone>
<firstName>Bob2</firstName>
</content>
<!-- or if Content Format is equal Attachment content will be provided as an attachment field -->
<attachment>cid:29cde59c-e85b-41e0-834c-22bbed5a5b9a</attachment>
</S3MonitorEvent>

Using Single Object Mode

When processing an XML document, you can choose whether to create a list of user objects or as a single process object.
For example, note that the following XML contains a list of user objects where the users element is a root element for the list:
<users>
<user>
<firstName>Bob</firstName>
<lastName>Smith</lastName>
<phone>111122-222</phone>
</user>
<user>
<user>
<firstName>Bob2</firstName>
<lastName>Smith2</lastName>
<phone>111122-222</phone>
</user>
</users>
In this case, if you want to convert the whole XML document to a single users process object, where user is an object list field, enable Single Object Mode. If you want to convert the XML to a list of user objects, disable Single Object Mode.