StructuredPojo
, ToCopyableBuilder<DataResource.Builder,DataResource>
@Generated("software.amazon.awssdk:codegen") public class DataResource extends Object implements StructuredPojo, ToCopyableBuilder<DataResource.Builder,DataResource>
The Amazon S3 objects that you specify in your event selectors for your trail to log data events. Data events are
object-level API operations that access S3 objects, such as GetObject
, DeleteObject
, and
PutObject
. You can specify up to 250 S3 buckets and object prefixes for a trail.
Example
You create an event selector for a trail and specify an S3 bucket and an empty prefix, such as
arn:aws:s3:::bucket-1/
.
You upload an image file to bucket-1
.
The PutObject
API operation occurs on an object in the S3 bucket that you specified in the event
selector. The trail processes and logs the event.
You upload another image file to a different S3 bucket named arn:aws:s3:::bucket-2
.
The event occurs on an object in an S3 bucket that you didn't specify in the event selector. The trail doesn’t log the event.
Modifier and Type | Class | Description |
---|---|---|
static interface |
DataResource.Builder |
Modifier and Type | Method | Description |
---|---|---|
static DataResource.Builder |
builder() |
|
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
void |
marshall(ProtocolMarshaller protocolMarshaller) |
Marshalls this structured data using the given
ProtocolMarshaller . |
static Class<? extends DataResource.Builder> |
serializableBuilderClass() |
|
DataResource.Builder |
toBuilder() |
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
|
String |
type() |
The resource type in which you want to log data events.
|
List<String> |
values() |
A list of ARN-like strings for the specified S3 objects.
|
public String type()
The resource type in which you want to log data events. You can specify only the following value:
AWS::S3::Object
.
AWS::S3::Object
.public List<String> values()
A list of ARN-like strings for the specified S3 objects.
To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as
arn:aws:s3:::bucket-1/
. The trail logs data events for all objects in this S3 bucket.
To log data events for specific objects, specify the S3 bucket and object prefix such as
arn:aws:s3:::bucket-1/example-images
. The trail logs data events for objects in this S3 bucket that
match the prefix.
To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as
arn:aws:s3:::bucket-1/
. The trail logs data events for all objects in this S3 bucket.
To log data events for specific objects, specify the S3 bucket and object prefix such as
arn:aws:s3:::bucket-1/example-images
. The trail logs data events for objects in this S3
bucket that match the prefix.
public DataResource.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<DataResource.Builder,DataResource>
public static DataResource.Builder builder()
public static Class<? extends DataResource.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.