@Override
    public PutEventSelectorsResult putEventSelectors(PutEventSelectorsRequest request) {
        request = beforeClientExecution(request);
        return executePutEventSelectors(request);
    }
@ Override public PutEventSelectorsResult putEventSelectors ( PutEventSelectorsRequest request ) { request = beforeClientExecution ( request ) ; return executePutEventSelectors ( request ) ; }
<p>
Configures an event selector for your trail. Use event selectors to further specify the management and data event
settings for your trail. By default, trails created without specific event selectors will be configured to log
all read and write management events, and no data events.
</p>
<p>
When an event occurs in your account, CloudTrail evaluates the event selectors in all trails. For each trail, if
the event matches any event selector, the trail processes and logs the event. If the event doesn't match any
event selector, the trail doesn't log the event.
</p>
<p>
Example
</p>
<ol>
<li>
<p>
You create an event selector for a trail and specify that you want write-only events.
</p>
</li>
<li>
<p>
The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations occur in your account.
</p>
</li>
<li>
<p>
CloudTrail evaluates whether the events match your event selectors.
</p>
</li>
<li>
<p>
The <code>RunInstances</code> is a write-only event and it matches your event selector. The trail logs the event.
</p>
</li>
<li>
<p>
The <code>GetConsoleOutput</code> is a read-only event but it doesn't match your event selector. The trail
doesn't log the event.
</p>
</li>
</ol>
<p>
The <code>PutEventSelectors</code> operation must be called from the region in which the trail was created;
otherwise, an <code>InvalidHomeRegionException</code> is thrown.
</p>
<p>
You can configure up to five event selectors for each trail. For more information, see <a href=
"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html"
>Logging Data and Management Events for Trails </a> and <a
href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Limits in AWS
CloudTrail</a> in the <i>AWS CloudTrail User Guide</i>.
</p>

@param putEventSelectorsRequest
@return Result of the PutEventSelectors operation returned by the service.
@throws TrailNotFoundException
This exception is thrown when the trail with the given name is not found.
@throws InvalidTrailNameException
This exception is thrown when the provided trail name is not valid. Trail names must meet the following
requirements:</p>
<ul>
<li>
<p>
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
</p>
</li>
<li>
<p>
Start with a letter or number, and end with a letter or number
</p>
</li>
<li>
<p>
Be between 3 and 128 characters
</p>
</li>
<li>
<p>
Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code> and
<code>my--namespace</code> are invalid.
</p>
</li>
<li>
<p>
Not be in IP address format (for example, 192.168.5.4)
</p>
</li>
@throws InvalidHomeRegionException
This exception is thrown when an operation is called on a trail from a region other than the region in
which the trail was created.
@throws InvalidEventSelectorsException
This exception is thrown when the <code>PutEventSelectors</code> operation is called with a number of
event selectors or data resources that is not valid. The combination of event selectors and data
resources is not valid. A trail can have up to 5 event selectors. A trail is limited to 250 data
resources. These data resources can be distributed across event selectors, but the overall total cannot
exceed 250.</p>
<p>
You can:
</p>
<ul>
<li>
<p>
Specify a valid number of event selectors (1 to 5) for a trail.
</p>
</li>
<li>
<p>
Specify a valid number of data resources (1 to 250) for an event selector. The limit of number of
resources on an individual event selector is configurable up to 250. However, this upper limit is allowed
only if the total number of data resources does not exceed 250 across all event selectors for a trail.
</p>
</li>
<li>
<p>
Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code> parameter
with a value of <code>read-only</code> is invalid.
</p>
</li>
@throws UnsupportedOperationException
This exception is thrown when the requested operation is not supported.
@throws OperationNotPermittedException
This exception is thrown when the requested operation is not permitted.
@throws NotOrganizationMasterAccountException
This exception is thrown when the AWS account making the request to create or update an organization
trail is not the master account for an organization in AWS Organizations. For more information, see <a
href=
"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html"
>Prepare For Creating a Trail For Your Organization</a>.
@throws InsufficientDependencyServiceAccessPermissionException
This exception is thrown when the IAM user or role that is used to create the organization trail is
lacking one or more required permissions for creating an organization trail in a required service. For
more information, see <a href=
"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html"
>Prepare For Creating a Trail For Your Organization</a>.
@sample AWSCloudTrail.PutEventSelectors
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors" target="_top">AWS
API Documentation</a>